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

Unified Diff: Source/modules/serviceworkers/ServiceWorkerContainerTest.cpp

Issue 778703004: Implement ServiceWorkerClient attributes [3/3] (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@properties-step1
Patch Set: Created 6 years 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
Index: Source/modules/serviceworkers/ServiceWorkerContainerTest.cpp
diff --git a/Source/modules/serviceworkers/ServiceWorkerContainerTest.cpp b/Source/modules/serviceworkers/ServiceWorkerContainerTest.cpp
index 22a0b49f9e25fab4c839e89b75750be9a651df11..9e2360d3d6241e7fa2b10a1d4a5880a2b8df888e 100644
--- a/Source/modules/serviceworkers/ServiceWorkerContainerTest.cpp
+++ b/Source/modules/serviceworkers/ServiceWorkerContainerTest.cpp
@@ -385,6 +385,12 @@ TEST_F(ServiceWorkerContainerTest, GetClientInfo)
EXPECT_TRUE(info.isFocused);
EXPECT_EQ(WebURL(KURL(KURL(), "http://localhost/x/index.html")), info.url);
EXPECT_EQ(WebURLRequest::FrameTypeTopLevel, info.frameType);
+
+ setVisibilityState(PageVisibilityStateHidden);
+ setFocused(false);
+ ASSERT_TRUE(container->getClientInfo(&info));
+ EXPECT_EQ(WebString("hidden"), info.visibilityState);
+ EXPECT_FALSE(info.isFocused);
}
} // namespace

Powered by Google App Engine
This is Rietveld 408576698