mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-09 17:31:47 +09:00
import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo
This commit is contained in:
commit
dcd9973243
150858 changed files with 23884658 additions and 0 deletions
28
testing/web-platform/tests/websockets/constructor/006.html
Normal file
28
testing/web-platform/tests/websockets/constructor/006.html
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
<!doctype html>
|
||||
<title>WebSockets: converting first arguments</title>
|
||||
<script src=/resources/testharness.js></script>
|
||||
<script src=/resources/testharnessreport.js></script>
|
||||
<script src=../constants.js?pipe=sub></script>
|
||||
<meta name="variant" content="">
|
||||
<meta name="variant" content="?wss">
|
||||
<div id=log></div>
|
||||
<script>
|
||||
async_test(function(t) {
|
||||
var a = document.createElement('a');
|
||||
a.href = SCHEME_DOMAIN_PORT+'/echo';
|
||||
var ws = new WebSocket(a); // should stringify arguments; <a> stringifies to its .href
|
||||
assert_equals(ws.url, a.href);
|
||||
ws.onopen = t.step_func(function(e) {
|
||||
ws.send('test');
|
||||
});
|
||||
ws.onmessage = t.step_func(function(e) {
|
||||
assert_equals(e.data, 'test');
|
||||
ws.onclose = t.step_func(function(e) {
|
||||
ws.onclose = t.step_func(function() {assert_unreached()});
|
||||
setTimeout(t.step_func(function() {t.done()}), 50);
|
||||
});
|
||||
ws.close();
|
||||
});
|
||||
ws.onerror = ws.onclose = t.step_func(function() {assert_unreached()});
|
||||
});
|
||||
</script>
|
||||
Loading…
Add table
Add a link
Reference in a new issue