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

Side by Side Diff: content/shell/common/webkit_test_helpers.cc

Issue 64843004: Get rid of user-level styles. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge to ToT Created 7 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « content/renderer/web_preferences.cc ('k') | webkit/common/webpreferences.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/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/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 29 matching lines...) Expand all
40 to->hyperlink_auditing_enabled = from.hyperlinkAuditingEnabled; 40 to->hyperlink_auditing_enabled = from.hyperlinkAuditingEnabled;
41 to->caret_browsing_enabled = from.caretBrowsingEnabled; 41 to->caret_browsing_enabled = from.caretBrowsingEnabled;
42 to->allow_displaying_insecure_content = from.allowDisplayOfInsecureContent; 42 to->allow_displaying_insecure_content = from.allowDisplayOfInsecureContent;
43 to->allow_running_insecure_content = from.allowRunningOfInsecureContent; 43 to->allow_running_insecure_content = from.allowRunningOfInsecureContent;
44 to->should_respect_image_orientation = from.shouldRespectImageOrientation; 44 to->should_respect_image_orientation = from.shouldRespectImageOrientation;
45 to->asynchronous_spell_checking_enabled = 45 to->asynchronous_spell_checking_enabled =
46 from.asynchronousSpellCheckingEnabled; 46 from.asynchronousSpellCheckingEnabled;
47 to->allow_file_access_from_file_urls = from.allowFileAccessFromFileURLs; 47 to->allow_file_access_from_file_urls = from.allowFileAccessFromFileURLs;
48 to->javascript_can_open_windows_automatically = 48 to->javascript_can_open_windows_automatically =
49 from.javaScriptCanOpenWindowsAutomatically; 49 from.javaScriptCanOpenWindowsAutomatically;
50 to->user_style_sheet_location = from.userStyleSheetLocation;
51 } 50 }
52 51
53 // Applies settings that differ between layout tests and regular mode. Some 52 // Applies settings that differ between layout tests and regular mode. Some
54 // of the defaults are controlled via command line flags which are 53 // of the defaults are controlled via command line flags which are
55 // automatically set for layout tests. 54 // automatically set for layout tests.
56 void ApplyLayoutTestDefaultPreferences(WebPreferences* prefs) { 55 void ApplyLayoutTestDefaultPreferences(WebPreferences* prefs) {
57 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 56 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
58 prefs->allow_universal_access_from_file_urls = true; 57 prefs->allow_universal_access_from_file_urls = true;
59 prefs->dom_paste_enabled = true; 58 prefs->dom_paste_enabled = true;
60 prefs->javascript_can_access_clipboard = true; 59 prefs->javascript_can_access_clipboard = true;
(...skipping 28 matching lines...) Expand all
89 prefs->serif_font_family_map[webkit_glue::kCommonScript] = 88 prefs->serif_font_family_map[webkit_glue::kCommonScript] =
90 serif; 89 serif;
91 prefs->standard_font_family_map[webkit_glue::kCommonScript] = 90 prefs->standard_font_family_map[webkit_glue::kCommonScript] =
92 serif; 91 serif;
93 prefs->fixed_font_family_map[webkit_glue::kCommonScript] = 92 prefs->fixed_font_family_map[webkit_glue::kCommonScript] =
94 ASCIIToUTF16("Courier"); 93 ASCIIToUTF16("Courier");
95 prefs->sans_serif_font_family_map[ 94 prefs->sans_serif_font_family_map[
96 webkit_glue::kCommonScript] = ASCIIToUTF16("Helvetica"); 95 webkit_glue::kCommonScript] = ASCIIToUTF16("Helvetica");
97 prefs->minimum_logical_font_size = 9; 96 prefs->minimum_logical_font_size = 9;
98 prefs->asynchronous_spell_checking_enabled = false; 97 prefs->asynchronous_spell_checking_enabled = false;
99 prefs->user_style_sheet_enabled = true;
100 prefs->threaded_html_parser = true; 98 prefs->threaded_html_parser = true;
101 prefs->accelerated_2d_canvas_enabled = 99 prefs->accelerated_2d_canvas_enabled =
102 command_line.HasSwitch(switches::kEnableAccelerated2DCanvas); 100 command_line.HasSwitch(switches::kEnableAccelerated2DCanvas);
103 prefs->force_compositing_mode = 101 prefs->force_compositing_mode =
104 command_line.HasSwitch(switches::kForceCompositingMode); 102 command_line.HasSwitch(switches::kForceCompositingMode);
105 prefs->accelerated_compositing_for_video_enabled = false; 103 prefs->accelerated_compositing_for_video_enabled = false;
106 prefs->mock_scrollbars_enabled = false; 104 prefs->mock_scrollbars_enabled = false;
107 prefs->fixed_position_creates_stacking_context = false; 105 prefs->fixed_position_creates_stacking_context = false;
108 prefs->smart_insert_delete_enabled = true; 106 prefs->smart_insert_delete_enabled = true;
109 prefs->minimum_accelerated_2d_canvas_size = 0; 107 prefs->minimum_accelerated_2d_canvas_size = 0;
110 #if defined(OS_ANDROID) 108 #if defined(OS_ANDROID)
111 prefs->text_autosizing_enabled = false; 109 prefs->text_autosizing_enabled = false;
112 #endif 110 #endif
113 prefs->viewport_enabled = false; 111 prefs->viewport_enabled = false;
114 } 112 }
115 113
116 base::FilePath GetWebKitRootDirFilePath() { 114 base::FilePath GetWebKitRootDirFilePath() {
117 base::FilePath base_path; 115 base::FilePath base_path;
118 PathService::Get(base::DIR_SOURCE_ROOT, &base_path); 116 PathService::Get(base::DIR_SOURCE_ROOT, &base_path);
119 return base_path.Append(FILE_PATH_LITERAL("third_party/WebKit")); 117 return base_path.Append(FILE_PATH_LITERAL("third_party/WebKit"));
120 } 118 }
121 119
122 } // namespace content 120 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/web_preferences.cc ('k') | webkit/common/webpreferences.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698