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(''); |