mirror of
https://github.com/servo/servo.git
synced 2025-06-11 01:50:10 +00:00
Auto merge of #7066 - Ms2ger:ws-event, r=metajack
Dispatch message events for WebSocket. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7066) <!-- Reviewable:end -->
This commit is contained in:
commit
d8b4611a79
87 changed files with 127 additions and 424 deletions
|
@ -26,7 +26,7 @@ interface WebSocket : EventTarget {
|
|||
[Throws] void close([Clamp] optional unsigned short code, optional USVString reason);
|
||||
|
||||
//messaging
|
||||
//attribute EventHandler onmessage;
|
||||
attribute EventHandler onmessage;
|
||||
//attribute BinaryType binaryType;
|
||||
[Throws] void send(optional USVString data);
|
||||
//void send(Blob data);
|
||||
|
|
|
@ -8,6 +8,7 @@ use dom::bindings::codegen::Bindings::WebSocketBinding::WebSocketMethods;
|
|||
use dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull;
|
||||
use dom::bindings::codegen::InheritTypes::EventTargetCast;
|
||||
use dom::bindings::codegen::InheritTypes::EventCast;
|
||||
use dom::bindings::conversions::ToJSValConvertible;
|
||||
use dom::bindings::error::{Error, Fallible};
|
||||
use dom::bindings::error::Error::{InvalidAccess, Syntax};
|
||||
use dom::bindings::global::{GlobalField, GlobalRef};
|
||||
|
@ -15,20 +16,22 @@ use dom::bindings::js::Root;
|
|||
use dom::bindings::refcounted::Trusted;
|
||||
use dom::bindings::str::USVString;
|
||||
use dom::bindings::trace::JSTraceable;
|
||||
use dom::bindings::utils::reflect_dom_object;
|
||||
use dom::bindings::utils::{reflect_dom_object, Reflectable};
|
||||
use dom::blob::Blob;
|
||||
use dom::closeevent::CloseEvent;
|
||||
use dom::event::{Event, EventBubbles, EventCancelable, EventHelpers};
|
||||
use dom::eventtarget::{EventTarget, EventTargetHelpers, EventTargetTypeId};
|
||||
use net_traits::hosts::replace_hosts;
|
||||
use dom::messageevent::MessageEvent;
|
||||
use script_task::Runnable;
|
||||
use script_task::ScriptMsg;
|
||||
use std::cell::{Cell, RefCell};
|
||||
use std::borrow::ToOwned;
|
||||
|
||||
use net_traits::hosts::replace_hosts;
|
||||
use util::str::DOMString;
|
||||
use util::task::spawn_named;
|
||||
|
||||
use js::jsapi::{RootedValue, JSAutoRequest, JSAutoCompartment};
|
||||
use js::jsval::UndefinedValue;
|
||||
use hyper::header::Host;
|
||||
|
||||
use websocket::Message;
|
||||
use websocket::ws::sender::Sender as Sender_Object;
|
||||
use websocket::client::sender::Sender;
|
||||
|
@ -38,9 +41,14 @@ use websocket::client::request::Url;
|
|||
use websocket::Client;
|
||||
use websocket::header::Origin;
|
||||
use websocket::result::WebSocketResult;
|
||||
use websocket::ws::receiver::Receiver as WSReceiver;
|
||||
use websocket::ws::util::url::parse_url;
|
||||
|
||||
#[derive(JSTraceable, PartialEq, Copy, Clone)]
|
||||
use std::borrow::ToOwned;
|
||||
use std::cell::{Cell, RefCell};
|
||||
use std::sync::{Arc, Mutex};
|
||||
|
||||
#[derive(JSTraceable, PartialEq, Copy, Clone, Debug)]
|
||||
enum WebSocketRequestState {
|
||||
Connecting = 0,
|
||||
Open = 1,
|
||||
|
@ -50,13 +58,18 @@ enum WebSocketRequestState {
|
|||
|
||||
no_jsmanaged_fields!(Sender<WebSocketStream>);
|
||||
|
||||
enum MessageData {
|
||||
Text(String),
|
||||
Binary(Vec<u8>),
|
||||
}
|
||||
|
||||
#[dom_struct]
|
||||
pub struct WebSocket {
|
||||
eventtarget: EventTarget,
|
||||
url: Url,
|
||||
global: GlobalField,
|
||||
ready_state: Cell<WebSocketRequestState>,
|
||||
sender: RefCell<Option<Sender<WebSocketStream>>>,
|
||||
sender: RefCell<Option<Arc<Mutex<Sender<WebSocketStream>>>>>,
|
||||
failed: Cell<bool>, //Flag to tell if websocket was closed due to failure
|
||||
full: Cell<bool>, //Flag to tell if websocket queue is full
|
||||
clean_close: Cell<bool>, //Flag to tell if the websocket closed cleanly (not due to full or fail)
|
||||
|
@ -156,7 +169,7 @@ impl WebSocket {
|
|||
|
||||
// Step 9.
|
||||
let channel = establish_a_websocket_connection(&resource_url, net_url, origin);
|
||||
let (temp_sender, _temp_receiver) = match channel {
|
||||
let (ws_sender, mut receiver) = match channel {
|
||||
Ok(channel) => channel,
|
||||
Err(e) => {
|
||||
debug!("Failed to establish a WebSocket connection: {:?}", e);
|
||||
|
@ -167,12 +180,39 @@ impl WebSocket {
|
|||
return;
|
||||
}
|
||||
};
|
||||
let ws_sender = Arc::new(Mutex::new(ws_sender));
|
||||
|
||||
let open_task = box ConnectionEstablishedTask {
|
||||
addr: address,
|
||||
sender: temp_sender,
|
||||
addr: address.clone(),
|
||||
sender: ws_sender.clone(),
|
||||
};
|
||||
sender.send(ScriptMsg::RunnableMsg(open_task)).unwrap();
|
||||
|
||||
for message in receiver.incoming_messages() {
|
||||
let message = match message {
|
||||
Ok(Message::Text(text)) => MessageData::Text(text),
|
||||
Ok(Message::Binary(data)) => MessageData::Binary(data),
|
||||
Ok(Message::Ping(data)) => {
|
||||
ws_sender.lock().unwrap().send_message(Message::Pong(data)).unwrap();
|
||||
continue;
|
||||
},
|
||||
Ok(Message::Pong(_)) => continue,
|
||||
Ok(Message::Close(data)) => {
|
||||
ws_sender.lock().unwrap().send_message(Message::Close(data)).unwrap();
|
||||
let task = box CloseTask {
|
||||
addr: address,
|
||||
};
|
||||
sender.send(ScriptMsg::RunnableMsg(task)).unwrap();
|
||||
break;
|
||||
},
|
||||
Err(_) => break,
|
||||
};
|
||||
let message_task = box MessageReceivedTask {
|
||||
address: address.clone(),
|
||||
message: message,
|
||||
};
|
||||
sender.send(ScriptMsg::RunnableMsg(message_task)).unwrap();
|
||||
}
|
||||
});
|
||||
|
||||
// Step 7.
|
||||
|
@ -184,6 +224,7 @@ impl<'a> WebSocketMethods for &'a WebSocket {
|
|||
event_handler!(open, GetOnopen, SetOnopen);
|
||||
event_handler!(close, GetOnclose, SetOnclose);
|
||||
event_handler!(error, GetOnerror, SetOnerror);
|
||||
event_handler!(message, GetOnmessage, SetOnmessage);
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-websocket-url
|
||||
fn Url(self) -> DOMString {
|
||||
|
@ -218,7 +259,7 @@ impl<'a> WebSocketMethods for &'a WebSocket {
|
|||
*/
|
||||
let mut other_sender = self.sender.borrow_mut();
|
||||
let my_sender = other_sender.as_mut().unwrap();
|
||||
let _ = my_sender.send_message(Message::Text(data.unwrap().0));
|
||||
let _ = my_sender.lock().unwrap().send_message(Message::Text(data.unwrap().0));
|
||||
return Ok(())
|
||||
}
|
||||
|
||||
|
@ -230,7 +271,7 @@ impl<'a> WebSocketMethods for &'a WebSocket {
|
|||
let mut sender = this.sender.borrow_mut();
|
||||
//TODO: Also check if the buffer is full
|
||||
if let Some(sender) = sender.as_mut() {
|
||||
let _ = sender.send_message(Message::Close(None));
|
||||
let _ = sender.lock().unwrap().send_message(Message::Close(None));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -279,7 +320,7 @@ impl<'a> WebSocketMethods for &'a WebSocket {
|
|||
/// Task queued when *the WebSocket connection is established*.
|
||||
struct ConnectionEstablishedTask {
|
||||
addr: Trusted<WebSocket>,
|
||||
sender: Sender<WebSocketStream>,
|
||||
sender: Arc<Mutex<Sender<WebSocketStream>>>,
|
||||
}
|
||||
|
||||
impl Runnable for ConnectionEstablishedTask {
|
||||
|
@ -346,3 +387,38 @@ impl Runnable for CloseTask {
|
|||
event.fire(target);
|
||||
}
|
||||
}
|
||||
|
||||
struct MessageReceivedTask {
|
||||
address: Trusted<WebSocket>,
|
||||
message: MessageData,
|
||||
}
|
||||
|
||||
impl Runnable for MessageReceivedTask {
|
||||
fn handler(self: Box<Self>) {
|
||||
let ws = self.address.root();
|
||||
debug!("MessageReceivedTask::handler({:p}): readyState={:?}", &*ws,
|
||||
ws.ready_state.get());
|
||||
|
||||
// Step 1.
|
||||
if ws.ready_state.get() != WebSocketRequestState::Open {
|
||||
return;
|
||||
}
|
||||
|
||||
// Step 2-5.
|
||||
let global = ws.global.root();
|
||||
let cx = global.r().get_cx();
|
||||
let _ar = JSAutoRequest::new(cx);
|
||||
let _ac = JSAutoCompartment::new(cx, ws.reflector().get_jsobject().get());
|
||||
let mut message = RootedValue::new(cx, UndefinedValue());
|
||||
match self.message {
|
||||
MessageData::Text(text) => text.to_jsval(cx, message.handle_mut()),
|
||||
MessageData::Binary(data) => {
|
||||
let blob = Blob::new(global.r(), Some(data), "");
|
||||
blob.to_jsval(cx, message.handle_mut());
|
||||
},
|
||||
}
|
||||
|
||||
let target = EventTargetCast::from_ref(ws.r());
|
||||
MessageEvent::dispatch_jsval(target, global.r(), message.handle());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8322,9 +8322,6 @@
|
|||
[WebSocket interface: attribute protocol]
|
||||
expected: FAIL
|
||||
|
||||
[WebSocket interface: attribute onmessage]
|
||||
expected: FAIL
|
||||
|
||||
[WebSocket interface: attribute binaryType]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
[Close-1000-reason.htm]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[W3C WebSocket API - Create WebSocket - Close the Connection - close(1000, reason) - readyState should be in CLOSED state and wasClean is TRUE - Connection should be closed]
|
||||
expected: NOTRUN
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
[Close-1000.htm]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[W3C WebSocket API - Create WebSocket - Close the Connection - close(1000) - readyState should be in CLOSED state and wasClean is TRUE - Connection should be closed]
|
||||
expected: NOTRUN
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
[Close-reason-unpaired-surrogates.htm]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[W3C WebSocket API - Create WebSocket - Close the Connection - close(reason with unpaired surrogates) - connection should get closed]
|
||||
expected: NOTRUN
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
[Create-Secure-valid-url-array-protocols.htm]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[W3C WebSocket API - Create Secure WebSocket - Pass a valid URL and array of protocol strings - Connection should be closed]
|
||||
expected: NOTRUN
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
[Create-Secure-valid-url-protocol-string.htm]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[W3C WebSocket API - Create Secure WebSocket - Pass a valid URL and protocol string - Connection should be closed]
|
||||
expected: NOTRUN
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
[Create-Secure-valid-url.htm]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[W3C WebSocket API - Create Secure WebSocket - Pass a valid URL - Connection should be closed]
|
||||
expected: NOTRUN
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
[Create-valid-url-array-protocols.htm]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[W3C WebSocket API - Create WebSocket - Pass a valid URL and array of protocol strings - Connection should be closed]
|
||||
expected: NOTRUN
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
[Create-valid-url-protocol.htm]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[W3C WebSocket API - Create WebSocket - Pass a valid URL and a protocol string - Connection should be closed]
|
||||
expected: NOTRUN
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
[Create-valid-url.htm]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[W3C WebSocket API - Create WebSocket - Pass a valid URL - Connection should be closed]
|
||||
expected: NOTRUN
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
[Secure-Close-1000-reason.htm]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(1000, reason) - readyState should be in CLOSED state and wasClean is TRUE - Connection should be closed]
|
||||
expected: NOTRUN
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
[Secure-Close-1000-verify-code.htm]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(1000, reason) - event.code == 1000 and event.reason = 'Clean Close']
|
||||
expected: NOTRUN
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
[Secure-Close-1000.htm]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(1000) - readyState should be in CLOSED state and wasClean is TRUE - Connection should be closed]
|
||||
expected: NOTRUN
|
||||
|
|
@ -1,6 +1,5 @@
|
|||
[Secure-Close-1005-verify-code.htm]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[W3C WebSocket API - Create Secure WebSocket - Close the Connection - close() - return close code is 1005 - Connection should be closed]
|
||||
expected: NOTRUN
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
[Secure-Close-3000-reason.htm]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(3000, reason) - readyState should be in CLOSED state and wasClean is TRUE - Connection should be closed]
|
||||
expected: NOTRUN
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
[Secure-Close-3000-verify-code.htm]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(3000, reason) - verify return code is 3000 - Connection should be closed]
|
||||
expected: NOTRUN
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
[Secure-Close-4999-reason.htm]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(4999, reason) - readyState should be in CLOSED state and wasClean is TRUE - Connection should be closed]
|
||||
expected: NOTRUN
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
[Secure-Close-Reason-Unpaired-surrogates.htm]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(reason with unpaired surrogates) - connection should get closed]
|
||||
expected: NOTRUN
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
[Secure-Close-readyState-Closed.htm]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[W3C WebSocket API - Create Secure WebSocket - Close the Connection - readyState should be in CLOSED state and wasClean is TRUE - Connection should be closed]
|
||||
expected: NOTRUN
|
||||
|
|
@ -1,12 +1,8 @@
|
|||
[Secure-Send-65K-data.htm]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[W3C WebSocket API - Send 65K data on a Secure WebSocket - Connection should be opened]
|
||||
expected: FAIL
|
||||
|
||||
[W3C WebSocket API - Send 65K data on a Secure WebSocket - Message should be received]
|
||||
expected: NOTRUN
|
||||
|
||||
[W3C WebSocket API - Send 65K data on a Secure WebSocket - Connection should be closed]
|
||||
expected: NOTRUN
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
expected: FAIL
|
||||
|
||||
[W3C WebSocket API - Send 65K binary data on a Secure WebSocket - ArrayBuffer - Message should be received]
|
||||
expected: NOTRUN
|
||||
expected: FAIL
|
||||
|
||||
[W3C WebSocket API - Send 65K binary data on a Secure WebSocket - ArrayBuffer - Connection should be closed]
|
||||
expected: NOTRUN
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
expected: FAIL
|
||||
|
||||
[W3C WebSocket API - Send binary data on a Secure WebSocket - ArrayBuffer - Message should be received]
|
||||
expected: NOTRUN
|
||||
expected: FAIL
|
||||
|
||||
[W3C WebSocket API - Send binary data on a Secure WebSocket - ArrayBuffer - Connection should be closed]
|
||||
expected: NOTRUN
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Float32Array - Message should be received]
|
||||
expected: NOTRUN
|
||||
expected: FAIL
|
||||
|
||||
[W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Float32Array - Connection should be closed]
|
||||
expected: NOTRUN
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Float64Array - Message should be received]
|
||||
expected: NOTRUN
|
||||
expected: FAIL
|
||||
|
||||
[W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Float64Array - Connection should be closed]
|
||||
expected: NOTRUN
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Int32Array - Message should be received]
|
||||
expected: NOTRUN
|
||||
expected: FAIL
|
||||
|
||||
[W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Int32Array - Connection should be closed]
|
||||
expected: NOTRUN
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Uint16Array with offset and length - Message should be received]
|
||||
expected: NOTRUN
|
||||
expected: FAIL
|
||||
|
||||
[W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Uint16Array with offset and length - Connection should be closed]
|
||||
expected: NOTRUN
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Uint32Array with offset - Message should be received]
|
||||
expected: NOTRUN
|
||||
expected: FAIL
|
||||
|
||||
[W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Uint32Array with offset - Connection should be closed]
|
||||
expected: NOTRUN
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Uint8Array with offset and length - Message should be received]
|
||||
expected: NOTRUN
|
||||
expected: FAIL
|
||||
|
||||
[W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Uint8Array with offset and length - Connection should be closed]
|
||||
expected: NOTRUN
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Uint8Array with offset - Message should be received]
|
||||
expected: NOTRUN
|
||||
expected: FAIL
|
||||
|
||||
[W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Uint8Array with offset - Connection should be closed]
|
||||
expected: NOTRUN
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[W3C WebSocket API - Send binary data on a Secure WebSocket - Blob - Message should be received]
|
||||
expected: NOTRUN
|
||||
expected: FAIL
|
||||
|
||||
[W3C WebSocket API - Send binary data on a Secure WebSocket - Blob - Connection should be closed]
|
||||
expected: NOTRUN
|
||||
|
|
|
@ -1,12 +1,8 @@
|
|||
[Secure-Send-data.htm]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[W3C WebSocket API - Send data on a Secure WebSocket - Connection should be opened]
|
||||
expected: FAIL
|
||||
|
||||
[W3C WebSocket API - Send data on a Secure WebSocket - Message should be received]
|
||||
expected: NOTRUN
|
||||
|
||||
[W3C WebSocket API - Send data on a Secure WebSocket - Connection should be closed]
|
||||
expected: NOTRUN
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
[Secure-Send-null.htm]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[W3C WebSocket API - Send null data on a Secure WebSocket - Message should be received]
|
||||
expected: NOTRUN
|
||||
|
||||
[W3C WebSocket API - Send null data on a Secure WebSocket - Connection should be closed]
|
||||
expected: NOTRUN
|
||||
|
|
@ -1,12 +1,8 @@
|
|||
[Secure-Send-paired-surrogates.htm]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[W3C WebSocket API - Send paired surrogates data on a Secure WebSocket - Connection should be opened]
|
||||
expected: FAIL
|
||||
|
||||
[W3C WebSocket API - Send paired surrogates data on a Secure WebSocket - Message should be received]
|
||||
expected: NOTRUN
|
||||
|
||||
[W3C WebSocket API - Send paired surrogates data on a Secure WebSocket - Connection should be closed]
|
||||
expected: NOTRUN
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,12 +1,8 @@
|
|||
[Secure-Send-unicode-data.htm]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[W3C WebSocket API - Send unicode data on a Secure WebSocket - Connection should be opened]
|
||||
expected: FAIL
|
||||
|
||||
[W3C WebSocket API - Send unicode data on a Secure WebSocket - Message should be received]
|
||||
expected: NOTRUN
|
||||
|
||||
[W3C WebSocket API - Send unicode data on a Secure WebSocket - Connection should be closed]
|
||||
expected: NOTRUN
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
[Secure-Send-unpaired-surrogates.htm]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[W3C WebSocket API - Send unpaired surrogates on a Secure WebSocket - Message should be received]
|
||||
expected: NOTRUN
|
||||
|
||||
[W3C WebSocket API - Send unpaired surrogates on a Secure WebSocket - Connection should be closed]
|
||||
expected: NOTRUN
|
||||
|
|
@ -1,12 +1,8 @@
|
|||
[Send-0byte-data.htm]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[W3C WebSocket API - Send 0 byte data on a WebSocket - Connection should be opened]
|
||||
expected: FAIL
|
||||
|
||||
[W3C WebSocket API - Send 0 byte data on a WebSocket - Message should be received]
|
||||
expected: NOTRUN
|
||||
|
||||
[W3C WebSocket API - Send 0 byte data on a WebSocket - Connection should be closed]
|
||||
expected: NOTRUN
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,12 +1,8 @@
|
|||
[Send-65K-data.htm]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[W3C WebSocket API - Send 65K data on a WebSocket - Connection should be opened]
|
||||
expected: FAIL
|
||||
|
||||
[W3C WebSocket API - Send 65K data on a WebSocket - Message should be received]
|
||||
expected: NOTRUN
|
||||
|
||||
[W3C WebSocket API - Send 65K data on a WebSocket - Connection should be closed]
|
||||
expected: NOTRUN
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
[Send-Unpaired-Surrogates.htm]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[W3C WebSocket API - Send unpaired surrogates on a WebSocket - Message should be received]
|
||||
expected: NOTRUN
|
||||
|
||||
[W3C WebSocket API - Send unpaired surrogates on a WebSocket - Connection should be closed]
|
||||
expected: NOTRUN
|
||||
|
|
@ -5,7 +5,7 @@
|
|||
expected: FAIL
|
||||
|
||||
[W3C WebSocket API - Send 65K binary data on a WebSocket - ArrayBuffer - Message should be received]
|
||||
expected: NOTRUN
|
||||
expected: FAIL
|
||||
|
||||
[W3C WebSocket API - Send 65K binary data on a WebSocket - ArrayBuffer - Connection should be closed]
|
||||
expected: NOTRUN
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
expected: FAIL
|
||||
|
||||
[W3C WebSocket API - Send binary data on a WebSocket - ArrayBuffer - Message should be received]
|
||||
expected: NOTRUN
|
||||
expected: FAIL
|
||||
|
||||
[W3C WebSocket API - Send binary data on a WebSocket - ArrayBuffer - Connection should be closed]
|
||||
expected: NOTRUN
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Int16Array with offset - Message should be received]
|
||||
expected: NOTRUN
|
||||
expected: FAIL
|
||||
|
||||
[W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Int16Array with offset - Connection should be closed]
|
||||
expected: NOTRUN
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Int8Array - Message should be received]
|
||||
expected: NOTRUN
|
||||
expected: FAIL
|
||||
|
||||
[W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Int8Array - Connection should be closed]
|
||||
expected: NOTRUN
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[W3C WebSocket API - Send binary data on a WebSocket - Blob - Message should be received]
|
||||
expected: NOTRUN
|
||||
expected: FAIL
|
||||
|
||||
[W3C WebSocket API - Send binary data on a WebSocket - Blob - Connection should be closed]
|
||||
expected: NOTRUN
|
||||
|
|
|
@ -1,12 +1,8 @@
|
|||
[Send-data.htm]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[W3C WebSocket API - Send data on a WebSocket - Connection should be opened]
|
||||
expected: FAIL
|
||||
|
||||
[W3C WebSocket API - Send data on a WebSocket - Message should be received]
|
||||
expected: NOTRUN
|
||||
|
||||
[W3C WebSocket API - Send data on a WebSocket - Connection should be closed]
|
||||
expected: NOTRUN
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
[Send-null.htm]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[W3C WebSocket API - Send null data on a WebSocket - Message should be received]
|
||||
expected: NOTRUN
|
||||
|
||||
[W3C WebSocket API - Send null data on a WebSocket - Connection should be closed]
|
||||
expected: NOTRUN
|
||||
|
|
@ -1,12 +1,8 @@
|
|||
[Send-paired-surrogates.htm]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[W3C WebSocket API - Send (paired surrogates) data on a WebSocket - Connection should be opened]
|
||||
expected: FAIL
|
||||
|
||||
[W3C WebSocket API - Send (paired surrogates) data on a WebSocket - Message should be received]
|
||||
expected: NOTRUN
|
||||
|
||||
[W3C WebSocket API - Send (paired surrogates) data on a WebSocket - Connection should be closed]
|
||||
expected: NOTRUN
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,12 +1,8 @@
|
|||
[Send-unicode-data.htm]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[W3C WebSocket API - Send unicode data on a WebSocket - Connection should be opened]
|
||||
expected: FAIL
|
||||
|
||||
[W3C WebSocket API - Send unicode data on a WebSocket - Message should be received]
|
||||
expected: NOTRUN
|
||||
|
||||
[W3C WebSocket API - Send unicode data on a WebSocket - Connection should be closed]
|
||||
expected: NOTRUN
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
[001.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[WebSockets: Send/Receive blob, blob size less than network array buffer]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[002.html]
|
||||
type: testharness
|
||||
[WebSockets: Send/Receive blob, blob size greater than network array buffer]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[004.html]
|
||||
type: testharness
|
||||
[WebSockets: Send/Receive ArrayBuffer, size greater than network array buffer]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
[005.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[WebSockets: Send/Receive ArrayBuffer, size less than network array buffer]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
[002.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[WebSockets: server sends closing handshake]
|
||||
expected: TIMEOUT
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
[003.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[WebSockets: client sends closing handshake]
|
||||
expected: TIMEOUT
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
[004.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[WebSockets: data after closing handshake]
|
||||
expected: TIMEOUT
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
[013.html]
|
||||
type: testharness
|
||||
[WebSockets: multiple WebSocket objects]
|
||||
expected: TIMEOUT
|
||||
|
|
@ -1,6 +1,5 @@
|
|||
[016.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[WebSockets: non-ascii URL in query, document encoding windows-1252]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
[018.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[WebSockets: NULL char in url]
|
||||
expected: TIMEOUT
|
||||
|
|
@ -1,6 +1,5 @@
|
|||
[001.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[WebSockets: Cookie in request]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[003.html]
|
||||
type: testharness
|
||||
[WebSockets: sending HttpOnly cookies in ws request]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
[005.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[WebSockets: setting HttpOnly cookies in ws response, checking ws request]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
[006.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[WebSockets: setting Secure cookie with document.cookie, checking ws request]
|
||||
expected: TIMEOUT
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
[eventhandlers.html]
|
||||
type: testharness
|
||||
[Event handler for message should have [TreatNonCallableAsNull\]]
|
||||
expected: FAIL
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
[extended-payload-length.html]
|
||||
type: testharness
|
||||
[Application data is 125 byte which means any 'Extended payload length' field isn't used at all.]
|
||||
expected: TIMEOUT
|
||||
|
||||
[Application data is 126 byte which starts to use the 16 bit 'Extended payload length' field.]
|
||||
expected: TIMEOUT
|
||||
|
||||
[Application data is 0xFFFF byte which means the upper bound of the 16 bit 'Extended payload length' field.]
|
||||
expected: TIMEOUT
|
||||
|
||||
[Application data is (0xFFFF + 1) byte which starts to use the 64 bit 'Extended payload length' field]
|
||||
expected: TIMEOUT
|
||||
|
|
@ -15,9 +15,6 @@
|
|||
[WebSocket interface: attribute protocol]
|
||||
expected: FAIL
|
||||
|
||||
[WebSocket interface: attribute onmessage]
|
||||
expected: FAIL
|
||||
|
||||
[WebSocket interface: attribute binaryType]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -45,9 +42,6 @@
|
|||
[WebSocket interface: new WebSocket("ws://foo") must inherit property "protocol" with the proper type (11)]
|
||||
expected: FAIL
|
||||
|
||||
[WebSocket interface: new WebSocket("ws://foo") must inherit property "onmessage" with the proper type (13)]
|
||||
expected: FAIL
|
||||
|
||||
[WebSocket interface: new WebSocket("ws://foo") must inherit property "binaryType" with the proper type (14)]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
[clean-close.html]
|
||||
type: testharness
|
||||
[WebSockets: wasClean, true]
|
||||
expected: TIMEOUT
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
[001.html]
|
||||
type: testharness
|
||||
[WebSockets: getting on* 1]
|
||||
expected: FAIL
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
[006.html]
|
||||
type: testharness
|
||||
[WebSockets: 'on*' in ws]
|
||||
expected: FAIL
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
[007.html]
|
||||
type: testharness
|
||||
[WebSockets: listening for events with onmessage]
|
||||
expected: TIMEOUT
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
[010.html]
|
||||
type: testharness
|
||||
[WebSockets: setting event handlers to undefined 3]
|
||||
expected: FAIL
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
[011.html]
|
||||
type: testharness
|
||||
[onmessage]
|
||||
expected: FAIL
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
[012.html]
|
||||
type: testharness
|
||||
[onmessage]
|
||||
expected: FAIL
|
||||
|
|
@ -9,3 +9,6 @@
|
|||
[onerror]
|
||||
expected: FAIL
|
||||
|
||||
[onmessage]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
[016.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[WebSockets: addEventListener]
|
||||
expected: TIMEOUT
|
||||
|
|
@ -1,9 +1,6 @@
|
|||
[018.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[message event]
|
||||
expected: TIMEOUT
|
||||
|
||||
[error event]
|
||||
expected: TIMEOUT
|
||||
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
[008.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[WebSockets: getting readyState in closed]
|
||||
expected: TIMEOUT
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
[006.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[WebSockets: send() with unpaired surrogate when readyState is OPEN]
|
||||
expected: TIMEOUT
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
[007.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[WebSockets: close() followed by send()]
|
||||
expected: TIMEOUT
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
[008.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[WebSockets: send() in onclose]
|
||||
expected: TIMEOUT
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
[009.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[WebSockets: send('')]
|
||||
expected: TIMEOUT
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
[010.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[Constructor succeeds]
|
||||
expected: TIMEOUT
|
||||
|
||||
[WebSockets: sending non-strings (null)]
|
||||
expected: NOTRUN
|
||||
|
||||
[WebSockets: sending non-strings (undefined)]
|
||||
expected: NOTRUN
|
||||
|
||||
[WebSockets: sending non-strings (1)]
|
||||
expected: NOTRUN
|
||||
|
||||
[WebSockets: sending non-strings ([object Window\])]
|
||||
expected: NOTRUN
|
||||
|
||||
[WebSockets: sending non-strings ([object HTMLBodyElement\])]
|
||||
expected: NOTRUN
|
||||
|
||||
[WebSockets: sending non-strings ([object Object\])]
|
||||
expected: NOTRUN
|
||||
|
||||
[WebSockets: sending non-strings ()]
|
||||
expected: NOTRUN
|
||||
|
||||
[WebSockets: sending non-strings ([object WebSocket\])]
|
||||
expected: NOTRUN
|
||||
|
||||
[WebSockets: sending non-strings (function (){})]
|
||||
expected: NOTRUN
|
||||
|
||||
[WebSockets: sending non-strings (Error)]
|
||||
expected: NOTRUN
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
[011.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[WebSockets: sending non-ascii, combining chars and non-BMP]
|
||||
expected: TIMEOUT
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
[012.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[WebSockets: sending null]
|
||||
expected: TIMEOUT
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
[001.html]
|
||||
type: testharness
|
||||
[WebSockets: 20s inactivity after handshake]
|
||||
expected: TIMEOUT
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
[002.html]
|
||||
type: testharness
|
||||
[WebSockets: valid handshake]
|
||||
expected: TIMEOUT
|
||||
|
|
@ -1,6 +1,5 @@
|
|||
[003.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[WebSockets: origin]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue