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

Unified Diff: headless/lib/headless_web_contents_browsertest.cc

Issue 2778983002: Fix browser tests on Mac (Closed)
Patch Set: nit change on #if defined on DefaultSizes test Created 3 years, 9 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_devtools_client_browsertest.cc ('k') | headless/public/headless_browser.cc » ('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 f920a0ccbcff0e6572d66090b8bdc6f65657740f..67fee60f2086f5f0d404b30be5e08fb45c5130e1 100644
--- a/headless/lib/headless_web_contents_browsertest.cc
+++ b/headless/lib/headless_web_contents_browsertest.cc
@@ -88,11 +88,17 @@ IN_PROC_BROWSER_TEST_F(HeadlessWebContentsTest, Focus) {
// TODO(irisu): Focus of two web contents should be independent of the other.
// Both web_contents and web_contents2 should be focused at this point.
+ // NOTE(dvallet): Mac headless implementation already does this.
EXPECT_TRUE(EvaluateScript(web_contents, "document.hasFocus()")
->GetResult()
->GetValue()
->GetAsBoolean(&result));
+#if !defined(OS_MACOSX)
EXPECT_FALSE(result);
+#else
+ // Mac sets all contents as focused.
+ EXPECT_TRUE(result);
+#endif
EXPECT_TRUE(EvaluateScript(web_contents2, "document.hasFocus()")
->GetResult()
->GetValue()
« no previous file with comments | « headless/lib/headless_devtools_client_browsertest.cc ('k') | headless/public/headless_browser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698