| 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 class WebLocalFrame; | 44 class WebLocalFrame; |
| 45 class WebMIDIAccessor; | 45 class WebMIDIAccessor; |
| 46 class WebMIDIAccessorClient; | 46 class WebMIDIAccessorClient; |
| 47 class WebMIDIClient; | 47 class WebMIDIClient; |
| 48 class WebMIDIClientMock; | 48 class WebMIDIClientMock; |
| 49 class WebNode; | 49 class WebNode; |
| 50 class WebNotificationPresenter; | 50 class WebNotificationPresenter; |
| 51 class WebPlugin; | 51 class WebPlugin; |
| 52 class WebRange; | 52 class WebRange; |
| 53 class WebSerializedScriptValue; | 53 class WebSerializedScriptValue; |
| 54 class WebSpeechInputController; | |
| 55 class WebSpeechInputListener; | |
| 56 class WebSpeechRecognizer; | 54 class WebSpeechRecognizer; |
| 57 class WebSpellCheckClient; | 55 class WebSpellCheckClient; |
| 58 class WebString; | 56 class WebString; |
| 59 class WebURL; | 57 class WebURL; |
| 60 class WebURLResponse; | 58 class WebURLResponse; |
| 61 class WebUserMediaClient; | 59 class WebUserMediaClient; |
| 62 class WebView; | 60 class WebView; |
| 63 class WebWidget; | 61 class WebWidget; |
| 64 struct WebColorSuggestion; | 62 struct WebColorSuggestion; |
| 65 struct WebConsoleMessage; | 63 struct WebConsoleMessage; |
| 66 struct WebContextMenuData; | 64 struct WebContextMenuData; |
| 67 struct WebFileChooserParams; | 65 struct WebFileChooserParams; |
| 68 struct WebPluginParams; | 66 struct WebPluginParams; |
| 69 struct WebPoint; | 67 struct WebPoint; |
| 70 struct WebSize; | 68 struct WebSize; |
| 71 struct WebWindowFeatures; | 69 struct WebWindowFeatures; |
| 72 typedef unsigned WebColor; | 70 typedef unsigned WebColor; |
| 73 } | 71 } |
| 74 | 72 |
| 75 namespace WebTestRunner { | 73 namespace WebTestRunner { |
| 76 class MockWebSpeechInputController; | |
| 77 class MockWebSpeechRecognizer; | 74 class MockWebSpeechRecognizer; |
| 78 class SpellCheckClient; | 75 class SpellCheckClient; |
| 79 class TestInterfaces; | 76 class TestInterfaces; |
| 80 class WebTestDelegate; | 77 class WebTestDelegate; |
| 81 class WebTestInterfaces; | 78 class WebTestInterfaces; |
| 82 class WebUserMediaClientMock; | 79 class WebUserMediaClientMock; |
| 83 } | 80 } |
| 84 | 81 |
| 85 namespace content { | 82 namespace content { |
| 86 | 83 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 112 void didOpenChooser(); | 109 void didOpenChooser(); |
| 113 void didCloseChooser(); | 110 void didCloseChooser(); |
| 114 bool isChooserShown(); | 111 bool isChooserShown(); |
| 115 | 112 |
| 116 void display(base::Closure callback); | 113 void display(base::Closure callback); |
| 117 void displayAsyncThen(base::Closure callback); | 114 void displayAsyncThen(base::Closure callback); |
| 118 | 115 |
| 119 void discardBackingStore(); | 116 void discardBackingStore(); |
| 120 | 117 |
| 121 blink::WebMIDIClientMock* midiClientMock(); | 118 blink::WebMIDIClientMock* midiClientMock(); |
| 122 WebTestRunner::MockWebSpeechInputController* speechInputControllerMock(); | |
| 123 WebTestRunner::MockWebSpeechRecognizer* speechRecognizerMock(); | 119 WebTestRunner::MockWebSpeechRecognizer* speechRecognizerMock(); |
| 124 | 120 |
| 125 WebTestRunner::WebTaskList* taskList() { return &m_taskList; } | 121 WebTestRunner::WebTaskList* taskList() { return &m_taskList; } |
| 126 | 122 |
| 127 blink::WebView* webView(); | 123 blink::WebView* webView(); |
| 128 | 124 |
| 129 void didForceResize(); | 125 void didForceResize(); |
| 130 | 126 |
| 131 void postSpellCheckEvent(const blink::WebString& eventName); | 127 void postSpellCheckEvent(const blink::WebString& eventName); |
| 132 | 128 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 149 void didEndEditing(); | 145 void didEndEditing(); |
| 150 bool createView(blink::WebLocalFrame* creator, const blink::WebURLRequest&,
const blink::WebWindowFeatures&, const blink::WebString& frameName, blink::WebNa
vigationPolicy, bool suppressOpener); | 146 bool createView(blink::WebLocalFrame* creator, const blink::WebURLRequest&,
const blink::WebWindowFeatures&, const blink::WebString& frameName, blink::WebNa
vigationPolicy, bool suppressOpener); |
| 151 blink::WebPlugin* createPlugin(blink::WebLocalFrame*, const blink::WebPlugin
Params&); | 147 blink::WebPlugin* createPlugin(blink::WebLocalFrame*, const blink::WebPlugin
Params&); |
| 152 void setStatusText(const blink::WebString&); | 148 void setStatusText(const blink::WebString&); |
| 153 void didStopLoading(); | 149 void didStopLoading(); |
| 154 void showContextMenu(blink::WebLocalFrame*, const blink::WebContextMenuData&
); | 150 void showContextMenu(blink::WebLocalFrame*, const blink::WebContextMenuData&
); |
| 155 blink::WebUserMediaClient* userMediaClient(); | 151 blink::WebUserMediaClient* userMediaClient(); |
| 156 void printPage(blink::WebLocalFrame*); | 152 void printPage(blink::WebLocalFrame*); |
| 157 blink::WebNotificationPresenter* notificationPresenter(); | 153 blink::WebNotificationPresenter* notificationPresenter(); |
| 158 blink::WebMIDIClient* webMIDIClient(); | 154 blink::WebMIDIClient* webMIDIClient(); |
| 159 blink::WebSpeechInputController* speechInputController(blink::WebSpeechInput
Listener*); | |
| 160 blink::WebSpeechRecognizer* speechRecognizer(); | 155 blink::WebSpeechRecognizer* speechRecognizer(); |
| 161 bool requestPointerLock(); | 156 bool requestPointerLock(); |
| 162 void requestPointerUnlock(); | 157 void requestPointerUnlock(); |
| 163 bool isPointerLocked(); | 158 bool isPointerLocked(); |
| 164 void didFocus(); | 159 void didFocus(); |
| 165 void didBlur(); | 160 void didBlur(); |
| 166 void setToolTipText(const blink::WebString&, blink::WebTextDirection); | 161 void setToolTipText(const blink::WebString&, blink::WebTextDirection); |
| 167 void didAddMessageToConsole(const blink::WebConsoleMessage&, const blink::We
bString& sourceName, unsigned sourceLine); | 162 void didAddMessageToConsole(const blink::WebConsoleMessage&, const blink::We
bString& sourceName, unsigned sourceLine); |
| 168 void loadURLExternally(blink::WebLocalFrame* frame, const blink::WebURLReque
st& request, blink::WebNavigationPolicy policy, const blink::WebString& suggeste
d_name); | 163 void loadURLExternally(blink::WebLocalFrame* frame, const blink::WebURLReque
st& request, blink::WebNavigationPolicy policy, const blink::WebString& suggeste
d_name); |
| 169 void didStartProvisionalLoad(blink::WebLocalFrame*); | 164 void didStartProvisionalLoad(blink::WebLocalFrame*); |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 bool m_isPainting; | 210 bool m_isPainting; |
| 216 bool m_animateScheduled; | 211 bool m_animateScheduled; |
| 217 std::map<unsigned, std::string> m_resourceIdentifierMap; | 212 std::map<unsigned, std::string> m_resourceIdentifierMap; |
| 218 std::map<unsigned, blink::WebURLRequest> m_requestMap; | 213 std::map<unsigned, blink::WebURLRequest> m_requestMap; |
| 219 | 214 |
| 220 bool m_logConsoleOutput; | 215 bool m_logConsoleOutput; |
| 221 int m_chooserCount; | 216 int m_chooserCount; |
| 222 | 217 |
| 223 scoped_ptr<blink::WebMIDIClientMock> m_midiClient; | 218 scoped_ptr<blink::WebMIDIClientMock> m_midiClient; |
| 224 scoped_ptr<WebTestRunner::MockWebSpeechRecognizer> m_speechRecognizer; | 219 scoped_ptr<WebTestRunner::MockWebSpeechRecognizer> m_speechRecognizer; |
| 225 scoped_ptr<WebTestRunner::MockWebSpeechInputController> | |
| 226 m_speechInputController; | |
| 227 | 220 |
| 228 private: | 221 private: |
| 229 DISALLOW_COPY_AND_ASSIGN(WebTestProxyBase); | 222 DISALLOW_COPY_AND_ASSIGN(WebTestProxyBase); |
| 230 }; | 223 }; |
| 231 | 224 |
| 232 // Use this template to inject methods into your WebViewClient/WebFrameClient | 225 // Use this template to inject methods into your WebViewClient/WebFrameClient |
| 233 // implementation required for the running layout tests. | 226 // implementation required for the running layout tests. |
| 234 template<class Base, typename T> | 227 template<class Base, typename T> |
| 235 class WebTestProxy : public Base, public WebTestProxyBase { | 228 class WebTestProxy : public Base, public WebTestProxyBase { |
| 236 public: | 229 public: |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 308 return WebTestProxyBase::userMediaClient(); | 301 return WebTestProxyBase::userMediaClient(); |
| 309 } | 302 } |
| 310 virtual void printPage(blink::WebLocalFrame* frame) | 303 virtual void printPage(blink::WebLocalFrame* frame) |
| 311 { | 304 { |
| 312 WebTestProxyBase::printPage(frame); | 305 WebTestProxyBase::printPage(frame); |
| 313 } | 306 } |
| 314 virtual blink::WebMIDIClient* webMIDIClient() | 307 virtual blink::WebMIDIClient* webMIDIClient() |
| 315 { | 308 { |
| 316 return WebTestProxyBase::webMIDIClient(); | 309 return WebTestProxyBase::webMIDIClient(); |
| 317 } | 310 } |
| 318 virtual blink::WebSpeechInputController* speechInputController(blink::WebSpe
echInputListener* listener) | |
| 319 { | |
| 320 return WebTestProxyBase::speechInputController(listener); | |
| 321 } | |
| 322 virtual blink::WebSpeechRecognizer* speechRecognizer() | 311 virtual blink::WebSpeechRecognizer* speechRecognizer() |
| 323 { | 312 { |
| 324 return WebTestProxyBase::speechRecognizer(); | 313 return WebTestProxyBase::speechRecognizer(); |
| 325 } | 314 } |
| 326 virtual bool requestPointerLock() | 315 virtual bool requestPointerLock() |
| 327 { | 316 { |
| 328 return WebTestProxyBase::requestPointerLock(); | 317 return WebTestProxyBase::requestPointerLock(); |
| 329 } | 318 } |
| 330 virtual void requestPointerUnlock() | 319 virtual void requestPointerUnlock() |
| 331 { | 320 { |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 375 WebTestProxyBase::postSpellCheckEvent(eventName); | 364 WebTestProxyBase::postSpellCheckEvent(eventName); |
| 376 } | 365 } |
| 377 | 366 |
| 378 private: | 367 private: |
| 379 DISALLOW_COPY_AND_ASSIGN(WebTestProxy); | 368 DISALLOW_COPY_AND_ASSIGN(WebTestProxy); |
| 380 }; | 369 }; |
| 381 | 370 |
| 382 } // namespace content | 371 } // namespace content |
| 383 | 372 |
| 384 #endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_WEBTESTPROXY_H_ | 373 #endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_WEBTESTPROXY_H_ |
| OLD | NEW |