OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/browser/shell_browser_main.h" | 5 #include "content/shell/browser/shell_browser_main.h" |
6 | 6 |
7 #include <iostream> | 7 #include <iostream> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 } | 80 } |
81 test_url = net::FilePathToFileURL(base::MakeAbsoluteFilePath(local_file)); | 81 test_url = net::FilePathToFileURL(base::MakeAbsoluteFilePath(local_file)); |
82 } | 82 } |
83 base::FilePath local_path; | 83 base::FilePath local_path; |
84 if (current_working_directory) { | 84 if (current_working_directory) { |
85 // We're outside of the message loop here, and this is a test. | 85 // We're outside of the message loop here, and this is a test. |
86 base::ThreadRestrictions::ScopedAllowIO allow_io; | 86 base::ThreadRestrictions::ScopedAllowIO allow_io; |
87 if (net::FileURLToFilePath(test_url, &local_path)) | 87 if (net::FileURLToFilePath(test_url, &local_path)) |
88 *current_working_directory = local_path.DirName(); | 88 *current_working_directory = local_path.DirName(); |
89 else | 89 else |
90 file_util::GetCurrentDirectory(current_working_directory); | 90 base::GetCurrentDirectory(current_working_directory); |
91 } | 91 } |
92 return test_url; | 92 return test_url; |
93 } | 93 } |
94 | 94 |
95 bool GetNextTest(const CommandLine::StringVector& args, | 95 bool GetNextTest(const CommandLine::StringVector& args, |
96 size_t* position, | 96 size_t* position, |
97 std::string* test) { | 97 std::string* test) { |
98 if (*position >= args.size()) | 98 if (*position >= args.size()) |
99 return false; | 99 return false; |
100 if (args[*position] == FILE_PATH_LITERAL("-")) | 100 if (args[*position] == FILE_PATH_LITERAL("-")) |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 | 224 |
225 #if !defined(OS_ANDROID) | 225 #if !defined(OS_ANDROID) |
226 if (!layout_test_mode) | 226 if (!layout_test_mode) |
227 exit_code = main_runner->Run(); | 227 exit_code = main_runner->Run(); |
228 | 228 |
229 main_runner->Shutdown(); | 229 main_runner->Shutdown(); |
230 #endif | 230 #endif |
231 | 231 |
232 return exit_code; | 232 return exit_code; |
233 } | 233 } |
OLD | NEW |