| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 COMPONENTS_TEST_RUNNER_WEB_TEST_PROXY_H_ | 5 #ifndef COMPONENTS_TEST_RUNNER_WEB_TEST_PROXY_H_ |
| 6 #define COMPONENTS_TEST_RUNNER_WEB_TEST_PROXY_H_ | 6 #define COMPONENTS_TEST_RUNNER_WEB_TEST_PROXY_H_ |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 class WebTestInterfaces; | 85 class WebTestInterfaces; |
| 86 | 86 |
| 87 // WebTestProxyBase is the "brain" of WebTestProxy in the sense that | 87 // WebTestProxyBase is the "brain" of WebTestProxy in the sense that |
| 88 // WebTestProxy does the bridge between RenderViewImpl and WebTestProxyBase and | 88 // WebTestProxy does the bridge between RenderViewImpl and WebTestProxyBase and |
| 89 // when it requires a behavior to be different from the usual, it will call | 89 // when it requires a behavior to be different from the usual, it will call |
| 90 // WebTestProxyBase that implements the expected behavior. | 90 // WebTestProxyBase that implements the expected behavior. |
| 91 // See WebTestProxy class comments for more information. | 91 // See WebTestProxy class comments for more information. |
| 92 class TEST_RUNNER_EXPORT WebTestProxyBase { | 92 class TEST_RUNNER_EXPORT WebTestProxyBase { |
| 93 public: | 93 public: |
| 94 void SetInterfaces(WebTestInterfaces* interfaces); | 94 void SetInterfaces(WebTestInterfaces* interfaces); |
| 95 WebTestInterfaces* GetInterfaces(); | |
| 96 void SetDelegate(WebTestDelegate* delegate); | 95 void SetDelegate(WebTestDelegate* delegate); |
| 97 WebTestDelegate* GetDelegate(); | |
| 98 void set_widget(blink::WebWidget* widget) { web_widget_ = widget; } | 96 void set_widget(blink::WebWidget* widget) { web_widget_ = widget; } |
| 99 | 97 |
| 100 void Reset(); | 98 void Reset(); |
| 101 | 99 |
| 102 blink::WebSpellCheckClient* GetSpellCheckClient() const; | 100 blink::WebSpellCheckClient* GetSpellCheckClient() const; |
| 103 blink::WebColorChooser* CreateColorChooser( | 101 blink::WebColorChooser* CreateColorChooser( |
| 104 blink::WebColorChooserClient* client, | 102 blink::WebColorChooserClient* client, |
| 105 const blink::WebColor& color, | 103 const blink::WebColor& color, |
| 106 const blink::WebVector<blink::WebColorSuggestion>& suggestions); | 104 const blink::WebVector<blink::WebColorSuggestion>& suggestions); |
| 107 bool RunFileChooser(const blink::WebFileChooserParams& params, | 105 bool RunFileChooser(const blink::WebFileChooserParams& params, |
| 108 blink::WebFileChooserCompletion* completion); | 106 blink::WebFileChooserCompletion* completion); |
| 109 void ShowValidationMessage(const blink::WebString& main_message, | 107 void ShowValidationMessage(const blink::WebString& main_message, |
| 110 blink::WebTextDirection main_message_hint, | 108 blink::WebTextDirection main_message_hint, |
| 111 const blink::WebString& sub_message, | 109 const blink::WebString& sub_message, |
| 112 blink::WebTextDirection sub_message_hint); | 110 blink::WebTextDirection sub_message_hint); |
| 113 void HideValidationMessage(); | 111 |
| 114 void MoveValidationMessage(const blink::WebRect& anchor_in_root_view); | 112 void RunModalAlertDialog(const blink::WebString& message); |
| 113 bool RunModalConfirmDialog(const blink::WebString& message); |
| 114 bool RunModalPromptDialog(const blink::WebString& message, |
| 115 const blink::WebString& default_value, |
| 116 blink::WebString* actual_value); |
| 117 bool RunModalBeforeUnloadDialog(bool is_reload); |
| 115 | 118 |
| 116 std::string DumpBackForwardLists(); | 119 std::string DumpBackForwardLists(); |
| 117 void CapturePixelsForPrinting( | 120 void CapturePixelsForPrinting( |
| 118 const base::Callback<void(const SkBitmap&)>& callback); | 121 const base::Callback<void(const SkBitmap&)>& callback); |
| 119 void CopyImageAtAndCapturePixels( | 122 void CopyImageAtAndCapturePixels( |
| 120 int x, int y, const base::Callback<void(const SkBitmap&)>& callback); | 123 int x, int y, const base::Callback<void(const SkBitmap&)>& callback); |
| 121 void CapturePixelsAsync( | 124 void CapturePixelsAsync( |
| 122 const base::Callback<void(const SkBitmap&)>& callback); | 125 const base::Callback<void(const SkBitmap&)>& callback); |
| 123 | 126 |
| 124 void SetLogConsoleOutput(bool enabled); | 127 void SetLogConsoleOutput(bool enabled); |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 MainResourceLoadFailed, | 244 MainResourceLoadFailed, |
| 242 ResourceLoadCompleted | 245 ResourceLoadCompleted |
| 243 }; | 246 }; |
| 244 void CheckDone(blink::WebLocalFrame* frame, CheckDoneReason reason); | 247 void CheckDone(blink::WebLocalFrame* frame, CheckDoneReason reason); |
| 245 void AnimateNow(); | 248 void AnimateNow(); |
| 246 void DrawSelectionRect(SkCanvas* canvas); | 249 void DrawSelectionRect(SkCanvas* canvas); |
| 247 void DidCapturePixelsAsync( | 250 void DidCapturePixelsAsync( |
| 248 const base::Callback<void(const SkBitmap&)>& callback, | 251 const base::Callback<void(const SkBitmap&)>& callback, |
| 249 const SkBitmap& bitmap); | 252 const SkBitmap& bitmap); |
| 250 | 253 |
| 251 blink::WebWidget* web_widget() const { return web_widget_; } | |
| 252 | |
| 253 WebTestInterfaces* web_test_interfaces_; | |
| 254 TestInterfaces* test_interfaces_; | 254 TestInterfaces* test_interfaces_; |
| 255 WebTestDelegate* delegate_; | 255 WebTestDelegate* delegate_; |
| 256 blink::WebWidget* web_widget_; | 256 blink::WebWidget* web_widget_; |
| 257 | 257 |
| 258 WebTaskList task_list_; | 258 WebTaskList task_list_; |
| 259 | 259 |
| 260 blink::WebImage drag_image_; | 260 blink::WebImage drag_image_; |
| 261 | 261 |
| 262 scoped_ptr<SpellCheckClient> spellcheck_; | 262 scoped_ptr<SpellCheckClient> spellcheck_; |
| 263 scoped_ptr<MockWebUserMediaClient> user_media_client_; | 263 scoped_ptr<MockWebUserMediaClient> user_media_client_; |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 387 | 387 |
| 388 private: | 388 private: |
| 389 virtual ~WebTestProxy() {} | 389 virtual ~WebTestProxy() {} |
| 390 | 390 |
| 391 DISALLOW_COPY_AND_ASSIGN(WebTestProxy); | 391 DISALLOW_COPY_AND_ASSIGN(WebTestProxy); |
| 392 }; | 392 }; |
| 393 | 393 |
| 394 } // namespace test_runner | 394 } // namespace test_runner |
| 395 | 395 |
| 396 #endif // COMPONENTS_TEST_RUNNER_WEB_TEST_PROXY_H_ | 396 #endif // COMPONENTS_TEST_RUNNER_WEB_TEST_PROXY_H_ |
| OLD | NEW |