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 24 matching lines...) Expand all Loading... |
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 MockScreenOrientationClient; |
45 class MockWebUserMediaClient; | |
46 class TestInterfaces; | 45 class TestInterfaces; |
47 class WebContentSettings; | 46 class WebContentSettings; |
48 class WebTestDelegate; | 47 class WebTestDelegate; |
49 class WebTestProxyBase; | 48 class WebTestProxyBase; |
50 | 49 |
51 class TestRunner : public WebTestRunner, | 50 class TestRunner : public WebTestRunner, |
52 public base::SupportsWeakPtr<TestRunner> { | 51 public base::SupportsWeakPtr<TestRunner> { |
53 public: | 52 public: |
54 explicit TestRunner(TestInterfaces*); | 53 explicit TestRunner(TestInterfaces*); |
55 virtual ~TestRunner(); | 54 virtual ~TestRunner(); |
(...skipping 19 matching lines...) Expand all Loading... |
75 bool ShouldDumpAsAudio() const override; | 74 bool ShouldDumpAsAudio() const override; |
76 void GetAudioData(std::vector<unsigned char>* buffer_view) const override; | 75 void GetAudioData(std::vector<unsigned char>* buffer_view) const override; |
77 bool IsRecursiveLayoutDumpRequested() override; | 76 bool IsRecursiveLayoutDumpRequested() override; |
78 std::string DumpLayout(blink::WebLocalFrame* frame) override; | 77 std::string DumpLayout(blink::WebLocalFrame* frame) override; |
79 void ReplicateLayoutTestRuntimeFlagsChanges( | 78 void ReplicateLayoutTestRuntimeFlagsChanges( |
80 const base::DictionaryValue& changed_values) override; | 79 const base::DictionaryValue& changed_values) override; |
81 bool HasCustomTextDump(std::string* custom_text_dump) const override; | 80 bool HasCustomTextDump(std::string* custom_text_dump) const override; |
82 bool ShouldDumpBackForwardList() const override; | 81 bool ShouldDumpBackForwardList() const override; |
83 blink::WebContentSettingsClient* GetWebContentSettings() const override; | 82 blink::WebContentSettingsClient* GetWebContentSettings() const override; |
84 | 83 |
85 // Methods used by WebTestProxyBase and WebFrameTestClient. | 84 // Methods used by WebTestProxyBase. |
86 bool shouldStayOnPageAfterHandlingBeforeUnload() const; | 85 bool shouldStayOnPageAfterHandlingBeforeUnload() const; |
87 MockScreenOrientationClient* getMockScreenOrientationClient(); | 86 MockScreenOrientationClient* getMockScreenOrientationClient(); |
88 MockWebUserMediaClient* getMockWebUserMediaClient(); | |
89 bool shouldDumpSelectionRect() const; | 87 bool shouldDumpSelectionRect() const; |
90 bool isPrinting() const; | 88 bool isPrinting() const; |
91 bool shouldDumpAsTextWithPixelResults(); | 89 bool shouldDumpAsTextWithPixelResults(); |
92 bool shouldDumpAsCustomText() const; | 90 bool shouldDumpAsCustomText() const; |
93 std:: string customDumpText() const; | 91 std:: string customDumpText() const; |
94 void ShowDevTools(const std::string& settings, | 92 void ShowDevTools(const std::string& settings, |
95 const std::string& frontend_url); | 93 const std::string& frontend_url); |
96 void ClearDevToolsLocalStorage(); | 94 void ClearDevToolsLocalStorage(); |
97 void setShouldDumpAsText(bool); | 95 void setShouldDumpAsText(bool); |
98 void setShouldDumpAsMarkup(bool); | 96 void setShouldDumpAsMarkup(bool); |
(...skipping 27 matching lines...) Expand all Loading... |
126 bool shouldDumpResourcePriorities() const; | 124 bool shouldDumpResourcePriorities() const; |
127 bool RequestPointerLock(); | 125 bool RequestPointerLock(); |
128 void RequestPointerUnlock(); | 126 void RequestPointerUnlock(); |
129 bool isPointerLocked(); | 127 bool isPointerLocked(); |
130 void setToolTipText(const blink::WebString&); | 128 void setToolTipText(const blink::WebString&); |
131 bool shouldDumpDragImage(); | 129 bool shouldDumpDragImage(); |
132 bool shouldDumpNavigationPolicy() const; | 130 bool shouldDumpNavigationPolicy() const; |
133 | 131 |
134 bool midiAccessorResult(); | 132 bool midiAccessorResult(); |
135 | 133 |
136 // Methods used by MockColorChooser: | |
137 void DidOpenChooser(); | |
138 void DidCloseChooser(); | |
139 | |
140 // A single item in the work queue. | 134 // A single item in the work queue. |
141 class WorkItem { | 135 class WorkItem { |
142 public: | 136 public: |
143 virtual ~WorkItem() {} | 137 virtual ~WorkItem() {} |
144 | 138 |
145 // Returns true if this started a load. | 139 // Returns true if this started a load. |
146 virtual bool Run(WebTestDelegate*, blink::WebView*) = 0; | 140 virtual bool Run(WebTestDelegate*, blink::WebView*) = 0; |
147 }; | 141 }; |
148 | 142 |
149 private: | 143 private: |
(...skipping 666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
816 | 810 |
817 bool pointer_locked_; | 811 bool pointer_locked_; |
818 enum { | 812 enum { |
819 PointerLockWillSucceed, | 813 PointerLockWillSucceed, |
820 PointerLockWillRespondAsync, | 814 PointerLockWillRespondAsync, |
821 PointerLockWillFailSync, | 815 PointerLockWillFailSync, |
822 } pointer_lock_planned_result_; | 816 } pointer_lock_planned_result_; |
823 bool use_mock_theme_; | 817 bool use_mock_theme_; |
824 | 818 |
825 scoped_ptr<MockScreenOrientationClient> mock_screen_orientation_client_; | 819 scoped_ptr<MockScreenOrientationClient> mock_screen_orientation_client_; |
826 scoped_ptr<MockWebUserMediaClient> user_media_client_; | |
827 | |
828 // Number of currently active color choosers. | |
829 int chooser_count_; | |
830 | 820 |
831 base::WeakPtrFactory<TestRunner> weak_factory_; | 821 base::WeakPtrFactory<TestRunner> weak_factory_; |
832 | 822 |
833 DISALLOW_COPY_AND_ASSIGN(TestRunner); | 823 DISALLOW_COPY_AND_ASSIGN(TestRunner); |
834 }; | 824 }; |
835 | 825 |
836 } // namespace test_runner | 826 } // namespace test_runner |
837 | 827 |
838 #endif // COMPONENTS_TEST_RUNNER_TEST_RUNNER_H_ | 828 #endif // COMPONENTS_TEST_RUNNER_TEST_RUNNER_H_ |
OLD | NEW |