|
1 /* |
|
2 * Copyright (c) 2008-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 the License "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 |
|
18 |
|
19 /** |
|
20 @file |
|
21 @test |
|
22 */ |
|
23 |
|
24 #include "stsrollbackalltest.h" |
|
25 |
|
26 #include <usif/sts/sts.h> |
|
27 #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS |
|
28 #include "stsrecovery.h" |
|
29 #endif //SYMBIAN_ENABLE_SPLIT_HEADERS |
|
30 #include <scs/cleanuputils.h> |
|
31 #include <e32def.h> |
|
32 |
|
33 _LIT(KStsRollBackAllSecName, "STS RollBAckAllPending APIs test"); |
|
34 |
|
35 using namespace Usif; |
|
36 |
|
37 CStsRollbackAllSecTest* CStsRollbackAllSecTest::NewL() |
|
38 { |
|
39 CStsRollbackAllSecTest* self=new(ELeave) CStsRollbackAllSecTest(); |
|
40 CleanupStack::PushL(self); |
|
41 self->ConstructL(); |
|
42 CleanupStack::Pop(self); |
|
43 return self; |
|
44 } |
|
45 |
|
46 CStsRollbackAllSecTest::CStsRollbackAllSecTest() |
|
47 { |
|
48 SetSidRequired(TUid::Uid(0x10202DCE)); //SWI daemon's UID3 (ie: SID) |
|
49 } |
|
50 |
|
51 void CStsRollbackAllSecTest::ConstructL() |
|
52 { |
|
53 SetNameL(KStsRollBackAllSecName); |
|
54 } |
|
55 |
|
56 void CStsRollbackAllSecTest::RunTestL() |
|
57 { |
|
58 RStsRecoverySession stsRecoverySession; |
|
59 CleanupClosePushL(stsRecoverySession); |
|
60 TRAPD(err, stsRecoverySession.RollbackAllPendingL()); |
|
61 CheckFailL(err, _L("RollbackAllPendingL")); |
|
62 CleanupStack::PopAndDestroy(&stsRecoverySession); |
|
63 } |