mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1130678 - Fix messaging ordering issue in broadcastchannel tests, r=mchang
This commit is contained in:
parent
cf436b41a2
commit
9563da72b3
@ -2,8 +2,8 @@ onconnect = function(evt) {
|
||||
evt.ports[0].onmessage = function(evt) {
|
||||
var bc = new BroadcastChannel('foobar');
|
||||
bc.addEventListener('message', function(event) {
|
||||
evt.target.postMessage(event.data == "hello world from the window" ? "OK" : "KO");
|
||||
bc.postMessage("hello world from the worker");
|
||||
bc.postMessage(event.data == "hello world from the window" ?
|
||||
"hello world from the worker" : "KO");
|
||||
bc.close();
|
||||
}, false);
|
||||
|
||||
|
@ -29,8 +29,6 @@ function runTests() {
|
||||
if (event.data == "READY") {
|
||||
ok(true, "SharedWorker is ready!");
|
||||
bc.postMessage('hello world from the window');
|
||||
} else if(event.data == "OK") {
|
||||
ok(true, "SharedWorker has received the message");
|
||||
} else {
|
||||
ok(false, "Something wrong happened");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user