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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 prefs->asynchronous_spell_checking_enabled = false; | 103 prefs->asynchronous_spell_checking_enabled = false; |
104 prefs->accelerated_2d_canvas_enabled = | 104 prefs->accelerated_2d_canvas_enabled = |
105 command_line.HasSwitch(switches::kEnableAccelerated2DCanvas); | 105 command_line.HasSwitch(switches::kEnableAccelerated2DCanvas); |
106 prefs->mock_scrollbars_enabled = false; | 106 prefs->mock_scrollbars_enabled = false; |
107 prefs->smart_insert_delete_enabled = true; | 107 prefs->smart_insert_delete_enabled = true; |
108 prefs->minimum_accelerated_2d_canvas_size = 0; | 108 prefs->minimum_accelerated_2d_canvas_size = 0; |
109 #if defined(OS_ANDROID) | 109 #if defined(OS_ANDROID) |
110 prefs->text_autosizing_enabled = false; | 110 prefs->text_autosizing_enabled = false; |
111 #endif | 111 #endif |
112 prefs->viewport_enabled = false; | 112 prefs->viewport_enabled = false; |
| 113 prefs->default_minimum_page_scale_factor = 1.f; |
| 114 prefs->default_maximum_page_scale_factor = 4.f; |
113 } | 115 } |
114 | 116 |
115 base::FilePath GetWebKitRootDirFilePath() { | 117 base::FilePath GetWebKitRootDirFilePath() { |
116 base::FilePath base_path; | 118 base::FilePath base_path; |
117 PathService::Get(base::DIR_SOURCE_ROOT, &base_path); | 119 PathService::Get(base::DIR_SOURCE_ROOT, &base_path); |
118 return base_path.Append(FILE_PATH_LITERAL("third_party/WebKit")); | 120 return base_path.Append(FILE_PATH_LITERAL("third_party/WebKit")); |
119 } | 121 } |
120 | 122 |
121 std::vector<std::string> GetSideloadFontFiles() { | 123 std::vector<std::string> GetSideloadFontFiles() { |
122 std::vector<std::string> files; | 124 std::vector<std::string> files; |
123 const base::CommandLine& command_line = | 125 const base::CommandLine& command_line = |
124 *base::CommandLine::ForCurrentProcess(); | 126 *base::CommandLine::ForCurrentProcess(); |
125 if (command_line.HasSwitch(switches::kRegisterFontFiles)) { | 127 if (command_line.HasSwitch(switches::kRegisterFontFiles)) { |
126 base::SplitString( | 128 base::SplitString( |
127 command_line.GetSwitchValueASCII(switches::kRegisterFontFiles), | 129 command_line.GetSwitchValueASCII(switches::kRegisterFontFiles), |
128 ';', | 130 ';', |
129 &files); | 131 &files); |
130 } | 132 } |
131 return files; | 133 return files; |
132 } | 134 } |
133 | 135 |
134 } // namespace content | 136 } // namespace content |
OLD | NEW |