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

Unified Diff: content/test/data/service_worker/disable_web_security_update.html

Issue 2196633002: [ServiceWorker] Don't check the origin equality when disable-web-security flag is set. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: incorporated nhiroki's comment Created 4 years, 5 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 | « content/test/data/service_worker/disable_web_security_unregister.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/data/service_worker/disable_web_security_update.html
diff --git a/content/test/data/service_worker/disable_web_security_update.html b/content/test/data/service_worker/disable_web_security_update.html
new file mode 100644
index 0000000000000000000000000000000000000000..be745a2316b0222058fb2fa634bb3dd2eef9c144
--- /dev/null
+++ b/content/test/data/service_worker/disable_web_security_update.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<body>
+<script>
+var iframe = document.createElement('iframe');
+iframe.onload = (_ => {
+ if (iframe.contentWindow.location.origin == location.origin) {
+ document.title = "FAIL";
+ return;
+ }
+ iframe.contentWindow.navigator.serviceWorker.ready
+ .then(reg => reg.update())
+ .then(_ => { document.title = "PASS"; })
+ });
+iframe.src = location.search.substring(1);
+document.body.appendChild(iframe);
+</script>
+</body>
« no previous file with comments | « content/test/data/service_worker/disable_web_security_unregister.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698