| 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 18 matching lines...) Expand all Loading... |
| 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 WebTestDelegate; | 35 class WebTestDelegate; |
| 36 class WebTestProxyBase; | 36 class WebTestProxyBase; |
| 37 class WebTestRunner; | 37 class WebTestRunner; |
| 38 class WebViewTestClient; | 38 class WebViewTestClient; |
| 39 class WebWidgetTestClient; |
| 39 | 40 |
| 40 class TEST_RUNNER_EXPORT WebTestInterfaces { | 41 class TEST_RUNNER_EXPORT WebTestInterfaces { |
| 41 public: | 42 public: |
| 42 WebTestInterfaces(); | 43 WebTestInterfaces(); |
| 43 ~WebTestInterfaces(); | 44 ~WebTestInterfaces(); |
| 44 | 45 |
| 45 void SetMainView(blink::WebView* web_view); | 46 void SetMainView(blink::WebView* web_view); |
| 46 void SetDelegate(WebTestDelegate* delegate); | 47 void SetDelegate(WebTestDelegate* delegate); |
| 47 void ResetAll(); | 48 void ResetAll(); |
| 48 void SetTestIsRunning(bool running); | 49 void SetTestIsRunning(bool running); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 73 std::unique_ptr<WebFrameTestClient> CreateWebFrameTestClient( | 74 std::unique_ptr<WebFrameTestClient> CreateWebFrameTestClient( |
| 74 WebTestProxyBase* web_test_proxy_base); | 75 WebTestProxyBase* web_test_proxy_base); |
| 75 | 76 |
| 76 // Creates a WebViewClient implementation providing test behavior (i.e. | 77 // Creates a WebViewClient implementation providing test behavior (i.e. |
| 77 // providing a mocked speech recognizer). The caller should guarantee that | 78 // providing a mocked speech recognizer). The caller should guarantee that |
| 78 // the returned pointer won't be used beyond the lifetime of WebTestInterfaces | 79 // the returned pointer won't be used beyond the lifetime of WebTestInterfaces |
| 79 // and/or the lifetime of |web_test_proxy_base|. | 80 // and/or the lifetime of |web_test_proxy_base|. |
| 80 std::unique_ptr<WebViewTestClient> CreateWebViewTestClient( | 81 std::unique_ptr<WebViewTestClient> CreateWebViewTestClient( |
| 81 WebTestProxyBase* web_test_proxy_base); | 82 WebTestProxyBase* web_test_proxy_base); |
| 82 | 83 |
| 84 // Creates a WebWidgetClient implementation providing test behavior (i.e. |
| 85 // providing a mocked screen orientation). The caller should guarantee that |
| 86 // the returned pointer won't be used beyond the lifetime of WebTestInterfaces |
| 87 // and/or the lifetime of |web_test_proxy_base|. |
| 88 std::unique_ptr<WebWidgetTestClient> CreateWebWidgetTestClient( |
| 89 WebTestProxyBase* web_test_proxy_base); |
| 90 |
| 83 // Gets a list of currently opened windows created by the current test. | 91 // Gets a list of currently opened windows created by the current test. |
| 84 std::vector<blink::WebView*> GetWindowList(); | 92 std::vector<blink::WebView*> GetWindowList(); |
| 85 | 93 |
| 86 private: | 94 private: |
| 87 std::unique_ptr<TestInterfaces> interfaces_; | 95 std::unique_ptr<TestInterfaces> interfaces_; |
| 88 | 96 |
| 89 DISALLOW_COPY_AND_ASSIGN(WebTestInterfaces); | 97 DISALLOW_COPY_AND_ASSIGN(WebTestInterfaces); |
| 90 }; | 98 }; |
| 91 | 99 |
| 92 } // namespace test_runner | 100 } // namespace test_runner |
| 93 | 101 |
| 94 #endif // COMPONENTS_TEST_RUNNER_WEB_TEST_INTERFACES_H_ | 102 #endif // COMPONENTS_TEST_RUNNER_WEB_TEST_INTERFACES_H_ |
| OLD | NEW |