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

Unified Diff: headless/lib/headless_browser_browsertest.cc

Issue 2890133002: check whether the printing render frame host has been initialised before accepting a message in the… (Closed)
Patch Set: check whether the printing render frame host has been initialised before accepting a message in the… Created 3 years, 7 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/browser/headless_print_manager.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: headless/lib/headless_browser_browsertest.cc
diff --git a/headless/lib/headless_browser_browsertest.cc b/headless/lib/headless_browser_browsertest.cc
index 9df187e8584ca4afed04957522cbdbc72afde87e..5ca4e666ee62734c0763a977450ee2a4b4d7f099 100644
--- a/headless/lib/headless_browser_browsertest.cc
+++ b/headless/lib/headless_browser_browsertest.cc
@@ -895,4 +895,19 @@ IN_PROC_BROWSER_TEST_F(HeadlessBrowserTest, TraceUsingBrowserDevToolsTarget) {
EXPECT_LT(0u, tracing_data->GetSize());
}
+IN_PROC_BROWSER_TEST_F(HeadlessBrowserTest, WindowPrint) {
+ EXPECT_TRUE(embedded_test_server()->Start());
+
+ HeadlessBrowserContext* browser_context =
+ browser()->CreateBrowserContextBuilder().Build();
+
+ HeadlessWebContents* web_contents =
+ browser_context->CreateWebContentsBuilder()
+ .SetInitialURL(embedded_test_server()->GetURL("/hello.html"))
+ .Build();
+ EXPECT_TRUE(WaitForLoad(web_contents));
+ EXPECT_FALSE(
+ EvaluateScript(web_contents, "window.print()")->HasExceptionDetails());
+}
+
} // namespace headless
« no previous file with comments | « headless/lib/browser/headless_print_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698