Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make websockets work in a worker scope #9521

Merged
merged 4 commits into from Feb 5, 2016
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Prev

Use a .worker.js test

  • Loading branch information
Manishearth committed Feb 4, 2016
commit 396533c47971d1fad1d38a5e14800b7c107e704e
"deleted": [],
"items": {
"testharness": {
"websockets/Send-data-worker.htm": [
"websockets/Send-data.worker.js": [
{
"path": "websockets/Send-data-worker.htm",
"url": "/websockets/Send-data-worker.htm"
"path": "websockets/Send-data.worker.js",

This comment has been minimized.

@Ms2ger

Ms2ger Feb 4, 2016

Contributor

I don't think this should be here.

r+ assuming you file a followup about checking the Origin header in workers.

"url": "/websockets/Send-data.worker"
}
]
}

This file was deleted.

This file was deleted.

@@ -0,0 +1,21 @@
importScripts("/resources/testharness.js");
importScripts('websocket.js?pipe=sub')

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")


ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.