reroute.html (864B)
1 <!DOCTYPE html> 2 <script> 3 ["SimpleTest", "ok", "info", "is", "$"] 4 .forEach((v) => window[v] = window.parent[v]); 5 </script> 6 <script type="text/javascript" src="utils.js"> </script> 7 <script type="text/javascript" src="fetch_test_framework.js"> </script> 8 <script> 9 // If we are using the empty service worker then requests won't actually 10 // get intercepted and response URLs will reflect redirects. This means 11 // all our checks should use the "no sw" logic. Otherwise we need to 12 // note that interceptions are taking place so we can adjust our 13 // response URL expectations. 14 if (!navigator.serviceWorker.controller.scriptURL.endsWith('empty.js')) { 15 window.isSWPresent = true; 16 } 17 18 var searchParams = new URL(location.href).searchParams; 19 var mode = searchParams.get("mode"); 20 var script = searchParams.get("script"); 21 testScript(`${script}.js?mode=${mode}`); 22 </script>