|
1 // Copyright (c) 2007-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 the License "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 // @internalComponent |
|
15 // |
|
16 // |
|
17 |
|
18 #ifndef TESTCASE0462_H |
|
19 #define TESTCASE0462_H |
|
20 |
|
21 |
|
22 |
|
23 //---------------------------------------------------------------------------------------------- |
|
24 //! @SYMTestCaseID PBASE-T_OTGDI-0462 |
|
25 //! @SYMTestCaseDesc Cancel all 3 kinds of notifications. (publish&subscribe) |
|
26 //! @SYMFssID |
|
27 //! @SYMPREQ 1782 |
|
28 //! @SYMREQ 7079 |
|
29 //! @SYMTestType UT |
|
30 //! @SYMTestPriority 1 |
|
31 //! @SYMTestActions 1. Queue a request for notification of insertion/removal (OtgEventNotification(?)) |
|
32 //! 2. Cancel notification of insertion/removal (call OtgEventNotificationCancel()?) |
|
33 //! 3. Remove A plug |
|
34 //! 4. Insert A plug |
|
35 //! 5. Repeat step 3, 6 times |
|
36 //! 6. Initialize event counter |
|
37 //! 7. Count events = 12 (6 insert and 6 remove notifications) |
|
38 //! @SYMTestExpectedResults 1. After step 4 we should not see any notification of the A plug removal. |
|
39 //! |
|
40 //---------------------------------------------------------------------------------------------- |
|
41 |
|
42 class CTestCase0462 : public CTestCaseRoot |
|
43 { |
|
44 public: |
|
45 static CTestCase0462* NewL(TBool aHost); |
|
46 virtual ~CTestCase0462(); |
|
47 |
|
48 virtual void ExecuteTestCaseL(); |
|
49 void DoCancel(); |
|
50 static void CancelKB(CTestCaseRoot *pThis); |
|
51 |
|
52 void RunStepL(); |
|
53 virtual void DescribePreconditions(); |
|
54 TInt GetStepIndex() { return(iCaseStep); }; |
|
55 |
|
56 private: |
|
57 CTestCase0462(TBool aHost); |
|
58 void ConstructL(); |
|
59 |
|
60 CTestCaseWatchdog *iWDTimer; |
|
61 // DATA |
|
62 public: |
|
63 |
|
64 private: |
|
65 |
|
66 TInt iDequeAttempts; |
|
67 TInt iRepeats; // loop counter, |
|
68 |
|
69 enum TCaseSteps |
|
70 { |
|
71 EPreconditions, |
|
72 ELoadLdd, |
|
73 ERegisterForEvents, // QueueOtgEventRequest( event, status ); |
|
74 EEmptyQueue, |
|
75 EGetAndCancelEvent, |
|
76 ECancelNotify, |
|
77 EInsertA, |
|
78 ERemoveA, |
|
79 ETallyEvents, |
|
80 EUnloadLdd, |
|
81 ELastStep |
|
82 }; |
|
83 |
|
84 |
|
85 TCaseSteps iCaseStep; |
|
86 |
|
87 TTime iIDcheckStart; // start of checking for ID_PIN |
|
88 TTime iIDcheckEnd; |
|
89 |
|
90 const static TTestCaseFactoryReceipt<CTestCase0462> iFactoryReceipt; |
|
91 |
|
92 |
|
93 }; |
|
94 |
|
95 |
|
96 #endif // TESTCASE0462_H |