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

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

Issue 1089873003: Fix DCHECK failure when Manifest fetch has an Access Control error. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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/fetchers/web_url_loader_client_impl.cc » ('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 527a21b7ca50493353a2b3bca9dfe6272ed33ba8..043b5926d40ceb281db1a0965669592f3e41c620 100644
--- a/content/browser/manifest/manifest_browsertest.cc
+++ b/content/browser/manifest/manifest_browsertest.cc
@@ -248,6 +248,18 @@ IN_PROC_BROWSER_TEST_F(ManifestBrowserTest, CORSManifest) {
EXPECT_TRUE(manifest().IsEmpty());
EXPECT_EQ(0u, console_error_count());
+
+ // The purpose of this second load is to make sure the first load is fully
+ // finished. The first load will fail because of Access Control error but the
+ // underlying Blink loader will continue fetching the file. There is no
+ // reliable way to know when the fetch is finished from the browser test
+ // except by fetching the same file from same origin, making it succeed when
+ // it is actually fully loaded.
+ manifest_url =
+ embedded_test_server()->GetURL("/manifest/dummy-manifest.json").spec();
+ ASSERT_TRUE(content::ExecuteScript(shell()->web_contents(),
+ "setManifestTo('" + manifest_url + "')"));
+ GetManifestAndWait();
}
// If a page's manifest lives in a different origin, it should be accessible if
« no previous file with comments | « no previous file | content/renderer/fetchers/web_url_loader_client_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698