OLD | NEW |
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 Loading... |
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; | |
54 } | 53 } |
55 | 54 |
56 // Applies settings that differ between layout tests and regular mode. Some | 55 // Applies settings that differ between layout tests and regular mode. Some |
57 // of the defaults are controlled via command line flags which are | 56 // of the defaults are controlled via command line flags which are |
58 // automatically set for layout tests. | 57 // automatically set for layout tests. |
59 void ApplyLayoutTestDefaultPreferences(WebPreferences* prefs) { | 58 void ApplyLayoutTestDefaultPreferences(WebPreferences* prefs) { |
60 const base::CommandLine& command_line = | 59 const base::CommandLine& command_line = |
61 *base::CommandLine::ForCurrentProcess(); | 60 *base::CommandLine::ForCurrentProcess(); |
62 prefs->allow_universal_access_from_file_urls = true; | 61 prefs->allow_universal_access_from_file_urls = true; |
63 prefs->dom_paste_enabled = true; | 62 prefs->dom_paste_enabled = true; |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 prefs->default_maximum_page_scale_factor = 4.f; | 108 prefs->default_maximum_page_scale_factor = 4.f; |
110 } | 109 } |
111 | 110 |
112 base::FilePath GetWebKitRootDirFilePath() { | 111 base::FilePath GetWebKitRootDirFilePath() { |
113 base::FilePath base_path; | 112 base::FilePath base_path; |
114 PathService::Get(base::DIR_SOURCE_ROOT, &base_path); | 113 PathService::Get(base::DIR_SOURCE_ROOT, &base_path); |
115 return base_path.Append(FILE_PATH_LITERAL("third_party/WebKit")); | 114 return base_path.Append(FILE_PATH_LITERAL("third_party/WebKit")); |
116 } | 115 } |
117 | 116 |
118 } // namespace content | 117 } // namespace content |
OLD | NEW |