ServiceWorkerGlobalScope prototype chain should be immutable
[WebKit-https.git] / LayoutTests / fast / workers / DedicatedWorkerGlobalScope-immutable-prototype.html
1 <!DOCTYPE html>
2 <script src="../../resources/js-test-pre.js"></script>
3 <script src="resources/worker-create-common.js"></script>
4 <script>
5
6 var jsTestIsAsync = true;
7
8 description('Tests that DedicatedWorkerGlobalScope\'s prototype is immutable');
9
10 var worker = createWorker();
11 worker.postMessage("eval Object.setPrototypeOf(self, { })");
12 worker.postMessage("eval DONE");
13
14 worker.onmessage = function(evt) {
15     if (!/DONE/.test(evt.data))
16         debug(evt.data.replace(new RegExp("/.*LayoutTests"), "<...>"));
17     else
18         finishJSTest();
19 };
20
21 </script>
22 <script src="../../resources/js-test-post.js"></script>