mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-11-09 12:51:09 +02:00
Automatic update from web-platform-testsRemove the "W3C WebSocket API" prefix from websockets/ tests (#13478) This prefix doesn't add any useful information, and isn't used in all tests in this directory. Noticed because of the screen real estate it takes up in a view like this: https://wpt.fyi/results/websockets/Send-binary-65K-arraybuffer.any.html In the directory, this command was run, on macOS: git grep -lF 'W3C WebSocket API - ' | xargs sed -i '' 's/W3C WebSocket API - //g' -- wpt-commits: 1e747acc90ecdbd23ef3348a144b77696cced55b wpt-pr: 13478
21 lines
473 B
JavaScript
21 lines
473 B
JavaScript
importScripts("/resources/testharness.js");
|
|
importScripts('websocket.sub.js')
|
|
|
|
var data = "test data";
|
|
|
|
async_test(function(t) {
|
|
|
|
var wsocket = CreateWebSocket(false, false, false);
|
|
|
|
wsocket.addEventListener('open', function (e) {
|
|
wsocket.send(data)
|
|
}, true)
|
|
|
|
wsocket.addEventListener('message', t.step_func_done(function(e) {
|
|
assert_equals(e.data, data);
|
|
done();
|
|
}), true);
|
|
|
|
}, "Send data on a WebSocket in a Worker")
|
|
|
|
|