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/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 to->allow_running_insecure_content = from.allowRunningOfInsecureContent; | 43 to->allow_running_insecure_content = from.allowRunningOfInsecureContent; |
44 to->css_shaders_enabled = from.cssCustomFilterEnabled; | 44 to->css_shaders_enabled = from.cssCustomFilterEnabled; |
45 to->should_respect_image_orientation = from.shouldRespectImageOrientation; | 45 to->should_respect_image_orientation = from.shouldRespectImageOrientation; |
46 to->asynchronous_spell_checking_enabled = | 46 to->asynchronous_spell_checking_enabled = |
47 from.asynchronousSpellCheckingEnabled; | 47 from.asynchronousSpellCheckingEnabled; |
48 to->allow_file_access_from_file_urls = from.allowFileAccessFromFileURLs; | 48 to->allow_file_access_from_file_urls = from.allowFileAccessFromFileURLs; |
49 to->author_and_user_styles_enabled = from.authorAndUserStylesEnabled; | 49 to->author_and_user_styles_enabled = from.authorAndUserStylesEnabled; |
50 to->javascript_can_open_windows_automatically = | 50 to->javascript_can_open_windows_automatically = |
51 from.javaScriptCanOpenWindowsAutomatically; | 51 from.javaScriptCanOpenWindowsAutomatically; |
52 to->user_style_sheet_location = from.userStyleSheetLocation; | 52 to->user_style_sheet_location = from.userStyleSheetLocation; |
53 to->touch_drag_drop_enabled = from.touchDragDropEnabled; | |
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 CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 59 CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
61 prefs->allow_universal_access_from_file_urls = true; | 60 prefs->allow_universal_access_from_file_urls = true; |
62 prefs->dom_paste_enabled = true; | 61 prefs->dom_paste_enabled = true; |
63 prefs->javascript_can_access_clipboard = true; | 62 prefs->javascript_can_access_clipboard = true; |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 FILE_PATH_LITERAL("Source/WebKit/chromium/webkit/support")))) { | 136 FILE_PATH_LITERAL("Source/WebKit/chromium/webkit/support")))) { |
138 // We're in a WebKit-only checkout. | 137 // We're in a WebKit-only checkout. |
139 return webkit_path.Append(FILE_PATH_LITERAL("Source/WebKit/chromium")); | 138 return webkit_path.Append(FILE_PATH_LITERAL("Source/WebKit/chromium")); |
140 } else { | 139 } else { |
141 // We're in a Chromium checkout, and WebKit is in third_party/WebKit. | 140 // We're in a Chromium checkout, and WebKit is in third_party/WebKit. |
142 return webkit_path.Append(FILE_PATH_LITERAL("../..")); | 141 return webkit_path.Append(FILE_PATH_LITERAL("../..")); |
143 } | 142 } |
144 } | 143 } |
145 | 144 |
146 } // namespace content | 145 } // namespace content |
OLD | NEW |