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

Unified Diff: chrome/test/base/in_process_browser_test.cc

Issue 2832153003: Move calling of shared browser test methods like SetUpOnMainThread/TearDownOnMainThread/RunTestOn... (Closed)
Patch Set: sync Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/test/base/in_process_browser_test.h ('k') | chromecast/browser/renderer_prelauncher_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/base/in_process_browser_test.cc
diff --git a/chrome/test/base/in_process_browser_test.cc b/chrome/test/base/in_process_browser_test.cc
index 9af204ac529ca7e11601f2d2bbf16fd6096731db..867c5ca532d7b6315d0135404223ee4305a17660 100644
--- a/chrome/test/base/in_process_browser_test.cc
+++ b/chrome/test/base/in_process_browser_test.cc
@@ -519,7 +519,7 @@ base::CommandLine InProcessBrowserTest::GetCommandLineForRelaunch() {
}
#endif
-void InProcessBrowserTest::RunTestOnMainThreadLoop() {
+void InProcessBrowserTest::PreRunTestOnMainThread() {
AfterStartupTaskUtils::SetBrowserStartupIsCompleteForTesting();
// Pump startup related events.
@@ -566,13 +566,15 @@ void InProcessBrowserTest::RunTestOnMainThreadLoop() {
if (browser_ && global_browser_set_up_function_)
ASSERT_TRUE(global_browser_set_up_function_(browser_));
- SetUpOnMainThread();
#if defined(OS_MACOSX)
autorelease_pool_->Recycle();
#endif
- if (!HasFatalFailure())
- RunTestOnMainThread();
+ // TODO(jam): remove this.
+ disable_io_checks();
+}
+
+void InProcessBrowserTest::PostRunTestOnMainThread() {
#if defined(OS_MACOSX)
autorelease_pool_->Recycle();
#endif
@@ -583,9 +585,6 @@ void InProcessBrowserTest::RunTestOnMainThreadLoop() {
EXPECT_EQ("", error_message);
}
- // Invoke cleanup and quit even if there are failures. This is similar to
- // gtest in that it invokes TearDown even if Setup fails.
- TearDownOnMainThread();
#if defined(OS_MACOSX)
autorelease_pool_->Recycle();
#endif
« no previous file with comments | « chrome/test/base/in_process_browser_test.h ('k') | chromecast/browser/renderer_prelauncher_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698