| 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> |
| 11 | 11 |
| 12 #include "base/callback.h" | 12 #include "base/callback.h" |
| 13 #include "base/files/file_path.h" | 13 #include "base/files/file_path.h" |
| 14 #include "base/macros.h" | 14 #include "base/macros.h" |
| 15 #include "components/test_runner/test_preferences.h" | 15 #include "components/test_runner/test_preferences.h" |
| 16 #include "components/test_runner/web_test_delegate.h" | 16 #include "components/test_runner/web_test_delegate.h" |
| 17 #include "content/public/common/page_state.h" | 17 #include "content/public/common/page_state.h" |
| 18 #include "content/public/renderer/render_view_observer.h" | 18 #include "content/public/renderer/render_view_observer.h" |
| 19 #include "content/public/renderer/render_view_observer_tracker.h" | 19 #include "content/public/renderer/render_view_observer_tracker.h" |
| 20 #include "content/shell/common/layout_test.mojom.h" |
| 20 #include "content/shell/common/layout_test/layout_test_bluetooth_fake_adapter_se
tter.mojom.h" | 21 #include "content/shell/common/layout_test/layout_test_bluetooth_fake_adapter_se
tter.mojom.h" |
| 21 #include "content/shell/common/shell_test_configuration.h" | |
| 22 #include "v8/include/v8.h" | 22 #include "v8/include/v8.h" |
| 23 | 23 |
| 24 class SkBitmap; | 24 class SkBitmap; |
| 25 | 25 |
| 26 namespace base { | 26 namespace base { |
| 27 class DictionaryValue; | 27 class DictionaryValue; |
| 28 } | 28 } |
| 29 | 29 |
| 30 namespace blink { | 30 namespace blink { |
| 31 class WebDeviceMotionData; | 31 class WebDeviceMotionData; |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 // Resets a RenderView to a known state for layout tests. It is used both when | 169 // Resets a RenderView to a known state for layout tests. It is used both when |
| 170 // a RenderView is created and when reusing an existing RenderView for the | 170 // a RenderView is created and when reusing an existing RenderView for the |
| 171 // next test case. | 171 // next test case. |
| 172 // When reusing an existing RenderView, |for_new_test| should be true, which | 172 // When reusing an existing RenderView, |for_new_test| should be true, which |
| 173 // also resets additional state, like the main frame's name and opener. | 173 // also resets additional state, like the main frame's name and opener. |
| 174 void Reset(bool for_new_test); | 174 void Reset(bool for_new_test); |
| 175 | 175 |
| 176 void ReportLeakDetectionResult(const LeakDetectionResult& result); | 176 void ReportLeakDetectionResult(const LeakDetectionResult& result); |
| 177 | 177 |
| 178 // Message handlers forwarded by LayoutTestRenderFrameObserver. | 178 // Message handlers forwarded by LayoutTestRenderFrameObserver. |
| 179 void OnSetTestConfiguration(const ShellTestConfiguration& params); | 179 void OnSetTestConfiguration(mojom::ShellTestConfigurationPtr params); |
| 180 void OnReplicateTestConfiguration(const ShellTestConfiguration& params); | 180 void OnReplicateTestConfiguration(mojom::ShellTestConfigurationPtr params); |
| 181 void OnSetupSecondaryRenderer(); | 181 void OnSetupSecondaryRenderer(); |
| 182 | 182 |
| 183 private: | 183 private: |
| 184 // Message handlers. | 184 // Message handlers. |
| 185 void OnSessionHistory( | 185 void OnSessionHistory( |
| 186 const std::vector<int>& routing_ids, | 186 const std::vector<int>& routing_ids, |
| 187 const std::vector<std::vector<PageState> >& session_histories, | 187 const std::vector<std::vector<PageState> >& session_histories, |
| 188 const std::vector<unsigned>& current_entry_indexes); | 188 const std::vector<unsigned>& current_entry_indexes); |
| 189 void OnReset(); | 189 void OnReset(); |
| 190 void OnTestFinishedInSecondaryRenderer(); | 190 void OnTestFinishedInSecondaryRenderer(); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 203 void OnPixelsDumpCompleted(const SkBitmap& snapshot); | 203 void OnPixelsDumpCompleted(const SkBitmap& snapshot); |
| 204 void CaptureDumpComplete(); | 204 void CaptureDumpComplete(); |
| 205 std::string DumpHistoryForWindow(blink::WebView* web_view); | 205 std::string DumpHistoryForWindow(blink::WebView* web_view); |
| 206 | 206 |
| 207 mojom::LayoutTestBluetoothFakeAdapterSetter& | 207 mojom::LayoutTestBluetoothFakeAdapterSetter& |
| 208 GetBluetoothFakeAdapterSetter(); | 208 GetBluetoothFakeAdapterSetter(); |
| 209 mojom::LayoutTestBluetoothFakeAdapterSetterPtr bluetooth_fake_adapter_setter_; | 209 mojom::LayoutTestBluetoothFakeAdapterSetterPtr bluetooth_fake_adapter_setter_; |
| 210 | 210 |
| 211 test_runner::TestPreferences prefs_; | 211 test_runner::TestPreferences prefs_; |
| 212 | 212 |
| 213 ShellTestConfiguration test_config_; | 213 mojom::ShellTestConfigurationPtr test_config_; |
| 214 | 214 |
| 215 std::vector<int> routing_ids_; | 215 std::vector<int> routing_ids_; |
| 216 std::vector<std::vector<PageState> > session_histories_; | 216 std::vector<std::vector<PageState> > session_histories_; |
| 217 std::vector<unsigned> current_entry_indexes_; | 217 std::vector<unsigned> current_entry_indexes_; |
| 218 | 218 |
| 219 std::deque<base::Callback<void(const std::vector<std::string>&)>> | 219 std::deque<base::Callback<void(const std::vector<std::string>&)>> |
| 220 get_bluetooth_events_callbacks_; | 220 get_bluetooth_events_callbacks_; |
| 221 | 221 |
| 222 bool is_main_window_; | 222 bool is_main_window_; |
| 223 | 223 |
| 224 bool focus_on_next_commit_; | 224 bool focus_on_next_commit_; |
| 225 | 225 |
| 226 std::unique_ptr<test_runner::AppBannerService> app_banner_service_; | 226 std::unique_ptr<test_runner::AppBannerService> app_banner_service_; |
| 227 | 227 |
| 228 std::unique_ptr<LeakDetector> leak_detector_; | 228 std::unique_ptr<LeakDetector> leak_detector_; |
| 229 | 229 |
| 230 DISALLOW_COPY_AND_ASSIGN(BlinkTestRunner); | 230 DISALLOW_COPY_AND_ASSIGN(BlinkTestRunner); |
| 231 }; | 231 }; |
| 232 | 232 |
| 233 } // namespace content | 233 } // namespace content |
| 234 | 234 |
| 235 #endif // CONTENT_SHELL_RENDERER_LAYOUT_TEST_BLINK_TEST_RUNNER_H_ | 235 #endif // CONTENT_SHELL_RENDERER_LAYOUT_TEST_BLINK_TEST_RUNNER_H_ |
| OLD | NEW |