2 Any copyright is dedicated to the Public Domain.
3 http://creativecommons.org/publicdomain/zero/1.0/
7 function ok(cond
, msg
) {
8 window
.parent
.postMessage({status
: "ok", data
: cond
, msg
}, "*");
11 window
.parent
.postMessage({status
: "done"}, "*");
14 function testSharedWorker() {
15 var sw
= new SharedWorker("importForeignScripts_worker.js");
16 sw
.port
.onmessage = function(e
) {
17 if (e
.data
== "finish") {
21 ok(e
.data
=== "good", "mixed content for shared workers is correctly blocked");
24 sw
.onerror = function() {
25 ok(false, "Error on shared worker ");
28 sw
.port
.postMessage("start");
31 var worker
= new Worker("importForeignScripts_worker.js");
33 worker
.onmessage = function(e
) {
34 if (e
.data
== "finish") {
38 ok(e
.data
=== "good", "mixed content is correctly blocked");
41 worker
.onerror = function() {
42 ok(false, "Error on worker");
45 worker
.postMessage("start");