56
|
1 |
/*
|
|
2 |
* Copyright (c) 2007-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: Class for the test cases.
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
#ifndef C_BCTESTMIXMCLGENERALCASE_H
|
|
19 |
#define C_BCTESTMIXMCLGENERALCASE_H
|
|
20 |
|
|
21 |
#include <aknlongtapdetector.h>
|
|
22 |
#include <aknphysicsobserveriface.h>
|
|
23 |
#include <itemfinderobserver.h>
|
|
24 |
|
|
25 |
#include "bctestcase.h"
|
|
26 |
|
|
27 |
class CBCTestMixMCLContainer;
|
|
28 |
class CBCTestMixMCLView;
|
|
29 |
class CCoeControl;
|
|
30 |
|
|
31 |
/**
|
|
32 |
* test case for general apis
|
|
33 |
*/
|
|
34 |
class CBCTestMixMCLGeneralCase: public CBCTestCase,
|
|
35 |
public MAknLongTapDetectorCallBack,
|
|
36 |
public MAknPhysicsObserver,
|
|
37 |
public MAknItemFinderObserver
|
|
38 |
{
|
|
39 |
public: // constructor and destructor
|
|
40 |
|
|
41 |
/**
|
|
42 |
* Symbian 2nd static constructor
|
|
43 |
*/
|
|
44 |
static CBCTestMixMCLGeneralCase* NewL(
|
|
45 |
CBCTestMixMCLContainer* aContainer,
|
|
46 |
CBCTestMixMCLView* aView );
|
|
47 |
|
|
48 |
/**
|
|
49 |
* Destructor
|
|
50 |
*/
|
|
51 |
virtual ~CBCTestMixMCLGeneralCase();
|
|
52 |
|
|
53 |
public: // from CBCTestCase
|
|
54 |
|
|
55 |
/**
|
|
56 |
* Execute corresponding test functions for UI command
|
|
57 |
* @param aCmd, UI command
|
|
58 |
*/
|
|
59 |
void RunL( TInt aCmd );
|
|
60 |
|
|
61 |
protected: // new functions
|
|
62 |
|
|
63 |
/**
|
|
64 |
* Build autotest script
|
|
65 |
*/
|
|
66 |
void BuildScriptL();
|
|
67 |
|
|
68 |
/**
|
|
69 |
* Create control or allocate resource for test
|
|
70 |
* @param aCmd UI command, maybe you need to do some work
|
|
71 |
* for different outline
|
|
72 |
*/
|
|
73 |
void PrepareCaseL( TInt aCmd );
|
|
74 |
|
|
75 |
/**
|
|
76 |
* Release resource used in test
|
|
77 |
*/
|
|
78 |
void ReleaseCaseL();
|
|
79 |
|
|
80 |
/**
|
|
81 |
* Callback method. Get's called when a long tap occurs.
|
|
82 |
* @param aPenEventLocation Long tap event location relative to parent control.
|
|
83 |
* @param aPenEventScreenLocation Long tap event location relative to screen.
|
|
84 |
*/
|
|
85 |
void HandleLongTapEventL( const TPoint& aPenEventLocation,
|
|
86 |
const TPoint& aPenEventScreenLocation );
|
|
87 |
/*
|
|
88 |
* Test list box apis
|
|
89 |
*/
|
|
90 |
void TestListBoxL();
|
|
91 |
|
|
92 |
/*
|
|
93 |
* Test options menu's apis
|
|
94 |
*/
|
|
95 |
void TestOptionsMenuL();
|
|
96 |
|
|
97 |
/*
|
|
98 |
* Test tas object apis
|
|
99 |
*/
|
|
100 |
void TestTasObjectInfoAndTasHookL();
|
|
101 |
|
|
102 |
/*
|
|
103 |
* Test miscellaneous apis, function one
|
|
104 |
*/
|
|
105 |
void TestMiscApisFuncOneL();
|
|
106 |
|
|
107 |
/*
|
|
108 |
* Test one function in class AknPopupUtils
|
|
109 |
*/
|
|
110 |
void TestAknPopupUtilsL();
|
|
111 |
/*
|
|
112 |
* Test one function in class AknListUtils
|
|
113 |
*/
|
|
114 |
void TestAknListUtilsL();
|
|
115 |
|
|
116 |
/*
|
|
117 |
* Test new APIs in CAknToolbar
|
|
118 |
*/
|
|
119 |
void TestAknToolbarL();
|
|
120 |
|
|
121 |
/*
|
|
122 |
* Test ProcessCommandL in AknRadioButtonSettingPage
|
|
123 |
*/
|
|
124 |
void TestRadioButtonSettingPageL();
|
|
125 |
|
|
126 |
/*
|
|
127 |
* Test ProcessCommandL in AknPopupSettingPage
|
|
128 |
*/
|
|
129 |
void TestPopupSettingPageL();
|
|
130 |
|
|
131 |
/*
|
|
132 |
* Tests editor's kinetic scrolling related functions.
|
|
133 |
*/
|
|
134 |
void TestEditorKineticScrollingL();
|
|
135 |
|
|
136 |
/*
|
|
137 |
* Tests editor's kinetic scrolling related functions.
|
|
138 |
*/
|
|
139 |
void TestEnableKineticScrollingPhysicsL();
|
|
140 |
|
|
141 |
/**
|
|
142 |
* Tests the SuspendPhysics() method in CAknPhysics.
|
|
143 |
*/
|
|
144 |
void TestAknPhysicsSuspendPhysicsL();
|
|
145 |
|
|
146 |
/**
|
|
147 |
* Tests the ResumePhysics() method in CAknPhysics.
|
|
148 |
*/
|
|
149 |
void TestAknPhysicsResumePhysicsL();
|
|
150 |
|
|
151 |
/*
|
|
152 |
* Tests CBA APIs.
|
|
153 |
*/
|
|
154 |
void TestCbaL();
|
|
155 |
|
|
156 |
/*
|
|
157 |
* Tests common dialogs APIs.
|
|
158 |
*/
|
|
159 |
void TestCommonDialogsL();
|
|
160 |
|
|
161 |
/*
|
|
162 |
* Tests ItemFinder.
|
|
163 |
*/
|
|
164 |
void TestItemFinderL();
|
|
165 |
|
|
166 |
/**
|
|
167 |
* Tests FindItemDialog.
|
|
168 |
*/
|
|
169 |
void TestFindItemDialogL();
|
|
170 |
|
|
171 |
/**
|
|
172 |
* Tests button component API.
|
|
173 |
*/
|
|
174 |
void TestAknButtonEnableFeedbackL();
|
|
175 |
|
|
176 |
protected: // From base class MAknPhysicsObserver
|
|
177 |
|
|
178 |
/**
|
|
179 |
* Physics emulation has moved the view
|
|
180 |
*
|
|
181 |
* @param aNewPosition The new position of the view.
|
|
182 |
* @param aDrawNow @c ETrue if client should redraw the screen,
|
|
183 |
* otherwise @c EFalse.
|
|
184 |
* @param aFlags Additional flags, not used currently.
|
|
185 |
*/
|
|
186 |
void ViewPositionChanged( const TPoint& aNewPosition,
|
|
187 |
TBool aDrawNow,
|
|
188 |
TUint aFlags );
|
|
189 |
|
|
190 |
/**
|
|
191 |
* Physics emulation has stopped moving the view
|
|
192 |
*/
|
|
193 |
void PhysicEmulationEnded();
|
|
194 |
|
|
195 |
/**
|
|
196 |
* Returns the observer view position.
|
|
197 |
*
|
|
198 |
* @return Physics observer view position.
|
|
199 |
*/
|
|
200 |
TPoint ViewPosition() const;
|
|
201 |
|
|
202 |
// From MAknItemFinderObserver
|
|
203 |
|
|
204 |
/**
|
|
205 |
* Handles the activation event.
|
|
206 |
*
|
|
207 |
* @param aItem Activated item.
|
|
208 |
* @param aEvent Activation method.
|
|
209 |
* @param aFlags Additional information about the event.
|
|
210 |
*/
|
|
211 |
void HandleFindItemEventL( const CItemFinder::CFindItemExt& aItem,
|
|
212 |
MAknItemFinderObserver::TEventFlag aEvent, TUint aFlags);
|
|
213 |
|
|
214 |
private: // constructor
|
|
215 |
|
|
216 |
/**
|
|
217 |
* C++ default constructor
|
|
218 |
*/
|
|
219 |
CBCTestMixMCLGeneralCase( CBCTestMixMCLContainer* aContainer,
|
|
220 |
CBCTestMixMCLView* aView );
|
|
221 |
|
|
222 |
/**
|
|
223 |
* Symbian 2nd constructor
|
|
224 |
*/
|
|
225 |
void ConstructL();
|
|
226 |
|
|
227 |
private: // data
|
|
228 |
|
|
229 |
/**
|
|
230 |
* Pointer to view
|
|
231 |
* not own
|
|
232 |
*/
|
|
233 |
CBCTestMixMCLView* iView;
|
|
234 |
|
|
235 |
/**
|
|
236 |
* Pointer to view
|
|
237 |
* own
|
|
238 |
*/
|
|
239 |
CCoeControl* iControl;
|
|
240 |
|
|
241 |
/**
|
|
242 |
* Pointer to container.
|
|
243 |
* not own
|
|
244 |
*/
|
|
245 |
CBCTestMixMCLContainer* iContainer;
|
|
246 |
};
|
|
247 |
|
|
248 |
#endif /*C_BCTESTMIXMCLGENERALCASE_H*/
|
|
249 |
|