chromium/third_party/blink/web_tests/bindings/idl-dictionary-unittest-expected.txt

IDL dictionary unittest

On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".

Test for setting an empty dictionary
PASS dict.longMember is undefined.
PASS dict.longMemberWithDefault is 42
PASS dict.longOrNullMember is undefined.
PASS dict.longOrNullMemberWithDefault is null
PASS dict.booleanMember is undefined.
PASS dict.doubleMember is undefined.
PASS dict.unrestrictedDoubleMember is undefined.
PASS dict.stringMember is undefined.
PASS dict.stringMemberWithDefault is "defaultStringValue"
PASS dict.byteStringMember is undefined.
PASS dict.usvStringMember is undefined.
PASS dict.stringSequenceMember is undefined.
PASS dict.stringSequenceMemberWithDefault is []
PASS dict.stringSequenceOrNullMember is undefined.
PASS dict.elementMember is undefined.
PASS dict.elementOrNullMember is undefined.
PASS dict.enumMember is undefined.
PASS dict.enumMemberWithDefault is "foo"
PASS dict.enumOrNullMember is undefined.
PASS dict.objectMember is undefined.
PASS dict.objectOrNullMemberWithDefault is null
PASS dict.doubleOrStringMember is undefined.
PASS dict.doubleOrStringSequenceMember is undefined.
PASS dict.eventTargetOrNullMember is null
PASS dict.anyMember is undefined.
PASS dict.callbackFunctionMember is undefined.


Test for setting undefined
PASS dict.longMember is undefined.
PASS dict.longMemberWithDefault is 42
PASS dict.longOrNullMember is undefined.
PASS dict.longOrNullMemberWithDefault is null
PASS dict.booleanMember is undefined.
PASS dict.doubleMember is undefined.
PASS dict.unrestrictedDoubleMember is undefined.
PASS dict.stringMember is undefined.
PASS dict.byteStringMember is undefined.
PASS dict.usvStringMember is undefined.
PASS dict.stringMemberWithDefault is "defaultStringValue"
PASS dict.stringSequenceMember is undefined.
PASS dict.stringSequenceMemberWithDefault is []
PASS dict.stringSequenceOrNullMember is undefined.
PASS dict.elementMember is undefined.
PASS dict.elementOrNullMember is undefined.
PASS dict.objectMember is undefined.
PASS dict.objectOrNullMemberWithDefault is null
PASS dict.eventTargetOrNullMember is null
PASS dict.anyMember is undefined.
PASS dict.callbackFunctionMember is undefined.


Test for setting valid values
PASS dict.longMember is 1
PASS dict.longMemberWithDefault is 2
PASS dict.longOrNullMember is 3
PASS dict.longOrNullMemberWithDefault is 4
PASS dict.stringMember is "modifiedString1"
PASS dict.stringMemberWithDefault is "modifiedString2"
PASS dict.byteStringMember is "\u0000\u0001þÿ"
PASS dict.usvStringMember is "!@#123ABCabc 𐀀"
PASS dict.booleanMember is true
PASS dict.doubleMember is 3.14
PASS dict.unrestrictedDoubleMember is NaN
PASS dict.stringSequenceMember is ["foo", "bar", "baz"]
PASS dict.stringSequenceMemberWithDefault is ["foo", "bar", "baz"]
PASS dict.stringSequenceOrNullMember is []
PASS dict.elementMember is element1
PASS dict.elementOrNullMember is null
PASS dict.enumMember is "foo"
PASS dict.enumMemberWithDefault is "bar"
PASS dict.enumOrNullMember is "baz"
PASS dict.objectMember is testObject1
PASS dict.objectOrNullMemberWithDefault is testObject2
PASS dict.doubleOrStringMember is 3.14
PASS dict.doubleOrStringSequenceMember is [3.14, "Hello"]
PASS dict.eventTargetOrNullMember is element1
PASS dict.internalEnumOrInternalEnumSequenceMember is "foo"
PASS dict.anyMember is 42
PASS dict.callbackFunctionMember("A", "B") is "Hi A and B"


Additional test for union type members
PASS dict.doubleOrStringMember is "foo"
PASS dict.doubleOrStringMember is "[object Object]"
PASS dict.doubleOrStringMember is ""
PASS dict.doubleOrStringMember is "null"
PASS dict.doubleOrStringMember is undefined.
PASS dict.internalEnumOrInternalEnumSequenceMember is ["foo", "bar"]


Test for explicit undefined or null, and missing members
PASS dict.enumOrNullMember is null
PASS dict.longMember is undefined.
PASS dict.longMemberWithDefault is 0
PASS dict.longOrNullMember is undefined.
PASS dict.longOrNullMemberWithDefault is null
PASS dictionaryTest.set({enumMember: null}) threw exception TypeError: Failed to execute 'set' on 'DictionaryTest': Failed to read the 'enumMember' property from 'InternalDictionary': The provided value 'null' is not a valid enum value of type InternalEnum..


Test for different values for the any type
PASS dict.anyMember is ""
PASS dict.anyMember is 0
PASS dict.anyMember is undefined.
PASS dict.anyMember is false
PASS dict.anyMember is null


Test for setting invalid member
PASS dict.invalidMember is undefined.


Test for setting invalid double value
PASS dictionaryTest.set({doubleMember: NaN}) threw exception TypeError: Failed to execute 'set' on 'DictionaryTest': Failed to read the 'doubleMember' property from 'InternalDictionary': The provided double value is non-finite..
PASS dictionaryTest.set({doubleMember: Infinity}) threw exception TypeError: Failed to execute 'set' on 'DictionaryTest': Failed to read the 'doubleMember' property from 'InternalDictionary': The provided double value is non-finite..
PASS dictionaryTest.set({doubleMember: -Infinity}) threw exception TypeError: Failed to execute 'set' on 'DictionaryTest': Failed to read the 'doubleMember' property from 'InternalDictionary': The provided double value is non-finite..
PASS dictionaryTest.set({doubleMember: 'invalid'}) threw exception TypeError: Failed to execute 'set' on 'DictionaryTest': Failed to read the 'doubleMember' property from 'InternalDictionary': The provided double value is non-finite..


Test for setting invalid ByteString value
PASS dictionaryTest.set({byteStringMember: 'Ā'}) threw exception TypeError: Failed to execute 'set' on 'DictionaryTest': Failed to read the 'byteStringMember' property from 'InternalDictionary': String contains non ISO-8859-1 code point..


Test for setting invalid USVString value
PASS dict.usvStringMember is "_�_�_��_"
Test for setting invalid enum value
PASS dictionaryTest.set({enumMember: 'invalid'}) threw exception TypeError: Failed to execute 'set' on 'DictionaryTest': Failed to read the 'enumMember' property from 'InternalDictionary': The provided value 'invalid' is not a valid enum value of type InternalEnum..


Test for setting invalid enum value in union sequence
PASS dictionaryTest.set({internalEnumOrInternalEnumSequenceMember: 'invalid'}) threw exception TypeError: Failed to execute 'set' on 'DictionaryTest': Failed to read the 'internalEnumOrInternalEnumSequenceMember' property from 'InternalDictionary': The provided value 'invalid' is not a valid enum value of type InternalEnum..
PASS dictionaryTest.set({internalEnumOrInternalEnumSequenceMember: ['invalid']}) threw exception TypeError: Failed to execute 'set' on 'DictionaryTest': Failed to read the 'internalEnumOrInternalEnumSequenceMember' property from 'InternalDictionary': The provided value 'invalid' is not a valid enum value of type InternalEnum..
Test for setting invalid object value
PASS dictionaryTest.set({objectMember: 42}) threw exception TypeError: Failed to execute 'set' on 'DictionaryTest': Failed to read the 'objectMember' property from 'InternalDictionary': Failed to convert value to 'object'..
PASS dictionaryTest.set({objectMember: 'invalid'}) threw exception TypeError: Failed to execute 'set' on 'DictionaryTest': Failed to read the 'objectMember' property from 'InternalDictionary': Failed to convert value to 'object'..


Test for setting invalid Element value
PASS dictionaryTest.set({elementMember: 42}) threw exception TypeError: Failed to execute 'set' on 'DictionaryTest': Failed to read the 'elementMember' property from 'InternalDictionary': Failed to convert value to 'Element'..
PASS dictionaryTest.set({elementMember: testObject1}) threw exception TypeError: Failed to execute 'set' on 'DictionaryTest': Failed to read the 'elementMember' property from 'InternalDictionary': Failed to convert value to 'Element'..
PASS dictionaryTest.set({elementMember: []}) threw exception TypeError: Failed to execute 'set' on 'DictionaryTest': Failed to read the 'elementMember' property from 'InternalDictionary': Failed to convert value to 'Element'..
PASS dictionaryTest.set({elementMember: document}) threw exception TypeError: Failed to execute 'set' on 'DictionaryTest': Failed to read the 'elementMember' property from 'InternalDictionary': Failed to convert value to 'Element'..


Test for setting invalid callback function value
PASS dictionaryTest.set({callbackFunctionMember: {}}) threw exception TypeError: Failed to execute 'set' on 'DictionaryTest': Failed to read the 'callbackFunctionMember' property from 'InternalDictionary': The given value is not a function..


Test for passing invalid dictionary values
PASS dictionaryTest.set(42) threw exception TypeError: Failed to execute 'set' on 'DictionaryTest': The provided value is not of type 'InternalDictionary'..
PASS dictionaryTest.set('string') threw exception TypeError: Failed to execute 'set' on 'DictionaryTest': The provided value is not of type 'InternalDictionary'..


Test for [Clamp] and [EnforceRange] member
PASS dict.longMember is -2147483648
PASS dict.longMemberWithClamp is 2147483647
PASS dictionaryTest.set({ longMemberWithEnforceRange: 2147483648 }) threw exception TypeError: Failed to execute 'set' on 'DictionaryTest': Failed to read the 'longMemberWithEnforceRange' property from 'InternalDictionary': Value is outside the 'long' value range..


Test for passing EventTarget
PASS dict.eventTargetOrNullMember is window
PASS dict.eventTargetOrNullMember is null
PASS dict.eventTargetOrNullMember is null
PASS dictionaryTest.set({eventTargetOrNullMember: 'invalid'}) threw exception TypeError: Failed to execute 'set' on 'DictionaryTest': Failed to read the 'eventTargetOrNullMember' property from 'InternalDictionary': Failed to convert value to 'EventTarget'..
PASS dictionaryTest.set({eventTargetOrNullMember: 42}) threw exception TypeError: Failed to execute 'set' on 'DictionaryTest': Failed to read the 'eventTargetOrNullMember' property from 'InternalDictionary': Failed to convert value to 'EventTarget'..
PASS dictionaryTest.set({eventTargetOrNullMember: []}) threw exception TypeError: Failed to execute 'set' on 'DictionaryTest': Failed to read the 'eventTargetOrNullMember' property from 'InternalDictionary': Failed to convert value to 'EventTarget'..
PASS dictionaryTest.set({eventTargetOrNullMember: {}}) threw exception TypeError: Failed to execute 'set' on 'DictionaryTest': Failed to read the 'eventTargetOrNullMember' property from 'InternalDictionary': Failed to convert value to 'EventTarget'..


Test for derived dictionary
PASS derived.longMember is undefined.
PASS derived.longMemberWithDefault is 42
PASS derived.longOrNullMember is undefined.
PASS derived.longOrNullMemberWithDefault is null
PASS derived.booleanMember is undefined.
PASS derived.doubleMember is undefined.
PASS derived.stringMember is undefined.
PASS derived.stringMemberWithDefault is "defaultStringValue"
PASS derived.stringSequenceMember is undefined.
PASS derived.stringSequenceMemberWithDefault is []
PASS derived.stringSequenceOrNullMember is undefined.
PASS derived.elementMember is undefined.
PASS derived.elementOrNullMember is undefined.
PASS derived.enumMember is undefined.
PASS derived.enumMemberWithDefault is "foo"
PASS derived.enumOrNullMember is undefined.
PASS derived.objectMember is undefined.
PASS derived.objectOrNullMemberWithDefault is null
PASS derived.derivedStringMember is undefined.
PASS derived.derivedStringMemberWithDefault is "derivedDefaultStringValue"
PASS derived.requiredBooleanMember is true


PASS derived.longMember is 1
PASS derived.stringMemberWithDefault is "modifiedString"
PASS derived.derivedStringMember is "modifiedString2"
PASS derived.derivedStringMemberWithDefault is "modifiedString3"
PASS derived.invalidMember is undefined.
PASS derived.requiredBooleanMember is false


Test for triple level derived dictionary
PASS derived.longMember is 1
PASS derived.derivedStringMember is "modifiedString"
PASS derived.derivedDerivedStringMember is "modifiedString2"
PASS derived.requiredBooleanMember is false


Test for passing invalid values as derived dictionary
PASS dictionaryTest.setDerived({objectMember: 42, requiredBooleanMember: false }) threw exception TypeError: Failed to execute 'setDerived' on 'DictionaryTest': Failed to read the 'objectMember' property from 'InternalDictionary': Failed to convert value to 'object'..
PASS dictionaryTest.setDerived({}) threw exception TypeError: Failed to execute 'setDerived' on 'DictionaryTest': Failed to read the 'requiredBooleanMember' property from 'InternalDictionaryDerived': Required member is undefined..
PASS successfullyParsed is true

TEST COMPLETE