blob: 73f4def48459205556c8f4a2979f9313100804b6 [file] [log] [blame]
<!DOCTYPE html>
<script src="../../resources/js-test-pre.js"></script>
<script src="resources/worker-create-common.js"></script>
<script>
var jsTestIsAsync = true;
description('This tests that setting the proto of a built in constructor is not reset');
var worker = createWorker();
worker.postMessage("eval proto = new Number(42)");
worker.postMessage("eval Object.getPrototypeOf(WorkerLocation)");
worker.postMessage("eval WorkerLocation.__proto__ = proto");
worker.postMessage("eval Object.getPrototypeOf(WorkerLocation)");
worker.postMessage("eval DONE");
worker.onmessage = function(evt) {
if (!/DONE/.test(evt.data))
debug(evt.data.replace(new RegExp("/.*LayoutTests"), "<...>"));
else
finishJSTest();
};
</script>
<script src="../../resources/js-test-post.js"></script>