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