| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/test/in_process_browser_test.h" | 5 #include "chrome/test/in_process_browser_test.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/file_path.h" | 8 #include "base/file_path.h" |
| 9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
| 10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| (...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 FROM_HERE, | 320 FROM_HERE, |
| 321 NewRunnableFunction(&BrowserList::CloseAllBrowsersAndExit)); | 321 NewRunnableFunction(&BrowserList::CloseAllBrowsersAndExit)); |
| 322 ui_test_utils::RunMessageLoop(); | 322 ui_test_utils::RunMessageLoop(); |
| 323 } | 323 } |
| 324 | 324 |
| 325 void InProcessBrowserTest::TimedOut() { | 325 void InProcessBrowserTest::TimedOut() { |
| 326 std::string error_message = "Test timed out. Each test runs for a max of "; | 326 std::string error_message = "Test timed out. Each test runs for a max of "; |
| 327 error_message += base::IntToString(initial_timeout_); | 327 error_message += base::IntToString(initial_timeout_); |
| 328 error_message += " ms (kInitialTimeoutInMS)."; | 328 error_message += " ms (kInitialTimeoutInMS)."; |
| 329 | 329 |
| 330 GTEST_NONFATAL_FAILURE_(error_message.c_str()); | 330 MessageLoopForUI::current()->Quit(); |
| 331 | 331 |
| 332 MessageLoopForUI::current()->Quit(); | 332 // WARNING: This must be after Quit as it returns. |
| 333 FAIL() << error_message; |
| 333 } | 334 } |
| 334 | 335 |
| 335 void InProcessBrowserTest::SetInitialTimeoutInMS(int timeout_value) { | 336 void InProcessBrowserTest::SetInitialTimeoutInMS(int timeout_value) { |
| 336 DCHECK_GT(timeout_value, 0); | 337 DCHECK_GT(timeout_value, 0); |
| 337 initial_timeout_ = timeout_value; | 338 initial_timeout_ = timeout_value; |
| 338 } | 339 } |
| OLD | NEW |