mirror of
https://github.com/servo/servo.git
synced 2025-10-11 14:00:28 +01:00
Update web-platform-tests to revision b'468d01bbd84da2babf265c6af46947be68713440'
This commit is contained in:
parent
35e95f55a1
commit
58e8ee674b
9438 changed files with 266112 additions and 106976 deletions
|
@ -1,20 +1,21 @@
|
|||
// META: script=websocket.sub.js
|
||||
// META: script=constants.sub.js
|
||||
// META: variant=
|
||||
// META: variant=?wpt_flags=h2
|
||||
// META: variant=?wss
|
||||
|
||||
var testOpen = async_test("Create WebSocket - Pass a valid URL and array of protocol strings - Connection should be opened");
|
||||
var testClose = async_test("Create WebSocket - Pass a valid URL and array of protocol strings - Connection should be closed");
|
||||
var test = async_test("Create WebSocket - Pass a valid URL and array of protocol strings - Connection should be closed");
|
||||
|
||||
var wsocket = CreateWebSocket(false, false, true);
|
||||
var wsocket = CreateWebSocket(false, true);
|
||||
var isOpenCalled = false;
|
||||
|
||||
wsocket.addEventListener('open', testOpen.step_func(function(evt) {
|
||||
wsocket.addEventListener('open', test.step_func(function(evt) {
|
||||
assert_equals(wsocket.readyState, 1, "readyState should be 1(OPEN)");
|
||||
wsocket.close();
|
||||
isOpenCalled = true;
|
||||
testOpen.done();
|
||||
}), true);
|
||||
|
||||
wsocket.addEventListener('close', testClose.step_func(function(evt) {
|
||||
wsocket.addEventListener('close', test.step_func(function(evt) {
|
||||
assert_true(isOpenCalled, "WebSocket connection should be open");
|
||||
assert_equals(evt.wasClean, true, "wasClean should be true");
|
||||
testClose.done();
|
||||
test.done();
|
||||
}), true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue