Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE html> | |
|
Nate Chapin
2015/03/04 17:44:55
I don't see any expected results for this new test
| |
| 2 <html> | |
| 3 <head> | |
| 4 <meta http-equiv="Content-Security-Policy" content="sandbox allow-scripts al low-popups"> | |
| 5 <script src="/resources/testharness.js"></script> | |
| 6 <script src="/resources/testharnessreport.js"></script> | |
| 7 </head> | |
| 8 <body> | |
| 9 <a target='_blank' href='/security/resources/post-origin-to-opener.html'></a > | |
| 10 | |
| 11 <script> | |
| 12 if (window.testRunner) { | |
| 13 testRunner.setCanOpenWindows(); | |
| 14 testRunner.setCloseRemainingWindowsWhenComplete(true); | |
| 15 } | |
| 16 | |
| 17 var test = async_test("Testing sandbox inherited via target='_blank'"); | |
| 18 | |
| 19 window.addEventListener("message", test.step_func(function (e) { | |
| 20 assert_equals(document.origin, 'null'); | |
| 21 assert_equals(e.data.origin, 'null'); | |
| 22 test.done(); | |
| 23 })); | |
| 24 | |
| 25 test.step(function () { | |
| 26 var link = document.querySelector('a'); | |
| 27 if (window.eventSender) { | |
| 28 eventSender.mouseMoveTo(link.offsetLeft + 2, link.offsetTop + 2) ; | |
| 29 eventSender.mouseDown(); | |
| 30 eventSender.mouseUp(); | |
| 31 } | |
| 32 }); | |
| 33 | |
| 34 </script> | |
| 35 </body> | |
| 36 </html> | |
| OLD | NEW |