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

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

Issue 2134723002: Reland #1: Fix re-usage of stale cached WebPreferences in RenderViewHost. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleanly reset WebPreferences with the initial untampered defaults. Created 4 years, 5 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 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 241
242 // True if the currently running test is a compositing test. 242 // True if the currently running test is a compositing test.
243 bool is_compositing_test_; 243 bool is_compositing_test_;
244 244
245 // Per test config. 245 // Per test config.
246 bool enable_pixel_dumping_; 246 bool enable_pixel_dumping_;
247 std::string expected_pixel_hash_; 247 std::string expected_pixel_hash_;
248 gfx::Size initial_size_; 248 gfx::Size initial_size_;
249 GURL test_url_; 249 GURL test_url_;
250 250
251 // Stores the default test-adapted WebPreferences which is then used to fully
252 // reset the main window's preferences if and when it is reused.
253 WebPreferences default_prefs_;
254
251 // True if the WebPreferences of newly created RenderViewHost should be 255 // True if the WebPreferences of newly created RenderViewHost should be
252 // overridden with prefs_. 256 // overridden with prefs_.
253 bool should_override_prefs_; 257 bool should_override_prefs_;
254 WebPreferences prefs_; 258 WebPreferences prefs_;
255 259
256 NotificationRegistrar registrar_; 260 NotificationRegistrar registrar_;
257 261
258 const bool is_leak_detection_enabled_; 262 const bool is_leak_detection_enabled_;
259 bool crash_when_leak_found_; 263 bool crash_when_leak_found_;
260 264
(...skipping 22 matching lines...) Expand all
283 // waiting on the UI thread while layout tests are being ran. 287 // waiting on the UI thread while layout tests are being ran.
284 ScopedAllowWaitForAndroidLayoutTests reduced_restrictions_; 288 ScopedAllowWaitForAndroidLayoutTests reduced_restrictions_;
285 #endif 289 #endif
286 290
287 DISALLOW_COPY_AND_ASSIGN(BlinkTestController); 291 DISALLOW_COPY_AND_ASSIGN(BlinkTestController);
288 }; 292 };
289 293
290 } // namespace content 294 } // namespace content
291 295
292 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_BLINK_TEST_CONTROLLER_H_ 296 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_BLINK_TEST_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698