mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1134224 - test_bug1132395.html must wait until the port is actually available before sending messages, r=ehsan
This commit is contained in:
parent
46995e9f97
commit
0b8961ab7c
@ -1,5 +1,7 @@
|
||||
onconnect = function(evt) {
|
||||
var blob = new Blob(['123'], { type: 'text/plain' });
|
||||
var url = URL.createObjectURL(blob);
|
||||
evt.ports[0].postMessage('alive \\o/');
|
||||
evt.ports[0].onmessage = function(e) {
|
||||
var blob = new Blob(['123'], { type: 'text/plain' });
|
||||
var url = URL.createObjectURL(blob);
|
||||
evt.ports[0].postMessage('alive \\o/');
|
||||
};
|
||||
}
|
||||
|
@ -16,9 +16,11 @@
|
||||
SpecialPowers.pushPrefEnv({ set: [["dom.workers.sharedWorkers.enabled", true]] }, function() {
|
||||
var sw = new SharedWorker('bug1132395_sharedWorker.js');
|
||||
sw.port.onmessage = function(event) {
|
||||
ok(true, "We didn't crash.");
|
||||
ok(true, "We didn't crash.");
|
||||
SimpleTest.finish();
|
||||
}
|
||||
|
||||
sw.port.postMessage('go');
|
||||
});
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
Loading…
Reference in New Issue
Block a user