Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE html> | |
| 2 <html> | |
| 3 <head> | |
| 4 <script src="/resources/testharness.js"></script> | |
| 5 <script src="/resources/testharnessreport.js"></script> | |
| 6 <script> | |
| 7 var accessTest = async_test("Test cross-origin access on a detached window"); | |
| 8 window.onload = accessTest.step_func(function () { | |
| 9 var detachedWindow = window[0]; | |
| 10 document.querySelector('iframe').remove(); | |
| 11 test(function() { | |
| 12 assert_throws("SecurityError", function () { | |
| 13 window.requestAnimationFrame.call(detachedWindow, function () { }); | |
| 14 }); | |
| 15 }, "method call with detached window receiver"); | |
| 16 test(function() { | |
|
dcheng
2017/02/19 09:05:51
This is a bit unsatisfactory, but otherwise, the t
| |
| 17 assert_throws("SecurityError", function () { | |
| 18 Object.getOwnPropertyDescriptor(window, "document").get.call(detachedWindo w); | |
| 19 }); | |
| 20 }, "attribute access with detached window receiver"); | |
| 21 accessTest.done(); | |
| 22 }); | |
| 23 </script> | |
| 24 </head> | |
| 25 <body> | |
| 26 <iframe src="http://localhost:8000/http/tests/security/resources/blank.html"></i frame> | |
| 27 </body> | |
| 28 </html> | |
| OLD | NEW |