| OLD | NEW |
| (Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script src="/resources/testharness.js"></script> |
| 3 <script src="/resources/testharnessreport.js"></script> |
| 4 <body> |
| 5 <script> |
| 6 async_test(t => { |
| 7 var i = document.createElement('iframe'); |
| 8 i.setAttribute("sandbox", "allow-scripts"); |
| 9 i.setAttribute("src", "javascript:top.postMessage('fail', '*');"); |
| 10 window.addEventListener( |
| 11 "message", |
| 12 t.unreached_func("The sandboxed 'javascript:' URL should not execute
.")); |
| 13 |
| 14 document.body.appendChild(i); |
| 15 |
| 16 // TODO(mkwst): I would love a better test here, but I don't know how el
se to |
| 17 // verify that the script _doesn't_ execute. |
| 18 setTimeout(t.done.bind(t), 250); |
| 19 }, "JavaScript URLs in sandboxed iframes should not execute, as the origin i
s distinct from its opener."); |
| 20 </script> |
| OLD | NEW |