OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 #include "public/web/WebIconURL.h" | 44 #include "public/web/WebIconURL.h" |
45 #include "public/web/WebNavigationPolicy.h" | 45 #include "public/web/WebNavigationPolicy.h" |
46 #include "public/web/WebNavigationType.h" | 46 #include "public/web/WebNavigationType.h" |
47 #include "public/web/WebSecurityOrigin.h" | 47 #include "public/web/WebSecurityOrigin.h" |
48 #include "public/web/WebTextAffinity.h" | 48 #include "public/web/WebTextAffinity.h" |
49 #include "public/web/WebTextDirection.h" | 49 #include "public/web/WebTextDirection.h" |
50 #include <map> | 50 #include <map> |
51 #include <memory> | 51 #include <memory> |
52 #include <string> | 52 #include <string> |
53 | 53 |
54 namespace WebKit { | 54 namespace blink { |
55 class WebAXObject; | 55 class WebAXObject; |
56 class WebAudioDevice; | 56 class WebAudioDevice; |
57 class WebCachedURLRequest; | 57 class WebCachedURLRequest; |
58 class WebColorChooser; | 58 class WebColorChooser; |
59 class WebColorChooserClient; | 59 class WebColorChooserClient; |
60 class WebDataSource; | 60 class WebDataSource; |
61 class WebDragData; | 61 class WebDragData; |
62 class WebFileChooserCompletion; | 62 class WebFileChooserCompletion; |
63 class WebFrame; | 63 class WebFrame; |
64 class WebGeolocationClient; | 64 class WebGeolocationClient; |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 class TestInterfaces; | 105 class TestInterfaces; |
106 class WebTestDelegate; | 106 class WebTestDelegate; |
107 class WebTestInterfaces; | 107 class WebTestInterfaces; |
108 class WebTestRunner; | 108 class WebTestRunner; |
109 class WebUserMediaClientMock; | 109 class WebUserMediaClientMock; |
110 | 110 |
111 class WEBTESTRUNNER_EXPORT WebTestProxyBase { | 111 class WEBTESTRUNNER_EXPORT WebTestProxyBase { |
112 public: | 112 public: |
113 void setInterfaces(WebTestInterfaces*); | 113 void setInterfaces(WebTestInterfaces*); |
114 void setDelegate(WebTestDelegate*); | 114 void setDelegate(WebTestDelegate*); |
115 void setWidget(WebKit::WebWidget*); | 115 void setWidget(blink::WebWidget*); |
116 | 116 |
117 void reset(); | 117 void reset(); |
118 | 118 |
119 WebKit::WebSpellCheckClient *spellCheckClient() const; | 119 blink::WebSpellCheckClient *spellCheckClient() const; |
120 WebKit::WebValidationMessageClient* validationMessageClient(); | 120 blink::WebValidationMessageClient* validationMessageClient(); |
121 WebKit::WebColorChooser* createColorChooser(WebKit::WebColorChooserClient*,
const WebKit::WebColor&); | 121 blink::WebColorChooser* createColorChooser(blink::WebColorChooserClient*, co
nst blink::WebColor&); |
122 bool runFileChooser(const WebKit::WebFileChooserParams&, WebKit::WebFileChoo
serCompletion*); | 122 bool runFileChooser(const blink::WebFileChooserParams&, blink::WebFileChoose
rCompletion*); |
123 | 123 |
124 std::string captureTree(bool debugRenderTree); | 124 std::string captureTree(bool debugRenderTree); |
125 SkCanvas* capturePixels(); | 125 SkCanvas* capturePixels(); |
126 | 126 |
127 void setLogConsoleOutput(bool enabled); | 127 void setLogConsoleOutput(bool enabled); |
128 | 128 |
129 // FIXME: Make this private again. | 129 // FIXME: Make this private again. |
130 void scheduleComposite(); | 130 void scheduleComposite(); |
131 | 131 |
132 void didOpenChooser(); | 132 void didOpenChooser(); |
133 void didCloseChooser(); | 133 void didCloseChooser(); |
134 bool isChooserShown(); | 134 bool isChooserShown(); |
135 | 135 |
136 #if WEBTESTRUNNER_IMPLEMENTATION | 136 #if WEBTESTRUNNER_IMPLEMENTATION |
137 void display(); | 137 void display(); |
138 void displayInvalidatedRegion(); | 138 void displayInvalidatedRegion(); |
139 void discardBackingStore(); | 139 void discardBackingStore(); |
140 | 140 |
141 WebKit::WebGeolocationClientMock* geolocationClientMock(); | 141 blink::WebGeolocationClientMock* geolocationClientMock(); |
142 WebKit::WebMIDIClientMock* midiClientMock(); | 142 blink::WebMIDIClientMock* midiClientMock(); |
143 MockWebSpeechInputController* speechInputControllerMock(); | 143 MockWebSpeechInputController* speechInputControllerMock(); |
144 MockWebSpeechRecognizer* speechRecognizerMock(); | 144 MockWebSpeechRecognizer* speechRecognizerMock(); |
145 #endif | 145 #endif |
146 | 146 |
147 WebTaskList* taskList() { return &m_taskList; } | 147 WebTaskList* taskList() { return &m_taskList; } |
148 | 148 |
149 WebKit::WebView* webView(); | 149 blink::WebView* webView(); |
150 | 150 |
151 void didForceResize(); | 151 void didForceResize(); |
152 | 152 |
153 protected: | 153 protected: |
154 WebTestProxyBase(); | 154 WebTestProxyBase(); |
155 ~WebTestProxyBase(); | 155 ~WebTestProxyBase(); |
156 | 156 |
157 void didInvalidateRect(const WebKit::WebRect&); | 157 void didInvalidateRect(const blink::WebRect&); |
158 void didScrollRect(int, int, const WebKit::WebRect&); | 158 void didScrollRect(int, int, const blink::WebRect&); |
159 void scheduleAnimation(); | 159 void scheduleAnimation(); |
160 // FIXME: Remove once we switch to use didForceResize. | 160 // FIXME: Remove once we switch to use didForceResize. |
161 void setWindowRect(const WebKit::WebRect&); | 161 void setWindowRect(const blink::WebRect&); |
162 void show(WebKit::WebNavigationPolicy); | 162 void show(blink::WebNavigationPolicy); |
163 void didAutoResize(const WebKit::WebSize&); | 163 void didAutoResize(const blink::WebSize&); |
164 void postAccessibilityEvent(const WebKit::WebAXObject&, WebKit::WebAXEvent); | 164 void postAccessibilityEvent(const blink::WebAXObject&, blink::WebAXEvent); |
165 void startDragging(WebKit::WebFrame*, const WebKit::WebDragData&, WebKit::We
bDragOperationsMask, const WebKit::WebImage&, const WebKit::WebPoint&); | 165 void startDragging(blink::WebFrame*, const blink::WebDragData&, blink::WebDr
agOperationsMask, const blink::WebImage&, const blink::WebPoint&); |
166 void didChangeSelection(bool isEmptySelection); | 166 void didChangeSelection(bool isEmptySelection); |
167 void didChangeContents(); | 167 void didChangeContents(); |
168 void didEndEditing(); | 168 void didEndEditing(); |
169 bool createView(WebKit::WebFrame* creator, const WebKit::WebURLRequest&, con
st WebKit::WebWindowFeatures&, const WebKit::WebString& frameName, WebKit::WebNa
vigationPolicy, bool suppressOpener); | 169 bool createView(blink::WebFrame* creator, const blink::WebURLRequest&, const
blink::WebWindowFeatures&, const blink::WebString& frameName, blink::WebNavigat
ionPolicy, bool suppressOpener); |
170 WebKit::WebPlugin* createPlugin(WebKit::WebFrame*, const WebKit::WebPluginPa
rams&); | 170 blink::WebPlugin* createPlugin(blink::WebFrame*, const blink::WebPluginParam
s&); |
171 void setStatusText(const WebKit::WebString&); | 171 void setStatusText(const blink::WebString&); |
172 void didStopLoading(); | 172 void didStopLoading(); |
173 void showContextMenu(WebKit::WebFrame*, const WebKit::WebContextMenuData&); | 173 void showContextMenu(blink::WebFrame*, const blink::WebContextMenuData&); |
174 WebKit::WebUserMediaClient* userMediaClient(); | 174 blink::WebUserMediaClient* userMediaClient(); |
175 void printPage(WebKit::WebFrame*); | 175 void printPage(blink::WebFrame*); |
176 WebKit::WebNotificationPresenter* notificationPresenter(); | 176 blink::WebNotificationPresenter* notificationPresenter(); |
177 WebKit::WebGeolocationClient* geolocationClient(); | 177 blink::WebGeolocationClient* geolocationClient(); |
178 WebKit::WebMIDIClient* webMIDIClient(); | 178 blink::WebMIDIClient* webMIDIClient(); |
179 WebKit::WebSpeechInputController* speechInputController(WebKit::WebSpeechInp
utListener*); | 179 blink::WebSpeechInputController* speechInputController(blink::WebSpeechInput
Listener*); |
180 WebKit::WebSpeechRecognizer* speechRecognizer(); | 180 blink::WebSpeechRecognizer* speechRecognizer(); |
181 bool requestPointerLock(); | 181 bool requestPointerLock(); |
182 void requestPointerUnlock(); | 182 void requestPointerUnlock(); |
183 bool isPointerLocked(); | 183 bool isPointerLocked(); |
184 void didFocus(); | 184 void didFocus(); |
185 void didBlur(); | 185 void didBlur(); |
186 void setToolTipText(const WebKit::WebString&, WebKit::WebTextDirection); | 186 void setToolTipText(const blink::WebString&, blink::WebTextDirection); |
187 void didAddMessageToConsole(const WebKit::WebConsoleMessage&, const WebKit::
WebString& sourceName, unsigned sourceLine); | 187 void didAddMessageToConsole(const blink::WebConsoleMessage&, const blink::We
bString& sourceName, unsigned sourceLine); |
188 void runModalAlertDialog(WebKit::WebFrame*, const WebKit::WebString&); | 188 void runModalAlertDialog(blink::WebFrame*, const blink::WebString&); |
189 bool runModalConfirmDialog(WebKit::WebFrame*, const WebKit::WebString&); | 189 bool runModalConfirmDialog(blink::WebFrame*, const blink::WebString&); |
190 bool runModalPromptDialog(WebKit::WebFrame*, const WebKit::WebString& messag
e, const WebKit::WebString& defaultValue, WebKit::WebString* actualValue); | 190 bool runModalPromptDialog(blink::WebFrame*, const blink::WebString& message,
const blink::WebString& defaultValue, blink::WebString* actualValue); |
191 bool runModalBeforeUnloadDialog(WebKit::WebFrame*, const WebKit::WebString&)
; | 191 bool runModalBeforeUnloadDialog(blink::WebFrame*, const blink::WebString&); |
192 | 192 |
193 void didStartProvisionalLoad(WebKit::WebFrame*); | 193 void didStartProvisionalLoad(blink::WebFrame*); |
194 void didReceiveServerRedirectForProvisionalLoad(WebKit::WebFrame*); | 194 void didReceiveServerRedirectForProvisionalLoad(blink::WebFrame*); |
195 bool didFailProvisionalLoad(WebKit::WebFrame*, const WebKit::WebURLError&); | 195 bool didFailProvisionalLoad(blink::WebFrame*, const blink::WebURLError&); |
196 void didCommitProvisionalLoad(WebKit::WebFrame*, bool isNewNavigation); | 196 void didCommitProvisionalLoad(blink::WebFrame*, bool isNewNavigation); |
197 void didReceiveTitle(WebKit::WebFrame*, const WebKit::WebString& title, WebK
it::WebTextDirection); | 197 void didReceiveTitle(blink::WebFrame*, const blink::WebString& title, blink:
:WebTextDirection); |
198 void didChangeIcon(WebKit::WebFrame*, WebKit::WebIconURL::Type); | 198 void didChangeIcon(blink::WebFrame*, blink::WebIconURL::Type); |
199 void didFinishDocumentLoad(WebKit::WebFrame*); | 199 void didFinishDocumentLoad(blink::WebFrame*); |
200 void didHandleOnloadEvents(WebKit::WebFrame*); | 200 void didHandleOnloadEvents(blink::WebFrame*); |
201 void didFailLoad(WebKit::WebFrame*, const WebKit::WebURLError&); | 201 void didFailLoad(blink::WebFrame*, const blink::WebURLError&); |
202 void didFinishLoad(WebKit::WebFrame*); | 202 void didFinishLoad(blink::WebFrame*); |
203 void didChangeLocationWithinPage(WebKit::WebFrame*); | 203 void didChangeLocationWithinPage(blink::WebFrame*); |
204 void didDetectXSS(WebKit::WebFrame*, const WebKit::WebURL& insecureURL, bool
didBlockEntirePage); | 204 void didDetectXSS(blink::WebFrame*, const blink::WebURL& insecureURL, bool d
idBlockEntirePage); |
205 void didDispatchPingLoader(WebKit::WebFrame*, const WebKit::WebURL&); | 205 void didDispatchPingLoader(blink::WebFrame*, const blink::WebURL&); |
206 void willRequestResource(WebKit::WebFrame*, const WebKit::WebCachedURLReques
t&); | 206 void willRequestResource(blink::WebFrame*, const blink::WebCachedURLRequest&
); |
207 void didCreateDataSource(WebKit::WebFrame*, WebKit::WebDataSource*); | 207 void didCreateDataSource(blink::WebFrame*, blink::WebDataSource*); |
208 void willSendRequest(WebKit::WebFrame*, unsigned identifier, WebKit::WebURLR
equest&, const WebKit::WebURLResponse& redirectResponse); | 208 void willSendRequest(blink::WebFrame*, unsigned identifier, blink::WebURLReq
uest&, const blink::WebURLResponse& redirectResponse); |
209 void didReceiveResponse(WebKit::WebFrame*, unsigned identifier, const WebKit
::WebURLResponse&); | 209 void didReceiveResponse(blink::WebFrame*, unsigned identifier, const blink::
WebURLResponse&); |
210 void didChangeResourcePriority(WebKit::WebFrame*, unsigned identifier, const
WebKit::WebURLRequest::Priority&); | 210 void didChangeResourcePriority(blink::WebFrame*, unsigned identifier, const
blink::WebURLRequest::Priority&); |
211 void didFinishResourceLoad(WebKit::WebFrame*, unsigned identifier); | 211 void didFinishResourceLoad(blink::WebFrame*, unsigned identifier); |
212 WebKit::WebNavigationPolicy decidePolicyForNavigation(WebKit::WebFrame*, Web
Kit::WebDataSource::ExtraData*, const WebKit::WebURLRequest&, WebKit::WebNavigat
ionType, WebKit::WebNavigationPolicy defaultPolicy, bool isRedirect); | 212 blink::WebNavigationPolicy decidePolicyForNavigation(blink::WebFrame*, blink
::WebDataSource::ExtraData*, const blink::WebURLRequest&, blink::WebNavigationTy
pe, blink::WebNavigationPolicy defaultPolicy, bool isRedirect); |
213 bool willCheckAndDispatchMessageEvent(WebKit::WebFrame* sourceFrame, WebKit:
:WebFrame* targetFrame, WebKit::WebSecurityOrigin target, WebKit::WebDOMMessageE
vent); | 213 bool willCheckAndDispatchMessageEvent(blink::WebFrame* sourceFrame, blink::W
ebFrame* targetFrame, blink::WebSecurityOrigin target, blink::WebDOMMessageEvent
); |
214 void resetInputMethod(); | 214 void resetInputMethod(); |
215 | 215 |
216 private: | 216 private: |
217 template<class, typename, typename> friend class WebFrameTestProxy; | 217 template<class, typename, typename> friend class WebFrameTestProxy; |
218 void locationChangeDone(WebKit::WebFrame*); | 218 void locationChangeDone(blink::WebFrame*); |
219 void paintRect(const WebKit::WebRect&); | 219 void paintRect(const blink::WebRect&); |
220 void paintInvalidatedRegion(); | 220 void paintInvalidatedRegion(); |
221 void paintPagesWithBoundaries(); | 221 void paintPagesWithBoundaries(); |
222 SkCanvas* canvas(); | 222 SkCanvas* canvas(); |
223 void displayRepaintMask(); | 223 void displayRepaintMask(); |
224 void invalidateAll(); | 224 void invalidateAll(); |
225 void animateNow(); | 225 void animateNow(); |
226 | 226 |
227 WebKit::WebWidget* webWidget(); | 227 blink::WebWidget* webWidget(); |
228 | 228 |
229 TestInterfaces* m_testInterfaces; | 229 TestInterfaces* m_testInterfaces; |
230 WebTestDelegate* m_delegate; | 230 WebTestDelegate* m_delegate; |
231 WebKit::WebWidget* m_webWidget; | 231 blink::WebWidget* m_webWidget; |
232 | 232 |
233 WebTaskList m_taskList; | 233 WebTaskList m_taskList; |
234 | 234 |
235 std::auto_ptr<SpellCheckClient> m_spellcheck; | 235 std::auto_ptr<SpellCheckClient> m_spellcheck; |
236 std::auto_ptr<WebUserMediaClientMock> m_userMediaClient; | 236 std::auto_ptr<WebUserMediaClientMock> m_userMediaClient; |
237 | 237 |
238 // Painting. | 238 // Painting. |
239 std::auto_ptr<SkCanvas> m_canvas; | 239 std::auto_ptr<SkCanvas> m_canvas; |
240 WebKit::WebRect m_paintRect; | 240 blink::WebRect m_paintRect; |
241 bool m_isPainting; | 241 bool m_isPainting; |
242 bool m_animateScheduled; | 242 bool m_animateScheduled; |
243 std::map<unsigned, std::string> m_resourceIdentifierMap; | 243 std::map<unsigned, std::string> m_resourceIdentifierMap; |
244 std::map<unsigned, WebKit::WebURLRequest> m_requestMap; | 244 std::map<unsigned, blink::WebURLRequest> m_requestMap; |
245 | 245 |
246 bool m_logConsoleOutput; | 246 bool m_logConsoleOutput; |
247 int m_chooserCount; | 247 int m_chooserCount; |
248 | 248 |
249 std::auto_ptr<WebKit::WebGeolocationClientMock> m_geolocationClient; | 249 std::auto_ptr<blink::WebGeolocationClientMock> m_geolocationClient; |
250 std::auto_ptr<WebKit::WebMIDIClientMock> m_midiClient; | 250 std::auto_ptr<blink::WebMIDIClientMock> m_midiClient; |
251 std::auto_ptr<MockWebSpeechRecognizer> m_speechRecognizer; | 251 std::auto_ptr<MockWebSpeechRecognizer> m_speechRecognizer; |
252 std::auto_ptr<MockWebSpeechInputController> m_speechInputController; | 252 std::auto_ptr<MockWebSpeechInputController> m_speechInputController; |
253 std::auto_ptr<MockWebValidationMessageClient> m_validationMessageClient; | 253 std::auto_ptr<MockWebValidationMessageClient> m_validationMessageClient; |
254 | 254 |
255 // FIXME:: We want to move away from this pattern and mark classes | 255 // FIXME:: We want to move away from this pattern and mark classes |
256 // as Noncopyable, but this class is marked as WEBTESTRUNNER_EXPORT | 256 // as Noncopyable, but this class is marked as WEBTESTRUNNER_EXPORT |
257 // while WebNonCopyable is not, so we cannot inherit from WebNonCopyable. | 257 // while WebNonCopyable is not, so we cannot inherit from WebNonCopyable. |
258 // To overcome the problem, for now not inheriting from WebNonCopyable | 258 // To overcome the problem, for now not inheriting from WebNonCopyable |
259 // but plan to fix it when we make the change of making WebNonCopyable | 259 // but plan to fix it when we make the change of making WebNonCopyable |
260 // a macro rather than class. We will have a single way to mark all classes | 260 // a macro rather than class. We will have a single way to mark all classes |
261 // as Noncopyable. | 261 // as Noncopyable. |
262 // Tracked under: http://code.google.com/p/chromium/issues/detail?id=229178 | 262 // Tracked under: http://code.google.com/p/chromium/issues/detail?id=229178 |
263 private: | 263 private: |
264 WebTestProxyBase(WebTestProxyBase&); | 264 WebTestProxyBase(WebTestProxyBase&); |
265 WebTestProxyBase& operator=(const WebTestProxyBase&); | 265 WebTestProxyBase& operator=(const WebTestProxyBase&); |
266 }; | 266 }; |
267 | 267 |
268 // Use this template to inject methods into your WebViewClient/WebFrameClient | 268 // Use this template to inject methods into your WebViewClient/WebFrameClient |
269 // implementation required for the running layout tests. | 269 // implementation required for the running layout tests. |
270 template<class Base, typename T> | 270 template<class Base, typename T> |
271 class WebTestProxy : public Base, public WebTestProxyBase, public WebKit::WebNon
Copyable { | 271 class WebTestProxy : public Base, public WebTestProxyBase, public blink::WebNonC
opyable { |
272 public: | 272 public: |
273 explicit WebTestProxy(T t) | 273 explicit WebTestProxy(T t) |
274 : Base(t) | 274 : Base(t) |
275 { | 275 { |
276 } | 276 } |
277 | 277 |
278 virtual ~WebTestProxy() { } | 278 virtual ~WebTestProxy() { } |
279 | 279 |
280 // WebViewClient implementation. | 280 // WebViewClient implementation. |
281 virtual void didInvalidateRect(const WebKit::WebRect& rect) | 281 virtual void didInvalidateRect(const blink::WebRect& rect) |
282 { | 282 { |
283 WebTestProxyBase::didInvalidateRect(rect); | 283 WebTestProxyBase::didInvalidateRect(rect); |
284 } | 284 } |
285 virtual void didScrollRect(int dx, int dy, const WebKit::WebRect& clipRect) | 285 virtual void didScrollRect(int dx, int dy, const blink::WebRect& clipRect) |
286 { | 286 { |
287 WebTestProxyBase::didScrollRect(dx, dy, clipRect); | 287 WebTestProxyBase::didScrollRect(dx, dy, clipRect); |
288 } | 288 } |
289 virtual void scheduleComposite() | 289 virtual void scheduleComposite() |
290 { | 290 { |
291 WebTestProxyBase::scheduleComposite(); | 291 WebTestProxyBase::scheduleComposite(); |
292 } | 292 } |
293 virtual void scheduleAnimation() | 293 virtual void scheduleAnimation() |
294 { | 294 { |
295 WebTestProxyBase::scheduleAnimation(); | 295 WebTestProxyBase::scheduleAnimation(); |
296 } | 296 } |
297 virtual void setWindowRect(const WebKit::WebRect& rect) | 297 virtual void setWindowRect(const blink::WebRect& rect) |
298 { | 298 { |
299 WebTestProxyBase::setWindowRect(rect); | 299 WebTestProxyBase::setWindowRect(rect); |
300 Base::setWindowRect(rect); | 300 Base::setWindowRect(rect); |
301 } | 301 } |
302 virtual void show(WebKit::WebNavigationPolicy policy) | 302 virtual void show(blink::WebNavigationPolicy policy) |
303 { | 303 { |
304 WebTestProxyBase::show(policy); | 304 WebTestProxyBase::show(policy); |
305 Base::show(policy); | 305 Base::show(policy); |
306 } | 306 } |
307 virtual void didAutoResize(const WebKit::WebSize& newSize) | 307 virtual void didAutoResize(const blink::WebSize& newSize) |
308 { | 308 { |
309 WebTestProxyBase::didAutoResize(newSize); | 309 WebTestProxyBase::didAutoResize(newSize); |
310 Base::didAutoResize(newSize); | 310 Base::didAutoResize(newSize); |
311 } | 311 } |
312 virtual void postAccessibilityEvent(const WebKit::WebAXObject& object, WebKi
t::WebAXEvent event) | 312 virtual void postAccessibilityEvent(const blink::WebAXObject& object, blink:
:WebAXEvent event) |
313 { | 313 { |
314 WebTestProxyBase::postAccessibilityEvent(object, event); | 314 WebTestProxyBase::postAccessibilityEvent(object, event); |
315 Base::postAccessibilityEvent(object, event); | 315 Base::postAccessibilityEvent(object, event); |
316 } | 316 } |
317 virtual void startDragging(WebKit::WebFrame* frame, const WebKit::WebDragDat
a& data, WebKit::WebDragOperationsMask mask, const WebKit::WebImage& image, cons
t WebKit::WebPoint& point) | 317 virtual void startDragging(blink::WebFrame* frame, const blink::WebDragData&
data, blink::WebDragOperationsMask mask, const blink::WebImage& image, const bl
ink::WebPoint& point) |
318 { | 318 { |
319 WebTestProxyBase::startDragging(frame, data, mask, image, point); | 319 WebTestProxyBase::startDragging(frame, data, mask, image, point); |
320 // Don't forward this call to Base because we don't want to do a real dr
ag-and-drop. | 320 // Don't forward this call to Base because we don't want to do a real dr
ag-and-drop. |
321 } | 321 } |
322 virtual void didChangeSelection(bool isEmptySelection) | 322 virtual void didChangeSelection(bool isEmptySelection) |
323 { | 323 { |
324 WebTestProxyBase::didChangeSelection(isEmptySelection); | 324 WebTestProxyBase::didChangeSelection(isEmptySelection); |
325 Base::didChangeSelection(isEmptySelection); | 325 Base::didChangeSelection(isEmptySelection); |
326 } | 326 } |
327 virtual void didChangeContents() | 327 virtual void didChangeContents() |
328 { | 328 { |
329 WebTestProxyBase::didChangeContents(); | 329 WebTestProxyBase::didChangeContents(); |
330 Base::didChangeContents(); | 330 Base::didChangeContents(); |
331 } | 331 } |
332 virtual WebKit::WebView* createView(WebKit::WebFrame* creator, const WebKit:
:WebURLRequest& request, const WebKit::WebWindowFeatures& features, const WebKit
::WebString& frameName, WebKit::WebNavigationPolicy policy, bool suppressOpener) | 332 virtual blink::WebView* createView(blink::WebFrame* creator, const blink::We
bURLRequest& request, const blink::WebWindowFeatures& features, const blink::Web
String& frameName, blink::WebNavigationPolicy policy, bool suppressOpener) |
333 { | 333 { |
334 if (!WebTestProxyBase::createView(creator, request, features, frameName,
policy, suppressOpener)) | 334 if (!WebTestProxyBase::createView(creator, request, features, frameName,
policy, suppressOpener)) |
335 return 0; | 335 return 0; |
336 return Base::createView(creator, request, features, frameName, policy, s
uppressOpener); | 336 return Base::createView(creator, request, features, frameName, policy, s
uppressOpener); |
337 } | 337 } |
338 virtual void setStatusText(const WebKit::WebString& text) | 338 virtual void setStatusText(const blink::WebString& text) |
339 { | 339 { |
340 WebTestProxyBase::setStatusText(text); | 340 WebTestProxyBase::setStatusText(text); |
341 Base::setStatusText(text); | 341 Base::setStatusText(text); |
342 } | 342 } |
343 virtual void didStopLoading() | 343 virtual void didStopLoading() |
344 { | 344 { |
345 WebTestProxyBase::didStopLoading(); | 345 WebTestProxyBase::didStopLoading(); |
346 Base::didStopLoading(); | 346 Base::didStopLoading(); |
347 } | 347 } |
348 virtual void showContextMenu(WebKit::WebFrame* frame, const WebKit::WebConte
xtMenuData& contextMenuData) | 348 virtual void showContextMenu(blink::WebFrame* frame, const blink::WebContext
MenuData& contextMenuData) |
349 { | 349 { |
350 WebTestProxyBase::showContextMenu(frame, contextMenuData); | 350 WebTestProxyBase::showContextMenu(frame, contextMenuData); |
351 Base::showContextMenu(frame, contextMenuData); | 351 Base::showContextMenu(frame, contextMenuData); |
352 } | 352 } |
353 virtual WebKit::WebUserMediaClient* userMediaClient() | 353 virtual blink::WebUserMediaClient* userMediaClient() |
354 { | 354 { |
355 return WebTestProxyBase::userMediaClient(); | 355 return WebTestProxyBase::userMediaClient(); |
356 } | 356 } |
357 virtual void printPage(WebKit::WebFrame* frame) | 357 virtual void printPage(blink::WebFrame* frame) |
358 { | 358 { |
359 WebTestProxyBase::printPage(frame); | 359 WebTestProxyBase::printPage(frame); |
360 } | 360 } |
361 virtual WebKit::WebNotificationPresenter* notificationPresenter() | 361 virtual blink::WebNotificationPresenter* notificationPresenter() |
362 { | 362 { |
363 return WebTestProxyBase::notificationPresenter(); | 363 return WebTestProxyBase::notificationPresenter(); |
364 } | 364 } |
365 virtual WebKit::WebGeolocationClient* geolocationClient() | 365 virtual blink::WebGeolocationClient* geolocationClient() |
366 { | 366 { |
367 return WebTestProxyBase::geolocationClient(); | 367 return WebTestProxyBase::geolocationClient(); |
368 } | 368 } |
369 virtual WebKit::WebMIDIClient* webMIDIClient() | 369 virtual blink::WebMIDIClient* webMIDIClient() |
370 { | 370 { |
371 return WebTestProxyBase::webMIDIClient(); | 371 return WebTestProxyBase::webMIDIClient(); |
372 } | 372 } |
373 virtual WebKit::WebSpeechInputController* speechInputController(WebKit::WebS
peechInputListener* listener) | 373 virtual blink::WebSpeechInputController* speechInputController(blink::WebSpe
echInputListener* listener) |
374 { | 374 { |
375 return WebTestProxyBase::speechInputController(listener); | 375 return WebTestProxyBase::speechInputController(listener); |
376 } | 376 } |
377 virtual WebKit::WebSpeechRecognizer* speechRecognizer() | 377 virtual blink::WebSpeechRecognizer* speechRecognizer() |
378 { | 378 { |
379 return WebTestProxyBase::speechRecognizer(); | 379 return WebTestProxyBase::speechRecognizer(); |
380 } | 380 } |
381 virtual bool requestPointerLock() | 381 virtual bool requestPointerLock() |
382 { | 382 { |
383 return WebTestProxyBase::requestPointerLock(); | 383 return WebTestProxyBase::requestPointerLock(); |
384 } | 384 } |
385 virtual void requestPointerUnlock() | 385 virtual void requestPointerUnlock() |
386 { | 386 { |
387 WebTestProxyBase::requestPointerUnlock(); | 387 WebTestProxyBase::requestPointerUnlock(); |
388 } | 388 } |
389 virtual bool isPointerLocked() | 389 virtual bool isPointerLocked() |
390 { | 390 { |
391 return WebTestProxyBase::isPointerLocked(); | 391 return WebTestProxyBase::isPointerLocked(); |
392 } | 392 } |
393 virtual void didFocus() | 393 virtual void didFocus() |
394 { | 394 { |
395 WebTestProxyBase::didFocus(); | 395 WebTestProxyBase::didFocus(); |
396 Base::didFocus(); | 396 Base::didFocus(); |
397 } | 397 } |
398 virtual void didBlur() | 398 virtual void didBlur() |
399 { | 399 { |
400 WebTestProxyBase::didBlur(); | 400 WebTestProxyBase::didBlur(); |
401 Base::didBlur(); | 401 Base::didBlur(); |
402 } | 402 } |
403 virtual void setToolTipText(const WebKit::WebString& text, WebKit::WebTextDi
rection hint) | 403 virtual void setToolTipText(const blink::WebString& text, blink::WebTextDire
ction hint) |
404 { | 404 { |
405 WebTestProxyBase::setToolTipText(text, hint); | 405 WebTestProxyBase::setToolTipText(text, hint); |
406 Base::setToolTipText(text, hint); | 406 Base::setToolTipText(text, hint); |
407 } | 407 } |
408 virtual void resetInputMethod() | 408 virtual void resetInputMethod() |
409 { | 409 { |
410 WebTestProxyBase::resetInputMethod(); | 410 WebTestProxyBase::resetInputMethod(); |
411 } | 411 } |
412 | 412 |
413 virtual void didStartProvisionalLoad(WebKit::WebFrame* frame) | 413 virtual void didStartProvisionalLoad(blink::WebFrame* frame) |
414 { | 414 { |
415 WebTestProxyBase::didStartProvisionalLoad(frame); | 415 WebTestProxyBase::didStartProvisionalLoad(frame); |
416 Base::didStartProvisionalLoad(frame); | 416 Base::didStartProvisionalLoad(frame); |
417 } | 417 } |
418 virtual void didReceiveServerRedirectForProvisionalLoad(WebKit::WebFrame* fr
ame) | 418 virtual void didReceiveServerRedirectForProvisionalLoad(blink::WebFrame* fra
me) |
419 { | 419 { |
420 WebTestProxyBase::didReceiveServerRedirectForProvisionalLoad(frame); | 420 WebTestProxyBase::didReceiveServerRedirectForProvisionalLoad(frame); |
421 Base::didReceiveServerRedirectForProvisionalLoad(frame); | 421 Base::didReceiveServerRedirectForProvisionalLoad(frame); |
422 } | 422 } |
423 virtual void didFailProvisionalLoad(WebKit::WebFrame* frame, const WebKit::W
ebURLError& error) | 423 virtual void didFailProvisionalLoad(blink::WebFrame* frame, const blink::Web
URLError& error) |
424 { | 424 { |
425 // If the test finished, don't notify the embedder of the failed load, | 425 // If the test finished, don't notify the embedder of the failed load, |
426 // as we already destroyed the document loader. | 426 // as we already destroyed the document loader. |
427 if (WebTestProxyBase::didFailProvisionalLoad(frame, error)) | 427 if (WebTestProxyBase::didFailProvisionalLoad(frame, error)) |
428 return; | 428 return; |
429 Base::didFailProvisionalLoad(frame, error); | 429 Base::didFailProvisionalLoad(frame, error); |
430 } | 430 } |
431 virtual void didCommitProvisionalLoad(WebKit::WebFrame* frame, bool isNewNav
igation) | 431 virtual void didCommitProvisionalLoad(blink::WebFrame* frame, bool isNewNavi
gation) |
432 { | 432 { |
433 WebTestProxyBase::didCommitProvisionalLoad(frame, isNewNavigation); | 433 WebTestProxyBase::didCommitProvisionalLoad(frame, isNewNavigation); |
434 Base::didCommitProvisionalLoad(frame, isNewNavigation); | 434 Base::didCommitProvisionalLoad(frame, isNewNavigation); |
435 } | 435 } |
436 virtual void didReceiveTitle(WebKit::WebFrame* frame, const WebKit::WebStrin
g& title, WebKit::WebTextDirection direction) | 436 virtual void didReceiveTitle(blink::WebFrame* frame, const blink::WebString&
title, blink::WebTextDirection direction) |
437 { | 437 { |
438 WebTestProxyBase::didReceiveTitle(frame, title, direction); | 438 WebTestProxyBase::didReceiveTitle(frame, title, direction); |
439 Base::didReceiveTitle(frame, title, direction); | 439 Base::didReceiveTitle(frame, title, direction); |
440 } | 440 } |
441 virtual void didChangeIcon(WebKit::WebFrame* frame, WebKit::WebIconURL::Type
iconType) | 441 virtual void didChangeIcon(blink::WebFrame* frame, blink::WebIconURL::Type i
conType) |
442 { | 442 { |
443 WebTestProxyBase::didChangeIcon(frame, iconType); | 443 WebTestProxyBase::didChangeIcon(frame, iconType); |
444 Base::didChangeIcon(frame, iconType); | 444 Base::didChangeIcon(frame, iconType); |
445 } | 445 } |
446 virtual void didFinishDocumentLoad(WebKit::WebFrame* frame) | 446 virtual void didFinishDocumentLoad(blink::WebFrame* frame) |
447 { | 447 { |
448 WebTestProxyBase::didFinishDocumentLoad(frame); | 448 WebTestProxyBase::didFinishDocumentLoad(frame); |
449 Base::didFinishDocumentLoad(frame); | 449 Base::didFinishDocumentLoad(frame); |
450 } | 450 } |
451 virtual void didHandleOnloadEvents(WebKit::WebFrame* frame) | 451 virtual void didHandleOnloadEvents(blink::WebFrame* frame) |
452 { | 452 { |
453 WebTestProxyBase::didHandleOnloadEvents(frame); | 453 WebTestProxyBase::didHandleOnloadEvents(frame); |
454 Base::didHandleOnloadEvents(frame); | 454 Base::didHandleOnloadEvents(frame); |
455 } | 455 } |
456 virtual void didFailLoad(WebKit::WebFrame* frame, const WebKit::WebURLError&
error) | 456 virtual void didFailLoad(blink::WebFrame* frame, const blink::WebURLError& e
rror) |
457 { | 457 { |
458 WebTestProxyBase::didFailLoad(frame, error); | 458 WebTestProxyBase::didFailLoad(frame, error); |
459 Base::didFailLoad(frame, error); | 459 Base::didFailLoad(frame, error); |
460 } | 460 } |
461 virtual void didFinishLoad(WebKit::WebFrame* frame) | 461 virtual void didFinishLoad(blink::WebFrame* frame) |
462 { | 462 { |
463 WebTestProxyBase::didFinishLoad(frame); | 463 WebTestProxyBase::didFinishLoad(frame); |
464 Base::didFinishLoad(frame); | 464 Base::didFinishLoad(frame); |
465 } | 465 } |
466 virtual void didDetectXSS(WebKit::WebFrame* frame, const WebKit::WebURL& ins
ecureURL, bool didBlockEntirePage) | 466 virtual void didDetectXSS(blink::WebFrame* frame, const blink::WebURL& insec
ureURL, bool didBlockEntirePage) |
467 { | 467 { |
468 WebTestProxyBase::didDetectXSS(frame, insecureURL, didBlockEntirePage); | 468 WebTestProxyBase::didDetectXSS(frame, insecureURL, didBlockEntirePage); |
469 Base::didDetectXSS(frame, insecureURL, didBlockEntirePage); | 469 Base::didDetectXSS(frame, insecureURL, didBlockEntirePage); |
470 } | 470 } |
471 virtual void willRequestResource(WebKit::WebFrame* frame, const WebKit::WebC
achedURLRequest& request) | 471 virtual void willRequestResource(blink::WebFrame* frame, const blink::WebCac
hedURLRequest& request) |
472 { | 472 { |
473 WebTestProxyBase::willRequestResource(frame, request); | 473 WebTestProxyBase::willRequestResource(frame, request); |
474 Base::willRequestResource(frame, request); | 474 Base::willRequestResource(frame, request); |
475 } | 475 } |
476 virtual void didCreateDataSource(WebKit::WebFrame* frame, WebKit::WebDataSou
rce* ds) | 476 virtual void didCreateDataSource(blink::WebFrame* frame, blink::WebDataSourc
e* ds) |
477 { | 477 { |
478 WebTestProxyBase::didCreateDataSource(frame, ds); | 478 WebTestProxyBase::didCreateDataSource(frame, ds); |
479 Base::didCreateDataSource(frame, ds); | 479 Base::didCreateDataSource(frame, ds); |
480 } | 480 } |
481 virtual void willSendRequest(WebKit::WebFrame* frame, unsigned identifier, W
ebKit::WebURLRequest& request, const WebKit::WebURLResponse& redirectResponse) | 481 virtual void willSendRequest(blink::WebFrame* frame, unsigned identifier, bl
ink::WebURLRequest& request, const blink::WebURLResponse& redirectResponse) |
482 { | 482 { |
483 WebTestProxyBase::willSendRequest(frame, identifier, request, redirectRe
sponse); | 483 WebTestProxyBase::willSendRequest(frame, identifier, request, redirectRe
sponse); |
484 Base::willSendRequest(frame, identifier, request, redirectResponse); | 484 Base::willSendRequest(frame, identifier, request, redirectResponse); |
485 } | 485 } |
486 virtual void didReceiveResponse(WebKit::WebFrame* frame, unsigned identifier
, const WebKit::WebURLResponse& response) | 486 virtual void didReceiveResponse(blink::WebFrame* frame, unsigned identifier,
const blink::WebURLResponse& response) |
487 { | 487 { |
488 WebTestProxyBase::didReceiveResponse(frame, identifier, response); | 488 WebTestProxyBase::didReceiveResponse(frame, identifier, response); |
489 Base::didReceiveResponse(frame, identifier, response); | 489 Base::didReceiveResponse(frame, identifier, response); |
490 } | 490 } |
491 virtual void didChangeResourcePriority(WebKit::WebFrame* frame, unsigned ide
ntifier, const WebKit::WebURLRequest::Priority& priority) | 491 virtual void didChangeResourcePriority(blink::WebFrame* frame, unsigned iden
tifier, const blink::WebURLRequest::Priority& priority) |
492 { | 492 { |
493 WebTestProxyBase::didChangeResourcePriority(frame, identifier, priority)
; | 493 WebTestProxyBase::didChangeResourcePriority(frame, identifier, priority)
; |
494 Base::didChangeResourcePriority(frame, identifier, priority); | 494 Base::didChangeResourcePriority(frame, identifier, priority); |
495 } | 495 } |
496 virtual void didFinishResourceLoad(WebKit::WebFrame* frame, unsigned identif
ier) | 496 virtual void didFinishResourceLoad(blink::WebFrame* frame, unsigned identifi
er) |
497 { | 497 { |
498 WebTestProxyBase::didFinishResourceLoad(frame, identifier); | 498 WebTestProxyBase::didFinishResourceLoad(frame, identifier); |
499 Base::didFinishResourceLoad(frame, identifier); | 499 Base::didFinishResourceLoad(frame, identifier); |
500 } | 500 } |
501 virtual void didAddMessageToConsole(const WebKit::WebConsoleMessage& message
, const WebKit::WebString& sourceName, unsigned sourceLine, const WebKit::WebStr
ing& stackTrace) | 501 virtual void didAddMessageToConsole(const blink::WebConsoleMessage& message,
const blink::WebString& sourceName, unsigned sourceLine, const blink::WebString
& stackTrace) |
502 { | 502 { |
503 WebTestProxyBase::didAddMessageToConsole(message, sourceName, sourceLine
); | 503 WebTestProxyBase::didAddMessageToConsole(message, sourceName, sourceLine
); |
504 Base::didAddMessageToConsole(message, sourceName, sourceLine, stackTrace
); | 504 Base::didAddMessageToConsole(message, sourceName, sourceLine, stackTrace
); |
505 } | 505 } |
506 virtual void runModalAlertDialog(WebKit::WebFrame* frame, const WebKit::WebS
tring& message) | 506 virtual void runModalAlertDialog(blink::WebFrame* frame, const blink::WebStr
ing& message) |
507 { | 507 { |
508 WebTestProxyBase::runModalAlertDialog(frame, message); | 508 WebTestProxyBase::runModalAlertDialog(frame, message); |
509 Base::runModalAlertDialog(frame, message); | 509 Base::runModalAlertDialog(frame, message); |
510 } | 510 } |
511 virtual bool runModalConfirmDialog(WebKit::WebFrame* frame, const WebKit::We
bString& message) | 511 virtual bool runModalConfirmDialog(blink::WebFrame* frame, const blink::WebS
tring& message) |
512 { | 512 { |
513 WebTestProxyBase::runModalConfirmDialog(frame, message); | 513 WebTestProxyBase::runModalConfirmDialog(frame, message); |
514 return Base::runModalConfirmDialog(frame, message); | 514 return Base::runModalConfirmDialog(frame, message); |
515 } | 515 } |
516 virtual bool runModalPromptDialog(WebKit::WebFrame* frame, const WebKit::Web
String& message, const WebKit::WebString& defaultValue, WebKit::WebString* actua
lValue) | 516 virtual bool runModalPromptDialog(blink::WebFrame* frame, const blink::WebSt
ring& message, const blink::WebString& defaultValue, blink::WebString* actualVal
ue) |
517 { | 517 { |
518 WebTestProxyBase::runModalPromptDialog(frame, message, defaultValue, act
ualValue); | 518 WebTestProxyBase::runModalPromptDialog(frame, message, defaultValue, act
ualValue); |
519 return Base::runModalPromptDialog(frame, message, defaultValue, actualVa
lue); | 519 return Base::runModalPromptDialog(frame, message, defaultValue, actualVa
lue); |
520 } | 520 } |
521 virtual bool runModalBeforeUnloadDialog(WebKit::WebFrame* frame, const WebKi
t::WebString& message) | 521 virtual bool runModalBeforeUnloadDialog(blink::WebFrame* frame, const blink:
:WebString& message) |
522 { | 522 { |
523 return WebTestProxyBase::runModalBeforeUnloadDialog(frame, message); | 523 return WebTestProxyBase::runModalBeforeUnloadDialog(frame, message); |
524 } | 524 } |
525 virtual WebKit::WebNavigationPolicy decidePolicyForNavigation(WebKit::WebFra
me* frame, WebKit::WebDataSource::ExtraData* extraData, const WebKit::WebURLRequ
est& request, WebKit::WebNavigationType type, WebKit::WebNavigationPolicy defaul
tPolicy, bool isRedirect) | 525 virtual blink::WebNavigationPolicy decidePolicyForNavigation(blink::WebFrame
* frame, blink::WebDataSource::ExtraData* extraData, const blink::WebURLRequest&
request, blink::WebNavigationType type, blink::WebNavigationPolicy defaultPolic
y, bool isRedirect) |
526 { | 526 { |
527 WebKit::WebNavigationPolicy policy = WebTestProxyBase::decidePolicyForNa
vigation(frame, extraData, request, type, defaultPolicy, isRedirect); | 527 blink::WebNavigationPolicy policy = WebTestProxyBase::decidePolicyForNav
igation(frame, extraData, request, type, defaultPolicy, isRedirect); |
528 if (policy == WebKit::WebNavigationPolicyIgnore) | 528 if (policy == blink::WebNavigationPolicyIgnore) |
529 return policy; | 529 return policy; |
530 return Base::decidePolicyForNavigation(frame, extraData, request, type,
defaultPolicy, isRedirect); | 530 return Base::decidePolicyForNavigation(frame, extraData, request, type,
defaultPolicy, isRedirect); |
531 } | 531 } |
532 virtual bool willCheckAndDispatchMessageEvent(WebKit::WebFrame* sourceFrame,
WebKit::WebFrame* targetFrame, WebKit::WebSecurityOrigin target, WebKit::WebDOM
MessageEvent event) | 532 virtual bool willCheckAndDispatchMessageEvent(blink::WebFrame* sourceFrame,
blink::WebFrame* targetFrame, blink::WebSecurityOrigin target, blink::WebDOMMess
ageEvent event) |
533 { | 533 { |
534 if (WebTestProxyBase::willCheckAndDispatchMessageEvent(sourceFrame, targ
etFrame, target, event)) | 534 if (WebTestProxyBase::willCheckAndDispatchMessageEvent(sourceFrame, targ
etFrame, target, event)) |
535 return true; | 535 return true; |
536 return Base::willCheckAndDispatchMessageEvent(sourceFrame, targetFrame,
target, event); | 536 return Base::willCheckAndDispatchMessageEvent(sourceFrame, targetFrame,
target, event); |
537 } | 537 } |
538 virtual WebKit::WebColorChooser* createColorChooser(WebKit::WebColorChooserC
lient* client, const WebKit::WebColor& color) | 538 virtual blink::WebColorChooser* createColorChooser(blink::WebColorChooserCli
ent* client, const blink::WebColor& color) |
539 { | 539 { |
540 return WebTestProxyBase::createColorChooser(client, color); | 540 return WebTestProxyBase::createColorChooser(client, color); |
541 } | 541 } |
542 virtual bool runFileChooser(const WebKit::WebFileChooserParams& params, WebK
it::WebFileChooserCompletion* completion) | 542 virtual bool runFileChooser(const blink::WebFileChooserParams& params, blink
::WebFileChooserCompletion* completion) |
543 { | 543 { |
544 return WebTestProxyBase::runFileChooser(params, completion); | 544 return WebTestProxyBase::runFileChooser(params, completion); |
545 } | 545 } |
546 }; | 546 }; |
547 | 547 |
548 } | 548 } |
549 | 549 |
550 #endif // WebTestProxy_h | 550 #endif // WebTestProxy_h |
OLD | NEW |