Chromium Code Reviews| 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 CONTENT_SHELL_BROWSER_LAYOUT_TEST_BLINK_TEST_CONTROLLER_H_ | 5 #ifndef CONTENT_SHELL_BROWSER_LAYOUT_TEST_BLINK_TEST_CONTROLLER_H_ |
| 6 #define CONTENT_SHELL_BROWSER_LAYOUT_TEST_BLINK_TEST_CONTROLLER_H_ | 6 #define CONTENT_SHELL_BROWSER_LAYOUT_TEST_BLINK_TEST_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <ostream> | 10 #include <ostream> |
| (...skipping 21 matching lines...) Expand all Loading... | |
| 32 | 32 |
| 33 #if defined(OS_ANDROID) | 33 #if defined(OS_ANDROID) |
| 34 #include "base/threading/thread_restrictions.h" | 34 #include "base/threading/thread_restrictions.h" |
| 35 #endif | 35 #endif |
| 36 | 36 |
| 37 class SkBitmap; | 37 class SkBitmap; |
| 38 | 38 |
| 39 namespace content { | 39 namespace content { |
| 40 | 40 |
| 41 class LayoutTestBluetoothChooserFactory; | 41 class LayoutTestBluetoothChooserFactory; |
| 42 class LayoutTestDevToolsFrontend; | 42 class LayoutTestDevToolsBindings; |
| 43 class RenderFrameHost; | 43 class RenderFrameHost; |
| 44 class RenderProcessHost; | 44 class RenderProcessHost; |
| 45 class Shell; | 45 class Shell; |
| 46 | 46 |
| 47 #if defined(OS_ANDROID) | 47 #if defined(OS_ANDROID) |
| 48 // Android uses a nested message loop for running layout tests because the | 48 // Android uses a nested message loop for running layout tests because the |
| 49 // default message loop, provided by the system, does not offer a blocking | 49 // default message loop, provided by the system, does not offer a blocking |
| 50 // Run() method. The loop itself, implemented as NestedMessagePumpAndroid, | 50 // Run() method. The loop itself, implemented as NestedMessagePumpAndroid, |
| 51 // uses a base::WaitableEvent allowing it to sleep until more events arrive. | 51 // uses a base::WaitableEvent allowing it to sleep until more events arrive. |
| 52 class ScopedAllowWaitForAndroidLayoutTests { | 52 class ScopedAllowWaitForAndroidLayoutTests { |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 225 const std::string& argument); | 225 const std::string& argument); |
| 226 mojom::LayoutTestControl* GetLayoutTestControlPtr(RenderFrameHost* frame); | 226 mojom::LayoutTestControl* GetLayoutTestControlPtr(RenderFrameHost* frame); |
| 227 void HandleLayoutTestControlError(RenderFrameHost* frame); | 227 void HandleLayoutTestControlError(RenderFrameHost* frame); |
| 228 | 228 |
| 229 std::unique_ptr<BlinkTestResultPrinter> printer_; | 229 std::unique_ptr<BlinkTestResultPrinter> printer_; |
| 230 | 230 |
| 231 base::FilePath current_working_directory_; | 231 base::FilePath current_working_directory_; |
| 232 base::FilePath temp_path_; | 232 base::FilePath temp_path_; |
| 233 | 233 |
| 234 Shell* main_window_; | 234 Shell* main_window_; |
| 235 std::unique_ptr<Shell> secondary_window_; | |
| 236 | |
| 237 // Points to either main_window_ or secondary_window_ | |
|
dgozman
2017/03/16 21:38:07
Is that a case yet?
chenwilliam
2017/03/17 22:08:26
Not yet. Removed.
| |
| 238 Shell* devtools_window_; | |
| 239 std::unique_ptr<LayoutTestDevToolsBindings> devtools_bindings_; | |
| 235 | 240 |
| 236 // The PID of the render process of the render view host of main_window_. | 241 // The PID of the render process of the render view host of main_window_. |
| 237 int current_pid_; | 242 int current_pid_; |
| 238 | 243 |
| 239 // Tracks if (during the current test) we have already sent *initial* test | 244 // Tracks if (during the current test) we have already sent *initial* test |
| 240 // configuration to a renderer process (*initial* test configuration is | 245 // configuration to a renderer process (*initial* test configuration is |
| 241 // associated with some steps that should only be executed *once* per test - | 246 // associated with some steps that should only be executed *once* per test - |
| 242 // for example resizing the window and setting the focus). | 247 // for example resizing the window and setting the focus). |
| 243 bool did_send_initial_test_configuration_; | 248 bool did_send_initial_test_configuration_; |
| 244 | 249 |
| (...skipping 16 matching lines...) Expand all Loading... | |
| 261 // True if the WebPreferences of newly created RenderViewHost should be | 266 // True if the WebPreferences of newly created RenderViewHost should be |
| 262 // overridden with prefs_. | 267 // overridden with prefs_. |
| 263 bool should_override_prefs_; | 268 bool should_override_prefs_; |
| 264 WebPreferences prefs_; | 269 WebPreferences prefs_; |
| 265 | 270 |
| 266 NotificationRegistrar registrar_; | 271 NotificationRegistrar registrar_; |
| 267 | 272 |
| 268 const bool is_leak_detection_enabled_; | 273 const bool is_leak_detection_enabled_; |
| 269 bool crash_when_leak_found_; | 274 bool crash_when_leak_found_; |
| 270 | 275 |
| 271 LayoutTestDevToolsFrontend* devtools_frontend_; | |
| 272 | |
| 273 std::unique_ptr<LayoutTestBluetoothChooserFactory> bluetooth_chooser_factory_; | 276 std::unique_ptr<LayoutTestBluetoothChooserFactory> bluetooth_chooser_factory_; |
| 274 | 277 |
| 275 // Map from frame_tree_node_id into frame-specific dumps. | 278 // Map from frame_tree_node_id into frame-specific dumps. |
| 276 std::map<int, std::string> frame_to_layout_dump_map_; | 279 std::map<int, std::string> frame_to_layout_dump_map_; |
| 277 // Number of ShellViewHostMsg_LayoutDumpResponse messages we are waiting for. | 280 // Number of ShellViewHostMsg_LayoutDumpResponse messages we are waiting for. |
| 278 int pending_layout_dumps_; | 281 int pending_layout_dumps_; |
| 279 | 282 |
| 280 // Renderer processes are observed to detect crashes. | 283 // Renderer processes are observed to detect crashes. |
| 281 ScopedObserver<RenderProcessHost, RenderProcessHostObserver> | 284 ScopedObserver<RenderProcessHost, RenderProcessHostObserver> |
| 282 render_process_host_observer_; | 285 render_process_host_observer_; |
| (...skipping 13 matching lines...) Expand all Loading... | |
| 296 // waiting on the UI thread while layout tests are being ran. | 299 // waiting on the UI thread while layout tests are being ran. |
| 297 ScopedAllowWaitForAndroidLayoutTests reduced_restrictions_; | 300 ScopedAllowWaitForAndroidLayoutTests reduced_restrictions_; |
| 298 #endif | 301 #endif |
| 299 | 302 |
| 300 DISALLOW_COPY_AND_ASSIGN(BlinkTestController); | 303 DISALLOW_COPY_AND_ASSIGN(BlinkTestController); |
| 301 }; | 304 }; |
| 302 | 305 |
| 303 } // namespace content | 306 } // namespace content |
| 304 | 307 |
| 305 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_BLINK_TEST_CONTROLLER_H_ | 308 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_BLINK_TEST_CONTROLLER_H_ |
| OLD | NEW |