mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1134224 - More test for test_bug1132395.html, r=ehsan
This commit is contained in:
parent
c25fcf5d9b
commit
b3bf0365e0
@ -1,7 +1,12 @@
|
||||
dump("SW created\n");
|
||||
onconnect = function(evt) {
|
||||
dump("SW onconnect\n");
|
||||
evt.ports[0].onmessage = function(e) {
|
||||
dump("SW onmessage\n");
|
||||
var blob = new Blob(['123'], { type: 'text/plain' });
|
||||
dump("SW blob created\n");
|
||||
var url = URL.createObjectURL(blob);
|
||||
dump("SW url created: " + url + "\n");
|
||||
evt.ports[0].postMessage('alive \\o/');
|
||||
};
|
||||
}
|
||||
|
@ -13,13 +13,20 @@
|
||||
|
||||
<script class="testbody" type="text/javascript">
|
||||
|
||||
// This test is full of dummy debug messages. This is because I need to follow
|
||||
// an hard-to-reproduce timeout failure.
|
||||
|
||||
info("test started");
|
||||
SpecialPowers.pushPrefEnv({ set: [["dom.workers.sharedWorkers.enabled", true]] }, function() {
|
||||
info("test started");
|
||||
var sw = new SharedWorker('bug1132395_sharedWorker.js');
|
||||
sw.port.onmessage = function(event) {
|
||||
info("sw.onmessage received");
|
||||
ok(true, "We didn't crash.");
|
||||
SimpleTest.finish();
|
||||
}
|
||||
|
||||
info("sw.postmessage called");
|
||||
sw.port.postMessage('go');
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user