refresher.html (1002B)
1 <!-- 2 Any copyright is dedicated to the Public Domain. 3 http://creativecommons.org/publicdomain/zero/1.0/ 4 --> 5 <!DOCTYPE HTML> 6 <html> 7 <head> 8 <title>Bug 982726 - test match_all not crashing</title> 9 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> 10 <!-- some tests will intercept this bogus script request --> 11 <script type="text/javascript" src="does_not_exist.js"></script> 12 </head> 13 <body> 14 <p id="display"></p> 15 <div id="content" style="display: none"></div> 16 <pre id="test"></pre> 17 <script class="testbody" type="text/javascript"> 18 19 if (!parent) { 20 dump("sw_clients/simple.html shouldn't be launched directly!"); 21 } 22 23 window.addEventListener("message", function(event) { 24 if (event.data === "REFRESH") { 25 window.location.reload(); 26 } else if (event.data === "FORCE_REFRESH") { 27 window.location.reload(true); 28 } 29 }); 30 31 navigator.serviceWorker.ready.then(function() { 32 parent.postMessage("READY", "*"); 33 }); 34 35 </script> 36 </pre> 37 </body> 38 </html>