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 |
new file mode 100644 |
index 0000000000000000000000000000000000000000..9c525d58ece6830115f6d2c222d676cbc0054483 |
--- /dev/null |
+++ b/LayoutTests/fast/dom/idl-dictionary-unittest.html |
@@ -0,0 +1,24 @@ |
+<!DOCTYPE html> |
+<script src="../../resources/js-test.js"></script> |
+<script> |
+description('IDL dictionary unittest'); |
+ |
+if (window.internals && internals.dictionaryTest) { |
+ var dictionaryTest = window.internals.dictionaryTest(); |
+ |
+ dictionaryTest.set({}); |
+ dict = dictionaryTest.get(); |
+ shouldBeUndefined('dict.longMember'); |
+ shouldBe('dict.stringMember', '"defaultStringValue"'); |
+ shouldBeNull('dict.booleanOrNullMember'); |
+ |
+ dictionaryTest.set({longMember: 3, stringMember: 'modifiedString', |
+ stringSequenceMember: ['foo', 'bar', 'baz'], |
+ invalidMember: 'invalid'}); |
+ dict = dictionaryTest.get(); |
+ shouldBe('dict.longMember', '3'); |
+ shouldBe('dict.stringMember', '"modifiedString"'); |
+ shouldBe('dict.stringSequenceMember', '["foo", "bar", "baz"]'); |
+ shouldBeUndefined('dict.invalidMember'); |
+} |
+</script> |