| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 </head> | 4 </head> |
| 5 <body> | 5 <body> |
| 6 <script> | 6 <script> |
| 7 if (window.testRunner) { | 7 if (window.testRunner) { |
| 8 testRunner.dumpAsText(); | 8 testRunner.dumpAsText(); |
| 9 testRunner.dumpChildFramesAsText(); | 9 testRunner.dumpChildFramesAsText(); |
| 10 } | 10 } |
| 11 </script> | 11 </script> |
| 12 <p>This test verifies that shared workers are not available in a sandboxed i
frame.</p> | 12 <p>This test verifies that shared workers are not available in a sandboxed i
frame.</p> |
| 13 <iframe sandbox="allow-scripts" srcdoc=" | 13 <iframe sandbox="allow-scripts" srcdoc=" |
| 14 <script> | 14 <script> |
| 15 try { | 15 try { |
| 16 var s = new SharedWorker('http://127.0.0.1:8080/fast/frames/reso
urces/sandboxed-iframe-workers.js'); | 16 var s = new SharedWorker('http://127.0.0.1:8080/fast/frames/reso
urces/sandboxed-iframe-workers.js'); |
| 17 alert('FAIL: SharedWorker creation should have thrown an excepti
on.'); | 17 console.log('FAIL: SharedWorker creation should have thrown an e
xception.'); |
| 18 } catch (e) { | 18 } catch (e) { |
| 19 alert('PASS: SharedWorker creation threw \'' + e + '\'.'); | 19 console.log('PASS: SharedWorker creation threw \'' + e + '\'.'); |
| 20 } | 20 } |
| 21 </script> | 21 </script> |
| 22 "></iframe> | 22 "></iframe> |
| 23 </body> | 23 </body> |
| 24 </head> | 24 </head> |
| 25 </html> | 25 </html> |
| OLD | NEW |