2 <script src=
"../../resources/js-test.js"></script>
3 <script src=
"resources/worker-create-common.js"></script>
6 var jsTestIsAsync
= true;
8 description('This tests that setting the proto of a built in constructor is not reset');
10 var worker
= createWorker();
11 worker
.postMessage("eval proto = new Number(42)");
12 worker
.postMessage("eval Object.getPrototypeOf(WorkerLocation)");
13 worker
.postMessage("eval WorkerLocation.__proto__ = proto");
14 worker
.postMessage("eval Object.getPrototypeOf(WorkerLocation)");
15 worker
.postMessage("eval DONE");
17 worker
.onmessage = function(evt
) {
18 if (!/DONE/.test(evt
.data
))
19 debug(evt
.data
.replace(new RegExp("/.*LayoutTests"), "<...>"));