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

Unified Diff: chromecast/browser/test/cast_browser_test.cc

Issue 2502143002: Revert of [chromecast] Make testnames consistent. (Closed)
Patch Set: Created 4 years, 1 month 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') | chromecast/browser/test/cast_devtools_delegate_test.cc » ('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
deleted file mode 100644
index 781d2492fbbbb1ec114411537a371122f44242a8..0000000000000000000000000000000000000000
--- a/chromecast/browser/test/cast_browser_test.cc
+++ /dev/null
@@ -1,80 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chromecast/browser/test/cast_browser_test.h"
-
-#include "base/command_line.h"
-#include "base/logging.h"
-#include "base/run_loop.h"
-#include "chromecast/base/chromecast_switches.h"
-#include "chromecast/base/metrics/cast_metrics_helper.h"
-#include "chromecast/browser/cast_browser_context.h"
-#include "chromecast/browser/cast_browser_process.h"
-#include "chromecast/browser/cast_content_window.h"
-#include "content/public/browser/browser_thread.h"
-#include "content/public/browser/render_process_host.h"
-#include "content/public/browser/web_contents.h"
-#include "content/public/common/content_switches.h"
-#include "content/public/test/browser_test_utils.h"
-#include "content/public/test/test_navigation_observer.h"
-
-namespace chromecast {
-namespace shell {
-
-CastBrowserTest::CastBrowserTest() {}
-
-CastBrowserTest::~CastBrowserTest() {}
-
-void CastBrowserTest::SetUp() {
- SetUpCommandLine(base::CommandLine::ForCurrentProcess());
-
- BrowserTestBase::SetUp();
-}
-
-void CastBrowserTest::TearDownOnMainThread() {
- web_contents_.reset();
- window_.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() {
- // Pump startup related events.
- DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
- base::RunLoop().RunUntilIdle();
-
- metrics::CastMetricsHelper::GetInstance()->SetDummySessionIdForTesting();
-
- SetUpOnMainThread();
- RunTestOnMainThread();
- TearDownOnMainThread();
-}
-
-content::WebContents* CastBrowserTest::NavigateToURL(const GURL& url) {
- window_ = base::MakeUnique<CastContentWindow>();
-
- web_contents_ = window_->CreateWebContents(
- CastBrowserProcess::GetInstance()->browser_context());
- window_->CreateWindowTree(web_contents_.get());
- content::WaitForLoadStop(web_contents_.get());
-
- content::TestNavigationObserver same_tab_observer(web_contents_.get(), 1);
- content::NavigationController::LoadURLParams params(url);
- params.transition_type = ui::PageTransitionFromInt(
- ui::PAGE_TRANSITION_TYPED | ui::PAGE_TRANSITION_FROM_ADDRESS_BAR);
- web_contents_->GetController().LoadURLWithParams(params);
- same_tab_observer.Wait();
-
- return web_contents_.get();
-}
-
-} // namespace shell
-} // namespace chromecast
« no previous file with comments | « chromecast/browser/test/cast_browser_test.h ('k') | chromecast/browser/test/cast_devtools_delegate_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698