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

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

Issue 366813007: Removed InProcessBrowserTest::CleanUpOnMainThread() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed superfluous override. Created 6 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 | Annotate | Revision Log
OLDNEW
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 "chrome/test/base/in_process_browser_test.h" 5 #include "chrome/test/base/in_process_browser_test.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 #endif 425 #endif
426 426
427 if (!HasFatalFailure()) 427 if (!HasFatalFailure())
428 RunTestOnMainThread(); 428 RunTestOnMainThread();
429 #if defined(OS_MACOSX) 429 #if defined(OS_MACOSX)
430 autorelease_pool_->Recycle(); 430 autorelease_pool_->Recycle();
431 #endif 431 #endif
432 432
433 // Invoke cleanup and quit even if there are failures. This is similar to 433 // Invoke cleanup and quit even if there are failures. This is similar to
434 // gtest in that it invokes TearDown even if Setup fails. 434 // gtest in that it invokes TearDown even if Setup fails.
435 CleanUpOnMainThread(); 435 TearDownOnMainThread();
436 #if defined(OS_MACOSX) 436 #if defined(OS_MACOSX)
437 autorelease_pool_->Recycle(); 437 autorelease_pool_->Recycle();
438 #endif 438 #endif
439 439
440 // Sometimes tests leave Quit tasks in the MessageLoop (for shame), so let's 440 // Sometimes tests leave Quit tasks in the MessageLoop (for shame), so let's
441 // run all pending messages here to avoid preempting the QuitBrowsers tasks. 441 // run all pending messages here to avoid preempting the QuitBrowsers tasks.
442 // TODO(jbates) Once crbug.com/134753 is fixed, this can be removed because it 442 // TODO(jbates) Once crbug.com/134753 is fixed, this can be removed because it
443 // will not be possible to post Quit tasks. 443 // will not be possible to post Quit tasks.
444 content::RunAllPendingInMessageLoop(); 444 content::RunAllPendingInMessageLoop();
445 445
(...skipping 27 matching lines...) Expand all
473 // On the Mac, this eventually reaches 473 // On the Mac, this eventually reaches
474 // -[BrowserWindowController windowWillClose:], which will post a deferred 474 // -[BrowserWindowController windowWillClose:], which will post a deferred
475 // -autorelease on itself to ultimately destroy the Browser object. The line 475 // -autorelease on itself to ultimately destroy the Browser object. The line
476 // below is necessary to pump these pending messages to ensure all Browsers 476 // below is necessary to pump these pending messages to ensure all Browsers
477 // get deleted. 477 // get deleted.
478 content::RunAllPendingInMessageLoop(); 478 content::RunAllPendingInMessageLoop();
479 delete autorelease_pool_; 479 delete autorelease_pool_;
480 autorelease_pool_ = NULL; 480 autorelease_pool_ = NULL;
481 #endif 481 #endif
482 } 482 }
OLDNEW
« no previous file with comments | « chrome/test/base/in_process_browser_test.h ('k') | chrome/test/base/test_chrome_web_ui_controller_factory_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698