Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(783)

Unified Diff: third_party/WebKit/LayoutTests/http/tests/security/lenient-this-issue569043.html

Issue 1667653002: V8-binding: Use v8::Template::SetNativeDataProperty without setter for [Replaceable]. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moved the [LenientThis] test to http/tests/. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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>

Powered by Google App Engine
This is Rietveld 408576698