| Index: third_party/WebKit/LayoutTests/http/tests/security/lenient-this-issue569043.html
|
| diff --git a/third_party/WebKit/LayoutTests/http/tests/security/lenient-this-issue569043.html b/third_party/WebKit/LayoutTests/http/tests/security/lenient-this-issue569043.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..8febbebb40b0f2c06697521909bec589fda70e03
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/http/tests/security/lenient-this-issue569043.html
|
| @@ -0,0 +1,29 @@
|
| +<!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>
|
|
|