received-301-code.html (727B)
1 <!doctype html> 2 <title>WebSockets: 301 Code Failed</title> 3 <meta name=author title="Domenico Rizzo" href="mailto:domenico.rizzo@gmail.com"> 4 <script src="/resources/testharness.js"></script> 5 <script src="/resources/testharnessreport.js"></script> 6 <script src="../constants.sub.js"></script> 7 <div id="log"></div> 8 <script> 9 async_test(function(t) { 10 t.step(function() { 11 const ws = new WebSocket(new URL("resources/redirect_response.py", location.href)); 12 13 ws.onopen = t.step_func(function() { 14 assert_unreached("onopen"); 15 }); 16 17 ws.onerror = t.step_func(function() { 18 assert_true(true) 19 t.done() 20 }); 21 }); 22 }, 'Websockets - Received 301 code'); 23 </script>