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/utf_string_conversions.h" | 11 #include "base/strings/utf_string_conversions.h" |
11 #include "content/public/common/content_switches.h" | 12 #include "content/public/common/content_switches.h" |
12 #include "content/shell/common/shell_switches.h" | 13 #include "content/shell/common/shell_switches.h" |
13 #include "content/shell/common/test_runner/test_preferences.h" | 14 #include "content/shell/common/test_runner/test_preferences.h" |
14 #include "webkit/common/webpreferences.h" | 15 #include "webkit/common/webpreferences.h" |
15 | 16 |
16 namespace content { | 17 namespace content { |
17 | 18 |
18 void ExportLayoutTestSpecificPreferences( | 19 void ExportLayoutTestSpecificPreferences( |
19 const TestPreferences& from, | 20 const TestPreferences& from, |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 #endif | 112 #endif |
112 prefs->viewport_enabled = false; | 113 prefs->viewport_enabled = false; |
113 } | 114 } |
114 | 115 |
115 base::FilePath GetWebKitRootDirFilePath() { | 116 base::FilePath GetWebKitRootDirFilePath() { |
116 base::FilePath base_path; | 117 base::FilePath base_path; |
117 PathService::Get(base::DIR_SOURCE_ROOT, &base_path); | 118 PathService::Get(base::DIR_SOURCE_ROOT, &base_path); |
118 return base_path.Append(FILE_PATH_LITERAL("third_party/WebKit")); | 119 return base_path.Append(FILE_PATH_LITERAL("third_party/WebKit")); |
119 } | 120 } |
120 | 121 |
| 122 std::vector<std::string> GetSideloadFontFiles() { |
| 123 std::vector<std::string> files; |
| 124 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
| 125 if (command_line.HasSwitch(switches::kRegisterFontFiles)) { |
| 126 base::SplitString( |
| 127 command_line.GetSwitchValueASCII(switches::kRegisterFontFiles), |
| 128 ';', |
| 129 &files); |
| 130 } |
| 131 return files; |
| 132 } |
| 133 |
121 } // namespace content | 134 } // namespace content |
OLD | NEW |