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

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

Issue 2264883002: Ensure previous test preference overrides are reset between tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 | « no previous file | no next file » | 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 #include "content/shell/browser/layout_test/blink_test_controller.h" 5 #include "content/shell/browser/layout_test/blink_test_controller.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <iostream> 9 #include <iostream>
10 #include <set> 10 #include <set>
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 main_window_->web_contents() 308 main_window_->web_contents()
309 ->GetRenderViewHost() 309 ->GetRenderViewHost()
310 ->GetWidget() 310 ->GetWidget()
311 ->WasResized(); 311 ->WasResized();
312 RenderViewHost* render_view_host = 312 RenderViewHost* render_view_host =
313 main_window_->web_contents()->GetRenderViewHost(); 313 main_window_->web_contents()->GetRenderViewHost();
314 314
315 // Compositing tests override the default preferences (see 315 // Compositing tests override the default preferences (see
316 // BlinkTestController::OverrideWebkitPrefs) so we force them to be 316 // BlinkTestController::OverrideWebkitPrefs) so we force them to be
317 // calculated again to ensure is_compositing_test_ changes are picked up. 317 // calculated again to ensure is_compositing_test_ changes are picked up.
318 default_prefs_ = render_view_host->GetWebkitPreferences();
319 OverrideWebkitPrefs(&default_prefs_); 318 OverrideWebkitPrefs(&default_prefs_);
320 319
321 render_view_host->UpdateWebkitPreferences(default_prefs_); 320 render_view_host->UpdateWebkitPreferences(default_prefs_);
322 HandleNewRenderFrameHost(render_view_host->GetMainFrame()); 321 HandleNewRenderFrameHost(render_view_host->GetMainFrame());
323 322
324 NavigationController::LoadURLParams params(test_url); 323 NavigationController::LoadURLParams params(test_url);
325 params.transition_type = ui::PageTransitionFromInt( 324 params.transition_type = ui::PageTransitionFromInt(
326 ui::PAGE_TRANSITION_TYPED | ui::PAGE_TRANSITION_FROM_ADDRESS_BAR); 325 ui::PAGE_TRANSITION_TYPED | ui::PAGE_TRANSITION_FROM_ADDRESS_BAR);
327 params.should_clear_history_list = true; 326 params.should_clear_history_list = true;
328 main_window_->web_contents()->GetController().LoadURLWithParams(params); 327 main_window_->web_contents()->GetController().LoadURLWithParams(params);
(...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after
945 } else { 944 } else {
946 printer_->AddErrorMessage(base::StringPrintf( 945 printer_->AddErrorMessage(base::StringPrintf(
947 "FAIL: Unexpected sendBluetoothManualChooserEvent() event name '%s'.", 946 "FAIL: Unexpected sendBluetoothManualChooserEvent() event name '%s'.",
948 event_name.c_str())); 947 event_name.c_str()));
949 return; 948 return;
950 } 949 }
951 bluetooth_chooser_factory_->SendEvent(event, argument); 950 bluetooth_chooser_factory_->SendEvent(event, argument);
952 } 951 }
953 952
954 } // namespace content 953 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698