mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +00:00
Bug 849094: Tests. r=bent
This commit is contained in:
parent
2ade1f9456
commit
157ed8f9d7
@ -4,6 +4,13 @@
|
||||
*/
|
||||
onclose = function() {
|
||||
postMessage("closed");
|
||||
// Try to open a new worker.
|
||||
try {
|
||||
var worker = new Worker("close_worker.js");
|
||||
throw new Error("We shouldn't get here!");
|
||||
} catch (e) {
|
||||
// pass
|
||||
}
|
||||
};
|
||||
|
||||
setTimeout(function () {
|
||||
|
@ -1,5 +1,9 @@
|
||||
/**
|
||||
* Any copyright is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/
|
||||
*/
|
||||
msg = null;
|
||||
var errors = 6;
|
||||
var errors = 5;
|
||||
|
||||
onerror = function(event) {
|
||||
ok(true, msg);
|
||||
@ -35,7 +39,12 @@ worker.onmessage = function(event) {
|
||||
}
|
||||
|
||||
msg = "Loading data:something";
|
||||
worker = new Worker("data:application/javascript;base64,ZHVtcCgnaGVsbG8gd29ybGQnKQo=");
|
||||
worker = new Worker("javascript:dump(123);");
|
||||
try {
|
||||
worker = new Worker("data:application/javascript;base64,ZHVtcCgnaGVsbG8gd29ybGQnKQo=");
|
||||
ok(false, "Should have thrown!");
|
||||
} catch (e) {
|
||||
ok(true, "Threw as expected.");
|
||||
}
|
||||
|
||||
worker = new Worker("javascript:dump(123);");
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
Loading…
Reference in New Issue
Block a user