author | Brendan Donegan <brendand@symbian.org> |
Fri, 14 May 2010 08:53:07 +0100 | |
branch | Symbian3 |
changeset 37 | 39b95dd8b504 |
parent 7 | 24ce88ef98ef |
permissions | -rw-r--r-- |
3 | 1 |
/* |
2 |
* Copyright (c) 2004 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: CBrCtlApiTestContainer from BrCtlBCTestContainer.h |
|
15 |
* |
|
16 |
*/ |
|
17 |
||
18 |
#ifndef BRCTLBCTESTCONTAINER_H |
|
19 |
#define BRCTLBCTESTCONTAINER_H |
|
20 |
||
21 |
// INCLUDES |
|
22 |
#include <coecntrl.h> |
|
23 |
#include <BrCtlInterface.h> // interface under test |
|
24 |
||
25 |
#include "BrCtlApiTestObserver.h" |
|
26 |
#include "BrCtlApiTestStateChangeObserver.h" |
|
27 |
#include "BrCtlApiTestDialogsProvider.h" |
|
28 |
||
29 |
// CONSTATNS |
|
30 |
const TInt KThisAppUid = 0xA0000181; |
|
31 |
||
7
24ce88ef98ef
Corrected Url addresses for browser smoke test
Maciej Seroka <maciejs@symbian.org>
parents:
3
diff
changeset
|
32 |
//_LIT( KUrlLoadTestHtml, "c:\\BrCtlTest\\loadtest.html" ); |
24ce88ef98ef
Corrected Url addresses for browser smoke test
Maciej Seroka <maciejs@symbian.org>
parents:
3
diff
changeset
|
33 |
_LIT( KUrlLoadTestHtml, "c:\\smoketest\\web\\loadtest2.html" ); |
24ce88ef98ef
Corrected Url addresses for browser smoke test
Maciej Seroka <maciejs@symbian.org>
parents:
3
diff
changeset
|
34 |
//_LIT( KUrlLoadTestHtml2, "file:///c:\\smoketest\\web\\loadtest2.html" ); |
24ce88ef98ef
Corrected Url addresses for browser smoke test
Maciej Seroka <maciejs@symbian.org>
parents:
3
diff
changeset
|
35 |
_LIT( KUrlLoadTestHtml2, "file:////c:\\smoketest\\web\\loadtest2.html" ); |
3 | 36 |
_LIT( KUrlHistoryHandlerHtml1, "file:///c:\\BrCtlTest\\historytest1.html" ); |
37 |
_LIT( KUrlHistoryHandlerHtml2, "file:///c:\\BrCtlTest\\historytest2.html" ); |
|
38 |
_LIT( KUrlHistoryHandlerHtml3, "file:///c:\\BrCtlTest\\historytest3.html" ); |
|
39 |
_LIT( KUrlLoadTestWml1, "file:///c:\\BrCtlTest\\loadtest1.wml" ); |
|
40 |
_LIT( KUrlLoadTestWml2, "file:///c:\\BrCtlTest\\loadtest2.wml" ); |
|
41 |
_LIT( KUrlLoadTestWml3, "file:///c:\\BrCtlTest\\loadtest3.wml" ); |
|
42 |
||
43 |
enum TBrCtlFindResponseExpected |
|
44 |
{ |
|
45 |
EFindNoMatchesExpected = 0, ///< Reserved for future use |
|
46 |
EFindMatchExpected, ///< Reserved for future use |
|
47 |
EFindMoreMatchesExpected ///< Reserved for future use |
|
48 |
}; |
|
49 |
||
50 |
||
51 |
||
52 |
// FORWARD DECLARATIONS |
|
53 |
//class CBrCtlInterface; |
|
54 |
||
55 |
// CLASS DECLARATION |
|
56 |
||
57 |
/** |
|
58 |
* CBrCtlApiTestContainer container control class. |
|
59 |
* |
|
60 |
*/ |
|
61 |
class CBrCtlApiTestContainer : public CCoeControl, |
|
62 |
MCoeControlObserver, |
|
63 |
MBrCtlDataLoadSupplier, |
|
64 |
MBrCtlCommandObserver, |
|
65 |
MWidgetCallback // Added for WidgetExtension Test |
|
66 |
{ |
|
67 |
public: // Constructors and destructor |
|
68 |
void ConstructL (const TRect& aRect ); |
|
69 |
~CBrCtlApiTestContainer(); |
|
70 |
||
71 |
private: // Functions from base classes |
|
72 |
void HandleCommandL( TBrCtlDefs::TBrCtlClientCommands aCommand, const CArrayFix<TPtrC>& aAttributesNames, |
|
73 |
const CArrayFix<TPtrC>& aAttributeValues ); |
|
74 |
void SizeChanged(); |
|
75 |
TInt CountComponentControls() const; |
|
76 |
CCoeControl* ComponentControl( TInt aIndex ) const; |
|
77 |
void Draw( const TRect& aRect ) const; |
|
78 |
TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType ); |
|
79 |
||
80 |
/** |
|
81 |
* From MBrCtlDataLoadSupplier, Cancel an on-going load |
|
82 |
*/ |
|
83 |
void CancelLoad(); |
|
84 |
||
85 |
// Functions from MWidgetCallback class |
|
86 |
TBool DialogMimeFileSelectLC(HBufC*& aSelectedFileName, |
|
87 |
const TDesC& aMimeType); |
|
88 |
||
89 |
/** |
|
90 |
* Called to show or hide softkeys |
|
91 |
* @since 3.1 |
|
92 |
* @param aVisible ETrue to show softkeys, EFalse when full screen is needed |
|
93 |
*/ |
|
94 |
void SetSoftkeysVisible(TBool aVisible); |
|
95 |
||
96 |
/** |
|
97 |
* Called to change the display orientation to landscape |
|
98 |
* @since 3.1 |
|
99 |
*/ |
|
100 |
void SetDisplayMode(TBrCtlDefs::TBrCtlOrientation aOrientation); |
|
101 |
||
102 |
//Reserved for future use |
|
103 |
TInt Reserved_1(TAny*& a0, TAny* a1, TAny* a2); |
|
104 |
TInt Reserved_2(TAny*& a0, TAny* a1, TAny* a2); |
|
105 |
TInt Reserved_3(TAny*& a0, TAny* a1, TAny* a2); |
|
106 |
TInt Reserved_4(TAny*& a0, TAny* a1, TAny* a2); |
|
107 |
TInt Reserved_5(TAny*& a0, TAny* a1, TAny* a2); |
|
108 |
TInt Reserved_6(TAny*& a0, TAny* a1, TAny* a2); |
|
109 |
TInt Reserved_7(TAny*& a0, TAny* a1, TAny* a2); |
|
110 |
TInt Reserved_8(TAny*& a0, TAny* a1, TAny* a2); |
|
111 |
TInt Reserved_9(TAny*& a0, TAny* a1, TAny* a2); |
|
112 |
TInt Reserved_10(TAny*& a0, TAny* a1, TAny* a2); |
|
113 |
||
114 |
||
115 |
||
116 |
public: // New functions |
|
117 |
void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane ); |
|
118 |
TKeyResponse HandleKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType ); |
|
119 |
||
120 |
public: // Functions utility |
|
121 |
HBufC8* ReadFileLC( const TDesC& aFileName ); |
|
122 |
void HandleControlEventL( CCoeControl* aControl,TCoeEvent aEventType ); |
|
123 |
void RunAllTestsL(); |
|
124 |
||
125 |
public: // Functions to test CBrCtlInterface |
|
126 |
void CreateBrowserControlInterfaceL(TInt aBrCtlConfig); //Change done to take a parameter |
|
127 |
TInt LoadPageL(); |
|
128 |
TInt HandleCommandL(TInt aCommand ); |
|
129 |
TInt LoadDataL(); |
|
130 |
TInt ClearCacheTest(); |
|
131 |
TBool IsUrlInCacheTest( TDesC16& aUrl ); |
|
132 |
TInt ClearItemInCacheTest(); |
|
133 |
TInt PageInfoLC( TBrCtlDefs::TBrCtlPageInfo aType ); |
|
134 |
TInt CertInfo(); |
|
135 |
TInt NavigationAvailableTest(); |
|
136 |
TInt GetBitmapData(); |
|
137 |
TInt SaveToFileL(); |
|
138 |
TInt OkToExit(); |
|
139 |
TInt FindKeyword( TPtrC aHtml , TPtrC aKeyword , TInt aMatch ); |
|
140 |
TInt FindKeywordAgain( TInt aMatch ); |
|
141 |
TInt SetFocus(); |
|
142 |
TInt OfferKeyEvent(); |
|
143 |
TInt BrCtlMinimumSize(); |
|
144 |
TInt BrCtlSubscribeToMenuItemsL(); |
|
145 |
TInt BrCtlContentSize(); |
|
146 |
TInt BrowserSettingL( TUint& aSetting ); |
|
147 |
TInt SetBrowserSettingL(); |
|
148 |
TInt FocusedImageL(); |
|
149 |
TInt AddCommandObserverL(); |
|
150 |
TInt RemoveCommandObserver(); |
|
151 |
TInt ImageCountL(); |
|
152 |
TInt BrCtlFocusedElementTypeL(); |
|
153 |
TInt BrCtlSetParam(); |
|
154 |
TInt LoadSavedPageL(); |
|
155 |
TInt SetSelfDownloadContentTypes(); |
|
156 |
TInt ZoomLevels(); |
|
157 |
TInt AddOptionMenuItems(); |
|
158 |
TInt BrCtlInitLoadDataL(); |
|
159 |
TInt HandleDownloadCommand(); |
|
160 |
TInt VersionInfoL(); |
|
161 |
TInt WmlOptionMenuItemsL(); |
|
162 |
TInt BrCtlPostL(); |
|
163 |
TInt CreateBrCtlInterfaceAndWidgetExtensionL(); // Added for WidgetExtension Test |
|
164 |
TInt HistoryLoad1L(); |
|
165 |
TInt HistoryLoad2L(); |
|
166 |
TInt HistoryLoad3L(); |
|
167 |
TInt WMLLoad1L(); |
|
168 |
TInt WMLLoad2L(); |
|
169 |
TInt WMLLoad3L(); |
|
170 |
||
171 |
private: //data |
|
172 |
CBrCtlInterface* iBrCtlInterface; |
|
173 |
TInt iCommandBase; |
|
174 |
CBrCtlApiTestObserver* iBrCtlApiTestObserver; |
|
175 |
CBrCtlApiTestStateChangeObserver* iBrCtlApiTestStateChangeObserver; |
|
176 |
CBrowserDialogsProviderProxy* iBrCtlDialogs; |
|
177 |
CEikMenuPane* iMenuPane; |
|
178 |
TBool iCancelInitDataLoad; |
|
179 |
||
180 |
// Added for Widget Extension Test |
|
181 |
MWidgetExtension* iWidgetExtension; |
|
182 |
}; |
|
183 |
||
184 |
#endif // BRCTLBCTESTCONTAINER_H |
|
185 |
||
186 |
// End of File |