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

Unified Diff: chromecast/browser/test/cast_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 | « chromecast/browser/test/cast_browser_test.h ('k') | content/public/test/browser_test_base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromecast/browser/test/cast_browser_test.cc
diff --git a/chromecast/browser/test/cast_browser_test.cc b/chromecast/browser/test/cast_browser_test.cc
index 29a32feab9494c4d2ad01e13942673d0c99c3c37..b3c71f5dbec72aab4a812e53e684626b8ce781ca 100644
--- a/chromecast/browser/test/cast_browser_test.cc
+++ b/chromecast/browser/test/cast_browser_test.cc
@@ -33,29 +33,21 @@ void CastBrowserTest::SetUp() {
BrowserTestBase::SetUp();
}
-void CastBrowserTest::TearDownOnMainThread() {
- cast_web_view_.reset();
-
- BrowserTestBase::TearDownOnMainThread();
-}
-
void CastBrowserTest::SetUpCommandLine(base::CommandLine* command_line) {
- BrowserTestBase::SetUpCommandLine(command_line);
-
command_line->AppendSwitch(switches::kNoWifi);
command_line->AppendSwitchASCII(switches::kTestType, "browser");
}
-void CastBrowserTest::RunTestOnMainThreadLoop() {
+void CastBrowserTest::PreRunTestOnMainThread() {
// Pump startup related events.
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
base::RunLoop().RunUntilIdle();
metrics::CastMetricsHelper::GetInstance()->SetDummySessionIdForTesting();
+}
- SetUpOnMainThread();
- RunTestOnMainThread();
- TearDownOnMainThread();
+void CastBrowserTest::PostRunTestOnMainThread() {
+ cast_web_view_.reset();
}
content::WebContents* CastBrowserTest::NavigateToURL(const GURL& url) {
« no previous file with comments | « chromecast/browser/test/cast_browser_test.h ('k') | content/public/test/browser_test_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698