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/shell_browser_main.h" | 5 #include "content/shell/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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 std::cout << "#READY\n"; | 164 std::cout << "#READY\n"; |
165 std::cout.flush(); | 165 std::cout.flush(); |
166 #endif | 166 #endif |
167 | 167 |
168 while (GetNextTest(args, &command_line_position, &test_string)) { | 168 while (GetNextTest(args, &command_line_position, &test_string)) { |
169 if (test_string.empty()) | 169 if (test_string.empty()) |
170 continue; | 170 continue; |
171 if (test_string == "QUIT") | 171 if (test_string == "QUIT") |
172 break; | 172 break; |
173 | 173 |
| 174 base::MessageLoop::current()->RunUntilIdle(); |
| 175 |
174 bool enable_pixel_dumps; | 176 bool enable_pixel_dumps; |
175 std::string pixel_hash; | 177 std::string pixel_hash; |
176 base::FilePath cwd; | 178 base::FilePath cwd; |
177 GURL test_url = GetURLForLayoutTest( | 179 GURL test_url = GetURLForLayoutTest( |
178 test_string, &cwd, &enable_pixel_dumps, &pixel_hash); | 180 test_string, &cwd, &enable_pixel_dumps, &pixel_hash); |
179 if (!content::WebKitTestController::Get()->PrepareForLayoutTest( | 181 if (!content::WebKitTestController::Get()->PrepareForLayoutTest( |
180 test_url, cwd, enable_pixel_dumps, pixel_hash)) { | 182 test_url, cwd, enable_pixel_dumps, pixel_hash)) { |
181 break; | 183 break; |
182 } | 184 } |
183 | 185 |
(...skipping 21 matching lines...) Expand all Loading... |
205 | 207 |
206 #if !defined(OS_ANDROID) | 208 #if !defined(OS_ANDROID) |
207 if (!layout_test_mode) | 209 if (!layout_test_mode) |
208 exit_code = main_runner->Run(); | 210 exit_code = main_runner->Run(); |
209 | 211 |
210 main_runner->Shutdown(); | 212 main_runner->Shutdown(); |
211 #endif | 213 #endif |
212 | 214 |
213 return exit_code; | 215 return exit_code; |
214 } | 216 } |
OLD | NEW |