michael@0: /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this file, michael@0: * You can obtain one at http://mozilla.org/MPL/2.0/. michael@0: */ michael@0: [Constructor, michael@0: Constructor(DOMString str), michael@0: Constructor(unsigned long num, boolean? boolArg), michael@0: Constructor(TestInterface? iface), michael@0: Constructor(long arg1, IndirectlyImplementedInterface iface), michael@0: // Constructor(long arg1, long arg2, (TestInterface or OnlyForUseInConstructor) arg3), michael@0: NamedConstructor=Example, michael@0: NamedConstructor=Example(DOMString str), michael@0: NamedConstructor=Example2(DictForConstructor dict, any any1, object obj1, michael@0: object? obj2, sequence seq, optional any any2, michael@0: optional object obj3, optional object? obj4) michael@0: ] michael@0: interface TestExampleInterface { michael@0: // Integer types michael@0: // XXXbz add tests for throwing versions of all the integer stuff michael@0: readonly attribute byte readonlyByte; michael@0: attribute byte writableByte; michael@0: void passByte(byte arg); michael@0: byte receiveByte(); michael@0: void passOptionalByte(optional byte arg); michael@0: void passOptionalByteBeforeRequired(optional byte arg1, byte arg2); michael@0: void passOptionalByteWithDefault(optional byte arg = 0); michael@0: void passOptionalByteWithDefaultBeforeRequired(optional byte arg1 = 0, byte arg2); michael@0: void passNullableByte(byte? arg); michael@0: void passOptionalNullableByte(optional byte? arg); michael@0: void passVariadicByte(byte... arg); michael@0: [Cached, Pure] michael@0: readonly attribute byte cachedByte; michael@0: [StoreInSlot, Constant] michael@0: readonly attribute byte cachedConstantByte; michael@0: [Cached, Pure] michael@0: attribute byte cachedWritableByte; michael@0: michael@0: readonly attribute short readonlyShort; michael@0: attribute short writableShort; michael@0: void passShort(short arg); michael@0: short receiveShort(); michael@0: void passOptionalShort(optional short arg); michael@0: void passOptionalShortWithDefault(optional short arg = 5); michael@0: michael@0: readonly attribute long readonlyLong; michael@0: attribute long writableLong; michael@0: void passLong(long arg); michael@0: long receiveLong(); michael@0: void passOptionalLong(optional long arg); michael@0: void passOptionalLongWithDefault(optional long arg = 7); michael@0: michael@0: readonly attribute long long readonlyLongLong; michael@0: attribute long long writableLongLong; michael@0: void passLongLong(long long arg); michael@0: long long receiveLongLong(); michael@0: void passOptionalLongLong(optional long long arg); michael@0: void passOptionalLongLongWithDefault(optional long long arg = -12); michael@0: michael@0: readonly attribute octet readonlyOctet; michael@0: attribute octet writableOctet; michael@0: void passOctet(octet arg); michael@0: octet receiveOctet(); michael@0: void passOptionalOctet(optional octet arg); michael@0: void passOptionalOctetWithDefault(optional octet arg = 19); michael@0: michael@0: readonly attribute unsigned short readonlyUnsignedShort; michael@0: attribute unsigned short writableUnsignedShort; michael@0: void passUnsignedShort(unsigned short arg); michael@0: unsigned short receiveUnsignedShort(); michael@0: void passOptionalUnsignedShort(optional unsigned short arg); michael@0: void passOptionalUnsignedShortWithDefault(optional unsigned short arg = 2); michael@0: michael@0: readonly attribute unsigned long readonlyUnsignedLong; michael@0: attribute unsigned long writableUnsignedLong; michael@0: void passUnsignedLong(unsigned long arg); michael@0: unsigned long receiveUnsignedLong(); michael@0: void passOptionalUnsignedLong(optional unsigned long arg); michael@0: void passOptionalUnsignedLongWithDefault(optional unsigned long arg = 6); michael@0: michael@0: readonly attribute unsigned long long readonlyUnsignedLongLong; michael@0: attribute unsigned long long writableUnsignedLongLong; michael@0: void passUnsignedLongLong(unsigned long long arg); michael@0: unsigned long long receiveUnsignedLongLong(); michael@0: void passOptionalUnsignedLongLong(optional unsigned long long arg); michael@0: void passOptionalUnsignedLongLongWithDefault(optional unsigned long long arg = 17); michael@0: michael@0: attribute float writableFloat; michael@0: attribute unrestricted float writableUnrestrictedFloat; michael@0: attribute float? writableNullableFloat; michael@0: attribute unrestricted float? writableNullableUnrestrictedFloat; michael@0: attribute double writableDouble; michael@0: attribute unrestricted double writableUnrestrictedDouble; michael@0: attribute double? writableNullableDouble; michael@0: attribute unrestricted double? writableNullableUnrestrictedDouble; michael@0: void passFloat(float arg1, unrestricted float arg2, michael@0: float? arg3, unrestricted float? arg4, michael@0: double arg5, unrestricted double arg6, michael@0: double? arg7, unrestricted double? arg8, michael@0: sequence arg9, sequence arg10, michael@0: sequence arg11, sequence arg12, michael@0: sequence arg13, sequence arg14, michael@0: sequence arg15, sequence arg16); michael@0: [LenientFloat] michael@0: void passLenientFloat(float arg1, unrestricted float arg2, michael@0: float? arg3, unrestricted float? arg4, michael@0: double arg5, unrestricted double arg6, michael@0: double? arg7, unrestricted double? arg8, michael@0: sequence arg9, michael@0: sequence arg10, michael@0: sequence arg11, michael@0: sequence arg12, michael@0: sequence arg13, michael@0: sequence arg14, michael@0: sequence arg15, michael@0: sequence arg16); michael@0: [LenientFloat] michael@0: attribute float lenientFloatAttr; michael@0: [LenientFloat] michael@0: attribute double lenientDoubleAttr; michael@0: michael@0: // Castable interface types michael@0: // XXXbz add tests for throwing versions of all the castable interface stuff michael@0: TestInterface receiveSelf(); michael@0: TestInterface? receiveNullableSelf(); michael@0: TestInterface receiveWeakSelf(); michael@0: TestInterface? receiveWeakNullableSelf(); michael@0: void passSelf(TestInterface arg); michael@0: void passNullableSelf(TestInterface? arg); michael@0: attribute TestInterface nonNullSelf; michael@0: attribute TestInterface? nullableSelf; michael@0: [Cached, Pure] michael@0: readonly attribute TestInterface cachedSelf; michael@0: // Optional arguments michael@0: void passOptionalSelf(optional TestInterface? arg); michael@0: void passOptionalNonNullSelf(optional TestInterface arg); michael@0: void passOptionalSelfWithDefault(optional TestInterface? arg = null); michael@0: michael@0: // Non-wrapper-cache interface types michael@0: [NewObject] michael@0: TestNonWrapperCacheInterface receiveNonWrapperCacheInterface(); michael@0: [NewObject] michael@0: TestNonWrapperCacheInterface? receiveNullableNonWrapperCacheInterface(); michael@0: [NewObject] michael@0: sequence receiveNonWrapperCacheInterfaceSequence(); michael@0: [NewObject] michael@0: sequence receiveNullableNonWrapperCacheInterfaceSequence(); michael@0: [NewObject] michael@0: sequence? receiveNonWrapperCacheInterfaceNullableSequence(); michael@0: [NewObject] michael@0: sequence? receiveNullableNonWrapperCacheInterfaceNullableSequence(); michael@0: michael@0: // Non-castable interface types michael@0: IndirectlyImplementedInterface receiveOther(); michael@0: IndirectlyImplementedInterface? receiveNullableOther(); michael@0: IndirectlyImplementedInterface receiveWeakOther(); michael@0: IndirectlyImplementedInterface? receiveWeakNullableOther(); michael@0: void passOther(IndirectlyImplementedInterface arg); michael@0: void passNullableOther(IndirectlyImplementedInterface? arg); michael@0: attribute IndirectlyImplementedInterface nonNullOther; michael@0: attribute IndirectlyImplementedInterface? nullableOther; michael@0: // Optional arguments michael@0: void passOptionalOther(optional IndirectlyImplementedInterface? arg); michael@0: void passOptionalNonNullOther(optional IndirectlyImplementedInterface arg); michael@0: void passOptionalOtherWithDefault(optional IndirectlyImplementedInterface? arg = null); michael@0: michael@0: // External interface types michael@0: TestExternalInterface receiveExternal(); michael@0: TestExternalInterface? receiveNullableExternal(); michael@0: TestExternalInterface receiveWeakExternal(); michael@0: TestExternalInterface? receiveWeakNullableExternal(); michael@0: void passExternal(TestExternalInterface arg); michael@0: void passNullableExternal(TestExternalInterface? arg); michael@0: attribute TestExternalInterface nonNullExternal; michael@0: attribute TestExternalInterface? nullableExternal; michael@0: // Optional arguments michael@0: void passOptionalExternal(optional TestExternalInterface? arg); michael@0: void passOptionalNonNullExternal(optional TestExternalInterface arg); michael@0: void passOptionalExternalWithDefault(optional TestExternalInterface? arg = null); michael@0: michael@0: // Callback interface types michael@0: TestCallbackInterface receiveCallbackInterface(); michael@0: TestCallbackInterface? receiveNullableCallbackInterface(); michael@0: TestCallbackInterface receiveWeakCallbackInterface(); michael@0: TestCallbackInterface? receiveWeakNullableCallbackInterface(); michael@0: void passCallbackInterface(TestCallbackInterface arg); michael@0: void passNullableCallbackInterface(TestCallbackInterface? arg); michael@0: attribute TestCallbackInterface nonNullCallbackInterface; michael@0: attribute TestCallbackInterface? nullableCallbackInterface; michael@0: // Optional arguments michael@0: void passOptionalCallbackInterface(optional TestCallbackInterface? arg); michael@0: void passOptionalNonNullCallbackInterface(optional TestCallbackInterface arg); michael@0: void passOptionalCallbackInterfaceWithDefault(optional TestCallbackInterface? arg = null); michael@0: michael@0: // Miscellaneous interface tests michael@0: IndirectlyImplementedInterface receiveConsequentialInterface(); michael@0: void passConsequentialInterface(IndirectlyImplementedInterface arg); michael@0: michael@0: // Sequence types michael@0: [Cached, Pure] michael@0: readonly attribute sequence readonlySequence; michael@0: [Cached, Pure] michael@0: readonly attribute sequence readonlySequenceOfDictionaries; michael@0: [Cached, Pure] michael@0: readonly attribute sequence? readonlyNullableSequenceOfDictionaries; michael@0: [Cached, Pure, Frozen] michael@0: readonly attribute sequence readonlyFrozenSequence; michael@0: [Cached, Pure, Frozen] michael@0: readonly attribute sequence? readonlyFrozenNullableSequence; michael@0: sequence receiveSequence(); michael@0: sequence? receiveNullableSequence(); michael@0: sequence receiveSequenceOfNullableInts(); michael@0: sequence? receiveNullableSequenceOfNullableInts(); michael@0: void passSequence(sequence arg); michael@0: void passNullableSequence(sequence? arg); michael@0: void passSequenceOfNullableInts(sequence arg); michael@0: void passOptionalSequenceOfNullableInts(optional sequence arg); michael@0: void passOptionalNullableSequenceOfNullableInts(optional sequence? arg); michael@0: sequence receiveCastableObjectSequence(); michael@0: sequence receiveCallbackObjectSequence(); michael@0: sequence receiveNullableCastableObjectSequence(); michael@0: sequence receiveNullableCallbackObjectSequence(); michael@0: sequence? receiveCastableObjectNullableSequence(); michael@0: sequence? receiveNullableCastableObjectNullableSequence(); michael@0: sequence receiveWeakCastableObjectSequence(); michael@0: sequence receiveWeakNullableCastableObjectSequence(); michael@0: sequence? receiveWeakCastableObjectNullableSequence(); michael@0: sequence? receiveWeakNullableCastableObjectNullableSequence(); michael@0: void passCastableObjectSequence(sequence arg); michael@0: void passNullableCastableObjectSequence(sequence arg); michael@0: void passCastableObjectNullableSequence(sequence? arg); michael@0: void passNullableCastableObjectNullableSequence(sequence? arg); michael@0: void passOptionalSequence(optional sequence arg); michael@0: void passOptionalNullableSequence(optional sequence? arg); michael@0: void passOptionalNullableSequenceWithDefaultValue(optional sequence? arg = null); michael@0: void passOptionalObjectSequence(optional sequence arg); michael@0: void passExternalInterfaceSequence(sequence arg); michael@0: void passNullableExternalInterfaceSequence(sequence arg); michael@0: michael@0: sequence receiveStringSequence(); michael@0: void passStringSequence(sequence arg); michael@0: michael@0: sequence receiveByteStringSequence(); michael@0: void passByteStringSequence(sequence arg); michael@0: michael@0: sequence receiveAnySequence(); michael@0: sequence? receiveNullableAnySequence(); michael@0: //XXXbz No support for sequence of sequence return values yet. michael@0: //sequence> receiveAnySequenceSequence(); michael@0: michael@0: sequence receiveObjectSequence(); michael@0: sequence receiveNullableObjectSequence(); michael@0: michael@0: void passSequenceOfSequences(sequence> arg); michael@0: //XXXbz No support for sequence of sequence return values yet. michael@0: //sequence> receiveSequenceOfSequences(); michael@0: michael@0: // MozMap types michael@0: void passMozMap(MozMap arg); michael@0: void passNullableMozMap(MozMap? arg); michael@0: void passMozMapOfNullableInts(MozMap arg); michael@0: void passOptionalMozMapOfNullableInts(optional MozMap arg); michael@0: void passOptionalNullableMozMapOfNullableInts(optional MozMap? arg); michael@0: void passCastableObjectMozMap(MozMap arg); michael@0: void passNullableCastableObjectMozMap(MozMap arg); michael@0: void passCastableObjectNullableMozMap(MozMap? arg); michael@0: void passNullableCastableObjectNullableMozMap(MozMap? arg); michael@0: void passOptionalMozMap(optional MozMap arg); michael@0: void passOptionalNullableMozMap(optional MozMap? arg); michael@0: void passOptionalNullableMozMapWithDefaultValue(optional MozMap? arg = null); michael@0: void passOptionalObjectMozMap(optional MozMap arg); michael@0: void passExternalInterfaceMozMap(MozMap arg); michael@0: void passNullableExternalInterfaceMozMap(MozMap arg); michael@0: void passStringMozMap(MozMap arg); michael@0: void passByteStringMozMap(MozMap arg); michael@0: void passMozMapOfMozMaps(MozMap> arg); michael@0: MozMap receiveMozMap(); michael@0: MozMap? receiveNullableMozMap(); michael@0: MozMap receiveMozMapOfNullableInts(); michael@0: MozMap? receiveNullableMozMapOfNullableInts(); michael@0: //XXXbz No support for MozMap of MozMaps return values yet. michael@0: //MozMap> receiveMozMapOfMozMaps(); michael@0: MozMap receiveAnyMozMap(); michael@0: michael@0: // Typed array types michael@0: void passArrayBuffer(ArrayBuffer arg); michael@0: void passNullableArrayBuffer(ArrayBuffer? arg); michael@0: void passOptionalArrayBuffer(optional ArrayBuffer arg); michael@0: void passOptionalNullableArrayBuffer(optional ArrayBuffer? arg); michael@0: void passOptionalNullableArrayBufferWithDefaultValue(optional ArrayBuffer? arg= null); michael@0: void passArrayBufferView(ArrayBufferView arg); michael@0: void passInt8Array(Int8Array arg); michael@0: void passInt16Array(Int16Array arg); michael@0: void passInt32Array(Int32Array arg); michael@0: void passUint8Array(Uint8Array arg); michael@0: void passUint16Array(Uint16Array arg); michael@0: void passUint32Array(Uint32Array arg); michael@0: void passUint8ClampedArray(Uint8ClampedArray arg); michael@0: void passFloat32Array(Float32Array arg); michael@0: void passFloat64Array(Float64Array arg); michael@0: void passSequenceOfArrayBuffers(sequence arg); michael@0: void passSequenceOfNullableArrayBuffers(sequence arg); michael@0: void passMozMapOfArrayBuffers(MozMap arg); michael@0: void passMozMapOfNullableArrayBuffers(MozMap arg); michael@0: void passVariadicTypedArray(Float32Array... arg); michael@0: void passVariadicNullableTypedArray(Float32Array?... arg); michael@0: Uint8Array receiveUint8Array(); michael@0: michael@0: // DOMString types michael@0: void passString(DOMString arg); michael@0: void passNullableString(DOMString? arg); michael@0: void passOptionalString(optional DOMString arg); michael@0: void passOptionalStringWithDefaultValue(optional DOMString arg = "abc"); michael@0: void passOptionalNullableString(optional DOMString? arg); michael@0: void passOptionalNullableStringWithDefaultValue(optional DOMString? arg = null); michael@0: void passVariadicString(DOMString... arg); michael@0: michael@0: // ByteString types michael@0: void passByteString(ByteString arg); michael@0: void passNullableByteString(ByteString? arg); michael@0: void passOptionalByteString(optional ByteString arg); michael@0: void passOptionalNullableByteString(optional ByteString? arg); michael@0: void passVariadicByteString(ByteString... arg); michael@0: michael@0: // Enumerated types michael@0: void passEnum(TestEnum arg); michael@0: void passNullableEnum(TestEnum? arg); michael@0: void passOptionalEnum(optional TestEnum arg); michael@0: void passEnumWithDefault(optional TestEnum arg = "a"); michael@0: void passOptionalNullableEnum(optional TestEnum? arg); michael@0: void passOptionalNullableEnumWithDefaultValue(optional TestEnum? arg = null); michael@0: void passOptionalNullableEnumWithDefaultValue2(optional TestEnum? arg = "a"); michael@0: TestEnum receiveEnum(); michael@0: TestEnum? receiveNullableEnum(); michael@0: attribute TestEnum enumAttribute; michael@0: readonly attribute TestEnum readonlyEnumAttribute; michael@0: michael@0: // Callback types michael@0: void passCallback(TestCallback arg); michael@0: void passNullableCallback(TestCallback? arg); michael@0: void passOptionalCallback(optional TestCallback arg); michael@0: void passOptionalNullableCallback(optional TestCallback? arg); michael@0: void passOptionalNullableCallbackWithDefaultValue(optional TestCallback? arg = null); michael@0: TestCallback receiveCallback(); michael@0: TestCallback? receiveNullableCallback(); michael@0: void passNullableTreatAsNullCallback(TestTreatAsNullCallback? arg); michael@0: void passOptionalNullableTreatAsNullCallback(optional TestTreatAsNullCallback? arg); michael@0: void passOptionalNullableTreatAsNullCallbackWithDefaultValue(optional TestTreatAsNullCallback? arg = null); michael@0: michael@0: // Any types michael@0: void passAny(any arg); michael@0: void passVariadicAny(any... arg); michael@0: void passOptionalAny(optional any arg); michael@0: void passAnyDefaultNull(optional any arg = null); michael@0: void passSequenceOfAny(sequence arg); michael@0: void passNullableSequenceOfAny(sequence? arg); michael@0: void passOptionalSequenceOfAny(optional sequence arg); michael@0: void passOptionalNullableSequenceOfAny(optional sequence? arg); michael@0: void passOptionalSequenceOfAnyWithDefaultValue(optional sequence? arg = null); michael@0: void passSequenceOfSequenceOfAny(sequence> arg); michael@0: void passSequenceOfNullableSequenceOfAny(sequence?> arg); michael@0: void passNullableSequenceOfNullableSequenceOfAny(sequence?>? arg); michael@0: void passOptionalNullableSequenceOfNullableSequenceOfAny(optional sequence?>? arg); michael@0: void passMozMapOfAny(MozMap arg); michael@0: void passNullableMozMapOfAny(MozMap? arg); michael@0: void passOptionalMozMapOfAny(optional MozMap arg); michael@0: void passOptionalNullableMozMapOfAny(optional MozMap? arg); michael@0: void passOptionalMozMapOfAnyWithDefaultValue(optional MozMap? arg = null); michael@0: void passMozMapOfMozMapOfAny(MozMap> arg); michael@0: void passMozMapOfNullableMozMapOfAny(MozMap?> arg); michael@0: void passNullableMozMapOfNullableMozMapOfAny(MozMap?>? arg); michael@0: void passOptionalNullableMozMapOfNullableMozMapOfAny(optional MozMap?>? arg); michael@0: void passOptionalNullableMozMapOfNullableSequenceOfAny(optional MozMap?>? arg); michael@0: void passOptionalNullableSequenceOfNullableMozMapOfAny(optional sequence?>? arg); michael@0: any receiveAny(); michael@0: michael@0: // object types michael@0: void passObject(object arg); michael@0: void passVariadicObject(object... arg); michael@0: void passNullableObject(object? arg); michael@0: void passVariadicNullableObject(object... arg); michael@0: void passOptionalObject(optional object arg); michael@0: void passOptionalNullableObject(optional object? arg); michael@0: void passOptionalNullableObjectWithDefaultValue(optional object? arg = null); michael@0: void passSequenceOfObject(sequence arg); michael@0: void passSequenceOfNullableObject(sequence arg); michael@0: void passNullableSequenceOfObject(sequence? arg); michael@0: void passOptionalNullableSequenceOfNullableSequenceOfObject(optional sequence?>? arg); michael@0: void passOptionalNullableSequenceOfNullableSequenceOfNullableObject(optional sequence?>? arg); michael@0: void passMozMapOfObject(MozMap arg); michael@0: object receiveObject(); michael@0: object? receiveNullableObject(); michael@0: michael@0: // Union types michael@0: void passUnion((object or long) arg); michael@0: // Some union tests are debug-only to avoid creating all those michael@0: // unused union types in opt builds. michael@0: #ifdef DEBUG michael@0: void passUnion2((long or boolean) arg); michael@0: void passUnion3((object or long or boolean) arg); michael@0: void passUnion4((Node or long or boolean) arg); michael@0: void passUnion5((object or boolean) arg); michael@0: void passUnion6((object or DOMString) arg); michael@0: void passUnion7((object or DOMString or long) arg); michael@0: void passUnion8((object or DOMString or boolean) arg); michael@0: void passUnion9((object or DOMString or long or boolean) arg); michael@0: void passUnion10(optional (EventInit or long) arg); michael@0: void passUnion11(optional (CustomEventInit or long) arg); michael@0: void passUnion12(optional (EventInit or long) arg = 5); michael@0: void passUnion13(optional (object or long?) arg = null); michael@0: void passUnion14(optional (object or long?) arg = 5); michael@0: void passUnionWithCallback((EventHandler or long) arg); michael@0: #endif michael@0: void passUnionWithNullable((object? or long) arg); michael@0: void passNullableUnion((object or long)? arg); michael@0: void passOptionalUnion(optional (object or long) arg); michael@0: void passOptionalNullableUnion(optional (object or long)? arg); michael@0: void passOptionalNullableUnionWithDefaultValue(optional (object or long)? arg = null); michael@0: //void passUnionWithInterfaces((TestInterface or TestExternalInterface) arg); michael@0: //void passUnionWithInterfacesAndNullable((TestInterface? or TestExternalInterface) arg); michael@0: //void passUnionWithSequence((sequence or long) arg); michael@0: void passUnionWithArrayBuffer((ArrayBuffer or long) arg); michael@0: void passUnionWithString((DOMString or object) arg); michael@0: //void passUnionWithEnum((TestEnum or object) arg); michael@0: // Trying to use a callback in a union won't include the test michael@0: // headers, unfortunately, so won't compile. michael@0: // void passUnionWithCallback((TestCallback or long) arg); michael@0: void passUnionWithObject((object or long) arg); michael@0: //void passUnionWithDict((Dict or long) arg); michael@0: michael@0: void passUnionWithDefaultValue1(optional (double or DOMString) arg = ""); michael@0: void passUnionWithDefaultValue2(optional (double or DOMString) arg = 1); michael@0: void passUnionWithDefaultValue3(optional (double or DOMString) arg = 1.5); michael@0: void passUnionWithDefaultValue4(optional (float or DOMString) arg = ""); michael@0: void passUnionWithDefaultValue5(optional (float or DOMString) arg = 1); michael@0: void passUnionWithDefaultValue6(optional (float or DOMString) arg = 1.5); michael@0: void passUnionWithDefaultValue7(optional (unrestricted double or DOMString) arg = ""); michael@0: void passUnionWithDefaultValue8(optional (unrestricted double or DOMString) arg = 1); michael@0: void passUnionWithDefaultValue9(optional (unrestricted double or DOMString) arg = 1.5); michael@0: void passUnionWithDefaultValue10(optional (unrestricted double or DOMString) arg = Infinity); michael@0: void passUnionWithDefaultValue11(optional (unrestricted float or DOMString) arg = ""); michael@0: void passUnionWithDefaultValue12(optional (unrestricted float or DOMString) arg = 1); michael@0: void passUnionWithDefaultValue13(optional (unrestricted float or DOMString) arg = Infinity); michael@0: michael@0: void passNullableUnionWithDefaultValue1(optional (double or DOMString)? arg = ""); michael@0: void passNullableUnionWithDefaultValue2(optional (double or DOMString)? arg = 1); michael@0: void passNullableUnionWithDefaultValue3(optional (double or DOMString)? arg = null); michael@0: void passNullableUnionWithDefaultValue4(optional (float or DOMString)? arg = ""); michael@0: void passNullableUnionWithDefaultValue5(optional (float or DOMString)? arg = 1); michael@0: void passNullableUnionWithDefaultValue6(optional (float or DOMString)? arg = null); michael@0: void passNullableUnionWithDefaultValue7(optional (unrestricted double or DOMString)? arg = ""); michael@0: void passNullableUnionWithDefaultValue8(optional (unrestricted double or DOMString)? arg = 1); michael@0: void passNullableUnionWithDefaultValue9(optional (unrestricted double or DOMString)? arg = null); michael@0: void passNullableUnionWithDefaultValue10(optional (unrestricted float or DOMString)? arg = ""); michael@0: void passNullableUnionWithDefaultValue11(optional (unrestricted float or DOMString)? arg = 1); michael@0: void passNullableUnionWithDefaultValue12(optional (unrestricted float or DOMString)? arg = null); michael@0: michael@0: void passSequenceOfUnions(sequence<(CanvasPattern or CanvasGradient)> arg); michael@0: void passSequenceOfUnions2(sequence<(object or long)> arg); michael@0: void passVariadicUnion((CanvasPattern or CanvasGradient)... arg); michael@0: michael@0: void passSequenceOfNullableUnions(sequence<(CanvasPattern or CanvasGradient)?> arg); michael@0: void passVariadicNullableUnion((CanvasPattern or CanvasGradient)?... arg); michael@0: void passMozMapOfUnions(MozMap<(CanvasPattern or CanvasGradient)> arg); michael@0: // XXXbz no move constructor on some unions michael@0: // void passMozMapOfUnions2(MozMap<(object or long)> arg); michael@0: michael@0: //(CanvasPattern or CanvasGradient) receiveUnion(); michael@0: //(object or long) receiveUnion2(); michael@0: //(CanvasPattern? or CanvasGradient) receiveUnionContainingNull(); michael@0: //(CanvasPattern or CanvasGradient)? receiveNullableUnion(); michael@0: //(object or long)? receiveNullableUnion2(); michael@0: michael@0: //attribute (CanvasPattern or CanvasGradient) writableUnion; michael@0: //attribute (CanvasPattern? or CanvasGradient) writableUnionContainingNull; michael@0: //attribute (CanvasPattern or CanvasGradient)? writableNullableUnion; michael@0: michael@0: // Date types michael@0: void passDate(Date arg); michael@0: void passNullableDate(Date? arg); michael@0: void passOptionalDate(optional Date arg); michael@0: void passOptionalNullableDate(optional Date? arg); michael@0: void passOptionalNullableDateWithDefaultValue(optional Date? arg = null); michael@0: void passDateSequence(sequence arg); michael@0: void passNullableDateSequence(sequence arg); michael@0: void passDateMozMap(MozMap arg); michael@0: Date receiveDate(); michael@0: Date? receiveNullableDate(); michael@0: michael@0: // binaryNames tests michael@0: void methodRenamedFrom(); michael@0: void methodRenamedFrom(byte argument); michael@0: readonly attribute byte attributeGetterRenamedFrom; michael@0: attribute byte attributeRenamedFrom; michael@0: michael@0: void passDictionary(optional Dict x); michael@0: [Cached, Pure] michael@0: readonly attribute Dict readonlyDictionary; michael@0: [Cached, Pure] michael@0: readonly attribute Dict? readonlyNullableDictionary; michael@0: [Cached, Pure] michael@0: attribute Dict writableDictionary; michael@0: [Cached, Pure, Frozen] michael@0: readonly attribute Dict readonlyFrozenDictionary; michael@0: [Cached, Pure, Frozen] michael@0: readonly attribute Dict? readonlyFrozenNullableDictionary; michael@0: [Cached, Pure, Frozen] michael@0: attribute Dict writableFrozenDictionary; michael@0: Dict receiveDictionary(); michael@0: Dict? receiveNullableDictionary(); michael@0: void passOtherDictionary(optional GrandparentDict x); michael@0: void passSequenceOfDictionaries(sequence x); michael@0: void passMozMapOfDictionaries(MozMap x); michael@0: // No support for nullable dictionaries inside a sequence (nor should there be) michael@0: // void passSequenceOfNullableDictionaries(sequence x); michael@0: void passDictionaryOrLong(optional Dict x); michael@0: void passDictionaryOrLong(long x); michael@0: michael@0: void passDictContainingDict(optional DictContainingDict arg); michael@0: void passDictContainingSequence(optional DictContainingSequence arg); michael@0: DictContainingSequence receiveDictContainingSequence(); michael@0: michael@0: // EnforceRange/Clamp tests michael@0: void dontEnforceRangeOrClamp(byte arg); michael@0: void doEnforceRange([EnforceRange] byte arg); michael@0: void doClamp([Clamp] byte arg); michael@0: [EnforceRange] attribute byte enforcedByte; michael@0: [Clamp] attribute byte clampedByte; michael@0: michael@0: // Typedefs michael@0: const myLong myLongConstant = 5; michael@0: void exerciseTypedefInterfaces1(AnotherNameForTestInterface arg); michael@0: AnotherNameForTestInterface exerciseTypedefInterfaces2(NullableTestInterface arg); michael@0: void exerciseTypedefInterfaces3(YetAnotherNameForTestInterface arg); michael@0: michael@0: // Static methods and attributes michael@0: static attribute boolean staticAttribute; michael@0: static void staticMethod(boolean arg); michael@0: static void staticMethodWithContext(any arg); michael@0: michael@0: // Overload resolution tests michael@0: //void overload1(DOMString... strs); michael@0: boolean overload1(TestInterface arg); michael@0: TestInterface overload1(DOMString strs, TestInterface arg); michael@0: void overload2(TestInterface arg); michael@0: void overload2(optional Dict arg); michael@0: void overload2(boolean arg); michael@0: void overload2(DOMString arg); michael@0: void overload2(Date arg); michael@0: void overload3(TestInterface arg); michael@0: void overload3(TestCallback arg); michael@0: void overload3(boolean arg); michael@0: void overload4(TestInterface arg); michael@0: void overload4(TestCallbackInterface arg); michael@0: void overload4(DOMString arg); michael@0: void overload5(long arg); michael@0: void overload5(TestEnum arg); michael@0: void overload6(long arg); michael@0: void overload6(boolean arg); michael@0: void overload7(long arg); michael@0: void overload7(boolean arg); michael@0: void overload7(ByteString arg); michael@0: void overload8(long arg); michael@0: void overload8(TestInterface arg); michael@0: void overload9(long? arg); michael@0: void overload9(DOMString arg); michael@0: void overload10(long? arg); michael@0: void overload10(object arg); michael@0: void overload11(long arg); michael@0: void overload11(DOMString? arg); michael@0: void overload12(long arg); michael@0: void overload12(boolean? arg); michael@0: void overload13(long? arg); michael@0: void overload13(boolean arg); michael@0: void overload14(optional long arg); michael@0: void overload14(TestInterface arg); michael@0: void overload15(long arg); michael@0: void overload15(optional TestInterface arg); michael@0: void overload16(long arg); michael@0: void overload16(optional TestInterface? arg); michael@0: michael@0: // Variadic handling michael@0: void passVariadicThirdArg(DOMString arg1, long arg2, TestInterface... arg3); michael@0: michael@0: // Conditionally exposed methods/attributes michael@0: [Pref="abc.def"] michael@0: readonly attribute boolean prefable1; michael@0: [Pref="abc.def"] michael@0: readonly attribute boolean prefable2; michael@0: [Pref="ghi.jkl"] michael@0: readonly attribute boolean prefable3; michael@0: [Pref="ghi.jkl"] michael@0: readonly attribute boolean prefable4; michael@0: [Pref="abc.def"] michael@0: readonly attribute boolean prefable5; michael@0: [Pref="abc.def", Func="nsGenericHTMLElement::TouchEventsEnabled"] michael@0: readonly attribute boolean prefable6; michael@0: [Pref="abc.def", Func="nsGenericHTMLElement::TouchEventsEnabled"] michael@0: readonly attribute boolean prefable7; michael@0: [Pref="ghi.jkl", Func="nsGenericHTMLElement::TouchEventsEnabled"] michael@0: readonly attribute boolean prefable8; michael@0: [Pref="abc.def", Func="nsGenericHTMLElement::TouchEventsEnabled"] michael@0: readonly attribute boolean prefable9; michael@0: [Pref="abc.def"] michael@0: void prefable10(); michael@0: [Pref="abc.def", Func="nsGenericHTMLElement::TouchEventsEnabled"] michael@0: void prefable11(); michael@0: [Pref="abc.def", Func="TestFuncControlledMember"] michael@0: readonly attribute boolean prefable12; michael@0: [Pref="abc.def", Func="nsGenericHTMLElement::TouchEventsEnabled"] michael@0: void prefable13(); michael@0: [Pref="abc.def", Func="TestFuncControlledMember"] michael@0: readonly attribute boolean prefable14; michael@0: [Func="TestFuncControlledMember"] michael@0: readonly attribute boolean prefable15; michael@0: [Func="TestFuncControlledMember"] michael@0: readonly attribute boolean prefable16; michael@0: [Pref="abc.def", Func="TestFuncControlledMember"] michael@0: void prefable17(); michael@0: [Func="TestFuncControlledMember"] michael@0: void prefable18(); michael@0: [Func="TestFuncControlledMember"] michael@0: void prefable19(); michael@0: michael@0: // Miscellania michael@0: [LenientThis] attribute long attrWithLenientThis; michael@0: [Unforgeable] readonly attribute long unforgeableAttr; michael@0: [Unforgeable, ChromeOnly] readonly attribute long unforgeableAttr2; michael@0: stringifier; michael@0: void passRenamedInterface(TestRenamedInterface arg); michael@0: [PutForwards=writableByte] readonly attribute TestExampleInterface putForwardsAttr; michael@0: [PutForwards=writableByte, LenientThis] readonly attribute TestExampleInterface putForwardsAttr2; michael@0: [PutForwards=writableByte, ChromeOnly] readonly attribute TestExampleInterface putForwardsAttr3; michael@0: [Throws] void throwingMethod(); michael@0: [Throws] attribute boolean throwingAttr; michael@0: [GetterThrows] attribute boolean throwingGetterAttr; michael@0: [SetterThrows] attribute boolean throwingSetterAttr; michael@0: legacycaller short(unsigned long arg1, TestInterface arg2); michael@0: void passArgsWithDefaults(optional long arg1, michael@0: optional TestInterface? arg2 = null, michael@0: optional Dict arg3, optional double arg4 = 5.0, michael@0: optional float arg5); michael@0: attribute any jsonifierShouldSkipThis; michael@0: attribute TestParentInterface jsonifierShouldSkipThis2; michael@0: attribute TestCallbackInterface jsonifierShouldSkipThis3; michael@0: jsonifier; michael@0: michael@0: // If you add things here, add them to TestCodeGen and TestJSImplGen as well michael@0: }; michael@0: michael@0: interface TestExampleProxyInterface { michael@0: getter long longIndexedGetter(unsigned long ix); michael@0: deleter void (unsigned long ix); michael@0: setter creator void longIndexedSetter(unsigned long y, long z); michael@0: stringifier DOMString myStringifier(); michael@0: getter short shortNameGetter(DOMString nom); michael@0: deleter void (DOMString nomnom); michael@0: setter creator void shortNamedSetter(DOMString me, short value); michael@0: };