|
1 /* |
|
2 * Copyright (c) 2006-2007 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: Test for effect control for the slideshow |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #ifndef __T_CSHWEFFECTCONTROL_H__ |
|
22 #define __T_CSHWEFFECTCONTROL_H__ |
|
23 |
|
24 // EXTERNAL INCLUDES |
|
25 #include <CEUnitTestSuiteClass.h> |
|
26 #include <EUnitDecorators.h> |
|
27 |
|
28 |
|
29 // INTERNAL INCLUDES |
|
30 #include "tmglxvisuallist_adapter.h" |
|
31 #include "tmglxmedialist_stub.h" |
|
32 #include "tmshweffectmanager_adapter.h" |
|
33 #include "shweventqueue.h" |
|
34 |
|
35 // FORWARD DECLARATIONS |
|
36 class CShwEffectControl; |
|
37 |
|
38 // CLASS DEFINITION |
|
39 /** |
|
40 * EUnit test suite for CShwEffectControl |
|
41 * |
|
42 */ |
|
43 NONSHARABLE_CLASS( T_CShwEffectControl ) |
|
44 : public CEUnitTestSuiteClass, |
|
45 public MGlxMediaList_Stub_Observer, |
|
46 public MGlxVisualList_Observer, |
|
47 public MShwEffectManager_Observer, |
|
48 public MShwEventQueue |
|
49 { |
|
50 public: // Constructors and destructors |
|
51 |
|
52 /** |
|
53 * Two phase construction |
|
54 */ |
|
55 static T_CShwEffectControl* NewL(); |
|
56 static T_CShwEffectControl* NewLC(); |
|
57 /** |
|
58 * Destructor |
|
59 */ |
|
60 ~T_CShwEffectControl(); |
|
61 |
|
62 private: // Constructors and destructors |
|
63 |
|
64 T_CShwEffectControl(); |
|
65 void ConstructL(); |
|
66 |
|
67 public: // from MGlxMediaList_Stub_Observer, MGlxVisualList_Observer, MShwEffectManager_Observer, MShwEventQueue |
|
68 |
|
69 void MGlxMediaList_MethodCalled( TMGlxMediaListMethodId aMethodId ); |
|
70 void MGlxVisualList_MethodCalled( TMGlxVisualListMethodId aMethodId ); |
|
71 void MShwEffectManager_MethodCalled( TMShwEffectManagerMethodId aMethodId ); |
|
72 void SendEventL( MShwEvent* aEvent ); |
|
73 |
|
74 private: // New methods |
|
75 |
|
76 void EmptySetupL(); |
|
77 void SetupL(); |
|
78 void Teardown(); |
|
79 |
|
80 void TestConstructionL(); |
|
81 void TransitionCompletedL(); |
|
82 void TransitionCompleted2L(); |
|
83 void NotifyLL(); |
|
84 void SlowImageLoadL(); |
|
85 void SlowImageLoad2L(); |
|
86 void HandleFocusChangedL(); |
|
87 void TestThumbnailLoadingL(); |
|
88 void TestErrorsInThumbnailLoadingL(); |
|
89 |
|
90 private: // Data |
|
91 |
|
92 CShwEffectControl* iCShwEffectControl; |
|
93 |
|
94 TMGlxVisualList_Adapter* iStubVisualList; |
|
95 TMGlxMediaList_Stub* iStubMediaList; |
|
96 |
|
97 TMShwEffectManager_Adapter iStubEffectManager; |
|
98 |
|
99 CActiveSchedulerWait iWait; |
|
100 |
|
101 RArray<TInt> iVisualListCalls; |
|
102 RArray<TInt> iMediaListCalls; |
|
103 RArray<TInt> iEffectCalls; |
|
104 RArray<MShwEvent*> iEvents; |
|
105 |
|
106 EUNIT_DECLARE_TEST_TABLE; |
|
107 |
|
108 }; |
|
109 |
|
110 #endif // __T_CSHWEFFECTCONTROL_H__ |
|
111 |
|
112 // End of file |