| 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 COMPONENTS_TEST_RUNNER_WEB_TEST_INTERFACES_H_ | 5 #ifndef COMPONENTS_TEST_RUNNER_WEB_TEST_INTERFACES_H_ |
| 6 #define COMPONENTS_TEST_RUNNER_WEB_TEST_INTERFACES_H_ | 6 #define COMPONENTS_TEST_RUNNER_WEB_TEST_INTERFACES_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 class WebView; | 27 class WebView; |
| 28 } | 28 } |
| 29 | 29 |
| 30 namespace test_runner { | 30 namespace test_runner { |
| 31 | 31 |
| 32 class AppBannerClient; | 32 class AppBannerClient; |
| 33 class TestInterfaces; | 33 class TestInterfaces; |
| 34 class WebFrameTestClient; | 34 class WebFrameTestClient; |
| 35 class WebFrameTestProxyBase; | 35 class WebFrameTestProxyBase; |
| 36 class WebTestDelegate; | 36 class WebTestDelegate; |
| 37 class WebTestProxyBase; | 37 class WebViewTestProxyBase; |
| 38 class WebTestRunner; | 38 class WebTestRunner; |
| 39 class WebViewTestClient; | 39 class WebViewTestClient; |
| 40 class WebWidgetTestClient; | 40 class WebWidgetTestClient; |
| 41 | 41 |
| 42 class TEST_RUNNER_EXPORT WebTestInterfaces { | 42 class TEST_RUNNER_EXPORT WebTestInterfaces { |
| 43 public: | 43 public: |
| 44 WebTestInterfaces(); | 44 WebTestInterfaces(); |
| 45 ~WebTestInterfaces(); | 45 ~WebTestInterfaces(); |
| 46 | 46 |
| 47 void SetMainView(blink::WebView* web_view); | 47 void SetMainView(blink::WebView* web_view); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 64 | 64 |
| 65 blink::WebAudioDevice* CreateAudioDevice(double sample_rate); | 65 blink::WebAudioDevice* CreateAudioDevice(double sample_rate); |
| 66 | 66 |
| 67 std::unique_ptr<blink::WebAppBannerClient> CreateAppBannerClient(); | 67 std::unique_ptr<blink::WebAppBannerClient> CreateAppBannerClient(); |
| 68 | 68 |
| 69 TestInterfaces* GetTestInterfaces(); | 69 TestInterfaces* GetTestInterfaces(); |
| 70 | 70 |
| 71 // Creates a WebFrameClient implementation providing test behavior (i.e. | 71 // Creates a WebFrameClient implementation providing test behavior (i.e. |
| 72 // forwarding javascript console output to the test harness). The caller | 72 // forwarding javascript console output to the test harness). The caller |
| 73 // should guarantee that the returned object won't be used beyond the lifetime | 73 // should guarantee that the returned object won't be used beyond the lifetime |
| 74 // of WebTestInterfaces and/or the lifetime of |web_test_proxy_base|. | 74 // of WebTestInterfaces and/or the lifetime of |web_view_test_proxy_base|. |
| 75 std::unique_ptr<WebFrameTestClient> CreateWebFrameTestClient( | 75 std::unique_ptr<WebFrameTestClient> CreateWebFrameTestClient( |
| 76 WebTestProxyBase* web_test_proxy_base, | 76 WebViewTestProxyBase* web_view_test_proxy_base, |
| 77 WebFrameTestProxyBase* web_frame_test_proxy_base); | 77 WebFrameTestProxyBase* web_frame_test_proxy_base); |
| 78 | 78 |
| 79 // Creates a WebViewClient implementation providing test behavior (i.e. | 79 // Creates a WebViewClient implementation providing test behavior (i.e. |
| 80 // providing a mocked speech recognizer). The caller should guarantee that | 80 // providing a mocked speech recognizer). The caller should guarantee that |
| 81 // the returned pointer won't be used beyond the lifetime of WebTestInterfaces | 81 // the returned pointer won't be used beyond the lifetime of WebTestInterfaces |
| 82 // and/or the lifetime of |web_test_proxy_base|. | 82 // and/or the lifetime of |web_view_test_proxy_base|. |
| 83 std::unique_ptr<WebViewTestClient> CreateWebViewTestClient( | 83 std::unique_ptr<WebViewTestClient> CreateWebViewTestClient( |
| 84 WebTestProxyBase* web_test_proxy_base); | 84 WebViewTestProxyBase* web_view_test_proxy_base); |
| 85 | 85 |
| 86 // Creates a WebWidgetClient implementation providing test behavior (i.e. | 86 // Creates a WebWidgetClient implementation providing test behavior (i.e. |
| 87 // providing a mocked screen orientation). The caller should guarantee that | 87 // providing a mocked screen orientation). The caller should guarantee that |
| 88 // the returned pointer won't be used beyond the lifetime of WebTestInterfaces | 88 // the returned pointer won't be used beyond the lifetime of WebTestInterfaces |
| 89 // and/or the lifetime of |web_test_proxy_base|. | 89 // and/or the lifetime of |web_view_test_proxy_base|. |
| 90 std::unique_ptr<WebWidgetTestClient> CreateWebWidgetTestClient( | 90 std::unique_ptr<WebWidgetTestClient> CreateWebWidgetTestClient( |
| 91 WebTestProxyBase* web_test_proxy_base); | 91 WebViewTestProxyBase* web_view_test_proxy_base); |
| 92 | 92 |
| 93 // Gets a list of currently opened windows created by the current test. | 93 // Gets a list of currently opened windows created by the current test. |
| 94 std::vector<blink::WebView*> GetWindowList(); | 94 std::vector<blink::WebView*> GetWindowList(); |
| 95 | 95 |
| 96 private: | 96 private: |
| 97 std::unique_ptr<TestInterfaces> interfaces_; | 97 std::unique_ptr<TestInterfaces> interfaces_; |
| 98 | 98 |
| 99 DISALLOW_COPY_AND_ASSIGN(WebTestInterfaces); | 99 DISALLOW_COPY_AND_ASSIGN(WebTestInterfaces); |
| 100 }; | 100 }; |
| 101 | 101 |
| 102 } // namespace test_runner | 102 } // namespace test_runner |
| 103 | 103 |
| 104 #endif // COMPONENTS_TEST_RUNNER_WEB_TEST_INTERFACES_H_ | 104 #endif // COMPONENTS_TEST_RUNNER_WEB_TEST_INTERFACES_H_ |
| OLD | NEW |