messagingfw/msgtestfw/TestCases/ScriptedTestCases/Capabilities/Cap_EMsvGetEntry.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  EMsvGetEntry
       
    18 
       
    19 //******************************************
       
    20 // We should have ReadData capability to Read the Entry. 
       
    21 // The SID when attempting to read the entry should be the same as that process which tried to add the entry.
       
    22 //******************************************
       
    23 
       
    24 PRINT Running  EMsvGetEntry : Read Caps = ReadUserData. Same SID. Should Pass.
       
    25 RUN_SCRIPT  c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_Setup.script
       
    26 
       
    27 
       
    28 RUN_PROGRAM -1 setcap c:\sys\bin\MessagingTestServer_caps.exe 0003fffe -SID 101F7776 C:\sys\bin\MessagingTestServer.exe
       
    29 
       
    30 RUN_PROGRAM -1 setcap c:\sys\bin\SendProxyServer_caps.exe 00008000 -SID 101F7776 C:\sys\bin\SendProxyServer.exe
       
    31 	
       
    32 RUN_SCRIPT  c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_CreateSingleEntryInbox.script
       
    33 
       
    34 RUN_SCRIPT  c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_SendEMsvGetEntry_Pass.script
       
    35 
       
    36 // Need delay to allow SendProxyServer shutting down
       
    37 DELAY 3000
       
    38 RUN_SCRIPT  c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_Restore.script
       
    39 
       
    40 //******************************************
       
    41 // We do not have any ability to read from the inbox.
       
    42 // Since we own the entry, ie same SID, we should succeed. 
       
    43 //******************************************
       
    44 
       
    45 PRINT Running  EMsvGetEntry : Read Caps = 0. Same SID. Should Pass.
       
    46 RUN_SCRIPT  c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_Setup.script
       
    47 
       
    48 RUN_PROGRAM -1 setcap c:\sys\bin\MessagingTestServer_caps.exe 0003fffe -SID 101F7776 C:\sys\bin\MessagingTestServer.exe
       
    49 RUN_PROGRAM -1 setcap c:\sys\bin\SendProxyServer_caps.exe 00000000 -SID 101F7776 C:\sys\bin\SendProxyServer.exe
       
    50 	
       
    51 RUN_SCRIPT  c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_CreateSingleEntryInbox.script
       
    52 
       
    53 RUN_SCRIPT  c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_SendEMsvGetEntry_Pass.script
       
    54 
       
    55 // Need delay to allow SendProxyServer shutting down
       
    56 DELAY 3000
       
    57 RUN_SCRIPT  c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_Restore.script
       
    58 
       
    59 //******************************************
       
    60 // We do not have any ability to read from the inbox.
       
    61 // Since we have ReadUserData it should succeed.
       
    62 //******************************************
       
    63 
       
    64 PRINT Running  EMsvGetEntry : Read Caps = ReadUserData. Different SID. Should Pass.
       
    65 RUN_SCRIPT  c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_Setup.script
       
    66 
       
    67 RUN_PROGRAM -1 setcap c:\sys\bin\MessagingTestServer_caps.exe 0003fffe -SID 101F7776 C:\sys\bin\MessagingTestServer.exe
       
    68 
       
    69 RUN_PROGRAM -1 setcap c:\sys\bin\SendProxyServer_caps.exe 00008000 -SID 101F7777 C:\sys\bin\SendProxyServer.exe
       
    70 	
       
    71 RUN_SCRIPT  c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_CreateSingleEntryInbox.script
       
    72 
       
    73 RUN_SCRIPT  c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_SendEMsvGetEntry_Pass.script
       
    74 
       
    75 // Need delay to allow SendProxyServer shutting down
       
    76 DELAY 3000
       
    77 RUN_SCRIPT  c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_Restore.script
       
    78 
       
    79 //******************************************
       
    80 // We do not have the ability to read from the inbox since we do not have ReadUserData.
       
    81 // Also we do not have the same SID, so we should fail.
       
    82 //******************************************
       
    83 
       
    84 PRINT Running  EMsvGetEntry :  Read Caps = 0. Different SID. Should Fail.
       
    85 RUN_SCRIPT  c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_Setup.script
       
    86 
       
    87 RUN_PROGRAM -1 setcap c:\sys\bin\MessagingTestServer_caps.exe 0003fffe -SID 101F7776 C:\sys\bin\MessagingTestServer.exe
       
    88 
       
    89 RUN_PROGRAM -1 setcap c:\sys\bin\SendProxyServer_caps.exe 00000000 -SID 101F7777 C:\sys\bin\SendProxyServer.exe
       
    90 	
       
    91 RUN_SCRIPT  c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_CreateSingleEntryInbox.script
       
    92 
       
    93 RUN_SCRIPT  c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_SendEMsvGetEntry_Fail.script
       
    94 
       
    95 
       
    96 DELAY 3000
       
    97 RUN_SCRIPT  c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_Restore.script