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

Unified Diff: Source/web/tests/WebFrameTest.cpp

Issue 249633002: Detect <link rel='manifest'> and notify embedder. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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 | « Source/web/FrameLoaderClientImpl.cpp ('k') | Source/web/tests/data/link-manifest-change.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/tests/WebFrameTest.cpp
diff --git a/Source/web/tests/WebFrameTest.cpp b/Source/web/tests/WebFrameTest.cpp
index 40db38089e70c58f9c083948f211ae0d93bf138b..ccbe015cf3c76e75956f97e136536b61717cd04c 100644
--- a/Source/web/tests/WebFrameTest.cpp
+++ b/Source/web/tests/WebFrameTest.cpp
@@ -5403,4 +5403,29 @@ TEST_F(WebFrameTest, HasVisibleContentOnHiddenFrames)
}
}
+class ManifestChangeWebFrameClient : public FrameTestHelpers::TestWebFrameClient {
+public:
+ ManifestChangeWebFrameClient() : m_manifestChangeCount(0) { }
+ virtual void didChangeManifest(WebLocalFrame*) OVERRIDE
+ {
+ ++m_manifestChangeCount;
+ }
+
+ int manifestChangeCount() { return m_manifestChangeCount; }
+
+private:
+ int m_manifestChangeCount;
+};
+
+TEST_F(WebFrameTest, NotifyManifestChange)
+{
+ registerMockedHttpURLLoad("link-manifest-change.html");
+
+ ManifestChangeWebFrameClient webFrameClient;
+ FrameTestHelpers::WebViewHelper webViewHelper;
+ webViewHelper.initializeAndLoad(m_baseURL + "link-manifest-change.html", true, &webFrameClient);
+
+ EXPECT_EQ(14, webFrameClient.manifestChangeCount());
+}
+
} // namespace
« no previous file with comments | « Source/web/FrameLoaderClientImpl.cpp ('k') | Source/web/tests/data/link-manifest-change.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698