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 |
109 void didOpenChooser(); | 112 void didOpenChooser(); |
110 void didCloseChooser(); | 113 void didCloseChooser(); |
111 bool isChooserShown(); | 114 bool isChooserShown(); |
112 | 115 |
113 void display(); | 116 void display(); |
114 void displayInvalidatedRegion(); | 117 void displayInvalidatedRegion(); |
115 void discardBackingStore(); | 118 void discardBackingStore(); |
116 | 119 |
117 blink::WebGeolocationClientMock* geolocationClientMock(); | 120 blink::WebGeolocationClientMock* geolocationClientMock(); |
118 blink::WebMIDIClientMock* midiClientMock(); | 121 blink::WebMIDIClientMock* midiClientMock(); |
119 MockWebSpeechInputController* speechInputControllerMock(); | 122 MockWebSpeechInputController* speechInputControllerMock(); |
120 MockWebSpeechRecognizer* speechRecognizerMock(); | 123 MockWebSpeechRecognizer* speechRecognizerMock(); |
121 | 124 |
122 WebTaskList* taskList() { return &m_taskList; } | 125 WebTaskList* taskList() { return &m_taskList; } |
123 | 126 |
124 blink::WebView* webView(); | 127 blink::WebView* webView(); |
125 | 128 |
126 void didForceResize(); | 129 void didForceResize(); |
127 | 130 |
128 void postSpellCheckEvent(const blink::WebString& eventName); | 131 void postSpellCheckEvent(const blink::WebString& eventName); |
129 | 132 |
130 protected: | 133 protected: |
131 WebTestProxyBase(); | 134 WebTestProxyBase(); |
132 ~WebTestProxyBase(); | 135 ~WebTestProxyBase(); |
133 | 136 |
134 void didInvalidateRect(const blink::WebRect&); | 137 void didInvalidateRect(const blink::WebRect&); |
135 void didScrollRect(int, int, const blink::WebRect&); | 138 void didScrollRect(int, int, const blink::WebRect&); |
| 139 void scheduleAnimation(); |
136 // FIXME: Remove once we switch to use didForceResize. | 140 // FIXME: Remove once we switch to use didForceResize. |
137 void setWindowRect(const blink::WebRect&); | 141 void setWindowRect(const blink::WebRect&); |
138 void show(blink::WebNavigationPolicy); | 142 void show(blink::WebNavigationPolicy); |
139 void didAutoResize(const blink::WebSize&); | 143 void didAutoResize(const blink::WebSize&); |
140 void postAccessibilityEvent(const blink::WebAXObject&, blink::WebAXEvent); | 144 void postAccessibilityEvent(const blink::WebAXObject&, blink::WebAXEvent); |
141 void startDragging(blink::WebFrame*, const blink::WebDragData&, blink::WebDr
agOperationsMask, const blink::WebImage&, const blink::WebPoint&); | 145 void startDragging(blink::WebFrame*, const blink::WebDragData&, blink::WebDr
agOperationsMask, const blink::WebImage&, const blink::WebPoint&); |
142 void didChangeSelection(bool isEmptySelection); | 146 void didChangeSelection(bool isEmptySelection); |
143 void didChangeContents(); | 147 void didChangeContents(); |
144 void didEndEditing(); | 148 void didEndEditing(); |
145 bool createView(blink::WebFrame* creator, const blink::WebURLRequest&, const
blink::WebWindowFeatures&, const blink::WebString& frameName, blink::WebNavigat
ionPolicy, bool suppressOpener); | 149 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... |
181 void didDispatchPingLoader(blink::WebFrame*, const blink::WebURL&); | 185 void didDispatchPingLoader(blink::WebFrame*, const blink::WebURL&); |
182 void willRequestResource(blink::WebFrame*, const blink::WebCachedURLRequest&
); | 186 void willRequestResource(blink::WebFrame*, const blink::WebCachedURLRequest&
); |
183 void willSendRequest(blink::WebFrame*, unsigned identifier, blink::WebURLReq
uest&, const blink::WebURLResponse& redirectResponse); | 187 void willSendRequest(blink::WebFrame*, unsigned identifier, blink::WebURLReq
uest&, const blink::WebURLResponse& redirectResponse); |
184 void didReceiveResponse(blink::WebFrame*, unsigned identifier, const blink::
WebURLResponse&); | 188 void didReceiveResponse(blink::WebFrame*, unsigned identifier, const blink::
WebURLResponse&); |
185 void didChangeResourcePriority(blink::WebFrame*, unsigned identifier, const
blink::WebURLRequest::Priority&); | 189 void didChangeResourcePriority(blink::WebFrame*, unsigned identifier, const
blink::WebURLRequest::Priority&); |
186 void didFinishResourceLoad(blink::WebFrame*, unsigned identifier); | 190 void didFinishResourceLoad(blink::WebFrame*, unsigned identifier); |
187 blink::WebNavigationPolicy decidePolicyForNavigation(blink::WebFrame*, blink
::WebDataSource::ExtraData*, const blink::WebURLRequest&, blink::WebNavigationTy
pe, blink::WebNavigationPolicy defaultPolicy, bool isRedirect); | 191 blink::WebNavigationPolicy decidePolicyForNavigation(blink::WebFrame*, blink
::WebDataSource::ExtraData*, const blink::WebURLRequest&, blink::WebNavigationTy
pe, blink::WebNavigationPolicy defaultPolicy, bool isRedirect); |
188 bool willCheckAndDispatchMessageEvent(blink::WebFrame* sourceFrame, blink::W
ebFrame* targetFrame, blink::WebSecurityOrigin target, blink::WebDOMMessageEvent
); | 192 bool willCheckAndDispatchMessageEvent(blink::WebFrame* sourceFrame, blink::W
ebFrame* targetFrame, blink::WebSecurityOrigin target, blink::WebDOMMessageEvent
); |
189 void resetInputMethod(); | 193 void resetInputMethod(); |
190 | 194 |
191 void ScheduleComposite(); | |
192 void ScheduleAnimation(); | |
193 | |
194 private: | 195 private: |
195 template<class, typename, typename> friend class WebFrameTestProxy; | 196 template<class, typename, typename> friend class WebFrameTestProxy; |
196 void locationChangeDone(blink::WebFrame*); | 197 void locationChangeDone(blink::WebFrame*); |
197 void paintRect(const blink::WebRect&); | 198 void paintRect(const blink::WebRect&); |
198 void paintInvalidatedRegion(); | 199 void paintInvalidatedRegion(); |
199 void paintPagesWithBoundaries(); | 200 void paintPagesWithBoundaries(); |
200 SkCanvas* canvas(); | 201 SkCanvas* canvas(); |
201 void displayRepaintMask(); | 202 void displayRepaintMask(); |
202 void invalidateAll(); | 203 void invalidateAll(); |
203 void animateNow(); | 204 void animateNow(); |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 | 248 |
248 // WebViewClient implementation. | 249 // WebViewClient implementation. |
249 virtual void didInvalidateRect(const blink::WebRect& rect) | 250 virtual void didInvalidateRect(const blink::WebRect& rect) |
250 { | 251 { |
251 WebTestProxyBase::didInvalidateRect(rect); | 252 WebTestProxyBase::didInvalidateRect(rect); |
252 } | 253 } |
253 virtual void didScrollRect(int dx, int dy, const blink::WebRect& clipRect) | 254 virtual void didScrollRect(int dx, int dy, const blink::WebRect& clipRect) |
254 { | 255 { |
255 WebTestProxyBase::didScrollRect(dx, dy, clipRect); | 256 WebTestProxyBase::didScrollRect(dx, dy, clipRect); |
256 } | 257 } |
| 258 virtual void scheduleComposite() |
| 259 { |
| 260 WebTestProxyBase::scheduleComposite(); |
| 261 } |
| 262 virtual void scheduleAnimation() |
| 263 { |
| 264 WebTestProxyBase::scheduleAnimation(); |
| 265 } |
257 virtual void setWindowRect(const blink::WebRect& rect) | 266 virtual void setWindowRect(const blink::WebRect& rect) |
258 { | 267 { |
259 WebTestProxyBase::setWindowRect(rect); | 268 WebTestProxyBase::setWindowRect(rect); |
260 Base::setWindowRect(rect); | 269 Base::setWindowRect(rect); |
261 } | 270 } |
262 virtual void show(blink::WebNavigationPolicy policy) | 271 virtual void show(blink::WebNavigationPolicy policy) |
263 { | 272 { |
264 WebTestProxyBase::show(policy); | 273 WebTestProxyBase::show(policy); |
265 Base::show(policy); | 274 Base::show(policy); |
266 } | 275 } |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
512 } | 521 } |
513 virtual void moveValidationMessage(const blink::WebRect& anchorInRootView) | 522 virtual void moveValidationMessage(const blink::WebRect& anchorInRootView) |
514 { | 523 { |
515 WebTestProxyBase::moveValidationMessage(anchorInRootView); | 524 WebTestProxyBase::moveValidationMessage(anchorInRootView); |
516 } | 525 } |
517 virtual void postSpellCheckEvent(const blink::WebString& eventName) | 526 virtual void postSpellCheckEvent(const blink::WebString& eventName) |
518 { | 527 { |
519 WebTestProxyBase::postSpellCheckEvent(eventName); | 528 WebTestProxyBase::postSpellCheckEvent(eventName); |
520 } | 529 } |
521 | 530 |
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 |