Index: bindings/tests/idls/core/TestObject.idl |
diff --git a/bindings/tests/idls/core/TestObject.idl b/bindings/tests/idls/core/TestObject.idl |
index 44d9cae814a9524b3612a90702f9c87bae18ae1b..97a9ab994fd43b0441299782674f2a2d44378213 100644 |
--- a/bindings/tests/idls/core/TestObject.idl |
+++ b/bindings/tests/idls/core/TestObject.idl |
@@ -88,7 +88,7 @@ interface TestObject { |
attribute Date dateAttribute; |
attribute DOMString stringAttribute; |
attribute ByteString byteStringAttribute; |
- attribute ScalarValueString scalarValueStringAttribute; |
+ attribute USVString usvStringAttribute; |
attribute DOMTimeStamp domTimeStampAttribute; |
attribute boolean booleanAttribute; |
attribute byte byteAttribute; |
@@ -150,11 +150,19 @@ interface TestObject { |
attribute TestInterface? testInterfaceOrNullAttribute; |
// Enumerations |
attribute TestEnum testEnumAttribute; |
+ attribute TestEnum? testEnumOrNullAttribute; |
// Static attributes |
static attribute DOMString staticStringAttribute; |
static attribute long staticLongAttribute; |
// Exceptional type |
attribute EventHandler eventHandlerAttribute; |
+ // Union types |
+ attribute (double or DOMString) doubleOrStringAttribute; |
+ attribute (double or DOMString)? doubleOrStringOrNullAttribute; |
+ attribute (double? or DOMString) doubleOrNullStringAttribute; |
+ attribute (DOMString or sequence<DOMString>) stringOrStringSequenceAttribute; |
+ attribute (TestEnum or double) testEnumOrDoubleAttribute; |
+ attribute (unrestricted double or DOMString) unrestrictedDoubleOrStringAttribute; |
// Extended attributes |
[LogActivity, LogAllWorlds] attribute long activityLoggingAccessForAllWorldsLongAttribute; |
@@ -187,7 +195,6 @@ interface TestObject { |
[Custom=Setter, ImplementedAs=implementedAsNameWithCustomGetter] attribute long customSetterImplementedAsLongAttribute; |
[MeasureAs=TestFeature] attribute long measureAsLongAttribute; |
[NotEnumerable] attribute long notEnumerableLongAttribute; |
- [PerContextEnabled=FeatureName] attribute long perContextEnabledLongAttribute; |
[PerWorldBindings] readonly attribute TestInterfaceEmpty perWorldBindingsReadonlyTestInterfaceEmptyAttribute; |
[LogActivity, LogAllWorlds, PerWorldBindings] attribute long activityLoggingAccessPerWorldBindingsLongAttribute; |
[LogActivity, PerWorldBindings] attribute long activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttribute; |
@@ -231,9 +238,9 @@ interface TestObject { |
[Reflect, ReflectOnly=("empty","missing","invalid","a-normal"), ReflectEmpty="empty", ReflectMissing="missing", ReflectInvalid="invalid"] readonly attribute DOMString limitedWithEmptyMissingInvalidAttribute; |
[Replaceable] readonly attribute long replaceableReadonlyLongAttribute; |
- [Replaceable, PutForwards=href] readonly attribute TestNode locationReplaceable; |
+ [Replaceable, ExposeJSAccessors] readonly attribute long replaceableReadonlyLongAccessor; |
+ [PutForwards=href] readonly attribute TestNode locationPutForwards; |
[RuntimeEnabled=FeatureName] attribute long runtimeEnabledLongAttribute; |
- [PerContextEnabled=FeatureName, RuntimeEnabled=FeatureName] attribute long perContextEnabledRuntimeEnabledLongAttribute; |
[Conditional=CONDITION, RuntimeEnabled=FeatureName] attribute long conditionalRuntimeEnabledLongAttribute; |
[SetterCallWith=(ActiveWindow,FirstWindow)] attribute DOMString setterCallWithActiveWindowAndFirstWindowStringAttribute; |
[SetterCallWith=ExecutionContext] attribute DOMString setterCallWithExecutionContextStringAttribute; |
@@ -244,14 +251,20 @@ interface TestObject { |
[TreatReturnedNullStringAs=Undefined, CachedAttribute=isStringDirty] attribute DOMString cachedTreatReturnedNullStringAsUndefinedStringAttribute; |
[TreatReturnedNullStringAs=Null] attribute ByteString treatReturnedNullStringAsNullByteStringAttribute; |
[TreatReturnedNullStringAs=Undefined] attribute ByteString treatReturnedNullStringAsUndefinedByteStringAttribute; |
- [TreatReturnedNullStringAs=Null] attribute ScalarValueString treatReturnedNullStringAsNullScalarValueStringAttribute; |
- [TreatReturnedNullStringAs=Undefined] attribute ScalarValueString treatReturnedNullStringAsUndefinedScalarValueStringAttribute; |
+ [TreatReturnedNullStringAs=Null] attribute USVString treatReturnedNullStringAsNullUSVStringAttribute; |
+ [TreatReturnedNullStringAs=Undefined] attribute USVString treatReturnedNullStringAsUndefinedUSVStringAttribute; |
[TypeChecking=Interface] attribute float typeCheckingInterfaceFloatAttribute; // nop for non-interface types |
[TypeChecking=Interface] attribute TestInterface typeCheckingInterfaceTestInterfaceAttribute; |
[TypeChecking=Interface] attribute TestInterface? typeCheckingInterfaceTestInterfaceOrNullAttribute; |
[Reflect, URL] attribute DOMString urlStringAttribute; |
[Reflect=reflectUrlAttribute, URL] attribute DOMString urlStringAttribute; |
[Unforgeable] attribute long unforgeableLongAttribute; |
+ [Measure] attribute long measuredLongAttribute; |
+ [SameObject] attribute TestInterface sameObjectAttribute; |
+ [Unscopeable] attribute long unscopeableLongAttribute; |
+ [Unscopeable, RuntimeEnabled=FeatureName] attribute long unscopeableRuntimeEnabledLongAttribute; |
+ [Unscopeable] void unscopeableVoidMethod(); |
+ [Unscopeable, RuntimeEnabled=FeatureName] void unscopeableRuntimeEnabledVoidMethod(); |
// Methods |
@@ -268,7 +281,7 @@ interface TestObject { |
Date dateMethod(); |
DOMString stringMethod(); |
ByteString byteStringMethod(); |
- ScalarValueString scalarValueStringMethod(); |
+ USVString usvStringMethod(); |
DOMTimeStamp readonlyDOMTimeStampMethod(); |
boolean booleanMethod(); |
byte byteMethod(); |
@@ -285,7 +298,7 @@ interface TestObject { |
void voidMethodDateArg(Date dateArg); |
void voidMethodStringArg(DOMString stringArg); |
void voidMethodByteStringArg(ByteString stringArg); |
- void voidMethodScalarValueStringArg(ScalarValueString scalarValueStringArg); |
+ void voidMethodUSVStringArg(USVString usvStringArg); |
void voidMethodDOMTimeStampArg(DOMTimeStamp domTimeStampArg); |
void voidMethodBooleanArg(boolean booleanArg); |
void voidMethodByteArg(byte byteArg); |
@@ -306,6 +319,8 @@ interface TestObject { |
VoidCallbackFunction voidCallbackFunctionMethod(); |
AnyCallbackFunctionOptionalAnyArg anyCallbackFunctionOptionalAnyArgMethod(); |
void voidMethodVoidCallbackFunctionArg(VoidCallbackFunction voidCallbackFunctionArg); |
+ void voidMethodOptionalVoidCallbackFunctionArg(optional VoidCallbackFunction voidCallbackFunctionArg); |
+ void voidMethodNullableVoidCallbackFunctionArg(VoidCallbackFunction? voidCallbackFunctionArg); |
void voidMethodAnyCallbackFunctionOptionalAnyArg(AnyCallbackFunctionOptionalAnyArg anyCallbackFunctionOptionalAnyArgArg); |
// Custom type conversions |
any anyMethod(); |
@@ -336,6 +351,7 @@ interface TestObject { |
void voidMethodArrayLongArg(long[] arrayLongArg); |
void voidMethodArrayStringArg(DOMString[] arrayStringArg); |
void voidMethodArrayTestInterfaceEmptyArg(TestInterfaceEmpty[] arrayTestInterfaceEmptyArg); |
+ void voidMethodNullableArrayLongArg(long[]? arrayLongArg); |
// Sequences |
sequence<long> longSequenceMethod(); |
sequence<DOMString> stringSequenceMethod(); |
@@ -344,6 +360,7 @@ interface TestObject { |
void voidMethodSequenceStringArg(sequence<DOMString> stringSequenceArg); |
void voidMethodSequenceTestInterfaceEmptyArg(sequence<TestInterfaceEmpty> testInterfaceEmptySequenceArg); |
void voidMethodSequenceSequenceDOMStringArg(sequence<sequence<DOMString>> stringSequenceSequenceArg); |
+ void voidMethodNullableSequenceLongArg(sequence<long>? longSequenceArg); |
// Nullable types |
long? nullableLongMethod(); |
DOMString? nullableStringMethod(); |
@@ -352,7 +369,15 @@ interface TestObject { |
// Union types |
(TestInterfaceGarbageCollected or DOMString) testInterfaceGarbageCollectedOrDOMStringMethod(); |
(TestInterfaceWillBeGarbageCollected or TestDictionary) testInterfaceWillBeGarbageCollectedOrTestDictionaryMethod(); |
- (sequence<long> or DOMString[] or unrestricted double) longSequenceOrDOMStringArrayOrUnrestrictedDoubleMethod(); |
+ (boolean or DOMString or unrestricted double) booleanOrDOMStringOrUnrestrictedDoubleMethod(); |
+ (TestInterface or long) testInterfaceOrLongMethod(); |
+ void voidMethodDoubleOrDOMStringArg((double or DOMString) arg); |
+ void voidMethodDoubleOrDOMStringOrNullArg((double or DOMString)? arg); |
+ void voidMethodDoubleOrNullOrDOMStringArg((double? or DOMString) arg); |
+ void voidMethodDOMStringOrArrayBufferOrArrayBufferViewArg((DOMString or ArrayBuffer or ArrayBufferView) arg); |
+ void voidMethodArrayBufferOrArrayBufferViewOrDictionaryArg((ArrayBuffer or ArrayBufferView or Dictionary) arg); |
+ // Array of Union types |
+ void voidMethodArrayOfDoubleOrDOMStringArg((double or DOMString)... arg); |
// Currently only used on interface type arguments |
void voidMethodTestInterfaceEmptyOrNullArg(TestInterfaceEmpty? nullableTestInterfaceEmptyArg); |
// Callback interface types |
@@ -364,8 +389,11 @@ interface TestObject { |
void voidMethodTestEnumArg(TestEnum testEnumTypeArg); |
// Exceptional types |
Dictionary dictionaryMethod(); |
+ TestDictionary testDictionaryMethod(); |
+ TestDictionary? nullableTestDictionaryMethod(); |
+ void passPermissiveDictionaryMethod([PermissiveDictionaryConversion] optional TestDictionary arg); |
NodeFilter nodeFilterMethod(); |
- Promise promiseMethod(long arg1, Dictionary arg2, DOMString arg3, DOMString... variadic); |
+ Promise<void> promiseMethod(long arg1, Dictionary arg2, DOMString arg3, DOMString... variadic); |
Promise promiseMethodWithoutExceptionState(Dictionary arg1); |
SerializedScriptValue serializedScriptValueMethod(); |
XPathNSResolver xPathNSResolverMethod(); |
@@ -375,8 +403,6 @@ interface TestObject { |
void voidMethodSerializedScriptValueArg(SerializedScriptValue serializedScriptValueArg); |
void voidMethodXPathNSResolverArg(XPathNSResolver xPathNSResolverArg); |
void voidMethodDictionarySequenceArg(sequence<Dictionary> dictionarySequenceArg); |
- Promise overloadedPromiseMethod(long arg); |
- Promise overloadedPromiseMethod(DOMString arg); |
// Arguments |
void voidMethodStringArgLongArg(DOMString stringArg, long longArg); |
@@ -406,6 +432,10 @@ interface TestObject { |
void voidMethodDefaultNullableByteStringArg(optional ByteString? defaultStringArg = null); |
void voidMethodDefaultNullableStringArg(optional DOMString? defaultStringArg = null); |
void voidMethodDefaultNullableTestInterfaceArg(optional TestInterface? defaultTestInterfaceArg = null); |
+ void voidMethodDefaultDoubleOrStringArgs(optional (double or DOMString) defaultLongArg = 10.0, |
+ optional (double or DOMString?) defaultStringArg = "foo", |
+ optional (double or DOMString)? defaultNullArg = null); |
+ void voidMethodDefaultStringSequenceArg(optional sequence<DOMString> defaultStringSequenceArg = []); |
// Variadic operations |
void voidMethodVariadicStringArg(DOMString... variadicStringArgs); |
@@ -436,7 +466,14 @@ interface TestObject { |
void overloadedMethodI(double doubleArg); |
void overloadedMethodJ(DOMString stringArg); |
void overloadedMethodJ(TestDictionary testDictionaryArg); |
+ void overloadedMethodK(Function functionArg); |
+ void overloadedMethodK(DOMString stringArg); |
+ void overloadedMethodL(long longArg, any... restArgs); |
+ void overloadedMethodL(DOMString stringArg, any... restArgs); |
+ Promise promiseOverloadMethod(); |
+ Promise promiseOverloadMethod(Window arg1, double arg2); |
+ Promise promiseOverloadMethod(Document arg1, double arg2); |
[PerWorldBindings] void overloadedPerWorldBindingsMethod(); |
[PerWorldBindings] void overloadedPerWorldBindingsMethod(long longArg); |
@@ -444,6 +481,14 @@ interface TestObject { |
static void overloadedStaticMethod(long longArg); |
static void overloadedStaticMethod(long longArg1, long longArg2); |
+ // Special operations |
+ [CallWith=ScriptState] getter any item(unsigned long index); |
+ [CallWith=ScriptState] getter object(DOMString name); |
+ [CallWith=ScriptState] setter DOMString setItem(unsigned long index, DOMString value); |
+ [CallWith=ScriptState] setter DOMString(DOMString name, DOMString value); |
+ [RaisesException, CallWith=ScriptState] deleter boolean(unsigned long index); |
+ [CallWith=ScriptState] deleter boolean(DOMString name); |
+ |
// Extended attributes for arguments |
// [Clamp] |
void voidMethodClampUnsignedShortArg([Clamp] unsigned short clampUnsignedShortArg); |
@@ -469,16 +514,22 @@ interface TestObject { |
[CallWith=(ScriptState,ScriptArguments)] void callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArg(optional boolean optionalBooleanArg); |
[CallWith=ActiveWindow] void callWithActiveWindow(); |
[CallWith=(ActiveWindow,FirstWindow)] void callWithActiveWindowScriptWindow(); |
+ [CallWith=ThisValue] void callWithThisValue(); |
[CheckSecurity=Node] void checkSecurityForNodeVoidMethod(); |
[Conditional=CONDITION] void conditionalConditionVoidMethod(); |
[Conditional=CONDITION] static void conditionalConditionStaticVoidMethod(); |
[Custom] void customVoidMethod(); |
+ [Custom=CallPrologue] void customCallPrologueVoidMethod(); |
+ [Custom=CallEpilogue] void customCallEpilogueVoidMethod(); |
[Conditional=CONDITION, Custom] void conditionalConditionCustomVoidMethod(); |
[CustomElementCallbacks] void customElementCallbacksVoidMethod(); |
[DeprecateAs=voidMethod] void deprecatedVoidMethod(); |
[DoNotCheckSignature] void doNotCheckSignatureVoidMethod(); |
[ImplementedAs=implementedAsMethodName] void implementedAsVoidMethod(); |
[MeasureAs=TestFeature] void measureAsVoidMethod(); |
+ [Measure] void measureMethod(); |
+ [Measure] void measureOverloadedMethod(); |
+ [Measure] void measureOverloadedMethod(long arg); |
[DeprecateAs=TestFeatureA] void DeprecateAsOverloadedMethod(); |
[DeprecateAs=TestFeatureB] void DeprecateAsOverloadedMethod(long arg); |
[DeprecateAs=TestFeature] void DeprecateAsSameValueOverloadedMethod(); |
@@ -494,9 +545,9 @@ interface TestObject { |
[DeprecateAs=TestFeatureA, MeasureAs=TestFeatureB] void deprecateAsSameValueMeasureAsSameValueOverloadedMethod(); |
[DeprecateAs=TestFeatureA, MeasureAs=TestFeatureB] void deprecateAsSameValueMeasureAsSameValueOverloadedMethod(long arg); |
[NotEnumerable] void notEnumerableVoidMethod(); |
- [PerContextEnabled=FeatureName] void perContextEnabledVoidMethod(); |
[PerWorldBindings] void perWorldBindingsVoidMethod(); |
[PerWorldBindings] void perWorldBindingsVoidMethodTestInterfaceEmptyArg(TestInterfaceEmpty testInterfaceEmptyArg); |
+ [PostMessage, RaisesException] void postMessage(SerializedScriptValue message, optional sequence<Transferable> transfer); |
[LogActivity, LogAllWorlds, PerWorldBindings] void activityLoggingForAllWorldsPerWorldBindingsVoidMethod(); |
[LogActivity, PerWorldBindings] void activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethod(); |
[RaisesException] void raisesExceptionVoidMethod(); |
@@ -505,28 +556,37 @@ interface TestObject { |
[RaisesException] void raisesExceptionVoidMethodTestCallbackInterfaceArg(TestCallbackInterface testCallbackInterfaceArg); |
[RaisesException] void raisesExceptionVoidMethodOptionalTestCallbackInterfaceArg(optional TestCallbackInterface optionalTestCallbackInterfaceArg); |
[RaisesException] TestInterfaceEmpty raisesExceptionTestInterfaceEmptyVoidMethod(); |
+ [RaisesException] XPathNSResolver raisesExceptionXPathNSResolverVoidMethod(); |
[CallWith=ExecutionContext, RaisesException] void callWithExecutionContextRaisesExceptionVoidMethodLongArg(long longArg); |
[RuntimeEnabled=FeatureName] void runtimeEnabledVoidMethod(); |
[PerWorldBindings, RuntimeEnabled=FeatureName] void perWorldBindingsRuntimeEnabledVoidMethod(); |
[RuntimeEnabled=FeatureName] void runtimeEnabledOverloadedVoidMethod(DOMString stringArg); |
[RuntimeEnabled=FeatureName] void runtimeEnabledOverloadedVoidMethod(long longArg); |
[RuntimeEnabled=FeatureName1] void partiallyRuntimeEnabledOverloadedVoidMethod(DOMString stringArg); |
- [RuntimeEnabled=FeatureName2] void partiallyRuntimeEnabledOverloadedVoidMethod(TestInterface testInterface); |
- void partiallyRuntimeEnabledOverloadedVoidMethod(long longArg); |
+ [RuntimeEnabled=FeatureName2] void partiallyRuntimeEnabledOverloadedVoidMethod(TestInterface testInterfaceArg); |
+ void partiallyRuntimeEnabledOverloadedVoidMethod(long longArg, DOMString stringArg); |
+ [RuntimeEnabled=FeatureName3] void partiallyRuntimeEnabledOverloadedVoidMethod(long longArg, DOMString stringArg, TestInterface testInterfaceArg); |
[TreatReturnedNullStringAs=Null] DOMString treatReturnedNullStringAsNullStringMethod(); |
[TreatReturnedNullStringAs=Undefined] DOMString treatReturnedNullStringAsUndefinedStringMethod(); |
[TreatReturnedNullStringAs=Null] ByteString treatReturnedNullStringAsNullByteStringMethod(); |
[TreatReturnedNullStringAs=Undefined] ByteString treatReturnedNullStringAsUndefinedByteStringMethod(); |
- [TreatReturnedNullStringAs=Null] ScalarValueString treatReturnedNullStringAsNullScalarValueStringMethod(); |
- [TreatReturnedNullStringAs=Undefined] ScalarValueString treatReturnedNullStringAsUndefinedScalarValueStringMethod(); |
+ [TreatReturnedNullStringAs=Null] USVString treatReturnedNullStringAsNullUSVStringMethod(); |
+ [TreatReturnedNullStringAs=Undefined] USVString treatReturnedNullStringAsUndefinedUSVStringMethod(); |
[TypeChecking=Interface] void typeCheckingInterfaceVoidMethodTestInterfaceEmptyArg(TestInterfaceEmpty testInterfaceEmptyArg); |
[TypeChecking=Interface] void typeCheckingInterfaceVoidMethodTestInterfaceEmptyVariadicArg(TestInterfaceEmpty... testInterfaceEmptyArg); |
- [TypeChecking=Unrestricted] void typeCheckingUnrestrictedVoidMethodFloatArgDoubleArg(float floatArg, double doubleArg); |
+ // Avoid redundant type checking |
+ [TypeChecking=Interface] void useToImpl4ArgumentsCheckingIfPossibleWithOptionalArg(Node node1, optional Node node2); |
+ [TypeChecking=Interface] void useToImpl4ArgumentsCheckingIfPossibleWithNullableArg(Node node1, Node? node2); |
+ [TypeChecking=Interface] void useToImpl4ArgumentsCheckingIfPossibleWithUndefinedArg(Node node1, [Default=Undefined] optional Node node2); |
+ void typeCheckingUnrestrictedVoidMethodFloatArgDoubleArg(float floatArg, double doubleArg); |
[Unforgeable] void unforgeableVoidMethod(); |
void voidMethodTestInterfaceGarbageCollectedSequenceArg(sequence<TestInterfaceGarbageCollected> testInterfaceGarbageCollectedSequenceArg); |
void voidMethodTestInterfaceGarbageCollectedArrayArg(TestInterfaceGarbageCollected[] testInterfaceGarbageCollectedArrayArg); |
void voidMethodTestInterfaceWillBeGarbageCollectedSequenceArg(sequence<TestInterfaceWillBeGarbageCollected> testInterfaceWillBeGarbageCollectedSequenceArg); |
void voidMethodTestInterfaceWillBeGarbageCollectedArrayArg(TestInterfaceWillBeGarbageCollected[] testInterfaceWillBeGarbageCollectedArrayArg); |
+ [NewObject] TestInterface newObjectTestInterfaceMethod(); |
+ |
+ serializer DOMString serializerMethod(); |
// Extended attributes on referenced interfaces |
// (not self; self-reference tests at interface themselves) |
@@ -552,4 +612,6 @@ interface TestObject { |
[ImplementedInPrivateScript, OnlyExposedToPrivateScript] short methodForPrivateScriptOnly(short value1, short value2); |
[ImplementedInPrivateScript, OnlyExposedToPrivateScript] attribute DOMString attributeForPrivateScriptOnly; |
[ImplementedInPrivateScript] attribute TestEnum enumForPrivateScript; |
+ |
+ maplike<long, DOMStringOrDouble>; |
}; |