mirror of
https://github.com/servo/servo.git
synced 2025-08-19 12:25:33 +01:00
Update web-platform-tests to revision 8a2ceb5f18911302b7a5c1cd2791f4ab50ad4326
This commit is contained in:
parent
462c272380
commit
1f531f66ea
5377 changed files with 174916 additions and 84369 deletions
|
@ -8,20 +8,20 @@
|
|||
<div id=log></div>
|
||||
<script>
|
||||
async_test(function(t) {
|
||||
// Sub-protocol matching is case-sensitive.
|
||||
var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/handshake_protocol', 'FOOBAR');
|
||||
var gotOpen = false;
|
||||
var gotError = false;
|
||||
ws.onopen = t.step_func(function(e) {
|
||||
gotOpen = true;
|
||||
})
|
||||
});
|
||||
ws.onerror = t.step_func(function(e) {
|
||||
gotError = true;
|
||||
})
|
||||
});
|
||||
ws.onclose = t.step_func(function(e) {
|
||||
assert_true(gotOpen, 'got open');
|
||||
assert_false(gotOpen, 'got open');
|
||||
assert_true(gotError, 'got error');
|
||||
ws.onclose = t.unreached_func();
|
||||
t.step_timeout(() => t.done(), 50);
|
||||
})
|
||||
t.done();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue