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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 #endif | 85 #endif |
86 prefs->serif_font_family_map[kCommonScript] = serif; | 86 prefs->serif_font_family_map[kCommonScript] = serif; |
87 prefs->standard_font_family_map[kCommonScript] = serif; | 87 prefs->standard_font_family_map[kCommonScript] = serif; |
88 prefs->fixed_font_family_map[kCommonScript] = base::ASCIIToUTF16("Courier"); | 88 prefs->fixed_font_family_map[kCommonScript] = base::ASCIIToUTF16("Courier"); |
89 prefs->sans_serif_font_family_map[kCommonScript] = | 89 prefs->sans_serif_font_family_map[kCommonScript] = |
90 base::ASCIIToUTF16("Helvetica"); | 90 base::ASCIIToUTF16("Helvetica"); |
91 prefs->minimum_logical_font_size = 9; | 91 prefs->minimum_logical_font_size = 9; |
92 prefs->asynchronous_spell_checking_enabled = false; | 92 prefs->asynchronous_spell_checking_enabled = false; |
93 prefs->accelerated_2d_canvas_enabled = | 93 prefs->accelerated_2d_canvas_enabled = |
94 command_line.HasSwitch(switches::kEnableAccelerated2DCanvas); | 94 command_line.HasSwitch(switches::kEnableAccelerated2DCanvas); |
95 prefs->accelerated_compositing_for_video_enabled = false; | |
96 prefs->mock_scrollbars_enabled = false; | 95 prefs->mock_scrollbars_enabled = false; |
97 prefs->smart_insert_delete_enabled = true; | 96 prefs->smart_insert_delete_enabled = true; |
98 prefs->minimum_accelerated_2d_canvas_size = 0; | 97 prefs->minimum_accelerated_2d_canvas_size = 0; |
99 #if defined(OS_ANDROID) | 98 #if defined(OS_ANDROID) |
100 prefs->text_autosizing_enabled = false; | 99 prefs->text_autosizing_enabled = false; |
101 #endif | 100 #endif |
102 prefs->viewport_enabled = false; | 101 prefs->viewport_enabled = false; |
103 } | 102 } |
104 | 103 |
105 base::FilePath GetWebKitRootDirFilePath() { | 104 base::FilePath GetWebKitRootDirFilePath() { |
106 base::FilePath base_path; | 105 base::FilePath base_path; |
107 PathService::Get(base::DIR_SOURCE_ROOT, &base_path); | 106 PathService::Get(base::DIR_SOURCE_ROOT, &base_path); |
108 return base_path.Append(FILE_PATH_LITERAL("third_party/WebKit")); | 107 return base_path.Append(FILE_PATH_LITERAL("third_party/WebKit")); |
109 } | 108 } |
110 | 109 |
111 std::vector<std::string> GetSideloadFontFiles() { | 110 std::vector<std::string> GetSideloadFontFiles() { |
112 std::vector<std::string> files; | 111 std::vector<std::string> files; |
113 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 112 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
114 if (command_line.HasSwitch(switches::kRegisterFontFiles)) { | 113 if (command_line.HasSwitch(switches::kRegisterFontFiles)) { |
115 base::SplitString( | 114 base::SplitString( |
116 command_line.GetSwitchValueASCII(switches::kRegisterFontFiles), | 115 command_line.GetSwitchValueASCII(switches::kRegisterFontFiles), |
117 ';', | 116 ';', |
118 &files); | 117 &files); |
119 } | 118 } |
120 return files; | 119 return files; |
121 } | 120 } |
122 | 121 |
123 } // namespace content | 122 } // namespace content |
OLD | NEW |