messagingfw/msgtestfw/TestCases/ScriptedTestCases/Capabilities/cap_emsvchildrenofavailabledrives.script
changeset 62 db3f5fa34ec7
parent 0 8e480a14352b
equal deleted inserted replaced
60:9f5ae1728557 62:db3f5fa34ec7
       
     1 //
       
     2 // Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 // All rights reserved.
       
     4 // This component and the accompanying materials are made available
       
     5 // under the terms of "Eclipse Public License v1.0"
       
     6 // which accompanies this distribution, and is available
       
     7 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 //
       
     9 // Initial Contributors:
       
    10 // Nokia Corporation - initial contribution.
       
    11 //
       
    12 // Contributors:
       
    13 //
       
    14 // Description:
       
    15 //
       
    16 
       
    17 PRINT Running  EMsvChildrenOfAvailableDrives
       
    18 
       
    19 LOAD_SERVER t_media  -SharedData
       
    20 START_TEST_BLOCK	100	t_media		c:\msgtest\testframework\scriptedtestcases\capabilities\cap_emsvchildrenofavailabledrives.ini
       
    21 	CREATE_OBJECT	CenRepTestWrapper	0100_obj
       
    22 	COMMAND		0100_obj		ResetCentralRepository	0100_ResetCentralRepository
       
    23 END_TEST_BLOCK
       
    24 
       
    25 
       
    26 RUN_UTILS  CopyFile   		c:\private\1000484b\msgprioritydrivelist.ini	c:\private\1000484b\msgprioritydrivelist.bak
       
    27 RUN_UTILS  MakeReadWrite  	c:\private\1000484b\msgprioritydrivelist.ini
       
    28 RUN_UTILS  CopyFile   		c:\msgtest\media\msg-adddrive-cap.ini		c:\private\1000484b\msgprioritydrivelist.ini
       
    29 
       
    30 //******************************************
       
    31 // We need ReadData capability to get all entries. The SID determines which entries we can access 
       
    32 // when we do not have proper caps. We should be able to access all entries in this test
       
    33 //******************************************
       
    34 
       
    35 PRINT Running  EMsvChildrenOfAvailableDrives : Read Caps = 0. Same SID. Should Pass.
       
    36 
       
    37 RUN_SCRIPT  c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_Setup.script
       
    38 
       
    39 RUN_PROGRAM -1 setcap c:\sys\bin\MessagingTestServer_caps.exe 0003fffe -SID 101F7776 C:\sys\bin\MessagingTestServer.exe
       
    40 
       
    41 RUN_PROGRAM -1 setcap c:\sys\bin\SendProxyServer_caps.exe 00000000 -SID 101F7776 C:\sys\bin\SendProxyServer.exe
       
    42 	
       
    43 RUN_SCRIPT  c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_CleanMessageStore.script
       
    44 
       
    45 RUN_SCRIPT  c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_CreateMultipleEntryInbox.script
       
    46 
       
    47 RUN_SCRIPT  c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_SendEMsvChildrenOfAvailableDrives_Pass.script
       
    48 
       
    49 // Need delay to allow SendProxyServer shutting down
       
    50 DELAY 3000
       
    51 RUN_SCRIPT  c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_Restore.script
       
    52 
       
    53 
       
    54 //******************************************
       
    55 // We need ReadData capability to get all entries. The SID determines which entries we can access 
       
    56 // when we do not have proper caps. We should be able to access all entries in this test.
       
    57 //******************************************
       
    58 
       
    59 PRINT Running  EMsvChildrenOfAvailableDrives : Read Caps = ReadUserData. Different SID. Should Pass.
       
    60 
       
    61 RUN_SCRIPT  c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_Setup.script
       
    62 
       
    63 RUN_PROGRAM -1 setcap c:\sys\bin\MessagingTestServer_caps.exe 0003fffe -SID 101F7776 C:\sys\bin\MessagingTestServer.exe
       
    64 
       
    65 RUN_PROGRAM -1 setcap c:\sys\bin\SendProxyServer_caps.exe 00008000 -SID 101F7777 C:\sys\bin\SendProxyServer.exe
       
    66 	
       
    67 RUN_SCRIPT  c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_CleanMessageStore.script
       
    68 
       
    69 RUN_SCRIPT  c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_CreateMultipleEntryInbox.script
       
    70 
       
    71 RUN_SCRIPT  c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_SendEMsvChildrenOfAvailableDrives_Pass.script
       
    72 
       
    73 // Need delay to allow SendProxyServer shutting down
       
    74 DELAY 3000
       
    75 RUN_SCRIPT  c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_Restore.script
       
    76 
       
    77 
       
    78 
       
    79 //******************************************
       
    80 // We need ReadData capability to get all entries. The SID determines which entries we can access 
       
    81 // when we do not have proper caps. We should only be able to access the ones we own in this test.
       
    82 //******************************************
       
    83 
       
    84 PRINT Running  EMsvChildrenOfAvailableDrives :  Read Caps = 0. Same SID as half the messages. Should Pass for these.
       
    85 
       
    86 RUN_SCRIPT  c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_Setup.script
       
    87 
       
    88 RUN_PROGRAM -1 setcap c:\sys\bin\MessagingTestServer_caps.exe 0003fffe -SID 101F7776 C:\sys\bin\MessagingTestServer.exe
       
    89 
       
    90 RUN_PROGRAM -1 setcap c:\sys\bin\SendProxyServer_caps.exe 00000000 -SID 101F7777 C:\sys\bin\SendProxyServer.exe
       
    91 	
       
    92 RUN_SCRIPT  c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_CleanMessageStore.script
       
    93 
       
    94 // Create messages owned by 101F7776
       
    95 RUN_SCRIPT  c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_CreateMultipleEntryInbox.script
       
    96 
       
    97 // Wait for test server to die
       
    98 DELAY 5000
       
    99 
       
   100 
       
   101 RUN_PROGRAM -1 setcap c:\sys\bin\MessagingTestServer_caps.exe 0003fffe -SID 101F7777 C:\sys\bin\MessagingTestServer.exe
       
   102 
       
   103 // Create messages owned by 101F7777
       
   104 RUN_SCRIPT  c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_CreateMultipleEntryInbox.script
       
   105 
       
   106 // should only get the messages we own
       
   107 RUN_SCRIPT  c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_SendEMsvChildrenOfAvailableDrives_Pass.script
       
   108 
       
   109 
       
   110 // Wait for test server to die
       
   111 DELAY 5000
       
   112 RUN_SCRIPT  c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_Restore.script
       
   113 
       
   114 
       
   115 RUN_UTILS  MakeReadWrite  	c:\private\1000484b\msgprioritydrivelist.ini
       
   116 RUN_UTILS  CopyFile   		c:\private\1000484b\msgprioritydrivelist.bak	c:\private\1000484b\msgprioritydrivelist.ini
       
   117 RUN_UTILS  DeleteFile		c:\private\1000484b\msgprioritydrivelist.bak
       
   118 
       
   119