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

Unified Diff: content/browser/manifest/manifest_browsertest.cc

Issue 896823002: [Manifest] Update a RenderFrame's Manifest when navigated. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 | « no previous file | content/renderer/manifest/manifest_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/manifest/manifest_browsertest.cc
diff --git a/content/browser/manifest/manifest_browsertest.cc b/content/browser/manifest/manifest_browsertest.cc
index 404831ddb9e23eb419f96e8dd6b8666b41fb95bc..b31d26ac4b59952cfb6a35cd39a49749dff54595 100644
--- a/content/browser/manifest/manifest_browsertest.cc
+++ b/content/browser/manifest/manifest_browsertest.cc
@@ -281,4 +281,32 @@ IN_PROC_BROWSER_TEST_F(ManifestBrowserTest, ParsingErrorsManifest) {
EXPECT_EQ(6u, console_error_count());
}
+// If a page has a manifest and the page is navigated to a page without a
+// manifest, the page's manifest should be updated.
+IN_PROC_BROWSER_TEST_F(ManifestBrowserTest, Navigation) {
+ {
+ GURL test_url = GetTestUrl("manifest", "dummy-manifest.html");
+
+ TestNavigationObserver navigation_observer(shell()->web_contents(), 1);
+ shell()->LoadURL(test_url);
+ navigation_observer.Wait();
+
+ GetManifestAndWait();
+ EXPECT_FALSE(manifest().IsEmpty());
+ EXPECT_EQ(0u, console_error_count());
+ }
+
+ {
+ GURL test_url = GetTestUrl("manifest", "no-manifest.html");
+
+ TestNavigationObserver navigation_observer(shell()->web_contents(), 1);
+ shell()->LoadURL(test_url);
+ navigation_observer.Wait();
+
+ GetManifestAndWait();
+ EXPECT_TRUE(manifest().IsEmpty());
+ EXPECT_EQ(0u, console_error_count());
+ }
+}
+
} // namespace content
« no previous file with comments | « no previous file | content/renderer/manifest/manifest_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698