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

Side by Side Diff: content/shell/renderer/layout_test/blink_test_helpers.cc

Issue 2042763002: Fix re-usage of stale cached WebPreferences in RenderViewHost. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/renderer/layout_test/blink_test_helpers.h" 5 #include "content/shell/renderer/layout_test/blink_test_helpers.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/files/file_util.h" 8 #include "base/files/file_util.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 to->allow_file_access_from_file_urls = from.allow_file_access_from_file_urls; 43 to->allow_file_access_from_file_urls = from.allow_file_access_from_file_urls;
44 to->javascript_can_open_windows_automatically = 44 to->javascript_can_open_windows_automatically =
45 from.java_script_can_open_windows_automatically; 45 from.java_script_can_open_windows_automatically;
46 to->web_security_enabled = 46 to->web_security_enabled =
47 from.web_security_enabled; 47 from.web_security_enabled;
48 to->disable_reading_from_canvas = from.disable_reading_from_canvas; 48 to->disable_reading_from_canvas = from.disable_reading_from_canvas;
49 to->strict_mixed_content_checking = 49 to->strict_mixed_content_checking =
50 from.strict_mixed_content_checking; 50 from.strict_mixed_content_checking;
51 to->strict_powerful_feature_restrictions = 51 to->strict_powerful_feature_restrictions =
52 from.strict_powerful_feature_restrictions; 52 from.strict_powerful_feature_restrictions;
53 to->spatial_navigation_enabled = from.spatial_navigation_enabled;
53 } 54 }
54 55
55 // Applies settings that differ between layout tests and regular mode. Some 56 // Applies settings that differ between layout tests and regular mode. Some
56 // of the defaults are controlled via command line flags which are 57 // of the defaults are controlled via command line flags which are
57 // automatically set for layout tests. 58 // automatically set for layout tests.
58 void ApplyLayoutTestDefaultPreferences(WebPreferences* prefs) { 59 void ApplyLayoutTestDefaultPreferences(WebPreferences* prefs) {
59 const base::CommandLine& command_line = 60 const base::CommandLine& command_line =
60 *base::CommandLine::ForCurrentProcess(); 61 *base::CommandLine::ForCurrentProcess();
61 prefs->allow_universal_access_from_file_urls = true; 62 prefs->allow_universal_access_from_file_urls = true;
62 prefs->dom_paste_enabled = true; 63 prefs->dom_paste_enabled = true;
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 prefs->default_maximum_page_scale_factor = 4.f; 109 prefs->default_maximum_page_scale_factor = 4.f;
109 } 110 }
110 111
111 base::FilePath GetWebKitRootDirFilePath() { 112 base::FilePath GetWebKitRootDirFilePath() {
112 base::FilePath base_path; 113 base::FilePath base_path;
113 PathService::Get(base::DIR_SOURCE_ROOT, &base_path); 114 PathService::Get(base::DIR_SOURCE_ROOT, &base_path);
114 return base_path.Append(FILE_PATH_LITERAL("third_party/WebKit")); 115 return base_path.Append(FILE_PATH_LITERAL("third_party/WebKit"));
115 } 116 }
116 117
117 } // namespace content 118 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698