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

Unified Diff: LayoutTests/fast/html/eventhandler-attribute-non-callable.html

Issue 1076783002: Support non-function object values assigned to EventHandler attributes (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: drop (now) pointless assert Created 5 years, 8 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: LayoutTests/fast/html/eventhandler-attribute-non-callable.html
diff --git a/LayoutTests/fast/html/eventhandler-attribute-non-callable.html b/LayoutTests/fast/html/eventhandler-attribute-non-callable.html
index 78ba7caf2e7699b55470007d04786c2c0c5fe31a..541fef525df527d0225a1ab4a8b32c33cb76b1af 100644
--- a/LayoutTests/fast/html/eventhandler-attribute-non-callable.html
+++ b/LayoutTests/fast/html/eventhandler-attribute-non-callable.html
@@ -33,10 +33,16 @@ shouldBe('callbackCount', '1');
var o = { handleEvent: callback };
shouldNotBe('div.onkeydown', 'null');
shouldNotThrow('div.onkeydown = o');
-shouldBeNull('div.onkeydown');
+shouldBe('div.onkeydown', 'o');
dispatchKeyEvent();
shouldBe('callbackCount', '1');
+// Test non-object assignment.
+shouldNotThrow('div.onkeydown = callback');
+shouldBe('div.onkeydown', 'callback');
+shouldNotThrow('div.onkeydown = "non-object"');
+shouldBeNull('div.onkeydown');
+
// Test null assignment.
shouldNotThrow('div.onkeydown = callback');
shouldBe('div.onkeydown', 'callback');

Powered by Google App Engine
This is Rietveld 408576698