Bug 1134224 - onerror for test_bug1132395.html, r=ehsan

This commit is contained in:
Andrea Marchesini 2015-06-05 11:15:17 +01:00
Родитель b65cba6328
Коммит 6b856c6ad5
1 изменённых файлов: 5 добавлений и 1 удалений

Просмотреть файл

@ -16,7 +16,6 @@
// 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');
@ -26,6 +25,11 @@ SpecialPowers.pushPrefEnv({ set: [["dom.workers.sharedWorkers.enabled", true]] }
SimpleTest.finish();
}
sw.onerror = function(event) {
ok(false, "Failed to create a ServiceWorker");
SimpleTest.finish();
}
info("sw.postmessage called");
sw.port.postMessage('go');
});