https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 7d5f042f7b7a4c0004679b08ec3f7ecab26fb620 authored by Simon Pieters on 28 August 2018, 10:14:54 UTC
HTML: test interaction of floating legend and flexbox/grid
Tip revision: 7d5f042
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