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/common/webkit_test_helpers.h" | 5 #include "content/shell/common/webkit_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/string_split.h" | 10 #include "base/strings/string_split.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 to->caret_browsing_enabled = from.caret_browsing_enabled; | 40 to->caret_browsing_enabled = from.caret_browsing_enabled; |
41 to->allow_displaying_insecure_content = | 41 to->allow_displaying_insecure_content = |
42 from.allow_display_of_insecure_content; | 42 from.allow_display_of_insecure_content; |
43 to->allow_running_insecure_content = from.allow_running_of_insecure_content; | 43 to->allow_running_insecure_content = from.allow_running_of_insecure_content; |
44 to->should_respect_image_orientation = from.should_respect_image_orientation; | 44 to->should_respect_image_orientation = from.should_respect_image_orientation; |
45 to->asynchronous_spell_checking_enabled = | 45 to->asynchronous_spell_checking_enabled = |
46 from.asynchronous_spell_checking_enabled; | 46 from.asynchronous_spell_checking_enabled; |
47 to->allow_file_access_from_file_urls = from.allow_file_access_from_file_urls; | 47 to->allow_file_access_from_file_urls = from.allow_file_access_from_file_urls; |
48 to->javascript_can_open_windows_automatically = | 48 to->javascript_can_open_windows_automatically = |
49 from.java_script_can_open_windows_automatically; | 49 from.java_script_can_open_windows_automatically; |
| 50 to->web_security_enabled = |
| 51 from.web_security_enabled; |
50 } | 52 } |
51 | 53 |
52 // Applies settings that differ between layout tests and regular mode. Some | 54 // Applies settings that differ between layout tests and regular mode. Some |
53 // of the defaults are controlled via command line flags which are | 55 // of the defaults are controlled via command line flags which are |
54 // automatically set for layout tests. | 56 // automatically set for layout tests. |
55 void ApplyLayoutTestDefaultPreferences(WebPreferences* prefs) { | 57 void ApplyLayoutTestDefaultPreferences(WebPreferences* prefs) { |
56 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 58 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
57 prefs->allow_universal_access_from_file_urls = true; | 59 prefs->allow_universal_access_from_file_urls = true; |
58 prefs->dom_paste_enabled = true; | 60 prefs->dom_paste_enabled = true; |
59 prefs->javascript_can_access_clipboard = true; | 61 prefs->javascript_can_access_clipboard = true; |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 if (command_line.HasSwitch(switches::kRegisterFontFiles)) { | 115 if (command_line.HasSwitch(switches::kRegisterFontFiles)) { |
114 base::SplitString( | 116 base::SplitString( |
115 command_line.GetSwitchValueASCII(switches::kRegisterFontFiles), | 117 command_line.GetSwitchValueASCII(switches::kRegisterFontFiles), |
116 ';', | 118 ';', |
117 &files); | 119 &files); |
118 } | 120 } |
119 return files; | 121 return files; |
120 } | 122 } |
121 | 123 |
122 } // namespace content | 124 } // namespace content |
OLD | NEW |