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

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

Issue 1736353002: ABANDONED CL: Shared-memory-based approach to layout tests runtime flags replication. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 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 <ostream> 9 #include <ostream>
10 #include <string> 10 #include <string>
11 11
12 #include "base/cancelable_callback.h" 12 #include "base/cancelable_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 "base/memory/scoped_ptr.h" 15 #include "base/memory/scoped_ptr.h"
16 #include "base/memory/shared_memory.h"
16 #include "base/scoped_observer.h" 17 #include "base/scoped_observer.h"
17 #include "base/synchronization/lock.h" 18 #include "base/synchronization/lock.h"
18 #include "base/threading/non_thread_safe.h" 19 #include "base/threading/non_thread_safe.h"
19 #include "build/build_config.h" 20 #include "build/build_config.h"
20 #include "content/public/browser/bluetooth_chooser.h" 21 #include "content/public/browser/bluetooth_chooser.h"
21 #include "content/public/browser/gpu_data_manager_observer.h" 22 #include "content/public/browser/gpu_data_manager_observer.h"
22 #include "content/public/browser/notification_observer.h" 23 #include "content/public/browser/notification_observer.h"
23 #include "content/public/browser/notification_registrar.h" 24 #include "content/public/browser/notification_registrar.h"
24 #include "content/public/browser/render_process_host_observer.h" 25 #include "content/public/browser/render_process_host_observer.h"
25 #include "content/public/browser/web_contents_observer.h" 26 #include "content/public/browser/web_contents_observer.h"
26 #include "content/public/common/web_preferences.h" 27 #include "content/public/common/web_preferences.h"
27 #include "content/shell/common/leak_detection_result.h" 28 #include "content/shell/common/leak_detection_result.h"
28 #include "ui/gfx/geometry/size.h" 29 #include "ui/gfx/geometry/size.h"
29 30
30 #if defined(OS_ANDROID) 31 #if defined(OS_ANDROID)
31 #include "base/threading/thread_restrictions.h" 32 #include "base/threading/thread_restrictions.h"
32 #endif 33 #endif
33 34
34 class SkBitmap; 35 class SkBitmap;
35 36
36 namespace test_runner {
37 struct LayoutDumpFlags;
38 }
39
40 namespace url { 37 namespace url {
41 class Origin; 38 class Origin;
42 } 39 }
43 40
44 namespace content { 41 namespace content {
45 42
46 class LayoutTestBluetoothChooserFactory; 43 class LayoutTestBluetoothChooserFactory;
47 class LayoutTestDevToolsFrontend; 44 class LayoutTestDevToolsFrontend;
48 class RenderFrameHost; 45 class RenderFrameHost;
49 class RenderProcessHost; 46 class RenderProcessHost;
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 static BlinkTestController* instance_; 184 static BlinkTestController* instance_;
188 185
189 void DiscardMainWindow(); 186 void DiscardMainWindow();
190 void HandleNewRenderFrameHost( 187 void HandleNewRenderFrameHost(
191 RenderFrameHost* frame_representing_target_process); 188 RenderFrameHost* frame_representing_target_process);
192 189
193 // Message handlers. 190 // Message handlers.
194 void OnAudioDump(const std::vector<unsigned char>& audio_dump); 191 void OnAudioDump(const std::vector<unsigned char>& audio_dump);
195 void OnImageDump(const std::string& actual_pixel_hash, const SkBitmap& image); 192 void OnImageDump(const std::string& actual_pixel_hash, const SkBitmap& image);
196 void OnTextDump(const std::string& dump); 193 void OnTextDump(const std::string& dump);
197 void OnInitiateLayoutDump( 194 void OnInitiateLayoutDump(bool dump_child_frames);
198 const test_runner::LayoutDumpFlags& layout_dump_flags);
199 void OnLayoutDumpResponse(RenderFrameHost* sender, const std::string& dump); 195 void OnLayoutDumpResponse(RenderFrameHost* sender, const std::string& dump);
200 void OnPrintMessage(const std::string& message); 196 void OnPrintMessage(const std::string& message);
201 void OnOverridePreferences(const WebPreferences& prefs); 197 void OnOverridePreferences(const WebPreferences& prefs);
202 void OnTestFinished(); 198 void OnTestFinished();
203 void OnClearDevToolsLocalStorage(); 199 void OnClearDevToolsLocalStorage();
204 void OnShowDevTools(const std::string& settings, 200 void OnShowDevTools(const std::string& settings,
205 const std::string& frontend_url); 201 const std::string& frontend_url);
206 void OnCloseDevTools(); 202 void OnCloseDevTools();
207 void OnGoToOffset(int offset); 203 void OnGoToOffset(int offset);
208 void OnReload(); 204 void OnReload();
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 254
259 // Map from frame_tree_node_id into frame-specific dumps. 255 // Map from frame_tree_node_id into frame-specific dumps.
260 std::map<int, std::string> frame_to_layout_dump_map_; 256 std::map<int, std::string> frame_to_layout_dump_map_;
261 // Number of ShellViewHostMsg_LayoutDumpResponse messages we are waiting for. 257 // Number of ShellViewHostMsg_LayoutDumpResponse messages we are waiting for.
262 int pending_layout_dumps_; 258 int pending_layout_dumps_;
263 259
264 // Renderer processes are observed to detect crashes. 260 // Renderer processes are observed to detect crashes.
265 ScopedObserver<RenderProcessHost, RenderProcessHostObserver> 261 ScopedObserver<RenderProcessHost, RenderProcessHostObserver>
266 render_process_host_observer_; 262 render_process_host_observer_;
267 263
264 // Memory backing LayoutDumpFlags (shared across all renderers).
265 base::SharedMemory layout_dump_flags_memory_;
266
268 #if defined(OS_ANDROID) 267 #if defined(OS_ANDROID)
269 // Because of the nested message pump implementation, Android needs to allow 268 // Because of the nested message pump implementation, Android needs to allow
270 // waiting on the UI thread while layout tests are being ran. 269 // waiting on the UI thread while layout tests are being ran.
271 ScopedAllowWaitForAndroidLayoutTests reduced_restrictions_; 270 ScopedAllowWaitForAndroidLayoutTests reduced_restrictions_;
272 #endif 271 #endif
273 272
274 DISALLOW_COPY_AND_ASSIGN(BlinkTestController); 273 DISALLOW_COPY_AND_ASSIGN(BlinkTestController);
275 }; 274 };
276 275
277 } // namespace content 276 } // namespace content
278 277
279 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_BLINK_TEST_CONTROLLER_H_ 278 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_BLINK_TEST_CONTROLLER_H_
OLDNEW
« no previous file with comments | « components/test_runner/web_test_runner.h ('k') | content/shell/browser/layout_test/blink_test_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698