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

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: More merge to ToT. 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 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 #endif 424 #endif
425 425
426 if (!HasFatalFailure()) 426 if (!HasFatalFailure())
427 RunTestOnMainThread(); 427 RunTestOnMainThread();
428 #if defined(OS_MACOSX) 428 #if defined(OS_MACOSX)
429 autorelease_pool_->Recycle(); 429 autorelease_pool_->Recycle();
430 #endif 430 #endif
431 431
432 // Invoke cleanup and quit even if there are failures. This is similar to 432 // Invoke cleanup and quit even if there are failures. This is similar to
433 // gtest in that it invokes TearDown even if Setup fails. 433 // gtest in that it invokes TearDown even if Setup fails.
434 CleanUpOnMainThread(); 434 TearDownOnMainThread();
435 #if defined(OS_MACOSX) 435 #if defined(OS_MACOSX)
436 autorelease_pool_->Recycle(); 436 autorelease_pool_->Recycle();
437 #endif 437 #endif
438 438
439 // Sometimes tests leave Quit tasks in the MessageLoop (for shame), so let's 439 // Sometimes tests leave Quit tasks in the MessageLoop (for shame), so let's
440 // run all pending messages here to avoid preempting the QuitBrowsers tasks. 440 // run all pending messages here to avoid preempting the QuitBrowsers tasks.
441 // TODO(jbates) Once crbug.com/134753 is fixed, this can be removed because it 441 // TODO(jbates) Once crbug.com/134753 is fixed, this can be removed because it
442 // will not be possible to post Quit tasks. 442 // will not be possible to post Quit tasks.
443 content::RunAllPendingInMessageLoop(); 443 content::RunAllPendingInMessageLoop();
444 444
(...skipping 27 matching lines...) Expand all
472 // On the Mac, this eventually reaches 472 // On the Mac, this eventually reaches
473 // -[BrowserWindowController windowWillClose:], which will post a deferred 473 // -[BrowserWindowController windowWillClose:], which will post a deferred
474 // -autorelease on itself to ultimately destroy the Browser object. The line 474 // -autorelease on itself to ultimately destroy the Browser object. The line
475 // below is necessary to pump these pending messages to ensure all Browsers 475 // below is necessary to pump these pending messages to ensure all Browsers
476 // get deleted. 476 // get deleted.
477 content::RunAllPendingInMessageLoop(); 477 content::RunAllPendingInMessageLoop();
478 delete autorelease_pool_; 478 delete autorelease_pool_;
479 autorelease_pool_ = NULL; 479 autorelease_pool_ = NULL;
480 #endif 480 #endif
481 } 481 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698