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

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

Issue 966643002: Add [TypeChecking=Unrestricted] to InternalDictionary (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fix test expectations Created 5 years, 10 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
« no previous file with comments | « no previous file | LayoutTests/fast/dom/idl-dictionary-unittest-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 b6e6d8d3e146bfef1f592488822c84c281bc82bd..a31e4945b982104983ef129c81dbfc0322bd27b7 100644
--- a/LayoutTests/fast/dom/idl-dictionary-unittest.html
+++ b/LayoutTests/fast/dom/idl-dictionary-unittest.html
@@ -18,6 +18,7 @@ if (window.internals && internals.dictionaryTest) {
shouldBeNull('dict.longOrNullMemberWithDefault');
shouldBeUndefined('dict.booleanMember');
shouldBeUndefined('dict.doubleMember');
+ shouldBeUndefined('dict.unrestrictedDoubleMember');
shouldBeUndefined('dict.stringMember');
shouldBeEqualToString('dict.stringMemberWithDefault', 'defaultStringValue');
shouldBeUndefined('dict.byteStringMember');
@@ -44,6 +45,7 @@ if (window.internals && internals.dictionaryTest) {
shouldBeNull('dict.longOrNullMemberWithDefault');
shouldBeUndefined('dict.booleanMember');
shouldBeUndefined('dict.doubleMember');
+ shouldBeUndefined('dict.unrestrictedDoubleMember');
shouldBeUndefined('dict.stringMember');
shouldBeUndefined('dict.byteStringMember');
shouldBeUndefined('dict.usvStringMember');
@@ -71,6 +73,7 @@ if (window.internals && internals.dictionaryTest) {
usvStringMember: '!@#123ABCabc\xA0\uD800\uDC00',
booleanMember: true,
doubleMember: 3.14,
+ unrestrictedDoubleMember: NaN,
stringSequenceMember: ['foo', 'bar', 'baz'],
stringSequenceOrNullMember: [],
elementMember: element1,
@@ -94,6 +97,7 @@ if (window.internals && internals.dictionaryTest) {
shouldBeEqualToString('dict.usvStringMember', '!@#123ABCabc\xA0\uD800\uDC00');
shouldBeTrue('dict.booleanMember');
shouldBe('dict.doubleMember', '3.14');
+ shouldBe('dict.unrestrictedDoubleMember', 'NaN');
shouldBe('dict.stringSequenceMember', '["foo", "bar", "baz"]');
shouldBe('dict.stringSequenceOrNullMember', '[]');
shouldBe('dict.elementMember', 'element1');
@@ -160,6 +164,13 @@ if (window.internals && internals.dictionaryTest) {
shouldBeUndefined('dict.invalidMember');
debug('');
+ debug('Test for setting invalid double value');
+ shouldThrow("dictionaryTest.set({doubleMember: NaN})");
+ shouldThrow("dictionaryTest.set({doubleMember: Infinity})");
+ shouldThrow("dictionaryTest.set({doubleMember: -Infinity})");
+ shouldThrow("dictionaryTest.set({doubleMember: 'invalid'})");
+ debug('');
+
debug('Test for setting invalid ByteString value');
shouldThrow("dictionaryTest.set({byteStringMember: '\u0100'})");
debug('');
« no previous file with comments | « no previous file | LayoutTests/fast/dom/idl-dictionary-unittest-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698