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

Unified Diff: headless/lib/headless_web_contents_browsertest.cc

Issue 2043603004: headless: Introduce a browser context (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address nits Created 4 years, 6 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 | « headless/lib/headless_browser_browsertest.cc ('k') | headless/public/headless_browser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: headless/lib/headless_web_contents_browsertest.cc
diff --git a/headless/lib/headless_web_contents_browsertest.cc b/headless/lib/headless_web_contents_browsertest.cc
index 5cff88c0441b2529962893f61341be2272bb62e3..88700d95c23cbc3a773de186fd7f9858b105b54c 100644
--- a/headless/lib/headless_web_contents_browsertest.cc
+++ b/headless/lib/headless_web_contents_browsertest.cc
@@ -23,8 +23,11 @@ class HeadlessWebContentsTest : public HeadlessBrowserTest {};
IN_PROC_BROWSER_TEST_F(HeadlessWebContentsTest, Navigation) {
EXPECT_TRUE(embedded_test_server()->Start());
- HeadlessWebContents* web_contents = browser()->CreateWebContents(
- embedded_test_server()->GetURL("/hello.html"), gfx::Size(800, 600));
+ HeadlessWebContents* web_contents =
+ browser()
+ ->CreateWebContentsBuilder()
+ .SetInitialURL(embedded_test_server()->GetURL("/hello.html"))
+ .Build();
EXPECT_TRUE(WaitForLoad(web_contents));
std::vector<HeadlessWebContents*> all_web_contents =
@@ -37,8 +40,11 @@ IN_PROC_BROWSER_TEST_F(HeadlessWebContentsTest, Navigation) {
IN_PROC_BROWSER_TEST_F(HeadlessWebContentsTest, WindowOpen) {
EXPECT_TRUE(embedded_test_server()->Start());
- HeadlessWebContents* web_contents = browser()->CreateWebContents(
- embedded_test_server()->GetURL("/window_open.html"), gfx::Size(800, 600));
+ HeadlessWebContents* web_contents =
+ browser()
+ ->CreateWebContentsBuilder()
+ .SetInitialURL(embedded_test_server()->GetURL("/window_open.html"))
+ .Build();
EXPECT_TRUE(WaitForLoad(web_contents));
std::vector<HeadlessWebContents*> all_web_contents =
« no previous file with comments | « headless/lib/headless_browser_browsertest.cc ('k') | headless/public/headless_browser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698