| OLD | NEW |
| (Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <iframe name="frame1" src="http://localhost:8000/resources/dummy.html"></iframe> |
| 4 <script src="/resources/testharness.js"></script> |
| 5 <script src="/resources/testharnessreport.js"></script> |
| 6 <script> |
| 7 "use strict"; |
| 8 |
| 9 test(function() { |
| 10 class A { |
| 11 inject() { |
| 12 try { |
| 13 super.onmousedown = Function; // not [LenientThis] |
| 14 assert_unreached("Accessing to onmousedown on a cross-origin window shou
ld throw."); |
| 15 } catch (e) {} |
| 16 try { |
| 17 super.onmouseenter = Function; // [LenientThis] |
| 18 assert_unreached("Accessing to onmouseenter on a cross-origin window sho
uld throw."); |
| 19 } catch (e) {} |
| 20 } |
| 21 } |
| 22 |
| 23 A.prototype.__proto__ = window; |
| 24 |
| 25 var a = new A(); |
| 26 a.inject.call(frame1); // Call with a cross-origin window. |
| 27 }, "Accessing to a cross-origin window should throw regardless of [LenientThis].
"); |
| 28 </script> |
| 29 </html> |
| OLD | NEW |