| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 CHECK(PathService::Override(base::FILE_EXE, chrome_path)); | 211 CHECK(PathService::Override(base::FILE_EXE, chrome_path)); |
| 212 | 212 |
| 213 browser_ = CreateBrowser(profile); | 213 browser_ = CreateBrowser(profile); |
| 214 | 214 |
| 215 // Start the timeout timer to prevent hangs. | 215 // Start the timeout timer to prevent hangs. |
| 216 MessageLoopForUI::current()->PostDelayedTask(FROM_HERE, | 216 MessageLoopForUI::current()->PostDelayedTask(FROM_HERE, |
| 217 NewRunnableMethod(this, &InProcessBrowserTest::TimedOut), | 217 NewRunnableMethod(this, &InProcessBrowserTest::TimedOut), |
| 218 kInitialTimeoutInMS); | 218 kInitialTimeoutInMS); |
| 219 | 219 |
| 220 RunTestOnMainThread(); | 220 RunTestOnMainThread(); |
| 221 CleanUpOnMainThread(); |
| 221 | 222 |
| 222 BrowserList::const_iterator browser = BrowserList::begin(); | 223 BrowserList::const_iterator browser = BrowserList::begin(); |
| 223 for (; browser != BrowserList::end(); ++browser) | 224 for (; browser != BrowserList::end(); ++browser) |
| 224 (*browser)->CloseAllTabs(); | 225 (*browser)->CloseAllTabs(); |
| 225 | 226 |
| 226 // Stop the HTTP server. | 227 // Stop the HTTP server. |
| 227 http_server_ = NULL; | 228 http_server_ = NULL; |
| 228 | 229 |
| 229 MessageLoopForUI::current()->Quit(); | 230 MessageLoopForUI::current()->Quit(); |
| 230 } | 231 } |
| (...skipping 11 matching lines...) Expand all Loading... |
| 242 | 243 |
| 243 GTEST_NONFATAL_FAILURE_("Timed-out"); | 244 GTEST_NONFATAL_FAILURE_("Timed-out"); |
| 244 | 245 |
| 245 // Start the timeout timer to prevent hangs. | 246 // Start the timeout timer to prevent hangs. |
| 246 MessageLoopForUI::current()->PostDelayedTask(FROM_HERE, | 247 MessageLoopForUI::current()->PostDelayedTask(FROM_HERE, |
| 247 NewRunnableMethod(this, &InProcessBrowserTest::TimedOut), | 248 NewRunnableMethod(this, &InProcessBrowserTest::TimedOut), |
| 248 kSubsequentTimeoutInMS); | 249 kSubsequentTimeoutInMS); |
| 249 | 250 |
| 250 MessageLoopForUI::current()->Quit(); | 251 MessageLoopForUI::current()->Quit(); |
| 251 } | 252 } |
| OLD | NEW |