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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 } | 92 } |
93 | 93 |
94 bool GetNextTest(const CommandLine::StringVector& args, | 94 bool GetNextTest(const CommandLine::StringVector& args, |
95 size_t* position, | 95 size_t* position, |
96 std::string* test) { | 96 std::string* test) { |
97 if (*position >= args.size()) | 97 if (*position >= args.size()) |
98 return false; | 98 return false; |
99 if (args[*position] == FILE_PATH_LITERAL("-")) | 99 if (args[*position] == FILE_PATH_LITERAL("-")) |
100 return !!std::getline(std::cin, *test, '\n'); | 100 return !!std::getline(std::cin, *test, '\n'); |
101 #if defined(OS_WIN) | 101 #if defined(OS_WIN) |
102 *test = WideToUTF8(args[(*position)++]); | 102 *test = base::WideToUTF8(args[(*position)++]); |
103 #else | 103 #else |
104 *test = args[(*position)++]; | 104 *test = args[(*position)++]; |
105 #endif | 105 #endif |
106 return true; | 106 return true; |
107 } | 107 } |
108 | 108 |
109 } // namespace | 109 } // namespace |
110 | 110 |
111 // Main routine for running as the Browser process. | 111 // Main routine for running as the Browser process. |
112 int ShellBrowserMain( | 112 int ShellBrowserMain( |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 | 215 |
216 #if !defined(OS_ANDROID) | 216 #if !defined(OS_ANDROID) |
217 if (!layout_test_mode) | 217 if (!layout_test_mode) |
218 exit_code = main_runner->Run(); | 218 exit_code = main_runner->Run(); |
219 | 219 |
220 main_runner->Shutdown(); | 220 main_runner->Shutdown(); |
221 #endif | 221 #endif |
222 | 222 |
223 return exit_code; | 223 return exit_code; |
224 } | 224 } |
OLD | NEW |