2012-05-23 20:44:48 +04:00
|
|
|
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
|
|
* You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*/
|
|
|
|
|
2012-09-06 18:23:51 +04:00
|
|
|
typedef long myLong;
|
|
|
|
typedef TestInterface AnotherNameForTestInterface;
|
|
|
|
typedef TestInterface? NullableTestInterface;
|
|
|
|
|
2012-05-30 07:45:18 +04:00
|
|
|
interface TestExternalInterface;
|
|
|
|
|
2012-10-25 00:10:49 +04:00
|
|
|
interface TestRenamedInterface {
|
|
|
|
};
|
|
|
|
|
2012-07-19 22:48:58 +04:00
|
|
|
callback interface TestCallbackInterface {
|
|
|
|
readonly attribute long foo;
|
2013-01-28 17:34:30 +04:00
|
|
|
attribute DOMString bar;
|
2012-07-19 22:48:58 +04:00
|
|
|
void doSomething();
|
2013-01-28 17:34:30 +04:00
|
|
|
long doSomethingElse(DOMString arg, TestInterface otherArg);
|
|
|
|
};
|
|
|
|
|
|
|
|
callback interface TestSingleOperationCallbackInterface {
|
|
|
|
TestInterface doSomething(short arg, sequence<double> anotherArg);
|
2012-07-19 22:48:58 +04:00
|
|
|
};
|
|
|
|
|
2012-05-30 07:45:18 +04:00
|
|
|
enum TestEnum {
|
|
|
|
"a",
|
|
|
|
"b"
|
|
|
|
};
|
|
|
|
|
|
|
|
callback TestCallback = void();
|
2012-10-10 23:53:02 +04:00
|
|
|
[TreatNonCallableAsNull] callback TestTreatAsNullCallback = void();
|
2012-05-30 07:45:18 +04:00
|
|
|
|
2012-11-09 19:43:58 +04:00
|
|
|
// Callback return value tests
|
|
|
|
callback TestIntegerReturn = long();
|
|
|
|
callback TestNullableIntegerReturn = long?();
|
|
|
|
callback TestBooleanReturn = boolean();
|
|
|
|
callback TestFloatReturn = float();
|
2012-11-09 19:43:58 +04:00
|
|
|
callback TestStringReturn = DOMString(long arg);
|
2012-11-09 19:43:58 +04:00
|
|
|
callback TestEnumReturn = TestEnum();
|
|
|
|
callback TestInterfaceReturn = TestInterface();
|
|
|
|
callback TestNullableInterfaceReturn = TestInterface?();
|
|
|
|
callback TestExternalInterfaceReturn = TestExternalInterface();
|
|
|
|
callback TestNullableExternalInterfaceReturn = TestExternalInterface?();
|
|
|
|
callback TestCallbackInterfaceReturn = TestCallbackInterface();
|
|
|
|
callback TestNullableCallbackInterfaceReturn = TestCallbackInterface?();
|
|
|
|
callback TestCallbackReturn = TestCallback();
|
|
|
|
callback TestNullableCallbackReturn = TestCallback?();
|
|
|
|
callback TestObjectReturn = object();
|
|
|
|
callback TestNullableObjectReturn = object?();
|
|
|
|
callback TestTypedArrayReturn = ArrayBuffer();
|
|
|
|
callback TestNullableTypedArrayReturn = ArrayBuffer?();
|
|
|
|
callback TestSequenceReturn = sequence<boolean>();
|
|
|
|
callback TestNullableSequenceReturn = sequence<boolean>?();
|
2012-11-09 19:43:58 +04:00
|
|
|
// Callback argument tests
|
|
|
|
callback TestIntegerArguments = sequence<long>(long arg1, long? arg2,
|
|
|
|
sequence<long> arg3,
|
|
|
|
sequence<long?>? arg4);
|
|
|
|
callback TestInterfaceArguments = void(TestInterface arg1, TestInterface? arg2,
|
|
|
|
TestExternalInterface arg3,
|
|
|
|
TestExternalInterface? arg4,
|
|
|
|
TestCallbackInterface arg5,
|
|
|
|
TestCallbackInterface? arg6,
|
|
|
|
sequence<TestInterface> arg7,
|
|
|
|
sequence<TestInterface?>? arg8,
|
|
|
|
sequence<TestExternalInterface> arg9,
|
|
|
|
sequence<TestExternalInterface?>? arg10,
|
|
|
|
sequence<TestCallbackInterface> arg11,
|
|
|
|
sequence<TestCallbackInterface?>? arg12);
|
|
|
|
callback TestStringEnumArguments = void(DOMString myString, DOMString? nullString,
|
|
|
|
TestEnum myEnum);
|
|
|
|
callback TestObjectArguments = void(object anObj, object? anotherObj,
|
|
|
|
ArrayBuffer buf, ArrayBuffer? buf2);
|
|
|
|
callback TestOptionalArguments = void(optional DOMString aString,
|
|
|
|
optional object something,
|
|
|
|
optional sequence<TestInterface> aSeq,
|
|
|
|
optional TestInterface? anInterface,
|
|
|
|
optional TestInterface anotherInterface,
|
|
|
|
optional long aLong);
|
2012-11-09 19:43:58 +04:00
|
|
|
|
2012-06-12 02:21:35 +04:00
|
|
|
TestInterface implements ImplementedInterface;
|
|
|
|
|
2012-07-27 08:09:10 +04:00
|
|
|
// This interface is only for use in the constructor below
|
|
|
|
interface OnlyForUseInConstructor {
|
|
|
|
};
|
|
|
|
|
2012-06-02 05:26:20 +04:00
|
|
|
[Constructor,
|
|
|
|
Constructor(DOMString str),
|
2012-10-18 05:17:16 +04:00
|
|
|
Constructor(unsigned long num, boolean? boolArg),
|
2012-06-05 05:30:00 +04:00
|
|
|
Constructor(TestInterface? iface),
|
2013-01-22 14:51:15 +04:00
|
|
|
Constructor(long arg1, IndirectlyImplementedInterface iface),
|
|
|
|
// Constructor(long arg1, long arg2, (TestInterface or OnlyForUseInConstructor) arg3),
|
|
|
|
NamedConstructor=Test,
|
|
|
|
NamedConstructor=Test(DOMString str)
|
2012-07-27 08:09:10 +04:00
|
|
|
]
|
2012-05-23 20:44:48 +04:00
|
|
|
interface TestInterface {
|
2012-05-23 20:44:48 +04:00
|
|
|
// Integer types
|
2012-09-05 17:21:33 +04:00
|
|
|
// XXXbz add tests for throwing versions of all the integer stuff
|
2012-05-23 20:44:48 +04:00
|
|
|
readonly attribute byte readonlyByte;
|
|
|
|
attribute byte writableByte;
|
|
|
|
void passByte(byte arg);
|
|
|
|
byte receiveByte();
|
2012-05-30 07:45:18 +04:00
|
|
|
void passOptionalByte(optional byte arg);
|
|
|
|
void passOptionalByteWithDefault(optional byte arg = 0);
|
|
|
|
void passNullableByte(byte? arg);
|
|
|
|
void passOptionalNullableByte(optional byte? arg);
|
2012-12-12 02:50:56 +04:00
|
|
|
void passVariadicByte(byte... arg);
|
2012-05-23 20:44:48 +04:00
|
|
|
|
|
|
|
readonly attribute short readonlyShort;
|
|
|
|
attribute short writableShort;
|
|
|
|
void passShort(short arg);
|
|
|
|
short receiveShort();
|
2012-05-30 07:45:18 +04:00
|
|
|
void passOptionalShort(optional short arg);
|
2012-07-31 08:22:22 +04:00
|
|
|
void passOptionalShortWithDefault(optional short arg = 5);
|
2012-05-23 20:44:48 +04:00
|
|
|
|
|
|
|
readonly attribute long readonlyLong;
|
|
|
|
attribute long writableLong;
|
|
|
|
void passLong(long arg);
|
|
|
|
long receiveLong();
|
2012-05-30 07:45:18 +04:00
|
|
|
void passOptionalLong(optional long arg);
|
2012-07-31 08:22:22 +04:00
|
|
|
void passOptionalLongWithDefault(optional long arg = 7);
|
2012-05-23 20:44:48 +04:00
|
|
|
|
|
|
|
readonly attribute long long readonlyLongLong;
|
2012-05-30 07:45:18 +04:00
|
|
|
attribute long long writableLongLong;
|
2012-05-23 20:44:48 +04:00
|
|
|
void passLongLong(long long arg);
|
|
|
|
long long receiveLongLong();
|
2012-05-30 07:45:18 +04:00
|
|
|
void passOptionalLongLong(optional long long arg);
|
2012-07-31 08:22:22 +04:00
|
|
|
void passOptionalLongLongWithDefault(optional long long arg = -12);
|
2012-05-23 20:44:48 +04:00
|
|
|
|
|
|
|
readonly attribute octet readonlyOctet;
|
|
|
|
attribute octet writableOctet;
|
|
|
|
void passOctet(octet arg);
|
|
|
|
octet receiveOctet();
|
2012-05-30 07:45:18 +04:00
|
|
|
void passOptionalOctet(optional octet arg);
|
2012-07-31 08:22:22 +04:00
|
|
|
void passOptionalOctetWithDefault(optional octet arg = 19);
|
2012-05-23 20:44:48 +04:00
|
|
|
|
|
|
|
readonly attribute unsigned short readonlyUnsignedShort;
|
|
|
|
attribute unsigned short writableUnsignedShort;
|
|
|
|
void passUnsignedShort(unsigned short arg);
|
|
|
|
unsigned short receiveUnsignedShort();
|
2012-05-30 07:45:18 +04:00
|
|
|
void passOptionalUnsignedShort(optional unsigned short arg);
|
2012-07-31 08:22:22 +04:00
|
|
|
void passOptionalUnsignedShortWithDefault(optional unsigned short arg = 2);
|
2012-05-23 20:44:48 +04:00
|
|
|
|
|
|
|
readonly attribute unsigned long readonlyUnsignedLong;
|
|
|
|
attribute unsigned long writableUnsignedLong;
|
|
|
|
void passUnsignedLong(unsigned long arg);
|
|
|
|
unsigned long receiveUnsignedLong();
|
2012-05-30 07:45:18 +04:00
|
|
|
void passOptionalUnsignedLong(optional unsigned long arg);
|
2012-07-31 08:22:22 +04:00
|
|
|
void passOptionalUnsignedLongWithDefault(optional unsigned long arg = 6);
|
2012-05-23 20:44:48 +04:00
|
|
|
|
|
|
|
readonly attribute unsigned long long readonlyUnsignedLongLong;
|
|
|
|
attribute unsigned long long writableUnsignedLongLong;
|
|
|
|
void passUnsignedLongLong(unsigned long long arg);
|
|
|
|
unsigned long long receiveUnsignedLongLong();
|
2012-05-30 07:45:18 +04:00
|
|
|
void passOptionalUnsignedLongLong(optional unsigned long long arg);
|
2012-07-31 08:22:22 +04:00
|
|
|
void passOptionalUnsignedLongLongWithDefault(optional unsigned long long arg = 17);
|
2012-05-23 20:44:48 +04:00
|
|
|
|
2012-11-28 00:32:05 +04:00
|
|
|
attribute float writableFloat;
|
|
|
|
attribute unrestricted float writableUnrestrictedFloat;
|
|
|
|
attribute float? writableNullableFloat;
|
|
|
|
attribute unrestricted float? writableNullableUnrestrictedFloat;
|
|
|
|
attribute double writableDouble;
|
|
|
|
attribute unrestricted double writableUnrestrictedDouble;
|
|
|
|
attribute double? writableNullableDouble;
|
|
|
|
attribute unrestricted double? writableNullableUnrestrictedDouble;
|
|
|
|
void passFloat(float arg1, unrestricted float arg2,
|
|
|
|
float? arg3, unrestricted float? arg4,
|
|
|
|
double arg5, unrestricted double arg6,
|
|
|
|
double? arg7, unrestricted double? arg8,
|
|
|
|
sequence<float> arg9, sequence<unrestricted float> arg10,
|
|
|
|
sequence<float?> arg11, sequence<unrestricted float?> arg12,
|
|
|
|
sequence<double> arg13, sequence<unrestricted double> arg14,
|
|
|
|
sequence<double?> arg15, sequence<unrestricted double?> arg16);
|
|
|
|
[LenientFloat]
|
|
|
|
void passLenientFloat(float arg1, unrestricted float arg2,
|
|
|
|
float? arg3, unrestricted float? arg4,
|
|
|
|
double arg5, unrestricted double arg6,
|
|
|
|
double? arg7, unrestricted double? arg8,
|
|
|
|
sequence<float> arg9,
|
|
|
|
sequence<unrestricted float> arg10,
|
|
|
|
sequence<float?> arg11,
|
|
|
|
sequence<unrestricted float?> arg12,
|
|
|
|
sequence<double> arg13,
|
|
|
|
sequence<unrestricted double> arg14,
|
|
|
|
sequence<double?> arg15,
|
|
|
|
sequence<unrestricted double?> arg16);
|
|
|
|
[LenientFloat]
|
|
|
|
attribute float lenientFloatAttr;
|
|
|
|
[LenientFloat]
|
|
|
|
attribute double lenientDoubleAttr;
|
|
|
|
|
2012-05-23 20:44:48 +04:00
|
|
|
// Castable interface types
|
2012-09-05 17:21:33 +04:00
|
|
|
// XXXbz add tests for throwing versions of all the castable interface stuff
|
2012-05-23 20:44:48 +04:00
|
|
|
TestInterface receiveSelf();
|
|
|
|
TestInterface? receiveNullableSelf();
|
|
|
|
TestInterface receiveWeakSelf();
|
|
|
|
TestInterface? receiveWeakNullableSelf();
|
|
|
|
// A verstion to test for casting to TestInterface&
|
|
|
|
void passSelf(TestInterface arg);
|
|
|
|
// A version we can use to test for the exact type passed in
|
|
|
|
void passSelf2(TestInterface arg);
|
|
|
|
void passNullableSelf(TestInterface? arg);
|
|
|
|
attribute TestInterface nonNullSelf;
|
|
|
|
attribute TestInterface? nullableSelf;
|
2012-05-30 07:45:18 +04:00
|
|
|
// Optional arguments
|
|
|
|
void passOptionalSelf(optional TestInterface? arg);
|
|
|
|
void passOptionalNonNullSelf(optional TestInterface arg);
|
|
|
|
void passOptionalSelfWithDefault(optional TestInterface? arg = null);
|
2012-05-25 09:08:26 +04:00
|
|
|
|
2012-06-16 00:25:50 +04:00
|
|
|
// Non-wrapper-cache interface types
|
|
|
|
[Creator]
|
|
|
|
TestNonWrapperCacheInterface receiveNonWrapperCacheInterface();
|
|
|
|
[Creator]
|
|
|
|
TestNonWrapperCacheInterface? receiveNullableNonWrapperCacheInterface();
|
|
|
|
[Creator]
|
|
|
|
sequence<TestNonWrapperCacheInterface> receiveNonWrapperCacheInterfaceSequence();
|
|
|
|
[Creator]
|
|
|
|
sequence<TestNonWrapperCacheInterface?> receiveNullableNonWrapperCacheInterfaceSequence();
|
|
|
|
[Creator]
|
|
|
|
sequence<TestNonWrapperCacheInterface>? receiveNonWrapperCacheInterfaceNullableSequence();
|
|
|
|
[Creator]
|
|
|
|
sequence<TestNonWrapperCacheInterface?>? receiveNullableNonWrapperCacheInterfaceNullableSequence();
|
|
|
|
|
2012-05-30 07:45:18 +04:00
|
|
|
// Non-castable interface types
|
2013-01-08 22:05:36 +04:00
|
|
|
IndirectlyImplementedInterface receiveOther();
|
|
|
|
IndirectlyImplementedInterface? receiveNullableOther();
|
|
|
|
IndirectlyImplementedInterface receiveWeakOther();
|
|
|
|
IndirectlyImplementedInterface? receiveWeakNullableOther();
|
|
|
|
// A verstion to test for casting to IndirectlyImplementedInterface&
|
|
|
|
void passOther(IndirectlyImplementedInterface arg);
|
2012-05-30 07:45:18 +04:00
|
|
|
// A version we can use to test for the exact type passed in
|
2013-01-08 22:05:36 +04:00
|
|
|
void passOther2(IndirectlyImplementedInterface arg);
|
|
|
|
void passNullableOther(IndirectlyImplementedInterface? arg);
|
|
|
|
attribute IndirectlyImplementedInterface nonNullOther;
|
|
|
|
attribute IndirectlyImplementedInterface? nullableOther;
|
2012-05-30 07:45:18 +04:00
|
|
|
// Optional arguments
|
2013-01-08 22:05:36 +04:00
|
|
|
void passOptionalOther(optional IndirectlyImplementedInterface? arg);
|
|
|
|
void passOptionalNonNullOther(optional IndirectlyImplementedInterface arg);
|
|
|
|
void passOptionalOtherWithDefault(optional IndirectlyImplementedInterface? arg = null);
|
2012-05-30 07:45:18 +04:00
|
|
|
|
|
|
|
// External interface types
|
|
|
|
TestExternalInterface receiveExternal();
|
|
|
|
TestExternalInterface? receiveNullableExternal();
|
|
|
|
TestExternalInterface receiveWeakExternal();
|
|
|
|
TestExternalInterface? receiveWeakNullableExternal();
|
|
|
|
// A verstion to test for casting to TestExternalInterface&
|
|
|
|
void passExternal(TestExternalInterface arg);
|
|
|
|
// A version we can use to test for the exact type passed in
|
|
|
|
void passExternal2(TestExternalInterface arg);
|
|
|
|
void passNullableExternal(TestExternalInterface? arg);
|
|
|
|
attribute TestExternalInterface nonNullExternal;
|
|
|
|
attribute TestExternalInterface? nullableExternal;
|
2012-05-30 07:45:18 +04:00
|
|
|
// Optional arguments
|
|
|
|
void passOptionalExternal(optional TestExternalInterface? arg);
|
|
|
|
void passOptionalNonNullExternal(optional TestExternalInterface arg);
|
|
|
|
void passOptionalExternalWithDefault(optional TestExternalInterface? arg = null);
|
2012-05-30 07:45:18 +04:00
|
|
|
|
2012-07-19 22:48:58 +04:00
|
|
|
// Callback interface types
|
|
|
|
TestCallbackInterface receiveCallbackInterface();
|
|
|
|
TestCallbackInterface? receiveNullableCallbackInterface();
|
|
|
|
TestCallbackInterface receiveWeakCallbackInterface();
|
|
|
|
TestCallbackInterface? receiveWeakNullableCallbackInterface();
|
|
|
|
// A verstion to test for casting to TestCallbackInterface&
|
|
|
|
void passCallbackInterface(TestCallbackInterface arg);
|
|
|
|
// A version we can use to test for the exact type passed in
|
|
|
|
void passCallbackInterface2(TestCallbackInterface arg);
|
|
|
|
void passNullableCallbackInterface(TestCallbackInterface? arg);
|
|
|
|
attribute TestCallbackInterface nonNullCallbackInterface;
|
|
|
|
attribute TestCallbackInterface? nullableCallbackInterface;
|
|
|
|
// Optional arguments
|
|
|
|
void passOptionalCallbackInterface(optional TestCallbackInterface? arg);
|
|
|
|
void passOptionalNonNullCallbackInterface(optional TestCallbackInterface arg);
|
|
|
|
void passOptionalCallbackInterfaceWithDefault(optional TestCallbackInterface? arg = null);
|
|
|
|
|
2012-07-19 22:48:58 +04:00
|
|
|
// Miscellaneous interface tests
|
|
|
|
IndirectlyImplementedInterface receiveConsequentialInterface();
|
|
|
|
void passConsequentialInterface(IndirectlyImplementedInterface arg);
|
|
|
|
|
2012-05-25 09:08:26 +04:00
|
|
|
// Sequence types
|
|
|
|
sequence<long> receiveSequence();
|
|
|
|
sequence<long>? receiveNullableSequence();
|
2012-05-30 07:45:18 +04:00
|
|
|
sequence<long?> receiveSequenceOfNullableInts();
|
|
|
|
sequence<long?>? receiveNullableSequenceOfNullableInts();
|
2012-05-25 09:08:26 +04:00
|
|
|
void passSequence(sequence<long> arg);
|
|
|
|
void passNullableSequence(sequence<long>? arg);
|
2012-05-30 07:45:18 +04:00
|
|
|
void passSequenceOfNullableInts(sequence<long?> arg);
|
|
|
|
void passOptionalSequenceOfNullableInts(optional sequence<long?> arg);
|
|
|
|
void passOptionalNullableSequenceOfNullableInts(optional sequence<long?>? arg);
|
2012-05-25 09:08:26 +04:00
|
|
|
sequence<TestInterface> receiveCastableObjectSequence();
|
2012-10-10 23:57:57 +04:00
|
|
|
sequence<TestCallbackInterface> receiveCallbackObjectSequence();
|
2012-05-25 09:08:26 +04:00
|
|
|
sequence<TestInterface?> receiveNullableCastableObjectSequence();
|
2012-10-10 23:57:57 +04:00
|
|
|
sequence<TestCallbackInterface?> receiveNullableCallbackObjectSequence();
|
2012-05-25 09:08:26 +04:00
|
|
|
sequence<TestInterface>? receiveCastableObjectNullableSequence();
|
|
|
|
sequence<TestInterface?>? receiveNullableCastableObjectNullableSequence();
|
|
|
|
sequence<TestInterface> receiveWeakCastableObjectSequence();
|
|
|
|
sequence<TestInterface?> receiveWeakNullableCastableObjectSequence();
|
|
|
|
sequence<TestInterface>? receiveWeakCastableObjectNullableSequence();
|
|
|
|
sequence<TestInterface?>? receiveWeakNullableCastableObjectNullableSequence();
|
|
|
|
void passCastableObjectSequence(sequence<TestInterface> arg);
|
|
|
|
void passNullableCastableObjectSequence(sequence<TestInterface?> arg);
|
|
|
|
void passCastableObjectNullableSequence(sequence<TestInterface>? arg);
|
|
|
|
void passNullableCastableObjectNullableSequence(sequence<TestInterface?>? arg);
|
2012-05-30 07:45:18 +04:00
|
|
|
void passOptionalSequence(optional sequence<long> arg);
|
|
|
|
void passOptionalNullableSequence(optional sequence<long>? arg);
|
|
|
|
void passOptionalNullableSequenceWithDefaultValue(optional sequence<long>? arg = null);
|
|
|
|
void passOptionalObjectSequence(optional sequence<TestInterface> arg);
|
2012-11-28 00:20:40 +04:00
|
|
|
void passExternalInterfaceSequence(sequence<TestExternalInterface> arg);
|
|
|
|
void passNullableExternalInterfaceSequence(sequence<TestExternalInterface?> arg);
|
2012-05-30 07:45:18 +04:00
|
|
|
|
2012-06-12 18:22:05 +04:00
|
|
|
sequence<DOMString> receiveStringSequence();
|
|
|
|
void passStringSequence(sequence<DOMString> arg);
|
|
|
|
|
2012-06-13 19:15:05 +04:00
|
|
|
sequence<any> receiveAnySequence();
|
2012-09-21 06:47:47 +04:00
|
|
|
sequence<any>? receiveNullableAnySequence();
|
2012-06-13 19:15:05 +04:00
|
|
|
|
2012-05-30 07:45:18 +04:00
|
|
|
// Typed array types
|
|
|
|
void passArrayBuffer(ArrayBuffer arg);
|
|
|
|
void passNullableArrayBuffer(ArrayBuffer? arg);
|
|
|
|
void passOptionalArrayBuffer(optional ArrayBuffer arg);
|
|
|
|
void passOptionalNullableArrayBuffer(optional ArrayBuffer? arg);
|
|
|
|
void passOptionalNullableArrayBufferWithDefaultValue(optional ArrayBuffer? arg= null);
|
2012-05-30 07:45:18 +04:00
|
|
|
void passArrayBufferView(ArrayBufferView arg);
|
|
|
|
void passInt8Array(Int8Array arg);
|
|
|
|
void passInt16Array(Int16Array arg);
|
|
|
|
void passInt32Array(Int32Array arg);
|
|
|
|
void passUint8Array(Uint8Array arg);
|
|
|
|
void passUint16Array(Uint16Array arg);
|
|
|
|
void passUint32Array(Uint32Array arg);
|
|
|
|
void passUint8ClampedArray(Uint8ClampedArray arg);
|
|
|
|
void passFloat32Array(Float32Array arg);
|
|
|
|
void passFloat64Array(Float64Array arg);
|
2012-08-28 21:10:09 +04:00
|
|
|
Uint8Array receiveUint8Array();
|
2012-05-30 07:45:18 +04:00
|
|
|
|
|
|
|
// String types
|
|
|
|
void passString(DOMString arg);
|
|
|
|
void passNullableString(DOMString? arg);
|
|
|
|
void passOptionalString(optional DOMString arg);
|
2012-07-31 08:22:23 +04:00
|
|
|
void passOptionalStringWithDefaultValue(optional DOMString arg = "abc");
|
2012-05-30 07:45:18 +04:00
|
|
|
void passOptionalNullableString(optional DOMString? arg);
|
|
|
|
void passOptionalNullableStringWithDefaultValue(optional DOMString? arg = null);
|
2012-12-12 02:50:56 +04:00
|
|
|
void passVariadicString(DOMString... arg);
|
2012-05-30 07:45:18 +04:00
|
|
|
|
|
|
|
// Enumerated types
|
|
|
|
void passEnum(TestEnum arg);
|
|
|
|
// No support for nullable enums yet
|
|
|
|
// void passNullableEnum(TestEnum? arg);
|
|
|
|
void passOptionalEnum(optional TestEnum arg);
|
2012-07-31 08:22:23 +04:00
|
|
|
void passEnumWithDefault(optional TestEnum arg = "a");
|
2012-05-30 07:45:18 +04:00
|
|
|
// void passOptionalNullableEnum(optional TestEnum? arg);
|
|
|
|
// void passOptionalNullableEnumWithDefaultValue(optional TestEnum? arg = null);
|
|
|
|
TestEnum receiveEnum();
|
2012-06-21 11:11:07 +04:00
|
|
|
attribute TestEnum enumAttribute;
|
|
|
|
readonly attribute TestEnum readonlyEnumAttribute;
|
2012-05-30 07:45:18 +04:00
|
|
|
|
|
|
|
// Callback types
|
|
|
|
void passCallback(TestCallback arg);
|
|
|
|
void passNullableCallback(TestCallback? arg);
|
|
|
|
void passOptionalCallback(optional TestCallback arg);
|
|
|
|
void passOptionalNullableCallback(optional TestCallback? arg);
|
|
|
|
void passOptionalNullableCallbackWithDefaultValue(optional TestCallback? arg = null);
|
|
|
|
TestCallback receiveCallback();
|
|
|
|
TestCallback? receiveNullableCallback();
|
2012-10-10 23:53:02 +04:00
|
|
|
void passNullableTreatAsNullCallback(TestTreatAsNullCallback? arg);
|
|
|
|
void passOptionalNullableTreatAsNullCallback(optional TestTreatAsNullCallback? arg);
|
|
|
|
void passOptionalNullableTreatAsNullCallbackWithDefaultValue(optional TestTreatAsNullCallback? arg = null);
|
2013-01-03 07:03:25 +04:00
|
|
|
attribute TestTreatAsNullCallback treatAsNullCallback;
|
|
|
|
attribute TestTreatAsNullCallback? nullableTreatAsNullCallback;
|
2012-05-30 07:45:18 +04:00
|
|
|
|
|
|
|
// Any types
|
|
|
|
void passAny(any arg);
|
|
|
|
void passOptionalAny(optional any arg);
|
2012-07-31 08:22:22 +04:00
|
|
|
void passAnyDefaultNull(optional any arg = null);
|
2012-05-30 07:45:18 +04:00
|
|
|
any receiveAny();
|
|
|
|
|
|
|
|
// object types
|
|
|
|
void passObject(object arg);
|
|
|
|
void passNullableObject(object? arg);
|
|
|
|
void passOptionalObject(optional object arg);
|
|
|
|
void passOptionalNullableObject(optional object? arg);
|
|
|
|
void passOptionalNullableObjectWithDefaultValue(optional object? arg = null);
|
|
|
|
object receiveObject();
|
|
|
|
object? receiveNullableObject();
|
2012-05-19 01:25:47 +04:00
|
|
|
|
2012-05-19 01:25:47 +04:00
|
|
|
// Union types
|
|
|
|
void passUnion((object or long) arg);
|
|
|
|
void passUnionWithNullable((object? or long) arg);
|
|
|
|
void passNullableUnion((object or long)? arg);
|
|
|
|
void passOptionalUnion(optional (object or long) arg);
|
|
|
|
void passOptionalNullableUnion(optional (object or long)? arg);
|
|
|
|
void passOptionalNullableUnionWithDefaultValue(optional (object or long)? arg = null);
|
|
|
|
//void passUnionWithInterfaces((TestInterface or TestExternalInterface) arg);
|
|
|
|
//void passUnionWithInterfacesAndNullable((TestInterface? or TestExternalInterface) arg);
|
|
|
|
//void passUnionWithSequence((sequence<object> or long) arg);
|
|
|
|
void passUnionWithArrayBuffer((ArrayBuffer or long) arg);
|
|
|
|
void passUnionWithString((DOMString or object) arg);
|
|
|
|
//void passUnionWithEnum((TestEnum or object) arg);
|
2012-11-09 19:43:58 +04:00
|
|
|
// Trying to use a callback in a union won't include the test
|
|
|
|
// headers, unfortunately, so won't compile.
|
|
|
|
//void passUnionWithCallback((TestCallback or long) arg);
|
2012-05-19 01:25:47 +04:00
|
|
|
void passUnionWithObject((object or long) arg);
|
|
|
|
//void passUnionWithDict((Dict or long) arg);
|
|
|
|
|
2012-05-19 01:25:47 +04:00
|
|
|
// binaryNames tests
|
|
|
|
void methodRenamedFrom();
|
|
|
|
void methodRenamedFrom(byte argument);
|
|
|
|
readonly attribute byte attributeGetterRenamedFrom;
|
|
|
|
attribute byte attributeRenamedFrom;
|
2012-06-12 18:22:05 +04:00
|
|
|
|
2012-07-17 20:18:53 +04:00
|
|
|
void passDictionary(optional Dict x);
|
2012-10-22 21:08:52 +04:00
|
|
|
Dict receiveDictionary();
|
2012-07-17 20:18:53 +04:00
|
|
|
void passOtherDictionary(optional GrandparentDict x);
|
2012-06-12 18:22:05 +04:00
|
|
|
void passSequenceOfDictionaries(sequence<Dict> x);
|
2012-07-17 20:18:53 +04:00
|
|
|
void passDictionaryOrLong(optional Dict x);
|
|
|
|
void passDictionaryOrLong(long x);
|
2012-07-27 08:09:10 +04:00
|
|
|
|
|
|
|
void passDictContainingDict(optional DictContainingDict arg);
|
2012-09-19 07:24:27 +04:00
|
|
|
void passDictContainingSequence(optional DictContainingSequence arg);
|
2012-11-09 19:43:58 +04:00
|
|
|
DictContainingSequence receiveDictContainingSequence();
|
2012-09-06 11:25:03 +04:00
|
|
|
|
|
|
|
// EnforceRange/Clamp tests
|
|
|
|
void dontEnforceRangeOrClamp(byte arg);
|
|
|
|
void doEnforceRange([EnforceRange] byte arg);
|
|
|
|
void doClamp([Clamp] byte arg);
|
2012-09-06 18:23:51 +04:00
|
|
|
|
|
|
|
// Typedefs
|
|
|
|
const myLong myLongConstant = 5;
|
|
|
|
void exerciseTypedefInterfaces1(AnotherNameForTestInterface arg);
|
|
|
|
AnotherNameForTestInterface exerciseTypedefInterfaces2(NullableTestInterface arg);
|
|
|
|
void exerciseTypedefInterfaces3(YetAnotherNameForTestInterface arg);
|
2012-09-12 20:24:58 +04:00
|
|
|
|
2012-10-19 11:34:28 +04:00
|
|
|
// Static methods and attributes
|
|
|
|
static attribute boolean staticAttribute;
|
|
|
|
static void staticMethod(boolean arg);
|
2012-12-03 20:07:49 +04:00
|
|
|
static void staticMethodWithContext(any arg);
|
2012-10-19 11:34:28 +04:00
|
|
|
|
2012-12-12 02:50:56 +04:00
|
|
|
// Overload resolution tests
|
|
|
|
//void overload1(DOMString... strs);
|
|
|
|
boolean overload1(TestInterface arg);
|
|
|
|
TestInterface overload1(DOMString strs, TestInterface arg);
|
2013-01-03 23:03:11 +04:00
|
|
|
void overload2(TestInterface arg);
|
2013-01-03 23:03:00 +04:00
|
|
|
void overload2(optional Dict arg);
|
|
|
|
void overload2(DOMString arg);
|
2013-01-03 23:03:11 +04:00
|
|
|
void overload3(TestInterface arg);
|
|
|
|
void overload3(TestCallback arg);
|
|
|
|
void overload3(DOMString arg);
|
|
|
|
void overload4(TestInterface arg);
|
|
|
|
void overload4(TestCallbackInterface arg);
|
|
|
|
void overload4(DOMString arg);
|
2012-12-12 02:50:56 +04:00
|
|
|
|
|
|
|
// Variadic handling
|
|
|
|
void passVariadicThirdArg(DOMString arg1, long arg2, TestInterface... arg3);
|
|
|
|
|
2013-02-19 20:54:41 +04:00
|
|
|
// Conditionally exposed methods/attributes
|
|
|
|
[Pref="abc.def"]
|
|
|
|
readonly attribute boolean prefable1;
|
|
|
|
[Pref="abc.def"]
|
|
|
|
readonly attribute boolean prefable2;
|
|
|
|
[Pref="ghi.jkl"]
|
|
|
|
readonly attribute boolean prefable3;
|
|
|
|
[Pref="ghi.jkl"]
|
|
|
|
readonly attribute boolean prefable4;
|
|
|
|
[Pref="abc.def"]
|
|
|
|
readonly attribute boolean prefable5;
|
|
|
|
[Pref="abc.def", Func="nsGenericHTMLElement::TouchEventsEnabled"]
|
|
|
|
readonly attribute boolean prefable6;
|
|
|
|
[Pref="abc.def", Func="nsGenericHTMLElement::TouchEventsEnabled"]
|
|
|
|
readonly attribute boolean prefable7;
|
|
|
|
[Pref="ghi.jkl", Func="nsGenericHTMLElement::TouchEventsEnabled"]
|
|
|
|
readonly attribute boolean prefable8;
|
|
|
|
[Pref="abc.def", Func="nsGenericHTMLElement::TouchEventsEnabled"]
|
|
|
|
readonly attribute boolean prefable9;
|
|
|
|
[Pref="abc.def"]
|
|
|
|
void prefable10();
|
|
|
|
[Pref="abc.def", Func="nsGenericHTMLElement::TouchEventsEnabled"]
|
|
|
|
void prefable11();
|
|
|
|
[Pref="abc.def", Func="TestFuncControlledMember"]
|
|
|
|
readonly attribute boolean prefable12;
|
|
|
|
[Pref="abc.def", Func="nsGenericHTMLElement::TouchEventsEnabled"]
|
|
|
|
void prefable13();
|
|
|
|
[Pref="abc.def", Func="TestFuncControlledMember"]
|
|
|
|
readonly attribute boolean prefable14;
|
|
|
|
[Func="TestFuncControlledMember"]
|
|
|
|
readonly attribute boolean prefable15;
|
|
|
|
[Func="TestFuncControlledMember"]
|
|
|
|
readonly attribute boolean prefable16;
|
|
|
|
[Pref="abc.def", Func="TestFuncControlledMember"]
|
|
|
|
void prefable17();
|
|
|
|
[Func="TestFuncControlledMember"]
|
|
|
|
void prefable18();
|
|
|
|
[Func="TestFuncControlledMember"]
|
|
|
|
void prefable19();
|
|
|
|
|
2012-09-12 20:24:58 +04:00
|
|
|
// Miscellania
|
|
|
|
[LenientThis] attribute long attrWithLenientThis;
|
2012-10-25 00:10:49 +04:00
|
|
|
[Unforgeable] readonly attribute long unforgeableAttr;
|
|
|
|
[Unforgeable, ChromeOnly] readonly attribute long unforgeableAttr2;
|
2012-11-05 23:40:32 +04:00
|
|
|
stringifier;
|
2012-10-25 00:10:49 +04:00
|
|
|
void passRenamedInterface(TestRenamedInterface arg);
|
2012-08-13 16:20:49 +04:00
|
|
|
[PutForwards=writableByte] readonly attribute TestInterface putForwardsAttr;
|
|
|
|
[PutForwards=writableByte, LenientThis] readonly attribute TestInterface putForwardsAttr2;
|
|
|
|
[PutForwards=writableByte, ChromeOnly] readonly attribute TestInterface putForwardsAttr3;
|
2012-11-09 20:24:32 +04:00
|
|
|
[Throws] void throwingMethod();
|
|
|
|
[Throws] attribute boolean throwingAttr;
|
|
|
|
[GetterThrows] attribute boolean throwingGetterAttr;
|
|
|
|
[SetterThrows] attribute boolean throwingSetterAttr;
|
2012-10-18 05:17:16 +04:00
|
|
|
|
|
|
|
// If you add things here, add them to TestExampleGen as well
|
2012-05-23 20:44:48 +04:00
|
|
|
};
|
2012-06-12 02:21:35 +04:00
|
|
|
|
2012-12-14 23:10:50 +04:00
|
|
|
interface TestChildInterface : TestInterface {
|
|
|
|
};
|
|
|
|
|
2012-06-16 00:25:50 +04:00
|
|
|
interface TestNonWrapperCacheInterface {
|
|
|
|
};
|
|
|
|
|
2012-06-12 02:21:35 +04:00
|
|
|
interface ImplementedInterfaceParent {
|
|
|
|
void implementedParentMethod();
|
|
|
|
attribute boolean implementedParentProperty;
|
|
|
|
|
|
|
|
const long implementedParentConstant = 8;
|
|
|
|
};
|
|
|
|
|
|
|
|
ImplementedInterfaceParent implements IndirectlyImplementedInterface;
|
|
|
|
|
2012-07-19 22:48:58 +04:00
|
|
|
[NoInterfaceObject]
|
2012-06-12 02:21:35 +04:00
|
|
|
interface IndirectlyImplementedInterface {
|
|
|
|
void indirectlyImplementedMethod();
|
|
|
|
attribute boolean indirectlyImplementedProperty;
|
|
|
|
|
|
|
|
const long indirectlyImplementedConstant = 9;
|
|
|
|
};
|
|
|
|
|
|
|
|
interface ImplementedInterface : ImplementedInterfaceParent {
|
|
|
|
void implementedMethod();
|
|
|
|
attribute boolean implementedProperty;
|
|
|
|
|
|
|
|
const long implementedConstant = 5;
|
|
|
|
};
|
|
|
|
|
|
|
|
interface DiamondImplements {
|
|
|
|
readonly attribute long diamondImplementedProperty;
|
|
|
|
};
|
|
|
|
interface DiamondBranch1A {
|
|
|
|
};
|
|
|
|
interface DiamondBranch1B {
|
|
|
|
};
|
|
|
|
interface DiamondBranch2A : DiamondImplements {
|
|
|
|
};
|
|
|
|
interface DiamondBranch2B : DiamondImplements {
|
|
|
|
};
|
|
|
|
TestInterface implements DiamondBranch1A;
|
|
|
|
TestInterface implements DiamondBranch1B;
|
|
|
|
TestInterface implements DiamondBranch2A;
|
|
|
|
TestInterface implements DiamondBranch2B;
|
|
|
|
DiamondBranch1A implements DiamondImplements;
|
|
|
|
DiamondBranch1B implements DiamondImplements;
|
2012-06-12 18:22:05 +04:00
|
|
|
|
|
|
|
dictionary Dict : ParentDict {
|
2012-06-21 20:29:11 +04:00
|
|
|
TestEnum someEnum;
|
2012-06-12 18:22:05 +04:00
|
|
|
long x;
|
|
|
|
long a;
|
|
|
|
long b = 8;
|
|
|
|
long z = 9;
|
2012-06-12 18:22:05 +04:00
|
|
|
DOMString str;
|
2012-08-01 22:34:36 +04:00
|
|
|
DOMString empty = "";
|
2012-07-31 08:22:23 +04:00
|
|
|
TestEnum otherEnum = "b";
|
2012-07-31 08:22:23 +04:00
|
|
|
DOMString otherStr = "def";
|
|
|
|
DOMString? yetAnotherStr = null;
|
2012-12-18 01:44:04 +04:00
|
|
|
DOMString template;
|
2012-12-18 01:44:13 +04:00
|
|
|
object someObj;
|
2013-01-10 23:54:13 +04:00
|
|
|
boolean prototype;
|
2012-12-18 01:44:13 +04:00
|
|
|
object? anotherObj = null;
|
|
|
|
TestCallback? someCallback = null;
|
2013-02-06 18:23:45 +04:00
|
|
|
any someAny;
|
2012-06-12 18:22:05 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
dictionary ParentDict : GrandparentDict {
|
|
|
|
long c = 5;
|
2012-06-19 20:09:37 +04:00
|
|
|
TestInterface someInterface;
|
|
|
|
TestExternalInterface someExternalInterface;
|
2012-06-12 18:22:05 +04:00
|
|
|
};
|
2012-07-27 08:09:10 +04:00
|
|
|
|
|
|
|
dictionary DictContainingDict {
|
|
|
|
Dict memberDict;
|
|
|
|
};
|
2012-05-22 17:46:20 +04:00
|
|
|
|
2012-09-19 07:24:27 +04:00
|
|
|
dictionary DictContainingSequence {
|
|
|
|
sequence<long> ourSequence;
|
2012-11-09 19:43:58 +04:00
|
|
|
sequence<TestInterface> ourSequence2;
|
2012-09-19 07:24:27 +04:00
|
|
|
};
|
|
|
|
|
2012-05-22 17:46:20 +04:00
|
|
|
interface TestIndexedGetterInterface {
|
2012-11-06 20:01:49 +04:00
|
|
|
getter long item(unsigned long idx);
|
2012-05-22 17:46:20 +04:00
|
|
|
readonly attribute unsigned long length;
|
|
|
|
};
|
|
|
|
|
|
|
|
interface TestNamedGetterInterface {
|
|
|
|
getter DOMString (DOMString name);
|
|
|
|
};
|
|
|
|
|
2012-11-06 20:00:57 +04:00
|
|
|
interface TestIndexedGetterAndSetterAndNamedGetterInterface {
|
|
|
|
getter DOMString (DOMString myName);
|
|
|
|
getter long (unsigned long index);
|
|
|
|
setter creator void (unsigned long index, long arg);
|
|
|
|
};
|
|
|
|
|
2012-05-22 17:46:20 +04:00
|
|
|
interface TestIndexedAndNamedGetterInterface {
|
|
|
|
getter long (unsigned long index);
|
|
|
|
getter DOMString namedItem(DOMString name);
|
|
|
|
readonly attribute unsigned long length;
|
|
|
|
};
|
|
|
|
|
|
|
|
interface TestIndexedSetterInterface {
|
2012-11-06 20:01:49 +04:00
|
|
|
setter creator void setItem(unsigned long idx, DOMString item);
|
|
|
|
getter DOMString (unsigned long idx);
|
2012-05-22 17:46:20 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
interface TestNamedSetterInterface {
|
2012-11-06 20:00:57 +04:00
|
|
|
setter creator void (DOMString myName, TestIndexedSetterInterface item);
|
2012-11-05 20:58:03 +04:00
|
|
|
getter TestIndexedSetterInterface (DOMString name);
|
2012-05-22 17:46:20 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
interface TestIndexedAndNamedSetterInterface {
|
|
|
|
setter creator void (unsigned long index, TestIndexedSetterInterface item);
|
2012-11-05 20:58:03 +04:00
|
|
|
getter TestIndexedSetterInterface (unsigned long index);
|
2012-05-22 17:46:20 +04:00
|
|
|
setter creator void setNamedItem(DOMString name, TestIndexedSetterInterface item);
|
2012-11-05 20:58:03 +04:00
|
|
|
getter TestIndexedSetterInterface (DOMString name);
|
2012-05-22 17:46:20 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
interface TestIndexedAndNamedGetterAndSetterInterface : TestIndexedSetterInterface {
|
|
|
|
getter long item(unsigned long index);
|
|
|
|
getter DOMString namedItem(DOMString name);
|
|
|
|
setter creator void (unsigned long index, long item);
|
|
|
|
setter creator void (DOMString name, DOMString item);
|
|
|
|
stringifier DOMString ();
|
|
|
|
readonly attribute unsigned long length;
|
|
|
|
};
|
2012-10-31 16:36:20 +04:00
|
|
|
|
2012-11-05 20:58:02 +04:00
|
|
|
interface TestIndexedDeleterInterface {
|
2012-11-06 20:01:49 +04:00
|
|
|
deleter void delItem(unsigned long idx);
|
2012-11-05 20:58:03 +04:00
|
|
|
getter long (unsigned long index);
|
2012-11-05 20:58:02 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
interface TestIndexedDeleterWithRetvalInterface {
|
|
|
|
deleter boolean delItem(unsigned long index);
|
2012-11-05 20:58:03 +04:00
|
|
|
getter long (unsigned long index);
|
2012-11-05 20:58:02 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
interface TestNamedDeleterInterface {
|
|
|
|
deleter void (DOMString name);
|
2012-11-05 20:58:03 +04:00
|
|
|
getter long (DOMString name);
|
2012-11-05 20:58:02 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
interface TestNamedDeleterWithRetvalInterface {
|
|
|
|
deleter boolean delNamedItem(DOMString name);
|
2012-11-05 20:58:03 +04:00
|
|
|
getter long (DOMString name);
|
2012-11-05 20:58:02 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
interface TestIndexedAndNamedDeleterInterface {
|
|
|
|
deleter void (unsigned long index);
|
2012-11-05 20:58:03 +04:00
|
|
|
getter long (unsigned long index);
|
2012-11-05 20:58:02 +04:00
|
|
|
deleter void delNamedItem(DOMString name);
|
2012-11-05 20:58:03 +04:00
|
|
|
getter long (DOMString name);
|
2012-11-05 20:58:02 +04:00
|
|
|
};
|
|
|
|
|
2012-10-31 16:36:20 +04:00
|
|
|
interface TestCppKeywordNamedMethodsInterface {
|
|
|
|
boolean continue();
|
|
|
|
boolean delete();
|
|
|
|
long volatile();
|
|
|
|
};
|
|
|
|
|