| 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 a31e4945b982104983ef129c81dbfc0322bd27b7..1a989429f67e867ea4a6e32cacb13c1759a6f178 100644
|
| --- a/LayoutTests/fast/dom/idl-dictionary-unittest.html
|
| +++ b/LayoutTests/fast/dom/idl-dictionary-unittest.html
|
| @@ -243,7 +243,7 @@ if (window.internals && internals.dictionaryTest) {
|
| debug('');
|
|
|
| debug('Test for derived dictionary');
|
| - dictionaryTest.setDerived({});
|
| + dictionaryTest.setDerived({ requiredBooleanMember: true });
|
| derived = dictionaryTest.getDerived();
|
| shouldBeUndefined('derived.longMember');
|
| shouldBe('derived.longMemberWithDefault', '42');
|
| @@ -264,6 +264,7 @@ if (window.internals && internals.dictionaryTest) {
|
| shouldBeNull('derived.objectOrNullMemberWithDefault');
|
| shouldBeUndefined('derived.derivedStringMember');
|
| shouldBeEqualToString('derived.derivedStringMemberWithDefault', 'derivedDefaultStringValue');
|
| + shouldBeTrue('derived.requiredBooleanMember');
|
| debug('');
|
|
|
| dictionaryTest.setDerived({
|
| @@ -272,6 +273,7 @@ if (window.internals && internals.dictionaryTest) {
|
| derivedStringMember: 'modifiedString2',
|
| derivedStringMemberWithDefault: 'modifiedString3',
|
| invalidMember: 'shouldNotBeSet',
|
| + requiredBooleanMember: false,
|
| });
|
| derived = dictionaryTest.getDerived();
|
| shouldBe('derived.longMember', '1');
|
| @@ -279,8 +281,11 @@ if (window.internals && internals.dictionaryTest) {
|
| shouldBeEqualToString('derived.derivedStringMember', 'modifiedString2');
|
| shouldBeEqualToString('derived.derivedStringMemberWithDefault', 'modifiedString3');
|
| shouldBeUndefined('derived.invalidMember');
|
| -
|
| + shouldBeFalse('derived.requiredBooleanMember');
|
| debug('');
|
| - shouldThrow("dictionaryTest.setDerived({objectMember: 42})");
|
| +
|
| + debug('Test for passing invalid values as derived dictionary');
|
| + shouldThrow("dictionaryTest.setDerived({objectMember: 42, requiredBooleanMember: false })");
|
| + shouldThrow("dictionaryTest.setDerived({})"); // Missing required member.
|
| }
|
| </script>
|
|
|