Auto merge of #21424 - Eijebong:we-secure-now, r=jdm

Handle secure websockets

Fixes #20816

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/21424)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2018-08-16 00:58:40 -04:00 committed by GitHub
commit 89ab110357
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
84 changed files with 44 additions and 1065 deletions

View file

@ -8,7 +8,7 @@ use hyper::error::{Result as HyperResult, Error as HyperError};
use hyper::net::{NetworkConnector, HttpsStream, HttpStream, SslClient}; use hyper::net::{NetworkConnector, HttpsStream, HttpStream, SslClient};
use hyper_openssl::OpensslClient; use hyper_openssl::OpensslClient;
use openssl::ssl::{SSL_OP_NO_COMPRESSION, SSL_OP_NO_SSLV2, SSL_OP_NO_SSLV3}; use openssl::ssl::{SSL_OP_NO_COMPRESSION, SSL_OP_NO_SSLV2, SSL_OP_NO_SSLV3};
use openssl::ssl::{SslConnectorBuilder, SslMethod}; use openssl::ssl::{SslConnector, SslConnectorBuilder, SslMethod};
use openssl::x509; use openssl::x509;
use std::io; use std::io;
use std::net::TcpStream; use std::net::TcpStream;
@ -50,7 +50,7 @@ impl NetworkConnector for HttpsConnector {
pub type Connector = HttpsConnector; pub type Connector = HttpsConnector;
pub fn create_ssl_client(certs: &str) -> OpensslClient { pub fn create_ssl_connector(certs: &str) -> SslConnector {
// certs include multiple certificates. We could add all of them at once, // certs include multiple certificates. We could add all of them at once,
// but if any of them were already added, openssl would fail to insert all // but if any of them were already added, openssl would fail to insert all
// of them. // of them.
@ -79,7 +79,11 @@ pub fn create_ssl_client(certs: &str) -> OpensslClient {
} }
ssl_connector_builder.set_cipher_list(DEFAULT_CIPHERS).expect("could not set ciphers"); ssl_connector_builder.set_cipher_list(DEFAULT_CIPHERS).expect("could not set ciphers");
ssl_connector_builder.set_options(SSL_OP_NO_SSLV2 | SSL_OP_NO_SSLV3 | SSL_OP_NO_COMPRESSION); ssl_connector_builder.set_options(SSL_OP_NO_SSLV2 | SSL_OP_NO_SSLV3 | SSL_OP_NO_COMPRESSION);
let ssl_connector = ssl_connector_builder.build(); ssl_connector_builder.build()
}
pub fn create_ssl_client(certs: &str) -> OpensslClient {
let ssl_connector = create_ssl_connector(certs);
OpensslClient::from(ssl_connector) OpensslClient::from(ssl_connector)
} }

View file

@ -2,7 +2,9 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use connector::create_ssl_connector;
use cookie::Cookie; use cookie::Cookie;
use embedder_traits::resources::{self, Resource};
use fetch::methods::should_be_blocked_due_to_bad_port; use fetch::methods::should_be_blocked_due_to_bad_port;
use hosts::replace_host; use hosts::replace_host;
use http_loader::HttpState; use http_loader::HttpState;
@ -11,13 +13,17 @@ use ipc_channel::ipc::{IpcReceiver, IpcSender};
use net_traits::{CookieSource, MessageData}; use net_traits::{CookieSource, MessageData};
use net_traits::{WebSocketDomAction, WebSocketNetworkEvent}; use net_traits::{WebSocketDomAction, WebSocketNetworkEvent};
use net_traits::request::{RequestInit, RequestMode}; use net_traits::request::{RequestInit, RequestMode};
use openssl::ssl::SslStream;
use servo_config::opts;
use servo_url::ServoUrl; use servo_url::ServoUrl;
use std::fs;
use std::sync::Arc; use std::sync::Arc;
use std::sync::atomic::{AtomicBool, Ordering}; use std::sync::atomic::{AtomicBool, Ordering};
use std::thread; use std::thread;
use url::Url; use url::Url;
use ws::{CloseCode, Factory, Handler, Handshake, Message, Request, Response as WsResponse, Sender, WebSocket}; use ws::{CloseCode, Factory, Handler, Handshake, Message, Request, Response as WsResponse, Sender, WebSocket};
use ws::{Error as WebSocketError, ErrorKind as WebSocketErrorKind, Result as WebSocketResult}; use ws::{Error as WebSocketError, ErrorKind as WebSocketErrorKind, Result as WebSocketResult};
use ws::util::TcpStream;
/// A client for connecting to a websocket server /// A client for connecting to a websocket server
#[derive(Clone)] #[derive(Clone)]
@ -119,6 +125,29 @@ impl<'a> Handler for Client<'a> {
debug!("Connection closing due to ({:?}) {}", code, reason); debug!("Connection closing due to ({:?}) {}", code, reason);
let _ = self.event_sender.send(WebSocketNetworkEvent::Close(Some(code.into()), reason.to_owned())); let _ = self.event_sender.send(WebSocketNetworkEvent::Close(Some(code.into()), reason.to_owned()));
} }
fn upgrade_ssl_client(
&mut self,
stream: TcpStream,
url: &Url,
) -> WebSocketResult<SslStream<TcpStream>> {
let certs = match opts::get().certificate_path {
Some(ref path) => {
fs::read_to_string(path).expect("Couldn't not find certificate file")
}
None => {
resources::read_string(Resource::SSLCertificates)
},
};
let domain = self.resource_url.as_url().domain().ok_or(WebSocketError::new(
WebSocketErrorKind::Protocol,
format!("Unable to parse domain from {}. Needed for SSL.", url),
))?;
let connector = create_ssl_connector(&certs);
connector.connect(domain, stream).map_err(WebSocketError::from)
}
} }
pub fn init( pub fn init(

View file

@ -1,17 +1,17 @@
[Create-Secure-extensions-empty.any.html] [Create-Secure-extensions-empty.any.html]
expected: TIMEOUT expected: TIMEOUT
[W3C WebSocket API - Create Secure WebSocket - wsocket.extensions should be set to '' after connection is established - Connection should be opened] [W3C WebSocket API - Create Secure WebSocket - wsocket.extensions should be set to '' after connection is established - Connection should be opened]
expected: NOTRUN expected: FAIL
[W3C WebSocket API - Create Secure WebSocket - wsocket.extensions should be set to '' after connection is established - Connection should be closed] [W3C WebSocket API - Create Secure WebSocket - wsocket.extensions should be set to '' after connection is established - Connection should be closed]
expected: FAIL expected: NOTRUN
[Create-Secure-extensions-empty.any.worker.html] [Create-Secure-extensions-empty.any.worker.html]
expected: TIMEOUT expected: TIMEOUT
[W3C WebSocket API - Create Secure WebSocket - wsocket.extensions should be set to '' after connection is established - Connection should be opened] [W3C WebSocket API - Create Secure WebSocket - wsocket.extensions should be set to '' after connection is established - Connection should be opened]
expected: NOTRUN
[W3C WebSocket API - Create Secure WebSocket - wsocket.extensions should be set to '' after connection is established - Connection should be closed]
expected: FAIL expected: FAIL
[W3C WebSocket API - Create Secure WebSocket - wsocket.extensions should be set to '' after connection is established - Connection should be closed]
expected: NOTRUN

View file

@ -1,17 +0,0 @@
[Create-Secure-valid-url-array-protocols.any.html]
expected: TIMEOUT
[W3C WebSocket API - Create Secure WebSocket - Pass a valid URL and array of protocol strings - Connection should be opened]
expected: NOTRUN
[W3C WebSocket API - Create Secure WebSocket - Pass a valid URL and array of protocol strings - Connection should be closed]
expected: FAIL
[Create-Secure-valid-url-array-protocols.any.worker.html]
expected: TIMEOUT
[W3C WebSocket API - Create Secure WebSocket - Pass a valid URL and array of protocol strings - Connection should be opened]
expected: NOTRUN
[W3C WebSocket API - Create Secure WebSocket - Pass a valid URL and array of protocol strings - Connection should be closed]
expected: FAIL

View file

@ -1,17 +0,0 @@
[Create-Secure-valid-url-binaryType-blob.any.html]
expected: TIMEOUT
[W3C WebSocket API - Create Secure WebSocket - wsocket.binaryType should be set to 'blob' after connection is established - Connection should be opened]
expected: NOTRUN
[W3C WebSocket API - Create Secure WebSocket - wsocket.binaryType should be set to 'blob' after connection is established - Connection should be closed]
expected: FAIL
[Create-Secure-valid-url-binaryType-blob.any.worker.html]
expected: TIMEOUT
[W3C WebSocket API - Create Secure WebSocket - wsocket.binaryType should be set to 'blob' after connection is established - Connection should be opened]
expected: NOTRUN
[W3C WebSocket API - Create Secure WebSocket - wsocket.binaryType should be set to 'blob' after connection is established - Connection should be closed]
expected: FAIL

View file

@ -1,17 +0,0 @@
[Create-Secure-valid-url-protocol-setCorrectly.any.html]
expected: TIMEOUT
[W3C WebSocket API - Create Secure WebSocket - Pass a valid URL and protocol string - protocol should be set correctly - Connection should be opened]
expected: NOTRUN
[W3C WebSocket API - Create Secure WebSocket - Pass a valid URL and protocol string - Connection should be closed]
expected: FAIL
[Create-Secure-valid-url-protocol-setCorrectly.any.worker.html]
expected: TIMEOUT
[W3C WebSocket API - Create Secure WebSocket - Pass a valid URL and protocol string - protocol should be set correctly - Connection should be opened]
expected: NOTRUN
[W3C WebSocket API - Create Secure WebSocket - Pass a valid URL and protocol string - Connection should be closed]
expected: FAIL

View file

@ -1,17 +0,0 @@
[Create-Secure-valid-url-protocol-string.any.worker.html]
expected: TIMEOUT
[W3C WebSocket API - Create Secure WebSocket - Check readyState is 1]
expected: NOTRUN
[W3C WebSocket API - Create Secure WebSocket - Pass a valid URL and protocol string - Connection should be closed]
expected: FAIL
[Create-Secure-valid-url-protocol-string.any.html]
expected: TIMEOUT
[W3C WebSocket API - Create Secure WebSocket - Check readyState is 1]
expected: NOTRUN
[W3C WebSocket API - Create Secure WebSocket - Pass a valid URL and protocol string - Connection should be closed]
expected: FAIL

View file

@ -1,17 +0,0 @@
[Create-Secure-valid-url.any.html]
expected: TIMEOUT
[W3C WebSocket API - Create Secure WebSocket - Pass a valid URL - Connection should be opened]
expected: NOTRUN
[W3C WebSocket API - Create Secure WebSocket - Pass a valid URL - Connection should be closed]
expected: FAIL
[Create-Secure-valid-url.any.worker.html]
expected: TIMEOUT
[W3C WebSocket API - Create Secure WebSocket - Pass a valid URL - Connection should be opened]
expected: NOTRUN
[W3C WebSocket API - Create Secure WebSocket - Pass a valid URL - Connection should be closed]
expected: FAIL

View file

@ -1,17 +0,0 @@
[Secure-Close-1000-reason.any.worker.html]
expected: TIMEOUT
[W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(1000, reason) - Connection should be opened]
expected: NOTRUN
[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: FAIL
[Secure-Close-1000-reason.any.html]
expected: TIMEOUT
[W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(1000, reason) - Connection should be opened]
expected: NOTRUN
[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: FAIL

View file

@ -1,17 +0,0 @@
[Secure-Close-1000-verify-code.any.html]
expected: TIMEOUT
[W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(1000, reason) - Connection should be opened]
expected: NOTRUN
[W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(1000, reason) - event.code == 1000 and event.reason = 'Clean Close']
expected: FAIL
[Secure-Close-1000-verify-code.any.worker.html]
expected: TIMEOUT
[W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(1000, reason) - Connection should be opened]
expected: NOTRUN
[W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(1000, reason) - event.code == 1000 and event.reason = 'Clean Close']
expected: FAIL

View file

@ -1,17 +0,0 @@
[Secure-Close-1000.any.html]
expected: TIMEOUT
[W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(1000) - Connection should be opened]
expected: NOTRUN
[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: FAIL
[Secure-Close-1000.any.worker.html]
expected: TIMEOUT
[W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(1000) - Connection should be opened]
expected: NOTRUN
[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: FAIL

View file

@ -1,17 +0,0 @@
[Secure-Close-1005-verify-code.any.worker.html]
expected: TIMEOUT
[W3C WebSocket API - Create Secure WebSocket - Close the Connection - close() - Connection should be opened]
expected: NOTRUN
[W3C WebSocket API - Create Secure WebSocket - Close the Connection - close() - return close code is 1005 - Connection should be closed]
expected: FAIL
[Secure-Close-1005-verify-code.any.html]
expected: TIMEOUT
[W3C WebSocket API - Create Secure WebSocket - Close the Connection - close() - Connection should be opened]
expected: NOTRUN
[W3C WebSocket API - Create Secure WebSocket - Close the Connection - close() - return close code is 1005 - Connection should be closed]
expected: FAIL

View file

@ -1,11 +0,0 @@
[Secure-Close-1005.any.worker.html]
expected: TIMEOUT
[W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(1005) - see '7.1.5. The WebSocket Connection Close Code' in http://www.ietf.org/rfc/rfc6455.txt]
expected: NOTRUN
[Secure-Close-1005.any.html]
expected: TIMEOUT
[W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(1005) - see '7.1.5. The WebSocket Connection Close Code' in http://www.ietf.org/rfc/rfc6455.txt]
expected: NOTRUN

View file

@ -1,11 +0,0 @@
[Secure-Close-2999-reason.any.worker.html]
expected: TIMEOUT
[W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(2999, reason) - INVALID_ACCESS_ERR is thrown]
expected: NOTRUN
[Secure-Close-2999-reason.any.html]
expected: TIMEOUT
[W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(2999, reason) - INVALID_ACCESS_ERR is thrown]
expected: NOTRUN

View file

@ -1,17 +0,0 @@
[Secure-Close-3000-reason.any.html]
expected: TIMEOUT
[W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(3000, reason) - Connection should be opened]
expected: NOTRUN
[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: FAIL
[Secure-Close-3000-reason.any.worker.html]
expected: TIMEOUT
[W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(3000, reason) - Connection should be opened]
expected: NOTRUN
[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: FAIL

View file

@ -1,17 +0,0 @@
[Secure-Close-3000-verify-code.any.worker.html]
expected: TIMEOUT
[W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(3000, reason) - Connection should be opened]
expected: NOTRUN
[W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(3000, reason) - verify return code is 3000 - Connection should be closed]
expected: FAIL
[Secure-Close-3000-verify-code.any.html]
expected: TIMEOUT
[W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(3000, reason) - Connection should be opened]
expected: NOTRUN
[W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(3000, reason) - verify return code is 3000 - Connection should be closed]
expected: FAIL

View file

@ -1,17 +0,0 @@
[Secure-Close-4999-reason.any.worker.html]
expected: TIMEOUT
[W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(4999, reason) - Connection should be opened]
expected: NOTRUN
[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: FAIL
[Secure-Close-4999-reason.any.html]
expected: TIMEOUT
[W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(4999, reason) - Connection should be opened]
expected: NOTRUN
[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: FAIL

View file

@ -1,11 +0,0 @@
[Secure-Close-Reason-124Bytes.any.html]
expected: TIMEOUT
[W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(code, 'reason more than 123 bytes') - SYNTAX_ERR is thrown]
expected: NOTRUN
[Secure-Close-Reason-124Bytes.any.worker.html]
expected: TIMEOUT
[W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(code, 'reason more than 123 bytes') - SYNTAX_ERR is thrown]
expected: NOTRUN

View file

@ -1,17 +0,0 @@
[Secure-Close-Reason-Unpaired-surrogates.any.html]
expected: TIMEOUT
[W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(reason with unpaired surrogates) - connection should get opened]
expected: NOTRUN
[W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(reason with unpaired surrogates) - connection should get closed]
expected: FAIL
[Secure-Close-Reason-Unpaired-surrogates.any.worker.html]
expected: TIMEOUT
[W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(reason with unpaired surrogates) - connection should get opened]
expected: NOTRUN
[W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(reason with unpaired surrogates) - connection should get closed]
expected: FAIL

View file

@ -1,11 +0,0 @@
[Secure-Close-onlyReason.any.html]
expected: TIMEOUT
[W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(only reason) - INVALID_ACCESS_ERR is thrown]
expected: NOTRUN
[Secure-Close-onlyReason.any.worker.html]
expected: TIMEOUT
[W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(only reason) - INVALID_ACCESS_ERR is thrown]
expected: NOTRUN

View file

@ -1,17 +0,0 @@
[Secure-Close-readyState-Closed.any.html]
expected: TIMEOUT
[W3C WebSocket API - Create Secure WebSocket - Close the Connection - Connection should be opened]
expected: NOTRUN
[W3C WebSocket API - Create Secure WebSocket - Close the Connection - readyState should be in CLOSED state and wasClean is TRUE - Connection should be closed]
expected: FAIL
[Secure-Close-readyState-Closed.any.worker.html]
expected: TIMEOUT
[W3C WebSocket API - Create Secure WebSocket - Close the Connection - Connection should be opened]
expected: NOTRUN
[W3C WebSocket API - Create Secure WebSocket - Close the Connection - readyState should be in CLOSED state and wasClean is TRUE - Connection should be closed]
expected: FAIL

View file

@ -1,11 +0,0 @@
[Secure-Close-readyState-Closing.any.html]
expected: TIMEOUT
[W3C WebSocket API - Create Secure WebSocket - Close the Connection - readyState should be in CLOSING state just before onclose is called]
expected: NOTRUN
[Secure-Close-readyState-Closing.any.worker.html]
expected: TIMEOUT
[W3C WebSocket API - Create Secure WebSocket - Close the Connection - readyState should be in CLOSING state just before onclose is called]
expected: NOTRUN

View file

@ -1,17 +0,0 @@
[Secure-Close-server-initiated-close.any.html]
expected: TIMEOUT
[W3C WebSocket API - Create Secure WebSocket - Server initiated Close - Client sends back a CLOSE - Connection should be opened]
expected: NOTRUN
[W3C WebSocket API - Create Secure WebSocket - Server initiated Close - Client sends back a CLOSE - readyState should be in CLOSED state and wasClean is TRUE - Connection should be closed]
expected: FAIL
[Secure-Close-server-initiated-close.any.worker.html]
expected: TIMEOUT
[W3C WebSocket API - Create Secure WebSocket - Server initiated Close - Client sends back a CLOSE - Connection should be opened]
expected: NOTRUN
[W3C WebSocket API - Create Secure WebSocket - Server initiated Close - Client sends back a CLOSE - readyState should be in CLOSED state and wasClean is TRUE - Connection should be closed]
expected: FAIL

View file

@ -1,17 +1,9 @@
[Secure-Close-undefined.any.worker.html] [Secure-Close-undefined.any.worker.html]
expected: TIMEOUT
[Untitled] [Untitled]
expected: NOTRUN expected: NOTRUN
[Secure-Close-undefined]
expected: NOTRUN
[Secure-Close-undefined.any.html] [Secure-Close-undefined.any.html]
expected: TIMEOUT
[Untitled] [Untitled]
expected: NOTRUN expected: NOTRUN
[Secure-Close-undefined]
expected: NOTRUN

View file

@ -1,23 +0,0 @@
[Secure-Send-65K-data.any.html]
expected: TIMEOUT
[W3C WebSocket API - Send 65K data on a Secure WebSocket - Connection should be opened]
expected: NOTRUN
[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: FAIL
[Secure-Send-65K-data.any.worker.html]
expected: TIMEOUT
[W3C WebSocket API - Send 65K data on a Secure WebSocket - Connection should be opened]
expected: NOTRUN
[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: FAIL

View file

@ -1,23 +0,0 @@
[Secure-Send-binary-65K-arraybuffer.any.worker.html]
expected: TIMEOUT
[W3C WebSocket API - Send 65K binary data on a Secure WebSocket - ArrayBuffer - Connection should be opened]
expected: NOTRUN
[W3C WebSocket API - Send 65K binary data on a Secure WebSocket - ArrayBuffer - Message should be received]
expected: NOTRUN
[W3C WebSocket API - Send 65K binary data on a Secure WebSocket - ArrayBuffer - Connection should be closed]
expected: FAIL
[Secure-Send-binary-65K-arraybuffer.any.html]
expected: TIMEOUT
[W3C WebSocket API - Send 65K binary data on a Secure WebSocket - ArrayBuffer - Connection should be opened]
expected: NOTRUN
[W3C WebSocket API - Send 65K binary data on a Secure WebSocket - ArrayBuffer - Message should be received]
expected: NOTRUN
[W3C WebSocket API - Send 65K binary data on a Secure WebSocket - ArrayBuffer - Connection should be closed]
expected: FAIL

View file

@ -1,23 +0,0 @@
[Secure-Send-binary-arraybuffer.any.html]
expected: TIMEOUT
[W3C WebSocket API - Send binary data on a Secure WebSocket - ArrayBuffer - Connection should be opened]
expected: NOTRUN
[W3C WebSocket API - Send binary data on a Secure WebSocket - ArrayBuffer - Message should be received]
expected: NOTRUN
[W3C WebSocket API - Send binary data on a Secure WebSocket - ArrayBuffer - Connection should be closed]
expected: FAIL
[Secure-Send-binary-arraybuffer.any.worker.html]
expected: TIMEOUT
[W3C WebSocket API - Send binary data on a Secure WebSocket - ArrayBuffer - Connection should be opened]
expected: NOTRUN
[W3C WebSocket API - Send binary data on a Secure WebSocket - ArrayBuffer - Message should be received]
expected: NOTRUN
[W3C WebSocket API - Send binary data on a Secure WebSocket - ArrayBuffer - Connection should be closed]
expected: FAIL

View file

@ -1,23 +0,0 @@
[Secure-Send-binary-arraybufferview-float64.any.html]
expected: TIMEOUT
[W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Float64Array - Connection should be opened]
expected: NOTRUN
[W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Float64Array - Message should be received]
expected: NOTRUN
[W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Float64Array - Connection should be closed]
expected: FAIL
[Secure-Send-binary-arraybufferview-float64.any.worker.html]
expected: TIMEOUT
[W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Float64Array - Connection should be opened]
expected: NOTRUN
[W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Float64Array - Message should be received]
expected: NOTRUN
[W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Float64Array - Connection should be closed]
expected: FAIL

View file

@ -1,23 +0,0 @@
[Secure-Send-binary-arraybufferview-int32.any.html]
expected: TIMEOUT
[W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Int32Array - Connection should be opened]
expected: NOTRUN
[W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Int32Array - Message should be received]
expected: NOTRUN
[W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Int32Array - Connection should be closed]
expected: FAIL
[Secure-Send-binary-arraybufferview-int32.any.worker.html]
expected: TIMEOUT
[W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Int32Array - Connection should be opened]
expected: NOTRUN
[W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Int32Array - Message should be received]
expected: NOTRUN
[W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Int32Array - Connection should be closed]
expected: FAIL

View file

@ -1,23 +0,0 @@
[Secure-Send-binary-arraybufferview-uint16-offset-length.any.html]
expected: TIMEOUT
[W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Uint16Array with offset and length - Connection should be opened]
expected: NOTRUN
[W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Uint16Array with offset and length - Message should be received]
expected: NOTRUN
[W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Uint16Array with offset and length - Connection should be closed]
expected: FAIL
[Secure-Send-binary-arraybufferview-uint16-offset-length.any.worker.html]
expected: TIMEOUT
[W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Uint16Array with offset and length - Connection should be opened]
expected: NOTRUN
[W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Uint16Array with offset and length - Message should be received]
expected: NOTRUN
[W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Uint16Array with offset and length - Connection should be closed]
expected: FAIL

View file

@ -1,23 +0,0 @@
[Secure-Send-binary-arraybufferview-uint32-offset.any.worker.html]
expected: TIMEOUT
[W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Uint32Array with offset - Connection should be opened]
expected: NOTRUN
[W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Uint32Array with offset - Message should be received]
expected: NOTRUN
[W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Uint32Array with offset - Connection should be closed]
expected: FAIL
[Secure-Send-binary-arraybufferview-uint32-offset.any.html]
expected: TIMEOUT
[W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Uint32Array with offset - Connection should be opened]
expected: NOTRUN
[W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Uint32Array with offset - Message should be received]
expected: NOTRUN
[W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Uint32Array with offset - Connection should be closed]
expected: FAIL

View file

@ -1,23 +0,0 @@
[Secure-Send-binary-arraybufferview-uint8-offset-length.any.worker.html]
expected: TIMEOUT
[W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Uint8Array with offset and length - Connection should be opened]
expected: NOTRUN
[W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Uint8Array with offset and length - Message should be received]
expected: NOTRUN
[W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Uint8Array with offset and length - Connection should be closed]
expected: FAIL
[Secure-Send-binary-arraybufferview-uint8-offset-length.any.html]
expected: TIMEOUT
[W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Uint8Array with offset and length - Connection should be opened]
expected: NOTRUN
[W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Uint8Array with offset and length - Message should be received]
expected: NOTRUN
[W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Uint8Array with offset and length - Connection should be closed]
expected: FAIL

View file

@ -1,23 +0,0 @@
[Secure-Send-binary-arraybufferview-uint8-offset.any.worker.html]
expected: TIMEOUT
[W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Uint8Array with offset - Connection should be opened]
expected: NOTRUN
[W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Uint8Array with offset - Message should be received]
expected: NOTRUN
[W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Uint8Array with offset - Connection should be closed]
expected: FAIL
[Secure-Send-binary-arraybufferview-uint8-offset.any.html]
expected: TIMEOUT
[W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Uint8Array with offset - Connection should be opened]
expected: NOTRUN
[W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Uint8Array with offset - Message should be received]
expected: NOTRUN
[W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Uint8Array with offset - Connection should be closed]
expected: FAIL

View file

@ -1,23 +0,0 @@
[Secure-Send-binary-blob.any.html]
expected: TIMEOUT
[W3C WebSocket API - Send binary data on a Secure WebSocket - Blob - Connection should be opened]
expected: NOTRUN
[W3C WebSocket API - Send binary data on a Secure WebSocket - Blob - Message should be received]
expected: NOTRUN
[W3C WebSocket API - Send binary data on a Secure WebSocket - Blob - Connection should be closed]
expected: FAIL
[Secure-Send-binary-blob.any.worker.html]
expected: TIMEOUT
[W3C WebSocket API - Send binary data on a Secure WebSocket - Blob - Connection should be opened]
expected: NOTRUN
[W3C WebSocket API - Send binary data on a Secure WebSocket - Blob - Message should be received]
expected: NOTRUN
[W3C WebSocket API - Send binary data on a Secure WebSocket - Blob - Connection should be closed]
expected: FAIL

View file

@ -1,23 +0,0 @@
[Secure-Send-data.any.html]
expected: TIMEOUT
[W3C WebSocket API - Send data on a Secure WebSocket - Connection should be opened]
expected: NOTRUN
[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: FAIL
[Secure-Send-data.any.worker.html]
expected: TIMEOUT
[W3C WebSocket API - Send data on a Secure WebSocket - Connection should be opened]
expected: NOTRUN
[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: FAIL

View file

@ -1,23 +0,0 @@
[Secure-Send-null.any.worker.html]
expected: TIMEOUT
[W3C WebSocket API - Send null data on a Secure WebSocket - Connection should be opened]
expected: NOTRUN
[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: FAIL
[Secure-Send-null.any.html]
expected: TIMEOUT
[W3C WebSocket API - Send null data on a Secure WebSocket - Connection should be opened]
expected: NOTRUN
[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: FAIL

View file

@ -1,23 +0,0 @@
[Secure-Send-paired-surrogates.any.worker.html]
expected: TIMEOUT
[W3C WebSocket API - Send paired surrogates data on a Secure WebSocket - Connection should be opened]
expected: NOTRUN
[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: FAIL
[Secure-Send-paired-surrogates.any.html]
expected: TIMEOUT
[W3C WebSocket API - Send paired surrogates data on a Secure WebSocket - Connection should be opened]
expected: NOTRUN
[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: FAIL

View file

@ -1,23 +0,0 @@
[Secure-Send-unicode-data.any.worker.html]
expected: TIMEOUT
[W3C WebSocket API - Send unicode data on a Secure WebSocket - Connection should be opened]
expected: NOTRUN
[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: FAIL
[Secure-Send-unicode-data.any.html]
expected: TIMEOUT
[W3C WebSocket API - Send unicode data on a Secure WebSocket - Connection should be opened]
expected: NOTRUN
[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: FAIL

View file

@ -1,23 +0,0 @@
[Secure-Send-unpaired-surrogates.any.html]
expected: TIMEOUT
[W3C WebSocket API - Send unpaired surrogates on a Secure WebSocket - Connection should be opened]
expected: NOTRUN
[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: FAIL
[Secure-Send-unpaired-surrogates.any.worker.html]
expected: TIMEOUT
[W3C WebSocket API - Send unpaired surrogates on a Secure WebSocket - Connection should be opened]
expected: NOTRUN
[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: FAIL

View file

@ -1,8 +0,0 @@
[001.html?wss]
type: testharness
expected: TIMEOUT
[WebSockets: Send/Receive blob, blob size less than network array buffer]
expected: TIMEOUT
[001.html]

View file

@ -1,7 +0,0 @@
[002.html?wss]
type: testharness
[WebSockets: Send/Receive blob, blob size greater than network array buffer]
expected: TIMEOUT
[002.html]

View file

@ -1,7 +0,0 @@
[004.html?wss]
type: testharness
[WebSockets: Send/Receive ArrayBuffer, size greater than network array buffer]
expected: TIMEOUT
[004.html]

View file

@ -1,8 +0,0 @@
[005.html?wss]
type: testharness
expected: TIMEOUT
[WebSockets: Send/Receive ArrayBuffer, size less than network array buffer]
expected: TIMEOUT
[005.html]

View file

@ -1,17 +0,0 @@
[binaryType-wrong-value.any.html]
expected: TIMEOUT
[W3C WebSocket API - Create WebSocket - set binaryType to something other than blob or arraybuffer - SYNTAX_ERR is returned - Connection should be opened]
expected: NOTRUN
[W3C WebSocket API - Create WebSocket - set binaryType to something other than blob or arraybuffer - SYNTAX_ERR is returned - Connection should be closed]
expected: FAIL
[binaryType-wrong-value.any.worker.html]
expected: TIMEOUT
[W3C WebSocket API - Create WebSocket - set binaryType to something other than blob or arraybuffer - SYNTAX_ERR is returned - Connection should be opened]
expected: NOTRUN
[W3C WebSocket API - Create WebSocket - set binaryType to something other than blob or arraybuffer - SYNTAX_ERR is returned - Connection should be closed]
expected: FAIL

View file

@ -1,12 +1,6 @@
[bufferedAmount-unchanged-by-sync-xhr.any.html] [bufferedAmount-unchanged-by-sync-xhr.any.html]
[bufferedAmount should not be updated during a sync XHR]
expected: FAIL
[bufferedAmount-unchanged-by-sync-xhr.any.worker.html] [bufferedAmount-unchanged-by-sync-xhr.any.worker.html]
[bufferedAmount should not be updated during a sync XHR]
expected: FAIL
[bufferedAmount-unchanged-by-sync-xhr.any.sharedworker.html] [bufferedAmount-unchanged-by-sync-xhr.any.sharedworker.html]
[bufferedAmount-unchanged-by-sync-xhr] [bufferedAmount-unchanged-by-sync-xhr]

View file

@ -1,8 +0,0 @@
[002.html]
type: testharness
[002.html?wss]
type: testharness
[WebSockets: server sends closing handshake]
expected: FAIL

View file

@ -1,8 +0,0 @@
[003.html?wss]
type: testharness
[WebSockets: client sends closing handshake]
expected: FAIL
[003.html]
type: testharness

View file

@ -1,8 +0,0 @@
[004.html]
type: testharness
[004.html?wss]
type: testharness
[WebSockets: data after closing handshake]
expected: FAIL

View file

@ -1,8 +0,0 @@
[006.html]
type: testharness
[006.html?wss]
type: testharness
[WebSockets: converting first arguments]
expected: FAIL

View file

@ -1,8 +0,0 @@
[009.html?wss]
type: testharness
[WebSockets: protocol]
expected: FAIL
[009.html]
type: testharness

View file

@ -6,3 +6,6 @@
[011.html?wss] [011.html?wss]
type: testharness type: testharness
[WebSockets: protocol mismatch]
expected: FAIL

View file

@ -1,8 +0,0 @@
[018.html]
type: testharness
[018.html?wss]
type: testharness
[WebSockets: NULL char in url]
expected: FAIL

View file

@ -1,8 +0,0 @@
[019.html]
type: testharness
[019.html?wss]
type: testharness
[WebSockets: uppercase 'WS:']
expected: FAIL

View file

@ -1,8 +0,0 @@
[020.html]
type: testharness
[020.html?wss]
type: testharness
[WebSockets: uppercase host]
expected: FAIL

View file

@ -1,8 +0,0 @@
[022.html?wss]
type: testharness
[WebSockets: protocol array]
expected: FAIL
[022.html]
type: testharness

View file

@ -1,8 +0,0 @@
[001.html?wss]
type: testharness
[WebSockets: Cookie in request]
expected: FAIL
[001.html]
type: testharness

View file

@ -1,8 +0,0 @@
[002.html]
type: testharness
[002.html?wss]
type: testharness
[WebSockets: Set-Cookie in response]
expected: FAIL

View file

@ -1,8 +0,0 @@
[003.html]
type: testharness
[003.html?wss]
type: testharness
[WebSockets: sending HttpOnly cookies in ws request]
expected: FAIL

View file

@ -1,8 +0,0 @@
[004.html]
type: testharness
[004.html?wss]
type: testharness
[WebSockets: setting HttpOnly cookies in ws response, checking document.cookie]
expected: FAIL

View file

@ -4,6 +4,3 @@
[005.html?wss] [005.html?wss]
type: testharness type: testharness
[WebSockets: setting HttpOnly cookies in ws response, checking ws request]
expected: FAIL

View file

@ -1,17 +0,0 @@
[extended-payload-length.html]
type: testharness
[extended-payload-length.html?wss]
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

View file

@ -1,8 +0,0 @@
[clean-close.html?wss]
type: testharness
[WebSockets: wasClean, true]
expected: FAIL
[clean-close.html]
type: testharness

View file

@ -1,8 +0,0 @@
[bufferedAmount-arraybuffer.html?wss]
type: testharness
expected: TIMEOUT
[WebSockets: bufferedAmount for ArrayBuffer]
expected: TIMEOUT
[bufferedAmount-arraybuffer.html]

View file

@ -1,8 +0,0 @@
[bufferedAmount-blob.html?wss]
type: testharness
expected: TIMEOUT
[WebSockets: bufferedAmount for blob]
expected: TIMEOUT
[bufferedAmount-blob.html]

View file

@ -1,8 +0,0 @@
[bufferedAmount-getting.html?wss]
type: testharness
[WebSockets: bufferedAmount after send()ing]
expected: FAIL
[bufferedAmount-getting.html]
type: testharness

View file

@ -1,8 +0,0 @@
[bufferedAmount-large.html]
type: testharness
[bufferedAmount-large.html?wss]
type: testharness
[WebSockets: bufferedAmount for 65K data]
expected: TIMEOUT

View file

@ -1,9 +0,0 @@
[bufferedAmount-unicode.html]
type: testharness
[bufferedAmount-unicode.html?wss]
type: testharness
expected: TIMEOUT
[WebSockets: bufferedAmount for unicode data]
expected: TIMEOUT

View file

@ -1,8 +0,0 @@
[close-connecting.html]
type: testharness
[close-connecting.html?wss]
type: testharness
[WebSockets: close() when connecting]
expected: FAIL

View file

@ -1,8 +0,0 @@
[016.html]
type: testharness
[016.html?wss]
type: testharness
[WebSockets: addEventListener]
expected: FAIL

View file

@ -1,12 +0,0 @@
[018.html]
type: testharness
[018.html?wss]
type: testharness
expected: TIMEOUT
[open event]
expected: TIMEOUT
[message event]
expected: TIMEOUT

View file

@ -1,8 +0,0 @@
[006.html?wss]
type: testharness
[WebSockets: getting readyState in open]
expected: FAIL
[006.html]
type: testharness

View file

@ -1,8 +0,0 @@
[007.html?wss]
type: testharness
[WebSockets: getting readyState in closing]
expected: FAIL
[007.html]
type: testharness

View file

@ -1,8 +0,0 @@
[008.html?wss]
type: testharness
[WebSockets: getting readyState in closed]
expected: FAIL
[008.html]
type: testharness

View file

@ -1,9 +0,0 @@
[005.html]
type: testharness
[005.html?wss]
type: testharness
expected: TIMEOUT
[WebSockets: send() return value]
expected: TIMEOUT

View file

@ -1,9 +0,0 @@
[006.html]
type: testharness
[006.html?wss]
type: testharness
expected: TIMEOUT
[WebSockets: send() with unpaired surrogate when readyState is OPEN]
expected: TIMEOUT

View file

@ -1,8 +0,0 @@
[007.html?wss]
type: testharness
[WebSockets: close() followed by send()]
expected: FAIL
[007.html]
type: testharness

View file

@ -3,6 +3,4 @@
[008.html?wss] [008.html?wss]
type: testharness type: testharness
[WebSockets: send() in onclose]
expected: FAIL

View file

@ -1,8 +0,0 @@
[009.html]
type: testharness
[009.html?wss]
type: testharness
[WebSockets: send('')]
expected: FAIL

View file

@ -1,39 +0,0 @@
[010.html?wss]
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
[010.html]
type: testharness

View file

@ -1,8 +0,0 @@
[011.html]
type: testharness
[011.html?wss]
type: testharness
[WebSockets: sending non-ascii, combining chars and non-BMP]
expected: FAIL

View file

@ -1,8 +0,0 @@
[012.html]
type: testharness
[012.html?wss]
type: testharness
[WebSockets: sending null]
expected: FAIL

View file

@ -1,8 +0,0 @@
[001.html?wss]
type: testharness
[WebSockets: 20s inactivity after handshake]
expected: FAIL
[001.html]
type: testharness

View file

@ -1,8 +0,0 @@
[002.html]
type: testharness
[002.html?wss]
type: testharness
[WebSockets: valid handshake]
expected: FAIL

View file

@ -1,9 +0,0 @@
[005.html]
type: testharness
[005.html?wss]
type: testharness
expected: TIMEOUT
[WebSockets: proper first line]
expected: TIMEOUT