Backed out changeset d8a89848224b (bug 890928) for B2G mochitest-9 failures.

This commit is contained in:
Ryan VanderMeulen 2013-07-15 13:19:41 -04:00
parent 140c79151c
commit 0abf13413c
3 changed files with 5 additions and 29 deletions

View File

@ -144,7 +144,7 @@ public:
principal = doc->NodePrincipal();
} else {
MOZ_ASSERT_IF(!mWorkerPrivate->GetParent(), mWorkerPrivate->IsChromeWorker());
MOZ_ASSERT(mWorkerPrivate->IsChromeWorker());
principal = mWorkerPrivate->GetPrincipal();
}
@ -199,7 +199,7 @@ public:
principal = doc->NodePrincipal();
} else {
MOZ_ASSERT_IF(!mWorkerPrivate->GetParent(), mWorkerPrivate->IsChromeWorker());
MOZ_ASSERT(mWorkerPrivate->IsChromeWorker());
principal = mWorkerPrivate->GetPrincipal();
}

View File

@ -21,7 +21,7 @@
is(event.target, worker);
if (event.data.type == 'finish') {
runTest();
SimpleTest.finish();
} else if (event.data.type == 'status') {
ok(event.data.status, event.data.msg);
} else if (event.data.type == 'url') {
@ -42,22 +42,8 @@
SimpleTest.finish();
};
var tests = [
function() { worker.postMessage(0); },
function() { worker.postMessage(4); }
];
worker.postMessage(true);
function runTest() {
if (!tests.length) {
SimpleTest.finish();
return;
}
var test = tests.shift();
test();
}
runTest();
SimpleTest.waitForExplicitFinish();
</script>

View File

@ -1,14 +1,4 @@
onmessage = function(event) {
if (event.data != 0) {
var worker = new Worker('url_worker.js');
worker.onmessage = function(event) {
postMessage(event.data);
}
worker.postMessage(event.data - 1);
return;
}
onmessage = function() {
status = false;
try {
if ((URL instanceof Object)) {