011.html (878B)
1 <!doctype html> 2 <title>WebSockets: sending non-ascii, combining chars and non-BMP</title> 3 4 <script src=/resources/testharness.js></script> 5 <script src=/resources/testharnessreport.js></script> 6 <script src=../../../constants.sub.js></script> 7 <meta name="variant" content="?default"> 8 <meta name="variant" content="?wss"> 9 <meta name="variant" content="?wpt_flags=h2"> 10 <div id=log></div> 11 <script> 12 13 async_test(function(t) { 14 var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/echo'); 15 ws.onopen = t.step_func(function(e) { 16 ws.send('\u00E5 a\u030A \uD801\uDC7E'); 17 }); 18 ws.onmessage = t.step_func(function(e) { 19 assert_equals(e.data, '\u00E5 a\u030A \uD801\uDC7E'); 20 ws.onclose = t.step_func(function(e) { 21 ws.onclose = t.unreached_func(); 22 t.step_timeout(() => t.done(), 50); 23 }) 24 ws.close(); 25 }) 26 ws.onclose = ws.onerror = t.unreached_func(); 27 }); 28 </script>