| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CONTENT_SHELL_RENDERER_LAYOUT_TEST_BLINK_TEST_RUNNER_H_ | 5 #ifndef CONTENT_SHELL_RENDERER_LAYOUT_TEST_BLINK_TEST_RUNNER_H_ |
| 6 #define CONTENT_SHELL_RENDERER_LAYOUT_TEST_BLINK_TEST_RUNNER_H_ | 6 #define CONTENT_SHELL_RENDERER_LAYOUT_TEST_BLINK_TEST_RUNNER_H_ |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 float GetDeviceScaleFactorForTest() const override; | 155 float GetDeviceScaleFactorForTest() const override; |
| 156 void RunIdleTasks(const base::Closure& callback) override; | 156 void RunIdleTasks(const base::Closure& callback) override; |
| 157 | 157 |
| 158 // Resets a RenderView to a known state for layout tests. It is used both when | 158 // Resets a RenderView to a known state for layout tests. It is used both when |
| 159 // a RenderView is created and when reusing an existing RenderView for the | 159 // a RenderView is created and when reusing an existing RenderView for the |
| 160 // next test case. | 160 // next test case. |
| 161 // When reusing an existing RenderView, |for_new_test| should be true, which | 161 // When reusing an existing RenderView, |for_new_test| should be true, which |
| 162 // also resets additional state, like the main frame's name and opener. | 162 // also resets additional state, like the main frame's name and opener. |
| 163 void Reset(bool for_new_test); | 163 void Reset(bool for_new_test); |
| 164 | 164 |
| 165 void set_proxy(test_runner::WebTestProxyBase* proxy) { proxy_ = proxy; } | |
| 166 test_runner::WebTestProxyBase* proxy() const { return proxy_; } | |
| 167 | |
| 168 void ReportLeakDetectionResult(const LeakDetectionResult& result); | 165 void ReportLeakDetectionResult(const LeakDetectionResult& result); |
| 169 | 166 |
| 170 // Message handlers forwarded by LayoutTestRenderFrameObserver. | 167 // Message handlers forwarded by LayoutTestRenderFrameObserver. |
| 171 void OnSetTestConfiguration(const ShellTestConfiguration& params); | 168 void OnSetTestConfiguration(const ShellTestConfiguration& params); |
| 172 void OnReplicateTestConfiguration(const ShellTestConfiguration& params); | 169 void OnReplicateTestConfiguration(const ShellTestConfiguration& params); |
| 173 void OnSetupSecondaryRenderer(); | 170 void OnSetupSecondaryRenderer(); |
| 174 | 171 |
| 175 private: | 172 private: |
| 176 // Message handlers. | 173 // Message handlers. |
| 177 void OnSessionHistory( | 174 void OnSessionHistory( |
| (...skipping 12 matching lines...) Expand all Loading... |
| 190 void OnLayoutDumpCompleted(std::string completed_layout_dump); | 187 void OnLayoutDumpCompleted(std::string completed_layout_dump); |
| 191 void CaptureDumpContinued(); | 188 void CaptureDumpContinued(); |
| 192 void OnPixelsDumpCompleted(const SkBitmap& snapshot); | 189 void OnPixelsDumpCompleted(const SkBitmap& snapshot); |
| 193 void CaptureDumpComplete(); | 190 void CaptureDumpComplete(); |
| 194 std::string DumpHistoryForWindow(blink::WebView* web_view); | 191 std::string DumpHistoryForWindow(blink::WebView* web_view); |
| 195 | 192 |
| 196 mojom::LayoutTestBluetoothFakeAdapterSetter& | 193 mojom::LayoutTestBluetoothFakeAdapterSetter& |
| 197 GetBluetoothFakeAdapterSetter(); | 194 GetBluetoothFakeAdapterSetter(); |
| 198 mojom::LayoutTestBluetoothFakeAdapterSetterPtr bluetooth_fake_adapter_setter_; | 195 mojom::LayoutTestBluetoothFakeAdapterSetterPtr bluetooth_fake_adapter_setter_; |
| 199 | 196 |
| 200 test_runner::WebTestProxyBase* proxy_; | |
| 201 | |
| 202 test_runner::TestPreferences prefs_; | 197 test_runner::TestPreferences prefs_; |
| 203 | 198 |
| 204 ShellTestConfiguration test_config_; | 199 ShellTestConfiguration test_config_; |
| 205 | 200 |
| 206 std::vector<int> routing_ids_; | 201 std::vector<int> routing_ids_; |
| 207 std::vector<std::vector<PageState> > session_histories_; | 202 std::vector<std::vector<PageState> > session_histories_; |
| 208 std::vector<unsigned> current_entry_indexes_; | 203 std::vector<unsigned> current_entry_indexes_; |
| 209 | 204 |
| 210 std::deque<base::Callback<void(const std::vector<std::string>&)>> | 205 std::deque<base::Callback<void(const std::vector<std::string>&)>> |
| 211 get_bluetooth_events_callbacks_; | 206 get_bluetooth_events_callbacks_; |
| 212 | 207 |
| 213 bool is_main_window_; | 208 bool is_main_window_; |
| 214 | 209 |
| 215 bool focus_on_next_commit_; | 210 bool focus_on_next_commit_; |
| 216 | 211 |
| 217 std::unique_ptr<LeakDetector> leak_detector_; | 212 std::unique_ptr<LeakDetector> leak_detector_; |
| 218 | 213 |
| 219 DISALLOW_COPY_AND_ASSIGN(BlinkTestRunner); | 214 DISALLOW_COPY_AND_ASSIGN(BlinkTestRunner); |
| 220 }; | 215 }; |
| 221 | 216 |
| 222 } // namespace content | 217 } // namespace content |
| 223 | 218 |
| 224 #endif // CONTENT_SHELL_RENDERER_LAYOUT_TEST_BLINK_TEST_RUNNER_H_ | 219 #endif // CONTENT_SHELL_RENDERER_LAYOUT_TEST_BLINK_TEST_RUNNER_H_ |
| OLD | NEW |