| 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_FRAME_TEST_PROXY_H_ | 5 #ifndef CONTENT_SHELL_TEST_RUNNER_WEB_FRAME_TEST_PROXY_H_ |
| 6 #define COMPONENTS_TEST_RUNNER_WEB_FRAME_TEST_PROXY_H_ | 6 #define CONTENT_SHELL_TEST_RUNNER_WEB_FRAME_TEST_PROXY_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| 11 #include "base/logging.h" | 11 #include "base/logging.h" |
| 12 #include "base/macros.h" | 12 #include "base/macros.h" |
| 13 #include "components/test_runner/test_runner_export.h" | 13 #include "content/shell/test_runner/test_runner_export.h" |
| 14 #include "components/test_runner/web_frame_test_client.h" | 14 #include "content/shell/test_runner/web_frame_test_client.h" |
| 15 #include "third_party/WebKit/public/platform/WebEffectiveConnectionType.h" | 15 #include "third_party/WebKit/public/platform/WebEffectiveConnectionType.h" |
| 16 #include "third_party/WebKit/public/platform/WebString.h" | 16 #include "third_party/WebKit/public/platform/WebString.h" |
| 17 #include "third_party/WebKit/public/web/WebFrameClient.h" | 17 #include "third_party/WebKit/public/web/WebFrameClient.h" |
| 18 #include "third_party/WebKit/public/web/WebLocalFrame.h" | 18 #include "third_party/WebKit/public/web/WebLocalFrame.h" |
| 19 | 19 |
| 20 namespace test_runner { | 20 namespace test_runner { |
| 21 | 21 |
| 22 class TEST_RUNNER_EXPORT WebFrameTestProxyBase { | 22 class TEST_RUNNER_EXPORT WebFrameTestProxyBase { |
| 23 public: | 23 public: |
| 24 void set_test_client(std::unique_ptr<WebFrameTestClient> client) { | 24 void set_test_client(std::unique_ptr<WebFrameTestClient> client) { |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 blink::WebScreenOrientationClient* webScreenOrientationClient() override { | 69 blink::WebScreenOrientationClient* webScreenOrientationClient() override { |
| 70 return test_client()->webScreenOrientationClient(); | 70 return test_client()->webScreenOrientationClient(); |
| 71 } | 71 } |
| 72 | 72 |
| 73 void didAddMessageToConsole(const blink::WebConsoleMessage& message, | 73 void didAddMessageToConsole(const blink::WebConsoleMessage& message, |
| 74 const blink::WebString& source_name, | 74 const blink::WebString& source_name, |
| 75 unsigned source_line, | 75 unsigned source_line, |
| 76 const blink::WebString& stack_trace) override { | 76 const blink::WebString& stack_trace) override { |
| 77 test_client()->didAddMessageToConsole(message, source_name, source_line, | 77 test_client()->didAddMessageToConsole(message, source_name, source_line, |
| 78 stack_trace); | 78 stack_trace); |
| 79 Base::didAddMessageToConsole( | 79 Base::didAddMessageToConsole(message, source_name, source_line, |
| 80 message, source_name, source_line, stack_trace); | 80 stack_trace); |
| 81 } | 81 } |
| 82 | 82 |
| 83 bool canCreatePluginWithoutRenderer( | 83 bool canCreatePluginWithoutRenderer( |
| 84 const blink::WebString& mime_type) override { | 84 const blink::WebString& mime_type) override { |
| 85 const char suffix[] = "-can-create-without-renderer"; | 85 const char suffix[] = "-can-create-without-renderer"; |
| 86 return mime_type.utf8().find(suffix) != std::string::npos; | 86 return mime_type.utf8().find(suffix) != std::string::npos; |
| 87 } | 87 } |
| 88 | 88 |
| 89 void loadURLExternally(const blink::WebURLRequest& request, | 89 void loadURLExternally(const blink::WebURLRequest& request, |
| 90 blink::WebNavigationPolicy policy, | 90 blink::WebNavigationPolicy policy, |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 blink::WebFileChooserCompletion* completion) override { | 296 blink::WebFileChooserCompletion* completion) override { |
| 297 return test_client()->runFileChooser(params, completion); | 297 return test_client()->runFileChooser(params, completion); |
| 298 } | 298 } |
| 299 | 299 |
| 300 private: | 300 private: |
| 301 DISALLOW_COPY_AND_ASSIGN(WebFrameTestProxy); | 301 DISALLOW_COPY_AND_ASSIGN(WebFrameTestProxy); |
| 302 }; | 302 }; |
| 303 | 303 |
| 304 } // namespace test_runner | 304 } // namespace test_runner |
| 305 | 305 |
| 306 #endif // COMPONENTS_TEST_RUNNER_WEB_FRAME_TEST_PROXY_H_ | 306 #endif // CONTENT_SHELL_TEST_RUNNER_WEB_FRAME_TEST_PROXY_H_ |
| OLD | NEW |