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

Unified Diff: third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/insecure-inscope.html

Issue 2869093002: Upstream Service Worker window test to WPT
Patch Set: Incorporate review feedback Created 3 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
Index: third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/insecure-inscope.html
diff --git a/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/insecure-inscope.html b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/insecure-inscope.html
new file mode 100644
index 0000000000000000000000000000000000000000..e2b0ce9fdbdbfff16f5537bde5c01c014d9b8326
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/insecure-inscope.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>Insecure inscope page</title>
+<script>
+// The top window messages us when it wants to check for a controller.
+window.onmessage = (e => {
+ if (navigator.serviceWorker.controller === null) {
+ window.parent.postMessage('PASS', '*');
+ } else {
+ window.parent.postMessage('FAIL', '*');
+ }
+ });
+</script>

Powered by Google App Engine
This is Rietveld 408576698