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_TEST_RUNNER_H_ | 5 #ifndef COMPONENTS_TEST_RUNNER_TEST_RUNNER_H_ |
6 #define COMPONENTS_TEST_RUNNER_TEST_RUNNER_H_ | 6 #define COMPONENTS_TEST_RUNNER_TEST_RUNNER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <deque> | 10 #include <deque> |
(...skipping 23 matching lines...) Expand all Loading... | |
34 } | 34 } |
35 | 35 |
36 namespace gin { | 36 namespace gin { |
37 class ArrayBufferView; | 37 class ArrayBufferView; |
38 class Arguments; | 38 class Arguments; |
39 } | 39 } |
40 | 40 |
41 namespace test_runner { | 41 namespace test_runner { |
42 | 42 |
43 class InvokeCallbackTask; | 43 class InvokeCallbackTask; |
44 class MockScreenOrientationClient; | |
44 class TestInterfaces; | 45 class TestInterfaces; |
45 class WebContentSettings; | 46 class WebContentSettings; |
46 class WebTestDelegate; | 47 class WebTestDelegate; |
47 class WebTestProxyBase; | 48 class WebTestProxyBase; |
48 | 49 |
49 class TestRunner : public WebTestRunner, | 50 class TestRunner : public WebTestRunner, |
50 public base::SupportsWeakPtr<TestRunner> { | 51 public base::SupportsWeakPtr<TestRunner> { |
51 public: | 52 public: |
52 explicit TestRunner(TestInterfaces*); | 53 explicit TestRunner(TestInterfaces*); |
53 virtual ~TestRunner(); | 54 virtual ~TestRunner(); |
(...skipping 20 matching lines...) Expand all Loading... | |
74 void GetAudioData(std::vector<unsigned char>* buffer_view) const override; | 75 void GetAudioData(std::vector<unsigned char>* buffer_view) const override; |
75 const LayoutDumpFlags& GetLayoutDumpFlags() override; | 76 const LayoutDumpFlags& GetLayoutDumpFlags() override; |
76 void ReplicateLayoutDumpFlagsChanges( | 77 void ReplicateLayoutDumpFlagsChanges( |
77 const base::DictionaryValue& changed_values) override; | 78 const base::DictionaryValue& changed_values) override; |
78 bool HasCustomTextDump(std::string* custom_text_dump) const override; | 79 bool HasCustomTextDump(std::string* custom_text_dump) const override; |
79 bool ShouldDumpBackForwardList() const override; | 80 bool ShouldDumpBackForwardList() const override; |
80 blink::WebContentSettingsClient* GetWebContentSettings() const override; | 81 blink::WebContentSettingsClient* GetWebContentSettings() const override; |
81 | 82 |
82 // Methods used by WebTestProxyBase. | 83 // Methods used by WebTestProxyBase. |
83 bool shouldStayOnPageAfterHandlingBeforeUnload() const; | 84 bool shouldStayOnPageAfterHandlingBeforeUnload() const; |
85 MockScreenOrientationClient* getMockScreenOrientationClient(); | |
84 bool shouldDumpSelectionRect() const; | 86 bool shouldDumpSelectionRect() const; |
85 bool isPrinting() const; | 87 bool isPrinting() const; |
86 bool shouldDumpAsTextWithPixelResults(); | 88 bool shouldDumpAsTextWithPixelResults(); |
87 bool shouldDumpAsCustomText() const; | 89 bool shouldDumpAsCustomText() const; |
88 std:: string customDumpText() const; | 90 std:: string customDumpText() const; |
89 void ShowDevTools(const std::string& settings, | 91 void ShowDevTools(const std::string& settings, |
90 const std::string& frontend_url); | 92 const std::string& frontend_url); |
91 void ClearDevToolsLocalStorage(); | 93 void ClearDevToolsLocalStorage(); |
92 void setShouldDumpAsText(bool); | 94 void setShouldDumpAsText(bool); |
93 void setShouldDumpAsMarkup(bool); | 95 void setShouldDumpAsMarkup(bool); |
(...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
805 scoped_ptr<WebContentSettings> web_content_settings_; | 807 scoped_ptr<WebContentSettings> web_content_settings_; |
806 | 808 |
807 bool pointer_locked_; | 809 bool pointer_locked_; |
808 enum { | 810 enum { |
809 PointerLockWillSucceed, | 811 PointerLockWillSucceed, |
810 PointerLockWillRespondAsync, | 812 PointerLockWillRespondAsync, |
811 PointerLockWillFailSync, | 813 PointerLockWillFailSync, |
812 } pointer_lock_planned_result_; | 814 } pointer_lock_planned_result_; |
813 bool use_mock_theme_; | 815 bool use_mock_theme_; |
814 | 816 |
817 scoped_ptr<MockScreenOrientationClient> mock_screen_orientation_client_; | |
Łukasz Anforowicz
2016/03/16 00:16:01
TestRunner's lifetime is longer than the lifetime
| |
818 | |
815 base::WeakPtrFactory<TestRunner> weak_factory_; | 819 base::WeakPtrFactory<TestRunner> weak_factory_; |
816 | 820 |
817 DISALLOW_COPY_AND_ASSIGN(TestRunner); | 821 DISALLOW_COPY_AND_ASSIGN(TestRunner); |
818 }; | 822 }; |
819 | 823 |
820 } // namespace test_runner | 824 } // namespace test_runner |
821 | 825 |
822 #endif // COMPONENTS_TEST_RUNNER_TEST_RUNNER_H_ | 826 #endif // COMPONENTS_TEST_RUNNER_TEST_RUNNER_H_ |
OLD | NEW |