Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(208)

Side by Side Diff: content/shell/browser/layout_test/blink_test_controller.h

Issue 2756623002: DevTools: extract bindings from ShellDevToolsFrontend (Closed)
Patch Set: fixup Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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_;
dgozman 2017/03/17 22:44:14 Let's call this devtools_window_ and remove one be
chenwilliam 2017/03/20 21:32:20 Done.
236
237 Shell* devtools_window_;
238 std::unique_ptr<LayoutTestDevToolsBindings> devtools_bindings_;
235 239
236 // The PID of the render process of the render view host of main_window_. 240 // The PID of the render process of the render view host of main_window_.
237 int current_pid_; 241 int current_pid_;
238 242
239 // Tracks if (during the current test) we have already sent *initial* test 243 // Tracks if (during the current test) we have already sent *initial* test
240 // configuration to a renderer process (*initial* test configuration is 244 // configuration to a renderer process (*initial* test configuration is
241 // associated with some steps that should only be executed *once* per test - 245 // associated with some steps that should only be executed *once* per test -
242 // for example resizing the window and setting the focus). 246 // for example resizing the window and setting the focus).
243 bool did_send_initial_test_configuration_; 247 bool did_send_initial_test_configuration_;
244 248
(...skipping 16 matching lines...) Expand all
261 // True if the WebPreferences of newly created RenderViewHost should be 265 // True if the WebPreferences of newly created RenderViewHost should be
262 // overridden with prefs_. 266 // overridden with prefs_.
263 bool should_override_prefs_; 267 bool should_override_prefs_;
264 WebPreferences prefs_; 268 WebPreferences prefs_;
265 269
266 NotificationRegistrar registrar_; 270 NotificationRegistrar registrar_;
267 271
268 const bool is_leak_detection_enabled_; 272 const bool is_leak_detection_enabled_;
269 bool crash_when_leak_found_; 273 bool crash_when_leak_found_;
270 274
271 LayoutTestDevToolsFrontend* devtools_frontend_;
272
273 std::unique_ptr<LayoutTestBluetoothChooserFactory> bluetooth_chooser_factory_; 275 std::unique_ptr<LayoutTestBluetoothChooserFactory> bluetooth_chooser_factory_;
274 276
275 // Map from frame_tree_node_id into frame-specific dumps. 277 // Map from frame_tree_node_id into frame-specific dumps.
276 std::map<int, std::string> frame_to_layout_dump_map_; 278 std::map<int, std::string> frame_to_layout_dump_map_;
277 // Number of ShellViewHostMsg_LayoutDumpResponse messages we are waiting for. 279 // Number of ShellViewHostMsg_LayoutDumpResponse messages we are waiting for.
278 int pending_layout_dumps_; 280 int pending_layout_dumps_;
279 281
280 // Renderer processes are observed to detect crashes. 282 // Renderer processes are observed to detect crashes.
281 ScopedObserver<RenderProcessHost, RenderProcessHostObserver> 283 ScopedObserver<RenderProcessHost, RenderProcessHostObserver>
282 render_process_host_observer_; 284 render_process_host_observer_;
(...skipping 13 matching lines...) Expand all
296 // waiting on the UI thread while layout tests are being ran. 298 // waiting on the UI thread while layout tests are being ran.
297 ScopedAllowWaitForAndroidLayoutTests reduced_restrictions_; 299 ScopedAllowWaitForAndroidLayoutTests reduced_restrictions_;
298 #endif 300 #endif
299 301
300 DISALLOW_COPY_AND_ASSIGN(BlinkTestController); 302 DISALLOW_COPY_AND_ASSIGN(BlinkTestController);
301 }; 303 };
302 304
303 } // namespace content 305 } // namespace content
304 306
305 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_BLINK_TEST_CONTROLLER_H_ 307 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_BLINK_TEST_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698