Chromium Code Reviews| 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"'); |
|
haraken
2014/08/26 04:00:40
shouldBeEqualToString
bashi
2014/08/27 05:06:31
Done.
|
| + shouldBeNull('dict.booleanOrNullMember'); |
| + |
| + dictionaryTest.set({longMember: 3, stringMember: 'modifiedString', |
| + stringSequenceMember: ['foo', 'bar', 'baz'], |
| + invalidMember: 'invalid'}); |
|
haraken
2014/08/26 04:00:40
I want to add more test cases about null, undefine
bashi
2014/08/27 05:06:31
Partially done. Not all tests passed and it's not
|
| + dict = dictionaryTest.get(); |
| + shouldBe('dict.longMember', '3'); |
| + shouldBe('dict.stringMember', '"modifiedString"'); |
|
haraken
2014/08/26 04:00:40
shouldBeEqualToString
bashi
2014/08/27 05:06:31
Done.
|
| + shouldBe('dict.stringSequenceMember', '["foo", "bar", "baz"]'); |
| + shouldBeUndefined('dict.invalidMember'); |
| +} |
| +</script> |