https://github.com/web-platform-tests/wpt
Raw File
Tip revision: f313b142d12c079f80e1a91f83cf016501de3f3f authored by Emilio Cobos Álvarez on 11 April 2018, 14:14:39 UTC
[cssom] Add a test for mutation records with invalid values.
Tip revision: f313b14
Send-data.worker.js
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);

}, "W3C WebSocket API - Send data on a WebSocket in a Worker")


back to top