script-js-unlabeled-gzipped.sub.html (814B)
1 <!DOCTYPE html> 2 <!-- Test verifies that gziped script which parses as Javascript (not JSON) without Content-Type will execute with ORB. --> 3 <meta charset="utf-8"> 4 <script src="/resources/testharness.js"></script> 5 <script src="/resources/testharnessreport.js"></script> 6 <div id=log></div> 7 8 <script> 9 setup({ single_test: true }); 10 window.has_executed_script = false; 11 </script> 12 13 <!-- www1 is cross-origin, so the HTTP response is CORB-eligible --> 14 <script src="http://{{domains[www1]}}:{{ports[http][0]}}/fetch/orb/resources/js-unlabeled.js?pipe=gzip|header(Content-Type,)"> 15 </script> 16 17 <script> 18 // Verify what observable effects the <script> tag above had. 19 // Assertion should hold with and without ORB: 20 assert_true(window.has_executed_script, 21 'The cross-origin script should execute'); 22 done(); 23 </script>