| <!DOCTYPE html> |
| <html> |
| <iframe name="frame1" src="http://localhost:8000/resources/dummy.html"></iframe> |
| <script src="/resources/testharness.js"></script> |
| <script src="/resources/testharnessreport.js"></script> |
| <script> |
| "use strict"; |
| |
| test(function() { |
| class A { |
| inject() { |
| try { |
| super.onmousedown = Function; // not [LenientThis] |
| assert_unreached("Accessing to onmousedown on a cross-origin window should throw."); |
| } catch (e) {} |
| try { |
| super.onmouseenter = Function; // [LenientThis] |
| assert_unreached("Accessing to onmouseenter on a cross-origin window should throw."); |
| } catch (e) {} |
| } |
| } |
| |
| A.prototype.__proto__ = window; |
| |
| var a = new A(); |
| a.inject.call(frame1); // Call with a cross-origin window. |
| }, "Accessing to a cross-origin window should throw regardless of [LenientThis]."); |
| </script> |
| </html> |