// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
// which accompanies this distribution, and is available
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
//
// Initial Contributors:
// Nokia Corporation - initial contribution.
//
// Contributors:
//
// Description:
//

//! @File
//! @SYMTestSuiteName         nileprivfw.script
//! @SYMScriptTestEnvironment Testexecute

LOAD_SUITE s60PrivFwTestServer

PRINT Run s60PrivFwTestServer
PRINT

RUN_TEST_STEP 010 s60PrivFwTestServer LbsStep_ResetDefaultAdmin

RUN_TEST_STEP 030 s60PrivFwTestServer LbsStep_SetPrivacyHandler c:\testdata\configs\nileprivfw.ini LBS-PRIVFW-NILE-QNN

RUN_TEST_STEP 030 s60PrivFwTestServer LbsStep_SetupStandalonePrivacyMode



START_TESTCASE                LBS-PRIVFW-NILE-0001
//! @SYMTestCaseID              LBS-PRIVFW-NILE-0001
//! @SYMTestCaseDesc            Not available
//! @SYMTestPriority            Medium
//! @SYMTestActions             Not available
//! @SYMTestExpectedResults     Not available
//! @SYMTestType                CIT
//! @SYMCreationDate            17/3/2008
//! @SYMAuthor                  alans
RUN_TEST_STEP 060 s60PrivFwTestServer LbsPrivFwStep c:\testdata\configs\nileprivfw.ini LBS-PRIVFW-NILE-0001
END_TESTCASE LBS-PRIVFW-NILE-0001


START_TESTCASE                LBS-PRIVFW-NILE-0002
//! @SYMTestCaseID              LBS-PRIVFW-NILE-0002
//! @SYMTestCaseDesc            Cancel the 2nd of 3 verifications
//!				
//! @SYMTestPriority            Medium
//! @SYMTestActions             Create an instance of network privacy class. 
//!				Set the privacy notifier wait period to 3 seconds.
//!				Perform three GSM privacy verification requests. 
//!				Issue cancel(timeout) to the second verification request. 
//!				Wait until the third request notification dismisses and check number of verification and notification requests. 
//! @SYMTestExpectedResults     Two verification (accept) requests and one notification (accepted) for the cancelled verification request.
//! @SYMTestType                CIT
//! @SYMCreationDate            17/3/2008
//! @SYMAuthor                  alans
RUN_TEST_STEP 060 s60PrivFwTestServer LbsPrivFwStep c:\testdata\configs\nileprivfw.ini LBS-PRIVFW-NILE-0002
END_TESTCASE LBS-PRIVFW-NILE-0002


START_TESTCASE                LBS-PRIVFW-NILE-0003
//! @SYMTestCaseID              LBS-PRIVFW-NILE-0003
//! @SYMTestCaseDesc            GSM Verification Timeout Before Request Completed
//! @SYMTestPriority            Medium
//! @SYMTestActions             Create an instance of network privacy class.
//!				Perform basic GSM privacy verification request. 
//!				Set the privacy notifier wait period to three second and issue cancel (timeout) at half a second. 
//!				It is assumed, that the request has been conveyed to the privacy notifier in that time. 
//!				Check the exit reason from the notifier plugin.
//! @SYMTestExpectedResults     Test notifier reports One verification (cancelled) followed by a notification (that the verification was accepted on timeout)
//! @SYMTestType                CIT
//! @SYMCreationDate            17/3/2008
//! @SYMAuthor                  alans
RUN_TEST_STEP 060 s60PrivFwTestServer LbsPrivFwStep c:\testdata\configs\nileprivfw.ini LBS-PRIVFW-NILE-0003
END_TESTCASE LBS-PRIVFW-NILE-0003


START_TESTCASE                LBS-PRIVFW-NILE-0004
//! @SYMTestCaseID              LBS-PRIVFW-NILE-0004
//! @SYMTestCaseDesc            Not available
//! @SYMTestPriority            Medium
//! @SYMTestActions             Not available
//! @SYMTestExpectedResults     Not available
//! @SYMTestType                CIT
//! @SYMCreationDate            17/3/2008
//! @SYMAuthor                  alans
RUN_TEST_STEP 060 s60PrivFwTestServer LbsPrivFwStep c:\testdata\configs\nileprivfw.ini LBS-PRIVFW-NILE-0004
END_TESTCASE LBS-PRIVFW-NILE-0004


START_TESTCASE                LBS-PRIVFW-NILE-0005
//! @SYMTestCaseID              LBS-PRIVFW-NILE-0005
//! @SYMTestCaseDesc            Not available
//! @SYMTestPriority            Medium
//! @SYMTestActions             Not available
//! @SYMTestExpectedResults     Not available
//! @SYMTestType                CIT
//! @SYMCreationDate            17/3/2008
//! @SYMAuthor                  alans
RUN_TEST_STEP 060 s60PrivFwTestServer LbsPrivFwStep c:\testdata\configs\nileprivfw.ini LBS-PRIVFW-NILE-0005
END_TESTCASE LBS-PRIVFW-NILE-0005


//START_TESTCASE LBS-PRIVFW-NILE-0006
//! @SYMTestCaseID              LBS-PRIVFW-NILE-0006
//! @SYMTestCaseDesc            Not available
//! @SYMTestPriority            Medium
//! @SYMTestActions             Not available
//! @SYMTestExpectedResults     Not available
//! @SYMTestType                CIT
//! @SYMCreationDate            17/3/2008
//! @SYMAuthor                  alans
//RUN_TEST_STEP 060 s60PrivFwTestServer LbsPrivFwStep c:\testdata\configs\nileprivfw.ini LBS-PRIVFW-NILE-0006
//END_TESTCASE LBS-PRIVFW-NILE-0006


//START_TESTCASE LBS-PRIVFW-NILE-0007
//! @SYMTestCaseID              LBS-PRIVFW-NILE-0007
//! @SYMTestCaseDesc            Not available
//! @SYMTestPriority            Medium
//! @SYMTestActions             Not available
//! @SYMTestExpectedResults     Not available
//! @SYMTestType                CIT
//! @SYMCreationDate            17/3/2008
//! @SYMAuthor                  alans
//RUN_TEST_STEP 060 s60PrivFwTestServer LbsPrivFwStep c:\testdata\configs\nileprivfw.ini LBS-PRIVFW-NILE-0007
//END_TESTCASE LBS-PRIVFW-NILE-0007


//START_TESTCASE LBS-PRIVFW-NILE-0008
//! @SYMTestCaseID              LBS-PRIVFW-NILE-0008
//! @SYMTestCaseDesc            Not available
//! @SYMTestPriority            Medium
//! @SYMTestActions             Not available
//! @SYMTestExpectedResults     Not available
//! @SYMTestType                CIT
//! @SYMCreationDate            17/3/2008
//! @SYMAuthor                  alans
//RUN_TEST_STEP 060 s60PrivFwTestServer LbsPrivFwStep c:\testdata\configs\nileprivfw.ini LBS-PRIVFW-NILE-0008
//END_TESTCASE LBS-PRIVFW-NILE-0008


START_TESTCASE                LBS-PRIVFW-NILE-0009
//! @SYMTestCaseID              LBS-PRIVFW-NILE-0009
//! @SYMTestCaseDesc            Not available
//! @SYMTestPriority            Medium
//! @SYMTestActions             Not available
//! @SYMTestExpectedResults     Not available
//! @SYMTestType                CIT
//! @SYMCreationDate            17/3/2008
//! @SYMAuthor                  alans
RUN_TEST_STEP 120 s60PrivFwTestServer LbsPrivFwStep c:\testdata\configs\nileprivfw.ini LBS-PRIVFW-NILE-0009
END_TESTCASE LBS-PRIVFW-NILE-0009


START_TESTCASE                LBS-PRIVFW-NILE-0010
//! @SYMTestCaseID              LBS-PRIVFW-NILE-0010
//! @SYMTestCaseDesc            Not available
//! @SYMTestPriority            Medium
//! @SYMTestActions             Not available
//! @SYMTestExpectedResults     Not available
//! @SYMTestType                CIT
//! @SYMCreationDate            17/3/2008
//! @SYMAuthor                  alans
RUN_TEST_STEP 120 s60PrivFwTestServer LbsPrivFwStep c:\testdata\configs\nileprivfw.ini LBS-PRIVFW-NILE-0010
END_TESTCASE LBS-PRIVFW-NILE-0010


START_TESTCASE                LBS-PRIVFW-NILE-0011
//! @SYMTestCaseID              LBS-PRIVFW-NILE-0011
//! @SYMTestCaseDesc            Not available
//! @SYMTestPriority            Medium
//! @SYMTestActions             Not available
//! @SYMTestExpectedResults     Not available
//! @SYMTestType                CIT
//! @SYMCreationDate            17/3/2008
//! @SYMAuthor                  alans
RUN_TEST_STEP 300 s60PrivFwTestServer LbsPrivFwStep c:\testdata\configs\nileprivfw.ini LBS-PRIVFW-NILE-0011
END_TESTCASE LBS-PRIVFW-NILE-0011


START_TESTCASE                LBS-PRIVFW-NILE-0012
//! @SYMTestCaseID              LBS-PRIVFW-NILE-0012
//! @SYMTestCaseDesc            Not available
//! @SYMTestPriority            Medium
//! @SYMTestActions             Not available
//! @SYMTestExpectedResults     Not available
//! @SYMTestType                CIT
//! @SYMCreationDate            17/3/2008
//! @SYMAuthor                  alans
RUN_TEST_STEP 060 s60PrivFwTestServer LbsPrivFwStep c:\testdata\configs\nileprivfw.ini LBS-PRIVFW-NILE-0012
END_TESTCASE LBS-PRIVFW-NILE-0012


START_TESTCASE                LBS-PRIVFW-NILE-0013
//! @SYMTestCaseID              LBS-PRIVFW-NILE-0013
//! @SYMTestCaseDesc            Not available
//! @SYMTestPriority            Medium
//! @SYMTestActions             Not available
//! @SYMTestExpectedResults     Not available
//! @SYMTestType                CIT
//! @SYMCreationDate            17/3/2008
//! @SYMAuthor                  alans
RUN_TEST_STEP 060 s60PrivFwTestServer LbsPrivFwStep c:\testdata\configs\nileprivfw.ini LBS-PRIVFW-NILE-0013
END_TESTCASE LBS-PRIVFW-NILE-0013


//START_TESTCASE LBS-PRIVFW-NILE-0014
//! @SYMTestCaseID              LBS-PRIVFW-NILE-0014
//! @SYMTestCaseDesc            Not available
//! @SYMTestPriority            Medium
//! @SYMTestActions             Not available
//! @SYMTestExpectedResults     Not available
//! @SYMTestType                CIT
//! @SYMCreationDate            17/3/2008
//! @SYMAuthor                  alans
//RUN_TEST_STEP 060 s60PrivFwTestServer LbsPrivFwStep c:\testdata\configs\nileprivfw.ini LBS-PRIVFW-NILE-0014
//END_TESTCASE LBS-PRIVFW-NILE-0014


//START_TESTCASE LBS-PRIVFW-NILE-0015
//! @SYMTestCaseID              LBS-PRIVFW-NILE-0015
//! @SYMTestCaseDesc            Not available
//! @SYMTestPriority            Medium
//! @SYMTestActions             Not available
//! @SYMTestExpectedResults     Not available
//! @SYMTestType                CIT
//! @SYMCreationDate            17/3/2008
//! @SYMAuthor                  alans
//RUN_TEST_STEP 060 s60PrivFwTestServer LbsPrivFwStep c:\testdata\configs\nileprivfw.ini LBS-PRIVFW-NILE-0015
//END_TESTCASE LBS-PRIVFW-NILE-0015


START_TESTCASE                LBS-PRIVFW-NILE-0017
//! @SYMTestCaseID              LBS-PRIVFW-NILE-0017
//! @SYMTestCaseDesc            Not available
//! @SYMTestPriority            Medium
//! @SYMTestActions             Not available
//! @SYMTestExpectedResults     Not available
//! @SYMTestType                CIT
//! @SYMCreationDate            17/3/2008
//! @SYMAuthor                  alans
RUN_TEST_STEP 060 s60PrivFwTestServer LbsPrivFwStep c:\testdata\configs\nileprivfw.ini LBS-PRIVFW-NILE-0017
END_TESTCASE LBS-PRIVFW-NILE-0017

//
// Note: This test is meant to test that processes WITHOUT CommDD plat sec capability
//       fail if they try to use the Network Privacy API. However, we can't do this test
//       here because we can't change the platsec capabilities of the test .exe at runtime.
//       So, comment out this test instead
//
//START_TESTCASE LBS-PRIVFW-NILE-0018
//! @SYMTestCaseID              LBS-PRIVFW-NILE-0018
//! @SYMTestCaseDesc            Not available
//! @SYMTestPriority            Medium
//! @SYMTestActions             Not available
//! @SYMTestExpectedResults     Not available
//! @SYMTestType                CIT
//! @SYMCreationDate            17/3/2008
//! @SYMAuthor                  alans
//RUN_TEST_STEP 060 s60PrivFwTestServer LbsPrivFwStep c:\testdata\configs\nileprivfw.ini LBS-PRIVFW-NILE-0018
//END_TESTCASE LBS-PRIVFW-NILE-0018

//
// Note: This test is testing that a verification is rejected if the notifier plugin is missing.
//       We can't test this though, because you can't add or remove RNotifer plugins once the system
//       is running.
//       So, comment out this test instead.
//
//START_TESTCASE LBS-PRIVFW-NILE-0020
//! @SYMTestCaseID              LBS-PRIVFW-NILE-0020
//! @SYMTestCaseDesc            Not available
//! @SYMTestPriority            Medium
//! @SYMTestActions             Not available
//! @SYMTestExpectedResults     Not available
//! @SYMTestType                CIT
//! @SYMCreationDate            17/3/2008
//! @SYMAuthor                  alans
//RUN_TEST_STEP 060 s60PrivFwTestServer LbsPrivFwStep c:\testdata\configs\nileprivfw.ini LBS-PRIVFW-NILE-0020
//END_TESTCASE LBS-PRIVFW-NILE-0020


//START_TESTCASE LBS-PRIVFW-NILE-0021
//! @SYMTestCaseID              LBS-PRIVFW-NILE-0021
//! @SYMTestCaseDesc            Not available
//! @SYMTestPriority            Medium
//! @SYMTestActions             Not available
//! @SYMTestExpectedResults     Not available
//! @SYMTestType                CIT
//! @SYMCreationDate            17/3/2008
//! @SYMAuthor                  alans
//RUN_TEST_STEP 060 s60PrivFwTestServer LbsPrivFwStep c:\testdata\configs\nileprivfw.ini LBS-PRIVFW-NILE-0021
//END_TESTCASE LBS-PRIVFW-NILE-0021

//
// This test step is a stress-test. It basically repeats LBS-PRIVFW-NILE-0011
// for 2.5 hours, with a 5 second delay inbetween each run.
//


START_TESTCASE                LBS-PRIVFW-NILE-0022
//! @SYMTestCaseID              LBS-PRIVFW-NILE-0022
//! @SYMTestCaseDesc            Not available
//! @SYMTestPriority            Medium
//! @SYMTestActions             Not available
//! @SYMTestExpectedResults     Not available
//! @SYMTestType                CIT
//! @SYMCreationDate            17/3/2008
//! @SYMAuthor                  alans
RUN_TEST_STEP 10000 s60PrivFwTestServer LbsPrivFwStep c:\testdata\configs\nileprivfw.ini LBS-PRIVFW-NILE-0022
END_TESTCASE LBS-PRIVFW-NILE-0022


START_TESTCASE                LBS-PRIVFW-NILE-0023
//! @SYMTestCaseID              LBS-PRIVFW-NILE-0023
//! @SYMTestCaseDesc            Not available
//! @SYMTestPriority            Medium
//! @SYMTestActions             Not available
//! @SYMTestExpectedResults     Not available
//! @SYMTestType                CIT
//! @SYMCreationDate            17/3/2008
//! @SYMAuthor                  alans
RUN_TEST_STEP 060 s60PrivFwTestServer LbsPrivFwStep c:\testdata\configs\nileprivfw.ini LBS-PRIVFW-NILE-0023
END_TESTCASE LBS-PRIVFW-NILE-0023


START_TESTCASE                LBS-PRIVFW-NILE-0024
//! @SYMTestCaseID              LBS-PRIVFW-NILE-0024
//! @SYMTestCaseDesc            SUPL Verification Timeout 
//! @SYMTestPriority            Medium
//! @SYMTestActions             Create an instance of network privacy class and perform basic SUPL privacy verification request. 
//!				Set the privacy UI to refrain from answering to the request in 3 seconds. 
//!				Issue a cancel to the request.
//! @SYMTestExpectedResults     Test notifier reports One verification (cancelled) followed by a notification (that the verification was accepted on timeout)
//! @SYMTestType                CIT
//! @SYMCreationDate            17/3/2008
//! @SYMAuthor                  alans
RUN_TEST_STEP 060 s60PrivFwTestServer LbsPrivFwStep c:\testdata\configs\nileprivfw.ini LBS-PRIVFW-NILE-0024
END_TESTCASE LBS-PRIVFW-NILE-0024


START_TESTCASE                LBS-PRIVFW-NILE-0025
//! @SYMTestCaseID              LBS-PRIVFW-NILE-0025
//! @SYMTestCaseDesc            2 notifications one after the other (one accepted, one rejected)
//! @SYMTestPriority            Medium
//! @SYMTestActions             Not available
//! @SYMTestExpectedResults     Not available
//! @SYMTestType                CIT
//! @SYMCreationDate            17/3/2008
//! @SYMAuthor                  alans
RUN_TEST_STEP 060 s60PrivFwTestServer LbsPrivFwStep c:\testdata\configs\nileprivfw.ini LBS-PRIVFW-NILE-0025
END_TESTCASE LBS-PRIVFW-NILE-0025

// delay to avoid subsequent problems caused if above test (25) fails
// DELAY 2000

START_TESTCASE                LBS-PRIVFW-NILE-0026
//! @SYMTestCaseID              LBS-PRIVFW-NILE-0026
//! @SYMTestCaseDesc            Verification arrives while a notification is displayed
//! @SYMTestPriority            Medium
//! @SYMTestActions             Send a notification request
//!				while the notification is displayed by the UI, send a verification (configure 'UI' to accept both on timer)
//!				wait for all requests to be dealt with by the UI
//! @SYMTestExpectedResults     'UI' sees a notification which is then cancelled, followed by a verification and then the notification again
//! @SYMTestType                CIT
//! @SYMCreationDate            17/06/2009
//! @SYMAuthor                  lrm
RUN_TEST_STEP 060 s60PrivFwTestServer LbsPrivFwStep c:\testdata\configs\nileprivfw.ini LBS-PRIVFW-NILE-0026
END_TESTCASE LBS-PRIVFW-NILE-0026

START_TESTCASE                LBS-PRIVFW-NILE-0027
//! @SYMTestCaseID              LBS-PRIVFW-NILE-0027
//! @SYMTestCaseDesc            Verification arrives while a notification is displayed and other notifications are pending
//! @SYMTestPriority            Medium
//! @SYMTestActions             Send several notification requests. 
//!				While first is being displayed, send a verification (configure 'UI' to accept both on timer). 
//!				Wait for all requests to be dealt with by the UI
//! @SYMTestExpectedResults     The 'UI' sees a notification which is then cancelled, followed by a verification and then the first notification again followed by the other notifications
//! @SYMTestType                CIT
//! @SYMCreationDate            17/06/2009
//! @SYMAuthor                  lrm
RUN_TEST_STEP 060 s60PrivFwTestServer LbsPrivFwStep c:\testdata\configs\nileprivfw.ini LBS-PRIVFW-NILE-0027
END_TESTCASE LBS-PRIVFW-NILE-0027

START_TESTCASE                LBS-PRIVFW-NILE-0028
//! @SYMTestCaseID              LBS-PRIVFW-NILE-0028
//! @SYMTestCaseDesc            Verification arrives while a notification is displayed. While verification is displayed it timesout at the network and is accepted
//! @SYMTestPriority            Medium
//! @SYMTestActions             Send a notification request
//!				While notification is being displayed, send a verification (with timeout strategy 'accept'). 
//!				Cancel the Verification with reason timeout
//!				Wait for all requests to be dealt with by the UI
//! @SYMTestExpectedResults     The 'UI' sees a notification which is then cancelled, followed by a verification. Verification is cancelled and a notification that it was accepted is sent to the UI, then the first notification (which was deferred) is sent to the UI again
//! @SYMTestType                CIT
//! @SYMCreationDate            17/06/2009
//! @SYMAuthor                  lrm
RUN_TEST_STEP 060 s60PrivFwTestServer LbsPrivFwStep c:\testdata\configs\nileprivfw.ini LBS-PRIVFW-NILE-0028
END_TESTCASE LBS-PRIVFW-NILE-0028

START_TESTCASE                LBS-PRIVFW-NILE-0029
//! @SYMTestCaseID              LBS-PRIVFW-NILE-0029
//! @SYMTestCaseDesc            Verification arrives while a notification is displayed. While verification is displayed it timesout at the network and is rejected
//! @SYMTestPriority            Medium
//! @SYMTestActions             Send a notification request
//!				While notification is being displayed, send a verification (with timeout strategy 'reject'). 
//!				Cancel the Verification with reason timeout
//!				Wait for all requests to be dealt with by the UI
//! @SYMTestExpectedResults     The 'UI' sees a notification which is then cancelled, followed by a verification. Verification is cancelled and then the first notification (which was deferred) is sent to the UI again (nb: no notification for the verification that's rejected on timeout)
//! @SYMTestType                CIT
//! @SYMCreationDate            17/06/2009
//! @SYMAuthor                  lrm
RUN_TEST_STEP 060 s60PrivFwTestServer LbsPrivFwStep c:\testdata\configs\nileprivfw.ini LBS-PRIVFW-NILE-0029
END_TESTCASE LBS-PRIVFW-NILE-0029

