1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // tutilityplugin_step.cpp |
|
15 // |
|
16 // |
|
17 |
|
18 /** |
|
19 @file |
|
20 @test |
|
21 @internalComponent - Internal Symbian test code |
|
22 */ |
|
23 #ifndef __TUTILITY_PLUGIN_TEST_H__ |
|
24 #define __TUTILITY_PLUGIN_TEST_H__ |
|
25 |
|
26 #include <test/testexecutestepbase.h> |
|
27 #include <ssm/ssmstateawaresession.h> |
|
28 #include <e32event.h> |
|
29 |
|
30 _LIT(KTUtilityPluginStep,"UtilityPluginStep"); |
|
31 |
|
32 class CUtilityPluginTest : public CTestStep |
|
33 { |
|
34 public: |
|
35 typedef void (CUtilityPluginTest::*ClassFuncPtrL) (); |
|
36 public: |
|
37 CUtilityPluginTest(const TDesC& aStepName); |
|
38 ~ CUtilityPluginTest(); |
|
39 |
|
40 //from CTestStep |
|
41 TVerdict doTestStepPreambleL(); |
|
42 TVerdict doTestStepL(); |
|
43 TVerdict doTestStepPostambleL(); |
|
44 |
|
45 void doOOMTestL(ClassFuncPtrL testFuncL); |
|
46 |
|
47 private: |
|
48 void doTest1L(); |
|
49 void doTest2L(); |
|
50 void doTest3L(); |
|
51 void doTest4L(); |
|
52 void doTest5L(); |
|
53 void doTest6L(); |
|
54 void doTest7L(); //Manual test |
|
55 void TestNotificationAndPowerModeL(TRawEvent::TType aRawEvent, TBool aIsNotificationExpected, TPowerState aExpectedPowerState, |
|
56 TBool aDelayAcknowledgement = EFalse, TBool aCancelTransition = EFalse); |
|
57 void SetDefaultTestKey(); |
|
58 void SwitchOn(); |
|
59 void TestStateChangeNotificationNotReceivedL(); |
|
60 void TestSystemShutdownWithoutAcknowledgementL(); |
|
61 void LogDelayAcknowledgement(); |
|
62 TInt GetStartUpModeL(); |
|
63 }; |
|
64 |
|
65 /** |
|
66 Class which will run the timer and expire after stipulated timeout. |
|
67 */ |
|
68 class CShutdownNotifObserverTimer : public CTimer |
|
69 { |
|
70 public: |
|
71 static CShutdownNotifObserverTimer* NewL(); |
|
72 ~CShutdownNotifObserverTimer(); |
|
73 void StartTimer(TInt32 aTimeout); |
|
74 |
|
75 protected: |
|
76 // from CActive |
|
77 void RunL(); |
|
78 TInt RunError(TInt aError); |
|
79 |
|
80 private: |
|
81 void ConstructL(); |
|
82 CShutdownNotifObserverTimer(); |
|
83 private: |
|
84 CActiveScheduler* iScheduler; |
|
85 }; |
|
86 |
|
87 #endif //__TUTILITY_PLUGIN_TEST_H__ |
|
88 |
|