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

Side by Side 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: 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 unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <meta charset="utf-8"> 2 <meta charset="utf-8">
3 <title>Insecure inscope page</title> 3 <title>Insecure inscope page</title>
4 <script> 4 <script>
5 // The top window messages us when it wants to check for a controller. 5 // The top window messages us when it wants to check for a controller.
6 window.onmessage = (e => { 6 window.onmessage = (e => {
7 if (navigator.serviceWorker.controller === null) 7 if (navigator.serviceWorker.controller === null) {
8 window.top.postMessage('PASS', '*'); 8 window.parent.postMessage('PASS', '*');
9 else 9 } else {
10 window.top.postMessage('FAIL', '*'); 10 window.parent.postMessage('FAIL', '*');
11 }
11 }); 12 });
12 </script> 13 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698