blob: 46ee891a4ccba029ff3997561d272187724183c9 [file] [log] [blame]
<!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 [LegacyLenientThis]
assert_unreached("Accessing to onmousedown on a cross-origin window should throw.");
} catch (e) {}
try {
super.onmouseenter = Function; // [LegacyLenientThis]
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 [LegacyLenientThis].");
</script>
</html>