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 t = async_test("Test that cross-origin access on a detached window throws a
SecurityError."); |
| 8 window.onload = t.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 should throw"); |
| 16 test(function() { |
| 17 assert_throws("SecurityError", function () { |
| 18 Object.getOwnPropertyDescriptor(window, "document").get.call(detachedWindo
w); |
| 19 }); |
| 20 }, "attribute access with detached window receiver should throw"); |
| 21 t.done(); |
| 22 }); |
| 23 </script> |
| 24 </head> |
| 25 <body> |
| 26 <iframe src="data:text/html,"></iframe> |
| 27 </body> |
| 28 </html> |
OLD | NEW |