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

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

Issue 668933002: Chromecast browser test: use CastContentWindow for test lifetime. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: minor formatting nit Created 6 years, 2 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/chromecast_browser_test.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromecast/browser/test/chromecast_browser_test.cc
diff --git a/chromecast/browser/test/chromecast_browser_test.cc b/chromecast/browser/test/chromecast_browser_test.cc
index 01647742ef12ec3a86b3e63eebd2c8d510730d39..2895a98f27b557fa3ccef446f4134b6fc7bc0073 100644
--- a/chromecast/browser/test/chromecast_browser_test.cc
+++ b/chromecast/browser/test/chromecast_browser_test.cc
@@ -9,6 +9,7 @@
#include "base/message_loop/message_loop.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"
@@ -51,6 +52,7 @@ void ChromecastBrowserTest::RunTestOnMainThreadLoop() {
}
web_contents_.reset();
+ window_.reset();
}
void ChromecastBrowserTest::NavigateToURL(content::WebContents* window,
@@ -66,12 +68,10 @@ void ChromecastBrowserTest::NavigateToURL(content::WebContents* window,
}
content::WebContents* ChromecastBrowserTest::CreateBrowser() {
- content::WebContents::CreateParams create_params(
- CastBrowserProcess::GetInstance()->browser_context(),
- NULL);
- create_params.routing_id = MSG_ROUTING_NONE;
- create_params.initial_size = gfx::Size(1280, 720);
- web_contents_.reset(content::WebContents::Create(create_params));
+ window_.reset(new CastContentWindow);
+ gfx::Size initial_size(1280, 720);
+ web_contents_ = window_->Create(
+ initial_size, CastBrowserProcess::GetInstance()->browser_context());
return web_contents_.get();
}
« no previous file with comments | « chromecast/browser/test/chromecast_browser_test.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698