| 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 <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 13 #include "build/build_config.h" | 13 #include "build/build_config.h" |
| 14 #include "components/test_runner/test_runner_export.h" | 14 #include "components/test_runner/test_runner_export.h" |
| 15 #include "components/test_runner/web_task.h" | 15 #include "components/test_runner/web_task.h" |
| 16 #include "third_party/WebKit/public/platform/WebImage.h" | |
| 17 #include "third_party/WebKit/public/platform/WebRect.h" | 16 #include "third_party/WebKit/public/platform/WebRect.h" |
| 18 #include "third_party/WebKit/public/platform/WebScreenInfo.h" | 17 #include "third_party/WebKit/public/platform/WebScreenInfo.h" |
| 19 #include "third_party/WebKit/public/platform/WebURLError.h" | 18 #include "third_party/WebKit/public/platform/WebURLError.h" |
| 20 #include "third_party/WebKit/public/platform/WebURLRequest.h" | 19 #include "third_party/WebKit/public/platform/WebURLRequest.h" |
| 21 #include "third_party/WebKit/public/web/WebDOMMessageEvent.h" | 20 #include "third_party/WebKit/public/web/WebDOMMessageEvent.h" |
| 22 #include "third_party/WebKit/public/web/WebDragOperation.h" | 21 #include "third_party/WebKit/public/web/WebDragOperation.h" |
| 23 #include "third_party/WebKit/public/web/WebHistoryCommitType.h" | 22 #include "third_party/WebKit/public/web/WebHistoryCommitType.h" |
| 24 #include "third_party/WebKit/public/web/WebNavigationPolicy.h" | 23 #include "third_party/WebKit/public/web/WebNavigationPolicy.h" |
| 25 #include "third_party/WebKit/public/web/WebTextDirection.h" | 24 #include "third_party/WebKit/public/web/WebTextDirection.h" |
| 26 | 25 |
| 27 class SkBitmap; | |
| 28 class SkCanvas; | |
| 29 | |
| 30 namespace blink { | 26 namespace blink { |
| 31 class WebDragData; | 27 class WebDragData; |
| 32 class WebFileChooserCompletion; | 28 class WebFileChooserCompletion; |
| 29 class WebImage; |
| 33 class WebLocalFrame; | 30 class WebLocalFrame; |
| 34 class WebSpeechRecognizer; | 31 class WebSpeechRecognizer; |
| 35 class WebSpellCheckClient; | 32 class WebSpellCheckClient; |
| 36 class WebString; | 33 class WebString; |
| 37 class WebView; | 34 class WebView; |
| 38 class WebWidget; | 35 class WebWidget; |
| 39 struct WebFileChooserParams; | 36 struct WebFileChooserParams; |
| 40 struct WebPoint; | 37 struct WebPoint; |
| 41 struct WebWindowFeatures; | 38 struct WebWindowFeatures; |
| 42 } | 39 } |
| (...skipping 22 matching lines...) Expand all Loading... |
| 65 | 62 |
| 66 blink::WebSpellCheckClient* GetSpellCheckClient() const; | 63 blink::WebSpellCheckClient* GetSpellCheckClient() const; |
| 67 bool RunFileChooser(const blink::WebFileChooserParams& params, | 64 bool RunFileChooser(const blink::WebFileChooserParams& params, |
| 68 blink::WebFileChooserCompletion* completion); | 65 blink::WebFileChooserCompletion* completion); |
| 69 void ShowValidationMessage(const blink::WebString& main_message, | 66 void ShowValidationMessage(const blink::WebString& main_message, |
| 70 blink::WebTextDirection main_message_hint, | 67 blink::WebTextDirection main_message_hint, |
| 71 const blink::WebString& sub_message, | 68 const blink::WebString& sub_message, |
| 72 blink::WebTextDirection sub_message_hint); | 69 blink::WebTextDirection sub_message_hint); |
| 73 | 70 |
| 74 std::string DumpBackForwardLists(); | 71 std::string DumpBackForwardLists(); |
| 75 void CapturePixelsForPrinting( | |
| 76 const base::Callback<void(const SkBitmap&)>& callback); | |
| 77 void CopyImageAtAndCapturePixels( | |
| 78 int x, int y, const base::Callback<void(const SkBitmap&)>& callback); | |
| 79 void CapturePixelsAsync( | |
| 80 const base::Callback<void(const SkBitmap&)>& callback); | |
| 81 | 72 |
| 82 void LayoutAndPaintAsyncThen(const base::Closure& callback); | 73 void LayoutAndPaintAsyncThen(const base::Closure& callback); |
| 83 | 74 |
| 84 void GetScreenOrientationForTesting(blink::WebScreenInfo&); | 75 void GetScreenOrientationForTesting(blink::WebScreenInfo&); |
| 85 MockWebSpeechRecognizer* GetSpeechRecognizerMock(); | 76 MockWebSpeechRecognizer* GetSpeechRecognizerMock(); |
| 86 MockCredentialManagerClient* GetCredentialManagerClientMock(); | 77 MockCredentialManagerClient* GetCredentialManagerClientMock(); |
| 87 | 78 |
| 88 WebTaskList* mutable_task_list() { return &task_list_; } | 79 WebTaskList* mutable_task_list() { return &task_list_; } |
| 89 | 80 |
| 90 blink::WebView* GetWebView() const; | 81 blink::WebView* GetWebView() const; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 120 void DidFocus(); | 111 void DidFocus(); |
| 121 void SetToolTipText(const blink::WebString& text, | 112 void SetToolTipText(const blink::WebString& text, |
| 122 blink::WebTextDirection direction); | 113 blink::WebTextDirection direction); |
| 123 void DidChangeLocationWithinPage(blink::WebLocalFrame* frame); | 114 void DidChangeLocationWithinPage(blink::WebLocalFrame* frame); |
| 124 void ResetInputMethod(); | 115 void ResetInputMethod(); |
| 125 | 116 |
| 126 blink::WebString acceptLanguages(); | 117 blink::WebString acceptLanguages(); |
| 127 | 118 |
| 128 private: | 119 private: |
| 129 void AnimateNow(); | 120 void AnimateNow(); |
| 130 void DrawSelectionRect(SkCanvas* canvas); | |
| 131 void DidCapturePixelsAsync( | |
| 132 const base::Callback<void(const SkBitmap&)>& callback, | |
| 133 const SkBitmap& bitmap); | |
| 134 | 121 |
| 135 TestInterfaces* test_interfaces_; | 122 TestInterfaces* test_interfaces_; |
| 136 WebTestDelegate* delegate_; | 123 WebTestDelegate* delegate_; |
| 137 blink::WebWidget* web_widget_; | 124 blink::WebWidget* web_widget_; |
| 138 | 125 |
| 139 WebTaskList task_list_; | 126 WebTaskList task_list_; |
| 140 | 127 |
| 141 blink::WebImage drag_image_; | |
| 142 | |
| 143 scoped_ptr<SpellCheckClient> spellcheck_; | 128 scoped_ptr<SpellCheckClient> spellcheck_; |
| 144 | 129 |
| 145 bool animate_scheduled_; | 130 bool animate_scheduled_; |
| 146 | 131 |
| 147 scoped_ptr<MockCredentialManagerClient> credential_manager_client_; | 132 scoped_ptr<MockCredentialManagerClient> credential_manager_client_; |
| 148 scoped_ptr<MockWebSpeechRecognizer> speech_recognizer_; | 133 scoped_ptr<MockWebSpeechRecognizer> speech_recognizer_; |
| 149 | 134 |
| 150 private: | 135 private: |
| 151 DISALLOW_COPY_AND_ASSIGN(WebTestProxyBase); | 136 DISALLOW_COPY_AND_ASSIGN(WebTestProxyBase); |
| 152 }; | 137 }; |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 | 245 |
| 261 private: | 246 private: |
| 262 virtual ~WebTestProxy() {} | 247 virtual ~WebTestProxy() {} |
| 263 | 248 |
| 264 DISALLOW_COPY_AND_ASSIGN(WebTestProxy); | 249 DISALLOW_COPY_AND_ASSIGN(WebTestProxy); |
| 265 }; | 250 }; |
| 266 | 251 |
| 267 } // namespace test_runner | 252 } // namespace test_runner |
| 268 | 253 |
| 269 #endif // COMPONENTS_TEST_RUNNER_WEB_TEST_PROXY_H_ | 254 #endif // COMPONENTS_TEST_RUNNER_WEB_TEST_PROXY_H_ |
| OLD | NEW |