Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(671)

Side by Side Diff: chrome/test/in_process_browser_test.cc

Issue 150213: Add a ExtensionBrowserTest base class (Closed)
Patch Set: added timeouts fixed other tests Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/test/in_process_browser_test.h ('k') | chrome/test/ui_test_utils.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « chrome/test/in_process_browser_test.h ('k') | chrome/test/ui_test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698