diff --git a/dom/workers/URL.cpp b/dom/workers/URL.cpp index 2bb0f2802c47..c1220fbab2c4 100644 --- a/dom/workers/URL.cpp +++ b/dom/workers/URL.cpp @@ -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(); } diff --git a/dom/workers/test/test_url.html b/dom/workers/test/test_url.html index 2916a094d55a..0ce5976c2a3d 100644 --- a/dom/workers/test/test_url.html +++ b/dom/workers/test/test_url.html @@ -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(); diff --git a/dom/workers/test/url_worker.js b/dom/workers/test/url_worker.js index 4d8c84fc610c..0c7c2d8b930d 100644 --- a/dom/workers/test/url_worker.js +++ b/dom/workers/test/url_worker.js @@ -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)) {