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

Unified Diff: third_party/WebKit/LayoutTests/fast/dom/Window/lenient-this-issue569043.html

Issue 1539813002: bindings: Fixes [LenientThis] to refer to the correct object. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2564
Patch Set: Created 5 years 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/dom/Window/lenient-this-issue569043-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/dom/Window/lenient-this-issue569043.html
diff --git a/third_party/WebKit/LayoutTests/fast/dom/Window/lenient-this-issue569043.html b/third_party/WebKit/LayoutTests/fast/dom/Window/lenient-this-issue569043.html
new file mode 100644
index 0000000000000000000000000000000000000000..a7329a71ae04168a45d856fe7c4159b2feefd1db
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/dom/Window/lenient-this-issue569043.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html>
+<iframe name="frame1"></iframe>
+<script src="../../../resources/js-test.js"></script>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+
+description("Test that Issue 569043 has been fixed and [LenientThis] and 'super' are working as expected.");
+if (window.testRunner) {
+ testRunner.dumpAsText();
+}
+
+class A {
+ inject() {
+ super.onmousedown = Function; // not [LenientThis]
+ super.onmouseenter = Function; // [LenientThis]
+ }
+}
+
+A.prototype.__proto__ = window;
+
+var a = new A();
+
+a.inject.call(frame1)
+
+shouldBe("window.onmousedown", "Function");
+shouldBe("window.onmouseenter", "Function");
+shouldBeNull("frame1.onmousedown");
+shouldBeNull("frame1.onmouseenter");
+</script>
+</html>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/dom/Window/lenient-this-issue569043-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698