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

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

Issue 1715573002: Replicating LayoutDumpFlags across OOPIFs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@replicating-pixel-dump-flag
Patch Set: Removed unneeded include. 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
« no previous file with comments | « content/shell/DEPS ('k') | content/shell/browser/layout_test/blink_test_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/scoped_observer.h" 16 #include "base/scoped_observer.h"
17 #include "base/synchronization/lock.h" 17 #include "base/synchronization/lock.h"
18 #include "base/threading/non_thread_safe.h" 18 #include "base/threading/non_thread_safe.h"
19 #include "base/values.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();
198 const test_runner::LayoutDumpFlags& layout_dump_flags); 195 void OnLayoutDumpFlagsChanged(
196 RenderFrameHost* sender,
197 const base::DictionaryValue& changed_layout_dump_flags);
199 void OnLayoutDumpResponse(RenderFrameHost* sender, const std::string& dump); 198 void OnLayoutDumpResponse(RenderFrameHost* sender, const std::string& dump);
200 void OnPrintMessage(const std::string& message); 199 void OnPrintMessage(const std::string& message);
201 void OnOverridePreferences(const WebPreferences& prefs); 200 void OnOverridePreferences(const WebPreferences& prefs);
202 void OnTestFinished(); 201 void OnTestFinished();
203 void OnClearDevToolsLocalStorage(); 202 void OnClearDevToolsLocalStorage();
204 void OnShowDevTools(const std::string& settings, 203 void OnShowDevTools(const std::string& settings,
205 const std::string& frontend_url); 204 const std::string& frontend_url);
206 void OnCloseDevTools(); 205 void OnCloseDevTools();
207 void OnGoToOffset(int offset); 206 void OnGoToOffset(int offset);
208 void OnReload(); 207 void OnReload();
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 259
261 // Map from frame_tree_node_id into frame-specific dumps. 260 // Map from frame_tree_node_id into frame-specific dumps.
262 std::map<int, std::string> frame_to_layout_dump_map_; 261 std::map<int, std::string> frame_to_layout_dump_map_;
263 // Number of ShellViewHostMsg_LayoutDumpResponse messages we are waiting for. 262 // Number of ShellViewHostMsg_LayoutDumpResponse messages we are waiting for.
264 int pending_layout_dumps_; 263 int pending_layout_dumps_;
265 264
266 // Renderer processes are observed to detect crashes. 265 // Renderer processes are observed to detect crashes.
267 ScopedObserver<RenderProcessHost, RenderProcessHostObserver> 266 ScopedObserver<RenderProcessHost, RenderProcessHostObserver>
268 render_process_host_observer_; 267 render_process_host_observer_;
269 268
269 // Changes reported by OnLayoutDumpFlagsChanged that have accumulated since
270 // PrepareForLayoutTest (i.e. changes that need to be send to a fresh
271 // renderer created while test is in progress).
272 base::DictionaryValue accumulated_layout_dump_flags_changes_;
273
270 #if defined(OS_ANDROID) 274 #if defined(OS_ANDROID)
271 // Because of the nested message pump implementation, Android needs to allow 275 // Because of the nested message pump implementation, Android needs to allow
272 // waiting on the UI thread while layout tests are being ran. 276 // waiting on the UI thread while layout tests are being ran.
273 ScopedAllowWaitForAndroidLayoutTests reduced_restrictions_; 277 ScopedAllowWaitForAndroidLayoutTests reduced_restrictions_;
274 #endif 278 #endif
275 279
276 DISALLOW_COPY_AND_ASSIGN(BlinkTestController); 280 DISALLOW_COPY_AND_ASSIGN(BlinkTestController);
277 }; 281 };
278 282
279 } // namespace content 283 } // namespace content
280 284
281 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_BLINK_TEST_CONTROLLER_H_ 285 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_BLINK_TEST_CONTROLLER_H_
OLDNEW
« no previous file with comments | « content/shell/DEPS ('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