Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / frames / sandboxed-iframe-workers.html
blobedb7a2cc397e86629bc81bf5497b766095fefcba
1 <!DOCTYPE html>
2 <html>
3 <head>
4 </head>
5 <body>
6 <script>
7 if (window.testRunner) {
8 testRunner.dumpAsText();
9 testRunner.dumpChildFramesAsText();
11 </script>
12 <p>This test verifies that shared workers are not available in a sandboxed iframe.</p>
13 <iframe sandbox="allow-scripts" srcdoc="
14 <script>
15 try {
16 var s = new SharedWorker('http://127.0.0.1:8080/fast/frames/resources/sandboxed-iframe-workers.js');
17 console.log('FAIL: SharedWorker creation should have thrown an exception.');
18 } catch (e) {
19 console.log('PASS: SharedWorker creation threw \'' + e + '\'.');
21 </script>
22 "></iframe>
23 </body>
24 </head>
25 </html>