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/strings/string_split.h" | 10 #include "base/strings/string_split.h" |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 prefs->sans_serif_font_family_map[ | 96 prefs->sans_serif_font_family_map[ |
97 webkit_glue::kCommonScript] = base::ASCIIToUTF16("Helvetica"); | 97 webkit_glue::kCommonScript] = base::ASCIIToUTF16("Helvetica"); |
98 prefs->minimum_logical_font_size = 9; | 98 prefs->minimum_logical_font_size = 9; |
99 prefs->asynchronous_spell_checking_enabled = false; | 99 prefs->asynchronous_spell_checking_enabled = false; |
100 prefs->accelerated_2d_canvas_enabled = | 100 prefs->accelerated_2d_canvas_enabled = |
101 command_line.HasSwitch(switches::kEnableAccelerated2DCanvas); | 101 command_line.HasSwitch(switches::kEnableAccelerated2DCanvas); |
102 prefs->force_compositing_mode = | 102 prefs->force_compositing_mode = |
103 command_line.HasSwitch(switches::kForceCompositingMode); | 103 command_line.HasSwitch(switches::kForceCompositingMode); |
104 prefs->accelerated_compositing_for_video_enabled = false; | 104 prefs->accelerated_compositing_for_video_enabled = false; |
105 prefs->mock_scrollbars_enabled = false; | 105 prefs->mock_scrollbars_enabled = false; |
106 prefs->fixed_position_creates_stacking_context = false; | |
107 prefs->smart_insert_delete_enabled = true; | 106 prefs->smart_insert_delete_enabled = true; |
108 prefs->minimum_accelerated_2d_canvas_size = 0; | 107 prefs->minimum_accelerated_2d_canvas_size = 0; |
109 #if defined(OS_ANDROID) | 108 #if defined(OS_ANDROID) |
110 prefs->text_autosizing_enabled = false; | 109 prefs->text_autosizing_enabled = false; |
111 #endif | 110 #endif |
112 prefs->viewport_enabled = false; | 111 prefs->viewport_enabled = false; |
113 } | 112 } |
114 | 113 |
115 base::FilePath GetWebKitRootDirFilePath() { | 114 base::FilePath GetWebKitRootDirFilePath() { |
116 base::FilePath base_path; | 115 base::FilePath base_path; |
117 PathService::Get(base::DIR_SOURCE_ROOT, &base_path); | 116 PathService::Get(base::DIR_SOURCE_ROOT, &base_path); |
118 return base_path.Append(FILE_PATH_LITERAL("third_party/WebKit")); | 117 return base_path.Append(FILE_PATH_LITERAL("third_party/WebKit")); |
119 } | 118 } |
120 | 119 |
121 std::vector<std::string> GetSideloadFontFiles() { | 120 std::vector<std::string> GetSideloadFontFiles() { |
122 std::vector<std::string> files; | 121 std::vector<std::string> files; |
123 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 122 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
124 if (command_line.HasSwitch(switches::kRegisterFontFiles)) { | 123 if (command_line.HasSwitch(switches::kRegisterFontFiles)) { |
125 base::SplitString( | 124 base::SplitString( |
126 command_line.GetSwitchValueASCII(switches::kRegisterFontFiles), | 125 command_line.GetSwitchValueASCII(switches::kRegisterFontFiles), |
127 ';', | 126 ';', |
128 &files); | 127 &files); |
129 } | 128 } |
130 return files; | 129 return files; |
131 } | 130 } |
132 | 131 |
133 } // namespace content | 132 } // namespace content |
OLD | NEW |