messagingfw/msgtestfw/TestCases/ScriptedTestCases/Capabilities/cap_emsvgetchildidsall.script
changeset 0 8e480a14352b
equal deleted inserted replaced
-1:000000000000 0:8e480a14352b
       
     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  EMsvGetChildIdsAll
       
    18 
       
    19 
       
    20 LOAD_SERVER t_media  -SharedData
       
    21 START_TEST_BLOCK	100	t_media		c:\msgtest\testframework\scriptedtestcases\capabilities\cap_emsvgetchildidsall.ini
       
    22 	CREATE_OBJECT	CenRepTestWrapper	0100_obj
       
    23 	COMMAND		0100_obj		ResetCentralRepository	0100_ResetCentralRepository
       
    24 END_TEST_BLOCK
       
    25 
       
    26 
       
    27 RUN_UTILS  CopyFile   		c:\private\1000484b\msgprioritydrivelist.ini	c:\private\1000484b\msgprioritydrivelist.bak
       
    28 RUN_UTILS  MakeReadWrite  	c:\private\1000484b\msgprioritydrivelist.ini
       
    29 RUN_UTILS  CopyFile   		c:\msgtest\media\msg-adddrive-cap.ini		c:\private\1000484b\msgprioritydrivelist.ini
       
    30 
       
    31 
       
    32 //******************************************
       
    33 // We should have ReadUserData capability to get the childs ids. 
       
    34 // If we have the same SID but not ReadUserData we will get a filtered return containing only the entries we own.
       
    35 //******************************************
       
    36 
       
    37 PRINT Running  EMsvGetChildIdsAll : Read Caps = ReadUserData. Same SID. Should Pass.
       
    38 
       
    39 RUN_SCRIPT  c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_Setup.script
       
    40 
       
    41 RUN_PROGRAM -1 setcap c:\sys\bin\MessagingTestServer_caps.exe 0003fffe -SID 101F7777 C:\sys\bin\MessagingTestServer.exe
       
    42 
       
    43 // Clean the message store
       
    44 RUN_SCRIPT  c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_CleanMessageStore.script
       
    45 
       
    46 // Create 30 entries owned by 101F7777	
       
    47 RUN_SCRIPT  c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_CreateMultipleEntryInbox.script
       
    48 
       
    49 // Wait for MessagingTestServer to die
       
    50 DELAY 5000
       
    51 
       
    52 RUN_PROGRAM -1 setcap c:\sys\bin\MessagingTestServer_caps.exe 0003fffe -SID 101F7776 C:\sys\bin\MessagingTestServer.exe
       
    53 
       
    54 // Create 30 entries owned by 101F7776
       
    55 RUN_SCRIPT  c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_CreateMultipleEntryInbox.script
       
    56 
       
    57 RUN_PROGRAM -1 setcap c:\sys\bin\SendProxyServer_caps.exe 00008000 -SID 101F7776 C:\sys\bin\SendProxyServer.exe
       
    58 
       
    59 RUN_SCRIPT  c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_SendEMsvGetChildIdsAll_All.script
       
    60 
       
    61 // Need delay to allow SendProxyServer shutting down
       
    62 DELAY 3000
       
    63 RUN_SCRIPT  c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_Restore.script
       
    64 
       
    65 
       
    66 //******************************************
       
    67 // We should have ReadUserData capability to get the childs ids. 
       
    68 // If we have the same SID but not ReadUserData we will get a filtered return containing only the entries we own.
       
    69 //******************************************
       
    70 
       
    71 PRINT Running  EMsvGetChildIdsAll : Read Caps = 0. Same SID. Should only get the messages created by same SID.
       
    72 
       
    73 RUN_SCRIPT  c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_Setup.script
       
    74 
       
    75 RUN_PROGRAM -1 setcap c:\sys\bin\MessagingTestServer_caps.exe 0003fffe -SID 101F7777 C:\sys\bin\MessagingTestServer.exe
       
    76 
       
    77 // Clean the message store
       
    78 RUN_SCRIPT  c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_CleanMessageStore.script
       
    79 
       
    80 // Create 30 entries owned by 101F7777	
       
    81 RUN_SCRIPT  c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_CreateMultipleEntryInbox.script
       
    82 
       
    83 // Wait for MessagingTestServer to die
       
    84 DELAY 5000
       
    85 
       
    86 RUN_PROGRAM -1 setcap c:\sys\bin\MessagingTestServer_caps.exe 0003fffe -SID 101F7776 C:\sys\bin\MessagingTestServer.exe
       
    87 
       
    88 // Create 30 entries owned by 101F7776
       
    89 RUN_SCRIPT  c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_CreateMultipleEntryInbox.script
       
    90 
       
    91 RUN_PROGRAM -1 setcap c:\sys\bin\SendProxyServer_caps.exe 00000000 -SID 101F7776 C:\sys\bin\SendProxyServer.exe
       
    92 
       
    93 RUN_SCRIPT  c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_SendEMsvGetChildIdsAll_Owned.script
       
    94 
       
    95 // Need delay to allow SendProxyServer shutting down
       
    96 DELAY 3000
       
    97 RUN_SCRIPT  c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_Restore.script
       
    98 
       
    99 
       
   100 //******************************************
       
   101 // We should have ReadUserData capability to get the childs ids. 
       
   102 // If we have the same SID but not ReadUserData we will get a filtered return containing only the entries we own.
       
   103 //******************************************
       
   104 
       
   105 PRINT Running  EMsvGetChildIdsAll : Read Caps = ReadUserData. Different SID. Should Pass.
       
   106 
       
   107 RUN_SCRIPT  c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_Setup.script
       
   108 
       
   109 RUN_PROGRAM -1 setcap c:\sys\bin\MessagingTestServer_caps.exe 0003fffe -SID 101F7777 C:\sys\bin\MessagingTestServer.exe
       
   110 
       
   111 // Clean the message store
       
   112 RUN_SCRIPT  c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_CleanMessageStore.script
       
   113 
       
   114 // Create 30 entries owned by 101F7777	
       
   115 RUN_SCRIPT  c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_CreateMultipleEntryInbox.script
       
   116 
       
   117 // Wait for MessagingTestServer to die
       
   118 DELAY 5000
       
   119 
       
   120 RUN_PROGRAM -1 setcap c:\sys\bin\MessagingTestServer_caps.exe 0003fffe -SID 101F7776 C:\sys\bin\MessagingTestServer.exe
       
   121 
       
   122 // Create 30 entries owned by 101F7776
       
   123 RUN_SCRIPT  c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_CreateMultipleEntryInbox.script
       
   124 
       
   125 RUN_PROGRAM -1 setcap c:\sys\bin\SendProxyServer_caps.exe 00008000 -SID 101F7777 C:\sys\bin\SendProxyServer.exe
       
   126 
       
   127 RUN_SCRIPT  c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_SendEMsvGetChildIdsAll_All.script
       
   128 
       
   129 // Need delay to allow SendProxyServer shutting down
       
   130 DELAY 3000
       
   131 RUN_SCRIPT  c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_Restore.script
       
   132 
       
   133 
       
   134 //******************************************
       
   135 // We should have ReadUserData capability to get the childs ids. 
       
   136 // If we have the same SID but not ReadUserData we will get a filtered return containing only the entries we own.
       
   137 //******************************************
       
   138 
       
   139 PRINT Running  EMsvGetChildIdsAll :  Read Caps = 0. Different SID. Should get no messages.
       
   140 
       
   141 RUN_SCRIPT  c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_Setup.script
       
   142 
       
   143 RUN_PROGRAM -1 setcap c:\sys\bin\MessagingTestServer_caps.exe 0003fffe -SID 101F7776 C:\sys\bin\MessagingTestServer.exe
       
   144 
       
   145 RUN_PROGRAM -1 setcap c:\sys\bin\SendProxyServer_caps.exe 00000000 -SID 101F7777 C:\sys\bin\SendProxyServer.exe
       
   146 
       
   147 // Clean the message store
       
   148 RUN_SCRIPT  c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_CleanMessageStore.script
       
   149 
       
   150 // Create 30 entries owned by 101F7776
       
   151 RUN_SCRIPT  c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_CreateMultipleEntryInbox.script
       
   152 
       
   153 RUN_SCRIPT  c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_SendEMsvGetChildIdsAll_None.script
       
   154 
       
   155 // Need delay to allow SendProxyServer shutting down
       
   156 DELAY 3000
       
   157 RUN_SCRIPT  c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_Restore.script
       
   158 
       
   159 
       
   160 RUN_UTILS  MakeReadWrite  	c:\private\1000484b\msgprioritydrivelist.ini
       
   161 RUN_UTILS  CopyFile   		c:\private\1000484b\msgprioritydrivelist.bak	c:\private\1000484b\msgprioritydrivelist.ini
       
   162 RUN_UTILS  DeleteFile		c:\private\1000484b\msgprioritydrivelist.bak
       
   163