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

Unified Diff: LayoutTests/fast/dom/idl-dictionary-unittest.html

Issue 767313003: IDL dictionary: Throw a TypeError when an interface member conversion fails (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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
Index: LayoutTests/fast/dom/idl-dictionary-unittest.html
diff --git a/LayoutTests/fast/dom/idl-dictionary-unittest.html b/LayoutTests/fast/dom/idl-dictionary-unittest.html
index d855f128c0fd279aaac7f1ec1d8225a1767d2b5f..66829caac0c02ff7e4ff9c22615868453a731f0c 100644
--- a/LayoutTests/fast/dom/idl-dictionary-unittest.html
+++ b/LayoutTests/fast/dom/idl-dictionary-unittest.html
@@ -174,6 +174,13 @@ if (window.internals && internals.dictionaryTest) {
shouldThrow("dictionaryTest.set({objectMember: 'invalid'})");
debug('');
+ debug('Test for setting invalid Element value');
+ shouldThrow("dictionaryTest.set({elementMember: 42})");
+ shouldThrow("dictionaryTest.set({elementMember: testObject1})");
+ shouldThrow("dictionaryTest.set({elementMember: []})");
+ shouldThrow("dictionaryTest.set({elementMember: document})");
+ debug('');
+
debug('Test for passing invalid dictionary values');
shouldThrow("dictionaryTest.set(42)");
shouldThrow("dictionaryTest.set('string')");

Powered by Google App Engine
This is Rietveld 408576698