OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_SHELL_RENDERER_TEST_RUNNER_WEBTESTPROXY_H_ | 5 #ifndef CONTENT_SHELL_RENDERER_TEST_RUNNER_WEBTESTPROXY_H_ |
6 #define CONTENT_SHELL_RENDERER_TEST_RUNNER_WEBTESTPROXY_H_ | 6 #define CONTENT_SHELL_RENDERER_TEST_RUNNER_WEBTESTPROXY_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 bool runFileChooser(const blink::WebFileChooserParams&, blink::WebFileChoose
rCompletion*); | 99 bool runFileChooser(const blink::WebFileChooserParams&, blink::WebFileChoose
rCompletion*); |
100 void showValidationMessage(const blink::WebRect& anchorInRootView, const bli
nk::WebString& mainText, const blink::WebString& supplementalText, blink::WebTex
tDirection); | 100 void showValidationMessage(const blink::WebRect& anchorInRootView, const bli
nk::WebString& mainText, const blink::WebString& supplementalText, blink::WebTex
tDirection); |
101 void hideValidationMessage(); | 101 void hideValidationMessage(); |
102 void moveValidationMessage(const blink::WebRect& anchorInRootView); | 102 void moveValidationMessage(const blink::WebRect& anchorInRootView); |
103 | 103 |
104 std::string captureTree(bool debugRenderTree); | 104 std::string captureTree(bool debugRenderTree); |
105 SkCanvas* capturePixels(); | 105 SkCanvas* capturePixels(); |
106 | 106 |
107 void setLogConsoleOutput(bool enabled); | 107 void setLogConsoleOutput(bool enabled); |
108 | 108 |
109 // FIXME: Make this private again. | |
110 void scheduleComposite(); | |
111 | |
112 void didOpenChooser(); | 109 void didOpenChooser(); |
113 void didCloseChooser(); | 110 void didCloseChooser(); |
114 bool isChooserShown(); | 111 bool isChooserShown(); |
115 | 112 |
116 void display(); | 113 void display(); |
117 void displayInvalidatedRegion(); | 114 void displayInvalidatedRegion(); |
118 void discardBackingStore(); | 115 void discardBackingStore(); |
119 | 116 |
120 blink::WebGeolocationClientMock* geolocationClientMock(); | 117 blink::WebGeolocationClientMock* geolocationClientMock(); |
121 blink::WebMIDIClientMock* midiClientMock(); | 118 blink::WebMIDIClientMock* midiClientMock(); |
122 MockWebSpeechInputController* speechInputControllerMock(); | 119 MockWebSpeechInputController* speechInputControllerMock(); |
123 MockWebSpeechRecognizer* speechRecognizerMock(); | 120 MockWebSpeechRecognizer* speechRecognizerMock(); |
124 | 121 |
125 WebTaskList* taskList() { return &m_taskList; } | 122 WebTaskList* taskList() { return &m_taskList; } |
126 | 123 |
127 blink::WebView* webView(); | 124 blink::WebView* webView(); |
128 | 125 |
129 void didForceResize(); | 126 void didForceResize(); |
130 | 127 |
131 void postSpellCheckEvent(const blink::WebString& eventName); | 128 void postSpellCheckEvent(const blink::WebString& eventName); |
132 | 129 |
133 protected: | 130 protected: |
134 WebTestProxyBase(); | 131 WebTestProxyBase(); |
135 ~WebTestProxyBase(); | 132 ~WebTestProxyBase(); |
136 | 133 |
137 void didInvalidateRect(const blink::WebRect&); | 134 void didInvalidateRect(const blink::WebRect&); |
138 void didScrollRect(int, int, const blink::WebRect&); | 135 void didScrollRect(int, int, const blink::WebRect&); |
139 void scheduleAnimation(); | |
140 // FIXME: Remove once we switch to use didForceResize. | 136 // FIXME: Remove once we switch to use didForceResize. |
141 void setWindowRect(const blink::WebRect&); | 137 void setWindowRect(const blink::WebRect&); |
142 void show(blink::WebNavigationPolicy); | 138 void show(blink::WebNavigationPolicy); |
143 void didAutoResize(const blink::WebSize&); | 139 void didAutoResize(const blink::WebSize&); |
144 void postAccessibilityEvent(const blink::WebAXObject&, blink::WebAXEvent); | 140 void postAccessibilityEvent(const blink::WebAXObject&, blink::WebAXEvent); |
145 void startDragging(blink::WebFrame*, const blink::WebDragData&, blink::WebDr
agOperationsMask, const blink::WebImage&, const blink::WebPoint&); | 141 void startDragging(blink::WebFrame*, const blink::WebDragData&, blink::WebDr
agOperationsMask, const blink::WebImage&, const blink::WebPoint&); |
146 void didChangeSelection(bool isEmptySelection); | 142 void didChangeSelection(bool isEmptySelection); |
147 void didChangeContents(); | 143 void didChangeContents(); |
148 void didEndEditing(); | 144 void didEndEditing(); |
149 bool createView(blink::WebFrame* creator, const blink::WebURLRequest&, const
blink::WebWindowFeatures&, const blink::WebString& frameName, blink::WebNavigat
ionPolicy, bool suppressOpener); | 145 bool createView(blink::WebFrame* creator, const blink::WebURLRequest&, const
blink::WebWindowFeatures&, const blink::WebString& frameName, blink::WebNavigat
ionPolicy, bool suppressOpener); |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 void didDispatchPingLoader(blink::WebFrame*, const blink::WebURL&); | 181 void didDispatchPingLoader(blink::WebFrame*, const blink::WebURL&); |
186 void willRequestResource(blink::WebFrame*, const blink::WebCachedURLRequest&
); | 182 void willRequestResource(blink::WebFrame*, const blink::WebCachedURLRequest&
); |
187 void willSendRequest(blink::WebFrame*, unsigned identifier, blink::WebURLReq
uest&, const blink::WebURLResponse& redirectResponse); | 183 void willSendRequest(blink::WebFrame*, unsigned identifier, blink::WebURLReq
uest&, const blink::WebURLResponse& redirectResponse); |
188 void didReceiveResponse(blink::WebFrame*, unsigned identifier, const blink::
WebURLResponse&); | 184 void didReceiveResponse(blink::WebFrame*, unsigned identifier, const blink::
WebURLResponse&); |
189 void didChangeResourcePriority(blink::WebFrame*, unsigned identifier, const
blink::WebURLRequest::Priority&); | 185 void didChangeResourcePriority(blink::WebFrame*, unsigned identifier, const
blink::WebURLRequest::Priority&); |
190 void didFinishResourceLoad(blink::WebFrame*, unsigned identifier); | 186 void didFinishResourceLoad(blink::WebFrame*, unsigned identifier); |
191 blink::WebNavigationPolicy decidePolicyForNavigation(blink::WebFrame*, blink
::WebDataSource::ExtraData*, const blink::WebURLRequest&, blink::WebNavigationTy
pe, blink::WebNavigationPolicy defaultPolicy, bool isRedirect); | 187 blink::WebNavigationPolicy decidePolicyForNavigation(blink::WebFrame*, blink
::WebDataSource::ExtraData*, const blink::WebURLRequest&, blink::WebNavigationTy
pe, blink::WebNavigationPolicy defaultPolicy, bool isRedirect); |
192 bool willCheckAndDispatchMessageEvent(blink::WebFrame* sourceFrame, blink::W
ebFrame* targetFrame, blink::WebSecurityOrigin target, blink::WebDOMMessageEvent
); | 188 bool willCheckAndDispatchMessageEvent(blink::WebFrame* sourceFrame, blink::W
ebFrame* targetFrame, blink::WebSecurityOrigin target, blink::WebDOMMessageEvent
); |
193 void resetInputMethod(); | 189 void resetInputMethod(); |
194 | 190 |
| 191 void ScheduleComposite(); |
| 192 void ScheduleAnimation(); |
| 193 |
195 private: | 194 private: |
196 template<class, typename, typename> friend class WebFrameTestProxy; | 195 template<class, typename, typename> friend class WebFrameTestProxy; |
197 void locationChangeDone(blink::WebFrame*); | 196 void locationChangeDone(blink::WebFrame*); |
198 void paintRect(const blink::WebRect&); | 197 void paintRect(const blink::WebRect&); |
199 void paintInvalidatedRegion(); | 198 void paintInvalidatedRegion(); |
200 void paintPagesWithBoundaries(); | 199 void paintPagesWithBoundaries(); |
201 SkCanvas* canvas(); | 200 SkCanvas* canvas(); |
202 void displayRepaintMask(); | 201 void displayRepaintMask(); |
203 void invalidateAll(); | 202 void invalidateAll(); |
204 void animateNow(); | 203 void animateNow(); |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 | 247 |
249 // WebViewClient implementation. | 248 // WebViewClient implementation. |
250 virtual void didInvalidateRect(const blink::WebRect& rect) | 249 virtual void didInvalidateRect(const blink::WebRect& rect) |
251 { | 250 { |
252 WebTestProxyBase::didInvalidateRect(rect); | 251 WebTestProxyBase::didInvalidateRect(rect); |
253 } | 252 } |
254 virtual void didScrollRect(int dx, int dy, const blink::WebRect& clipRect) | 253 virtual void didScrollRect(int dx, int dy, const blink::WebRect& clipRect) |
255 { | 254 { |
256 WebTestProxyBase::didScrollRect(dx, dy, clipRect); | 255 WebTestProxyBase::didScrollRect(dx, dy, clipRect); |
257 } | 256 } |
258 virtual void scheduleComposite() | |
259 { | |
260 WebTestProxyBase::scheduleComposite(); | |
261 } | |
262 virtual void scheduleAnimation() | |
263 { | |
264 WebTestProxyBase::scheduleAnimation(); | |
265 } | |
266 virtual void setWindowRect(const blink::WebRect& rect) | 257 virtual void setWindowRect(const blink::WebRect& rect) |
267 { | 258 { |
268 WebTestProxyBase::setWindowRect(rect); | 259 WebTestProxyBase::setWindowRect(rect); |
269 Base::setWindowRect(rect); | 260 Base::setWindowRect(rect); |
270 } | 261 } |
271 virtual void show(blink::WebNavigationPolicy policy) | 262 virtual void show(blink::WebNavigationPolicy policy) |
272 { | 263 { |
273 WebTestProxyBase::show(policy); | 264 WebTestProxyBase::show(policy); |
274 Base::show(policy); | 265 Base::show(policy); |
275 } | 266 } |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
521 } | 512 } |
522 virtual void moveValidationMessage(const blink::WebRect& anchorInRootView) | 513 virtual void moveValidationMessage(const blink::WebRect& anchorInRootView) |
523 { | 514 { |
524 WebTestProxyBase::moveValidationMessage(anchorInRootView); | 515 WebTestProxyBase::moveValidationMessage(anchorInRootView); |
525 } | 516 } |
526 virtual void postSpellCheckEvent(const blink::WebString& eventName) | 517 virtual void postSpellCheckEvent(const blink::WebString& eventName) |
527 { | 518 { |
528 WebTestProxyBase::postSpellCheckEvent(eventName); | 519 WebTestProxyBase::postSpellCheckEvent(eventName); |
529 } | 520 } |
530 | 521 |
| 522 // Override Base implementation |
| 523 virtual void ScheduleComposite() |
| 524 { |
| 525 WebTestProxyBase::ScheduleComposite(); |
| 526 } |
| 527 virtual void ScheduleAnimation() |
| 528 { |
| 529 WebTestProxyBase::ScheduleAnimation(); |
| 530 } |
531 private: | 531 private: |
532 DISALLOW_COPY_AND_ASSIGN(WebTestProxy); | 532 DISALLOW_COPY_AND_ASSIGN(WebTestProxy); |
533 }; | 533 }; |
534 | 534 |
535 } | 535 } |
536 | 536 |
537 #endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_WEBTESTPROXY_H_ | 537 #endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_WEBTESTPROXY_H_ |
OLD | NEW |