mirror of
https://github.com/servo/servo.git
synced 2025-07-02 21:13:39 +01:00
Update web-platform-tests to revision ea14651f262003177d0ba5819bd2806a1327b12a
This commit is contained in:
parent
847115ba04
commit
816185f094
272 changed files with 5766 additions and 2855 deletions
|
@ -1,20 +1,20 @@
|
|||
// META: script=websocket.sub.js
|
||||
|
||||
var testOpen = async_test("W3C WebSocket API - Create Secure WebSocket - Check readyState is 1");
|
||||
var testClose = async_test("W3C WebSocket API - Create Secure WebSocket - Pass a valid URL and protocol string - Connection should be closed");
|
||||
var testOpen = async_test("W3C WebSocket API - Create Secure WebSocket - Check readyState is 1");
|
||||
var testClose = async_test("W3C WebSocket API - Create Secure WebSocket - Pass a valid URL and protocol string - Connection should be closed");
|
||||
|
||||
var wsocket = CreateWebSocket(true, true, false);
|
||||
var isOpenCalled = false;
|
||||
var wsocket = CreateWebSocket(true, true, false);
|
||||
var isOpenCalled = false;
|
||||
|
||||
wsocket.addEventListener('open', testOpen.step_func(function (evt) {
|
||||
assert_equals(wsocket.readyState, 1, "readyState should be 1(OPEN)");
|
||||
wsocket.close();
|
||||
isOpenCalled = true;
|
||||
testOpen.done();
|
||||
}), true);
|
||||
wsocket.addEventListener('open', testOpen.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) {
|
||||
assert_true(isOpenCalled, "WebSocket connection should be open");
|
||||
assert_equals(evt.wasClean, true, "wasClean should be true");
|
||||
testClose.done();
|
||||
}), true);
|
||||
wsocket.addEventListener('close', testClose.step_func(function(evt) {
|
||||
assert_true(isOpenCalled, "WebSocket connection should be open");
|
||||
assert_equals(evt.wasClean, true, "wasClean should be true");
|
||||
testClose.done();
|
||||
}), true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue