dom/bindings/test/TestCodeGen.webidl

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

michael@0 1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
michael@0 2 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 3 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
michael@0 4 * You can obtain one at http://mozilla.org/MPL/2.0/.
michael@0 5 */
michael@0 6
michael@0 7 typedef long myLong;
michael@0 8 typedef TestInterface AnotherNameForTestInterface;
michael@0 9 typedef TestInterface? NullableTestInterface;
michael@0 10
michael@0 11 interface TestExternalInterface;
michael@0 12
michael@0 13 [AvailableIn=PrivilegedApps, Pref="xyz"]
michael@0 14 interface TestRenamedInterface {
michael@0 15 };
michael@0 16
michael@0 17 callback interface TestCallbackInterface {
michael@0 18 readonly attribute long foo;
michael@0 19 attribute DOMString bar;
michael@0 20 void doSomething();
michael@0 21 long doSomethingElse(DOMString arg, TestInterface otherArg);
michael@0 22 void doSequenceLongArg(sequence<long> arg);
michael@0 23 void doSequenceStringArg(sequence<DOMString> arg);
michael@0 24 void doMozMapLongArg(MozMap<long> arg);
michael@0 25 sequence<long> getSequenceOfLong();
michael@0 26 sequence<TestInterface> getSequenceOfInterfaces();
michael@0 27 sequence<TestInterface>? getNullableSequenceOfInterfaces();
michael@0 28 sequence<TestInterface?> getSequenceOfNullableInterfaces();
michael@0 29 sequence<TestInterface?>? getNullableSequenceOfNullableInterfaces();
michael@0 30 sequence<TestCallbackInterface> getSequenceOfCallbackInterfaces();
michael@0 31 sequence<TestCallbackInterface>? getNullableSequenceOfCallbackInterfaces();
michael@0 32 sequence<TestCallbackInterface?> getSequenceOfNullableCallbackInterfaces();
michael@0 33 sequence<TestCallbackInterface?>? getNullableSequenceOfNullableCallbackInterfaces();
michael@0 34 MozMap<long> getMozMapOfLong();
michael@0 35 Dict? getDictionary();
michael@0 36 };
michael@0 37
michael@0 38 callback interface TestSingleOperationCallbackInterface {
michael@0 39 TestInterface doSomething(short arg, sequence<double> anotherArg);
michael@0 40 };
michael@0 41
michael@0 42 enum TestEnum {
michael@0 43 "1",
michael@0 44 "a",
michael@0 45 "b"
michael@0 46 };
michael@0 47
michael@0 48 callback TestCallback = void();
michael@0 49 [TreatNonCallableAsNull] callback TestTreatAsNullCallback = void();
michael@0 50
michael@0 51 // Callback return value tests
michael@0 52 callback TestIntegerReturn = long();
michael@0 53 callback TestNullableIntegerReturn = long?();
michael@0 54 callback TestBooleanReturn = boolean();
michael@0 55 callback TestFloatReturn = float();
michael@0 56 callback TestStringReturn = DOMString(long arg);
michael@0 57 callback TestEnumReturn = TestEnum();
michael@0 58 callback TestInterfaceReturn = TestInterface();
michael@0 59 callback TestNullableInterfaceReturn = TestInterface?();
michael@0 60 callback TestExternalInterfaceReturn = TestExternalInterface();
michael@0 61 callback TestNullableExternalInterfaceReturn = TestExternalInterface?();
michael@0 62 callback TestCallbackInterfaceReturn = TestCallbackInterface();
michael@0 63 callback TestNullableCallbackInterfaceReturn = TestCallbackInterface?();
michael@0 64 callback TestCallbackReturn = TestCallback();
michael@0 65 callback TestNullableCallbackReturn = TestCallback?();
michael@0 66 callback TestObjectReturn = object();
michael@0 67 callback TestNullableObjectReturn = object?();
michael@0 68 callback TestTypedArrayReturn = ArrayBuffer();
michael@0 69 callback TestNullableTypedArrayReturn = ArrayBuffer?();
michael@0 70 callback TestSequenceReturn = sequence<boolean>();
michael@0 71 callback TestNullableSequenceReturn = sequence<boolean>?();
michael@0 72 // Callback argument tests
michael@0 73 callback TestIntegerArguments = sequence<long>(long arg1, long? arg2,
michael@0 74 sequence<long> arg3,
michael@0 75 sequence<long?>? arg4);
michael@0 76 callback TestInterfaceArguments = void(TestInterface arg1, TestInterface? arg2,
michael@0 77 TestExternalInterface arg3,
michael@0 78 TestExternalInterface? arg4,
michael@0 79 TestCallbackInterface arg5,
michael@0 80 TestCallbackInterface? arg6,
michael@0 81 sequence<TestInterface> arg7,
michael@0 82 sequence<TestInterface?>? arg8,
michael@0 83 sequence<TestExternalInterface> arg9,
michael@0 84 sequence<TestExternalInterface?>? arg10,
michael@0 85 sequence<TestCallbackInterface> arg11,
michael@0 86 sequence<TestCallbackInterface?>? arg12);
michael@0 87 callback TestStringEnumArguments = void(DOMString myString, DOMString? nullString,
michael@0 88 TestEnum myEnum);
michael@0 89 callback TestObjectArguments = void(object anObj, object? anotherObj,
michael@0 90 ArrayBuffer buf, ArrayBuffer? buf2);
michael@0 91 callback TestOptionalArguments = void(optional DOMString aString,
michael@0 92 optional object something,
michael@0 93 optional sequence<TestInterface> aSeq,
michael@0 94 optional TestInterface? anInterface,
michael@0 95 optional TestInterface anotherInterface,
michael@0 96 optional long aLong);
michael@0 97
michael@0 98 TestInterface implements ImplementedInterface;
michael@0 99
michael@0 100 // This interface is only for use in the constructor below
michael@0 101 interface OnlyForUseInConstructor {
michael@0 102 };
michael@0 103
michael@0 104 [Constructor,
michael@0 105 Constructor(DOMString str),
michael@0 106 Constructor(unsigned long num, boolean? boolArg),
michael@0 107 Constructor(TestInterface? iface),
michael@0 108 Constructor(long arg1, IndirectlyImplementedInterface iface),
michael@0 109 Constructor(Date arg1),
michael@0 110 // Constructor(long arg1, long arg2, (TestInterface or OnlyForUseInConstructor) arg3),
michael@0 111 AvailableIn=CertifiedApps,
michael@0 112 NamedConstructor=Test,
michael@0 113 NamedConstructor=Test(DOMString str),
michael@0 114 NamedConstructor=Test2(DictForConstructor dict, any any1, object obj1,
michael@0 115 object? obj2, sequence<Dict> seq, optional any any2,
michael@0 116 optional object obj3, optional object? obj4)
michael@0 117 ]
michael@0 118 interface TestInterface {
michael@0 119 // Integer types
michael@0 120 // XXXbz add tests for throwing versions of all the integer stuff
michael@0 121 readonly attribute byte readonlyByte;
michael@0 122 attribute byte writableByte;
michael@0 123 void passByte(byte arg);
michael@0 124 byte receiveByte();
michael@0 125 void passOptionalByte(optional byte arg);
michael@0 126 void passOptionalByteBeforeRequired(optional byte arg1, byte arg2);
michael@0 127 void passOptionalByteWithDefault(optional byte arg = 0);
michael@0 128 void passOptionalByteWithDefaultBeforeRequired(optional byte arg1 = 0, byte arg2);
michael@0 129 void passNullableByte(byte? arg);
michael@0 130 void passOptionalNullableByte(optional byte? arg);
michael@0 131 void passVariadicByte(byte... arg);
michael@0 132 [StoreInSlot, Pure]
michael@0 133 readonly attribute byte cachedByte;
michael@0 134 [StoreInSlot, Constant]
michael@0 135 readonly attribute byte cachedConstantByte;
michael@0 136 [StoreInSlot, Pure]
michael@0 137 attribute byte cachedWritableByte;
michael@0 138
michael@0 139 readonly attribute short readonlyShort;
michael@0 140 attribute short writableShort;
michael@0 141 void passShort(short arg);
michael@0 142 short receiveShort();
michael@0 143 void passOptionalShort(optional short arg);
michael@0 144 void passOptionalShortWithDefault(optional short arg = 5);
michael@0 145
michael@0 146 readonly attribute long readonlyLong;
michael@0 147 attribute long writableLong;
michael@0 148 void passLong(long arg);
michael@0 149 long receiveLong();
michael@0 150 void passOptionalLong(optional long arg);
michael@0 151 void passOptionalLongWithDefault(optional long arg = 7);
michael@0 152
michael@0 153 readonly attribute long long readonlyLongLong;
michael@0 154 attribute long long writableLongLong;
michael@0 155 void passLongLong(long long arg);
michael@0 156 long long receiveLongLong();
michael@0 157 void passOptionalLongLong(optional long long arg);
michael@0 158 void passOptionalLongLongWithDefault(optional long long arg = -12);
michael@0 159
michael@0 160 readonly attribute octet readonlyOctet;
michael@0 161 attribute octet writableOctet;
michael@0 162 void passOctet(octet arg);
michael@0 163 octet receiveOctet();
michael@0 164 void passOptionalOctet(optional octet arg);
michael@0 165 void passOptionalOctetWithDefault(optional octet arg = 19);
michael@0 166
michael@0 167 readonly attribute unsigned short readonlyUnsignedShort;
michael@0 168 attribute unsigned short writableUnsignedShort;
michael@0 169 void passUnsignedShort(unsigned short arg);
michael@0 170 unsigned short receiveUnsignedShort();
michael@0 171 void passOptionalUnsignedShort(optional unsigned short arg);
michael@0 172 void passOptionalUnsignedShortWithDefault(optional unsigned short arg = 2);
michael@0 173
michael@0 174 readonly attribute unsigned long readonlyUnsignedLong;
michael@0 175 attribute unsigned long writableUnsignedLong;
michael@0 176 void passUnsignedLong(unsigned long arg);
michael@0 177 unsigned long receiveUnsignedLong();
michael@0 178 void passOptionalUnsignedLong(optional unsigned long arg);
michael@0 179 void passOptionalUnsignedLongWithDefault(optional unsigned long arg = 6);
michael@0 180
michael@0 181 readonly attribute unsigned long long readonlyUnsignedLongLong;
michael@0 182 attribute unsigned long long writableUnsignedLongLong;
michael@0 183 void passUnsignedLongLong(unsigned long long arg);
michael@0 184 unsigned long long receiveUnsignedLongLong();
michael@0 185 void passOptionalUnsignedLongLong(optional unsigned long long arg);
michael@0 186 void passOptionalUnsignedLongLongWithDefault(optional unsigned long long arg = 17);
michael@0 187
michael@0 188 attribute float writableFloat;
michael@0 189 attribute unrestricted float writableUnrestrictedFloat;
michael@0 190 attribute float? writableNullableFloat;
michael@0 191 attribute unrestricted float? writableNullableUnrestrictedFloat;
michael@0 192 attribute double writableDouble;
michael@0 193 attribute unrestricted double writableUnrestrictedDouble;
michael@0 194 attribute double? writableNullableDouble;
michael@0 195 attribute unrestricted double? writableNullableUnrestrictedDouble;
michael@0 196 void passFloat(float arg1, unrestricted float arg2,
michael@0 197 float? arg3, unrestricted float? arg4,
michael@0 198 double arg5, unrestricted double arg6,
michael@0 199 double? arg7, unrestricted double? arg8,
michael@0 200 sequence<float> arg9, sequence<unrestricted float> arg10,
michael@0 201 sequence<float?> arg11, sequence<unrestricted float?> arg12,
michael@0 202 sequence<double> arg13, sequence<unrestricted double> arg14,
michael@0 203 sequence<double?> arg15, sequence<unrestricted double?> arg16);
michael@0 204 [LenientFloat]
michael@0 205 void passLenientFloat(float arg1, unrestricted float arg2,
michael@0 206 float? arg3, unrestricted float? arg4,
michael@0 207 double arg5, unrestricted double arg6,
michael@0 208 double? arg7, unrestricted double? arg8,
michael@0 209 sequence<float> arg9,
michael@0 210 sequence<unrestricted float> arg10,
michael@0 211 sequence<float?> arg11,
michael@0 212 sequence<unrestricted float?> arg12,
michael@0 213 sequence<double> arg13,
michael@0 214 sequence<unrestricted double> arg14,
michael@0 215 sequence<double?> arg15,
michael@0 216 sequence<unrestricted double?> arg16);
michael@0 217 [LenientFloat]
michael@0 218 attribute float lenientFloatAttr;
michael@0 219 [LenientFloat]
michael@0 220 attribute double lenientDoubleAttr;
michael@0 221
michael@0 222 void passUnrestricted(optional unrestricted float arg1 = 0,
michael@0 223 optional unrestricted float arg2 = Infinity,
michael@0 224 optional unrestricted float arg3 = -Infinity,
michael@0 225 optional unrestricted float arg4 = NaN,
michael@0 226 optional unrestricted double arg5 = 0,
michael@0 227 optional unrestricted double arg6 = Infinity,
michael@0 228 optional unrestricted double arg7 = -Infinity,
michael@0 229 optional unrestricted double arg8 = NaN);
michael@0 230
michael@0 231 // Castable interface types
michael@0 232 // XXXbz add tests for throwing versions of all the castable interface stuff
michael@0 233 TestInterface receiveSelf();
michael@0 234 TestInterface? receiveNullableSelf();
michael@0 235 TestInterface receiveWeakSelf();
michael@0 236 TestInterface? receiveWeakNullableSelf();
michael@0 237 void passSelf(TestInterface arg);
michael@0 238 void passNullableSelf(TestInterface? arg);
michael@0 239 attribute TestInterface nonNullSelf;
michael@0 240 attribute TestInterface? nullableSelf;
michael@0 241 [Cached, Pure]
michael@0 242 readonly attribute TestInterface cachedSelf;
michael@0 243 // Optional arguments
michael@0 244 void passOptionalSelf(optional TestInterface? arg);
michael@0 245 void passOptionalNonNullSelf(optional TestInterface arg);
michael@0 246 void passOptionalSelfWithDefault(optional TestInterface? arg = null);
michael@0 247
michael@0 248 // Non-wrapper-cache interface types
michael@0 249 [NewObject]
michael@0 250 TestNonWrapperCacheInterface receiveNonWrapperCacheInterface();
michael@0 251 [NewObject]
michael@0 252 TestNonWrapperCacheInterface? receiveNullableNonWrapperCacheInterface();
michael@0 253 [NewObject]
michael@0 254 sequence<TestNonWrapperCacheInterface> receiveNonWrapperCacheInterfaceSequence();
michael@0 255 [NewObject]
michael@0 256 sequence<TestNonWrapperCacheInterface?> receiveNullableNonWrapperCacheInterfaceSequence();
michael@0 257 [NewObject]
michael@0 258 sequence<TestNonWrapperCacheInterface>? receiveNonWrapperCacheInterfaceNullableSequence();
michael@0 259 [NewObject]
michael@0 260 sequence<TestNonWrapperCacheInterface?>? receiveNullableNonWrapperCacheInterfaceNullableSequence();
michael@0 261
michael@0 262 // Non-castable interface types
michael@0 263 IndirectlyImplementedInterface receiveOther();
michael@0 264 IndirectlyImplementedInterface? receiveNullableOther();
michael@0 265 IndirectlyImplementedInterface receiveWeakOther();
michael@0 266 IndirectlyImplementedInterface? receiveWeakNullableOther();
michael@0 267 void passOther(IndirectlyImplementedInterface arg);
michael@0 268 void passNullableOther(IndirectlyImplementedInterface? arg);
michael@0 269 attribute IndirectlyImplementedInterface nonNullOther;
michael@0 270 attribute IndirectlyImplementedInterface? nullableOther;
michael@0 271 // Optional arguments
michael@0 272 void passOptionalOther(optional IndirectlyImplementedInterface? arg);
michael@0 273 void passOptionalNonNullOther(optional IndirectlyImplementedInterface arg);
michael@0 274 void passOptionalOtherWithDefault(optional IndirectlyImplementedInterface? arg = null);
michael@0 275
michael@0 276 // External interface types
michael@0 277 TestExternalInterface receiveExternal();
michael@0 278 TestExternalInterface? receiveNullableExternal();
michael@0 279 TestExternalInterface receiveWeakExternal();
michael@0 280 TestExternalInterface? receiveWeakNullableExternal();
michael@0 281 void passExternal(TestExternalInterface arg);
michael@0 282 void passNullableExternal(TestExternalInterface? arg);
michael@0 283 attribute TestExternalInterface nonNullExternal;
michael@0 284 attribute TestExternalInterface? nullableExternal;
michael@0 285 // Optional arguments
michael@0 286 void passOptionalExternal(optional TestExternalInterface? arg);
michael@0 287 void passOptionalNonNullExternal(optional TestExternalInterface arg);
michael@0 288 void passOptionalExternalWithDefault(optional TestExternalInterface? arg = null);
michael@0 289
michael@0 290 // Callback interface types
michael@0 291 TestCallbackInterface receiveCallbackInterface();
michael@0 292 TestCallbackInterface? receiveNullableCallbackInterface();
michael@0 293 TestCallbackInterface receiveWeakCallbackInterface();
michael@0 294 TestCallbackInterface? receiveWeakNullableCallbackInterface();
michael@0 295 void passCallbackInterface(TestCallbackInterface arg);
michael@0 296 void passNullableCallbackInterface(TestCallbackInterface? arg);
michael@0 297 attribute TestCallbackInterface nonNullCallbackInterface;
michael@0 298 attribute TestCallbackInterface? nullableCallbackInterface;
michael@0 299 // Optional arguments
michael@0 300 void passOptionalCallbackInterface(optional TestCallbackInterface? arg);
michael@0 301 void passOptionalNonNullCallbackInterface(optional TestCallbackInterface arg);
michael@0 302 void passOptionalCallbackInterfaceWithDefault(optional TestCallbackInterface? arg = null);
michael@0 303
michael@0 304 // Miscellaneous interface tests
michael@0 305 IndirectlyImplementedInterface receiveConsequentialInterface();
michael@0 306 void passConsequentialInterface(IndirectlyImplementedInterface arg);
michael@0 307
michael@0 308 // Sequence types
michael@0 309 [Cached, Pure]
michael@0 310 readonly attribute sequence<long> readonlySequence;
michael@0 311 [Cached, Pure]
michael@0 312 readonly attribute sequence<Dict> readonlySequenceOfDictionaries;
michael@0 313 [Cached, Pure]
michael@0 314 readonly attribute sequence<Dict>? readonlyNullableSequenceOfDictionaries;
michael@0 315 [Cached, Pure, Frozen]
michael@0 316 readonly attribute sequence<Dict> readonlyFrozenSequence;
michael@0 317 [Cached, Pure, Frozen]
michael@0 318 readonly attribute sequence<Dict>? readonlyFrozenNullableSequence;
michael@0 319 sequence<long> receiveSequence();
michael@0 320 sequence<long>? receiveNullableSequence();
michael@0 321 sequence<long?> receiveSequenceOfNullableInts();
michael@0 322 sequence<long?>? receiveNullableSequenceOfNullableInts();
michael@0 323 void passSequence(sequence<long> arg);
michael@0 324 void passNullableSequence(sequence<long>? arg);
michael@0 325 void passSequenceOfNullableInts(sequence<long?> arg);
michael@0 326 void passOptionalSequenceOfNullableInts(optional sequence<long?> arg);
michael@0 327 void passOptionalNullableSequenceOfNullableInts(optional sequence<long?>? arg);
michael@0 328 sequence<TestInterface> receiveCastableObjectSequence();
michael@0 329 sequence<TestCallbackInterface> receiveCallbackObjectSequence();
michael@0 330 sequence<TestInterface?> receiveNullableCastableObjectSequence();
michael@0 331 sequence<TestCallbackInterface?> receiveNullableCallbackObjectSequence();
michael@0 332 sequence<TestInterface>? receiveCastableObjectNullableSequence();
michael@0 333 sequence<TestInterface?>? receiveNullableCastableObjectNullableSequence();
michael@0 334 sequence<TestInterface> receiveWeakCastableObjectSequence();
michael@0 335 sequence<TestInterface?> receiveWeakNullableCastableObjectSequence();
michael@0 336 sequence<TestInterface>? receiveWeakCastableObjectNullableSequence();
michael@0 337 sequence<TestInterface?>? receiveWeakNullableCastableObjectNullableSequence();
michael@0 338 void passCastableObjectSequence(sequence<TestInterface> arg);
michael@0 339 void passNullableCastableObjectSequence(sequence<TestInterface?> arg);
michael@0 340 void passCastableObjectNullableSequence(sequence<TestInterface>? arg);
michael@0 341 void passNullableCastableObjectNullableSequence(sequence<TestInterface?>? arg);
michael@0 342 void passOptionalSequence(optional sequence<long> arg);
michael@0 343 void passOptionalNullableSequence(optional sequence<long>? arg);
michael@0 344 void passOptionalNullableSequenceWithDefaultValue(optional sequence<long>? arg = null);
michael@0 345 void passOptionalObjectSequence(optional sequence<TestInterface> arg);
michael@0 346 void passExternalInterfaceSequence(sequence<TestExternalInterface> arg);
michael@0 347 void passNullableExternalInterfaceSequence(sequence<TestExternalInterface?> arg);
michael@0 348
michael@0 349 sequence<DOMString> receiveStringSequence();
michael@0 350 void passStringSequence(sequence<DOMString> arg);
michael@0 351
michael@0 352 sequence<ByteString> receiveByteStringSequence();
michael@0 353 void passByteStringSequence(sequence<ByteString> arg);
michael@0 354
michael@0 355 sequence<any> receiveAnySequence();
michael@0 356 sequence<any>? receiveNullableAnySequence();
michael@0 357 sequence<sequence<any>> receiveAnySequenceSequence();
michael@0 358
michael@0 359 sequence<object> receiveObjectSequence();
michael@0 360 sequence<object?> receiveNullableObjectSequence();
michael@0 361
michael@0 362 void passSequenceOfSequences(sequence<sequence<long>> arg);
michael@0 363 sequence<sequence<long>> receiveSequenceOfSequences();
michael@0 364
michael@0 365 // MozMap types
michael@0 366 void passMozMap(MozMap<long> arg);
michael@0 367 void passNullableMozMap(MozMap<long>? arg);
michael@0 368 void passMozMapOfNullableInts(MozMap<long?> arg);
michael@0 369 void passOptionalMozMapOfNullableInts(optional MozMap<long?> arg);
michael@0 370 void passOptionalNullableMozMapOfNullableInts(optional MozMap<long?>? arg);
michael@0 371 void passCastableObjectMozMap(MozMap<TestInterface> arg);
michael@0 372 void passNullableCastableObjectMozMap(MozMap<TestInterface?> arg);
michael@0 373 void passCastableObjectNullableMozMap(MozMap<TestInterface>? arg);
michael@0 374 void passNullableCastableObjectNullableMozMap(MozMap<TestInterface?>? arg);
michael@0 375 void passOptionalMozMap(optional MozMap<long> arg);
michael@0 376 void passOptionalNullableMozMap(optional MozMap<long>? arg);
michael@0 377 void passOptionalNullableMozMapWithDefaultValue(optional MozMap<long>? arg = null);
michael@0 378 void passOptionalObjectMozMap(optional MozMap<TestInterface> arg);
michael@0 379 void passExternalInterfaceMozMap(MozMap<TestExternalInterface> arg);
michael@0 380 void passNullableExternalInterfaceMozMap(MozMap<TestExternalInterface?> arg);
michael@0 381 void passStringMozMap(MozMap<DOMString> arg);
michael@0 382 void passByteStringMozMap(MozMap<ByteString> arg);
michael@0 383 void passMozMapOfMozMaps(MozMap<MozMap<long>> arg);
michael@0 384 MozMap<long> receiveMozMap();
michael@0 385 MozMap<long>? receiveNullableMozMap();
michael@0 386 MozMap<long?> receiveMozMapOfNullableInts();
michael@0 387 MozMap<long?>? receiveNullableMozMapOfNullableInts();
michael@0 388 MozMap<MozMap<long>> receiveMozMapOfMozMaps();
michael@0 389 MozMap<any> receiveAnyMozMap();
michael@0 390
michael@0 391 // Typed array types
michael@0 392 void passArrayBuffer(ArrayBuffer arg);
michael@0 393 void passNullableArrayBuffer(ArrayBuffer? arg);
michael@0 394 void passOptionalArrayBuffer(optional ArrayBuffer arg);
michael@0 395 void passOptionalNullableArrayBuffer(optional ArrayBuffer? arg);
michael@0 396 void passOptionalNullableArrayBufferWithDefaultValue(optional ArrayBuffer? arg= null);
michael@0 397 void passArrayBufferView(ArrayBufferView arg);
michael@0 398 void passInt8Array(Int8Array arg);
michael@0 399 void passInt16Array(Int16Array arg);
michael@0 400 void passInt32Array(Int32Array arg);
michael@0 401 void passUint8Array(Uint8Array arg);
michael@0 402 void passUint16Array(Uint16Array arg);
michael@0 403 void passUint32Array(Uint32Array arg);
michael@0 404 void passUint8ClampedArray(Uint8ClampedArray arg);
michael@0 405 void passFloat32Array(Float32Array arg);
michael@0 406 void passFloat64Array(Float64Array arg);
michael@0 407 void passSequenceOfArrayBuffers(sequence<ArrayBuffer> arg);
michael@0 408 void passSequenceOfNullableArrayBuffers(sequence<ArrayBuffer?> arg);
michael@0 409 void passMozMapOfArrayBuffers(MozMap<ArrayBuffer> arg);
michael@0 410 void passMozMapOfNullableArrayBuffers(MozMap<ArrayBuffer?> arg);
michael@0 411 void passVariadicTypedArray(Float32Array... arg);
michael@0 412 void passVariadicNullableTypedArray(Float32Array?... arg);
michael@0 413 Uint8Array receiveUint8Array();
michael@0 414
michael@0 415 // DOMString types
michael@0 416 void passString(DOMString arg);
michael@0 417 void passNullableString(DOMString? arg);
michael@0 418 void passOptionalString(optional DOMString arg);
michael@0 419 void passOptionalStringWithDefaultValue(optional DOMString arg = "abc");
michael@0 420 void passOptionalNullableString(optional DOMString? arg);
michael@0 421 void passOptionalNullableStringWithDefaultValue(optional DOMString? arg = null);
michael@0 422 void passVariadicString(DOMString... arg);
michael@0 423
michael@0 424 // ByteString types
michael@0 425 void passByteString(ByteString arg);
michael@0 426 void passNullableByteString(ByteString? arg);
michael@0 427 void passOptionalByteString(optional ByteString arg);
michael@0 428 void passOptionalNullableByteString(optional ByteString? arg);
michael@0 429 void passVariadicByteString(ByteString... arg);
michael@0 430
michael@0 431 // Enumerated types
michael@0 432 void passEnum(TestEnum arg);
michael@0 433 void passNullableEnum(TestEnum? arg);
michael@0 434 void passOptionalEnum(optional TestEnum arg);
michael@0 435 void passEnumWithDefault(optional TestEnum arg = "a");
michael@0 436 void passOptionalNullableEnum(optional TestEnum? arg);
michael@0 437 void passOptionalNullableEnumWithDefaultValue(optional TestEnum? arg = null);
michael@0 438 void passOptionalNullableEnumWithDefaultValue2(optional TestEnum? arg = "a");
michael@0 439 TestEnum receiveEnum();
michael@0 440 TestEnum? receiveNullableEnum();
michael@0 441 attribute TestEnum enumAttribute;
michael@0 442 readonly attribute TestEnum readonlyEnumAttribute;
michael@0 443
michael@0 444 // Callback types
michael@0 445 void passCallback(TestCallback arg);
michael@0 446 void passNullableCallback(TestCallback? arg);
michael@0 447 void passOptionalCallback(optional TestCallback arg);
michael@0 448 void passOptionalNullableCallback(optional TestCallback? arg);
michael@0 449 void passOptionalNullableCallbackWithDefaultValue(optional TestCallback? arg = null);
michael@0 450 TestCallback receiveCallback();
michael@0 451 TestCallback? receiveNullableCallback();
michael@0 452 void passNullableTreatAsNullCallback(TestTreatAsNullCallback? arg);
michael@0 453 void passOptionalNullableTreatAsNullCallback(optional TestTreatAsNullCallback? arg);
michael@0 454 void passOptionalNullableTreatAsNullCallbackWithDefaultValue(optional TestTreatAsNullCallback? arg = null);
michael@0 455 attribute TestTreatAsNullCallback treatAsNullCallback;
michael@0 456 attribute TestTreatAsNullCallback? nullableTreatAsNullCallback;
michael@0 457
michael@0 458 // Any types
michael@0 459 void passAny(any arg);
michael@0 460 void passVariadicAny(any... arg);
michael@0 461 void passOptionalAny(optional any arg);
michael@0 462 void passAnyDefaultNull(optional any arg = null);
michael@0 463 void passSequenceOfAny(sequence<any> arg);
michael@0 464 void passNullableSequenceOfAny(sequence<any>? arg);
michael@0 465 void passOptionalSequenceOfAny(optional sequence<any> arg);
michael@0 466 void passOptionalNullableSequenceOfAny(optional sequence<any>? arg);
michael@0 467 void passOptionalSequenceOfAnyWithDefaultValue(optional sequence<any>? arg = null);
michael@0 468 void passSequenceOfSequenceOfAny(sequence<sequence<any>> arg);
michael@0 469 void passSequenceOfNullableSequenceOfAny(sequence<sequence<any>?> arg);
michael@0 470 void passNullableSequenceOfNullableSequenceOfAny(sequence<sequence<any>?>? arg);
michael@0 471 void passOptionalNullableSequenceOfNullableSequenceOfAny(optional sequence<sequence<any>?>? arg);
michael@0 472 void passMozMapOfAny(MozMap<any> arg);
michael@0 473 void passNullableMozMapOfAny(MozMap<any>? arg);
michael@0 474 void passOptionalMozMapOfAny(optional MozMap<any> arg);
michael@0 475 void passOptionalNullableMozMapOfAny(optional MozMap<any>? arg);
michael@0 476 void passOptionalMozMapOfAnyWithDefaultValue(optional MozMap<any>? arg = null);
michael@0 477 void passMozMapOfMozMapOfAny(MozMap<MozMap<any>> arg);
michael@0 478 void passMozMapOfNullableMozMapOfAny(MozMap<MozMap<any>?> arg);
michael@0 479 void passNullableMozMapOfNullableMozMapOfAny(MozMap<MozMap<any>?>? arg);
michael@0 480 void passOptionalNullableMozMapOfNullableMozMapOfAny(optional MozMap<MozMap<any>?>? arg);
michael@0 481 void passOptionalNullableMozMapOfNullableSequenceOfAny(optional MozMap<sequence<any>?>? arg);
michael@0 482 void passOptionalNullableSequenceOfNullableMozMapOfAny(optional sequence<MozMap<any>?>? arg);
michael@0 483 any receiveAny();
michael@0 484
michael@0 485 // object types
michael@0 486 void passObject(object arg);
michael@0 487 void passVariadicObject(object... arg);
michael@0 488 void passNullableObject(object? arg);
michael@0 489 void passVariadicNullableObject(object... arg);
michael@0 490 void passOptionalObject(optional object arg);
michael@0 491 void passOptionalNullableObject(optional object? arg);
michael@0 492 void passOptionalNullableObjectWithDefaultValue(optional object? arg = null);
michael@0 493 void passSequenceOfObject(sequence<object> arg);
michael@0 494 void passSequenceOfNullableObject(sequence<object?> arg);
michael@0 495 void passNullableSequenceOfObject(sequence<object>? arg);
michael@0 496 void passOptionalNullableSequenceOfNullableSequenceOfObject(optional sequence<sequence<object>?>? arg);
michael@0 497 void passOptionalNullableSequenceOfNullableSequenceOfNullableObject(optional sequence<sequence<object?>?>? arg);
michael@0 498 void passMozMapOfObject(MozMap<object> arg);
michael@0 499 object receiveObject();
michael@0 500 object? receiveNullableObject();
michael@0 501
michael@0 502 // Union types
michael@0 503 void passUnion((object or long) arg);
michael@0 504 // Some union tests are debug-only to avoid creating all those
michael@0 505 // unused union types in opt builds.
michael@0 506 #ifdef DEBUG
michael@0 507 void passUnion2((long or boolean) arg);
michael@0 508 void passUnion3((object or long or boolean) arg);
michael@0 509 void passUnion4((Node or long or boolean) arg);
michael@0 510 void passUnion5((object or boolean) arg);
michael@0 511 void passUnion6((object or DOMString) arg);
michael@0 512 void passUnion7((object or DOMString or long) arg);
michael@0 513 void passUnion8((object or DOMString or boolean) arg);
michael@0 514 void passUnion9((object or DOMString or long or boolean) arg);
michael@0 515 void passUnion10(optional (EventInit or long) arg);
michael@0 516 void passUnion11(optional (CustomEventInit or long) arg);
michael@0 517 void passUnion12(optional (EventInit or long) arg = 5);
michael@0 518 void passUnion13(optional (object or long?) arg = null);
michael@0 519 void passUnion14(optional (object or long?) arg = 5);
michael@0 520 void passUnionWithCallback((EventHandler or long) arg);
michael@0 521 #endif
michael@0 522 void passUnionWithNullable((object? or long) arg);
michael@0 523 void passNullableUnion((object or long)? arg);
michael@0 524 void passOptionalUnion(optional (object or long) arg);
michael@0 525 void passOptionalNullableUnion(optional (object or long)? arg);
michael@0 526 void passOptionalNullableUnionWithDefaultValue(optional (object or long)? arg = null);
michael@0 527 //void passUnionWithInterfaces((TestInterface or TestExternalInterface) arg);
michael@0 528 //void passUnionWithInterfacesAndNullable((TestInterface? or TestExternalInterface) arg);
michael@0 529 //void passUnionWithSequence((sequence<object> or long) arg);
michael@0 530 void passUnionWithArrayBuffer((ArrayBuffer or long) arg);
michael@0 531 void passUnionWithString((DOMString or object) arg);
michael@0 532 //void passUnionWithEnum((TestEnum or object) arg);
michael@0 533 // Trying to use a callback in a union won't include the test
michael@0 534 // headers, unfortunately, so won't compile.
michael@0 535 //void passUnionWithCallback((TestCallback or long) arg);
michael@0 536 void passUnionWithObject((object or long) arg);
michael@0 537 //void passUnionWithDict((Dict or long) arg);
michael@0 538
michael@0 539 void passUnionWithDefaultValue1(optional (double or DOMString) arg = "");
michael@0 540 void passUnionWithDefaultValue2(optional (double or DOMString) arg = 1);
michael@0 541 void passUnionWithDefaultValue3(optional (double or DOMString) arg = 1.5);
michael@0 542 void passUnionWithDefaultValue4(optional (float or DOMString) arg = "");
michael@0 543 void passUnionWithDefaultValue5(optional (float or DOMString) arg = 1);
michael@0 544 void passUnionWithDefaultValue6(optional (float or DOMString) arg = 1.5);
michael@0 545 void passUnionWithDefaultValue7(optional (unrestricted double or DOMString) arg = "");
michael@0 546 void passUnionWithDefaultValue8(optional (unrestricted double or DOMString) arg = 1);
michael@0 547 void passUnionWithDefaultValue9(optional (unrestricted double or DOMString) arg = 1.5);
michael@0 548 void passUnionWithDefaultValue10(optional (unrestricted double or DOMString) arg = Infinity);
michael@0 549 void passUnionWithDefaultValue11(optional (unrestricted float or DOMString) arg = "");
michael@0 550 void passUnionWithDefaultValue12(optional (unrestricted float or DOMString) arg = 1);
michael@0 551 void passUnionWithDefaultValue13(optional (unrestricted float or DOMString) arg = Infinity);
michael@0 552
michael@0 553 void passNullableUnionWithDefaultValue1(optional (double or DOMString)? arg = "");
michael@0 554 void passNullableUnionWithDefaultValue2(optional (double or DOMString)? arg = 1);
michael@0 555 void passNullableUnionWithDefaultValue3(optional (double or DOMString)? arg = null);
michael@0 556 void passNullableUnionWithDefaultValue4(optional (float or DOMString)? arg = "");
michael@0 557 void passNullableUnionWithDefaultValue5(optional (float or DOMString)? arg = 1);
michael@0 558 void passNullableUnionWithDefaultValue6(optional (float or DOMString)? arg = null);
michael@0 559 void passNullableUnionWithDefaultValue7(optional (unrestricted double or DOMString)? arg = "");
michael@0 560 void passNullableUnionWithDefaultValue8(optional (unrestricted double or DOMString)? arg = 1);
michael@0 561 void passNullableUnionWithDefaultValue9(optional (unrestricted double or DOMString)? arg = null);
michael@0 562 void passNullableUnionWithDefaultValue10(optional (unrestricted float or DOMString)? arg = "");
michael@0 563 void passNullableUnionWithDefaultValue11(optional (unrestricted float or DOMString)? arg = 1);
michael@0 564 void passNullableUnionWithDefaultValue12(optional (unrestricted float or DOMString)? arg = null);
michael@0 565
michael@0 566 void passSequenceOfUnions(sequence<(CanvasPattern or CanvasGradient)> arg);
michael@0 567 void passSequenceOfUnions2(sequence<(object or long)> arg);
michael@0 568 void passVariadicUnion((CanvasPattern or CanvasGradient)... arg);
michael@0 569
michael@0 570 void passSequenceOfNullableUnions(sequence<(CanvasPattern or CanvasGradient)?> arg);
michael@0 571 void passVariadicNullableUnion((CanvasPattern or CanvasGradient)?... arg);
michael@0 572 void passMozMapOfUnions(MozMap<(CanvasPattern or CanvasGradient)> arg);
michael@0 573 // XXXbz no move constructor on some unions
michael@0 574 // void passMozMapOfUnions2(MozMap<(object or long)> arg);
michael@0 575
michael@0 576 (CanvasPattern or CanvasGradient) receiveUnion();
michael@0 577 (object or long) receiveUnion2();
michael@0 578 (CanvasPattern? or CanvasGradient) receiveUnionContainingNull();
michael@0 579 (CanvasPattern or CanvasGradient)? receiveNullableUnion();
michael@0 580 (object or long)? receiveNullableUnion2();
michael@0 581
michael@0 582 attribute (CanvasPattern or CanvasGradient) writableUnion;
michael@0 583 attribute (CanvasPattern? or CanvasGradient) writableUnionContainingNull;
michael@0 584 attribute (CanvasPattern or CanvasGradient)? writableNullableUnion;
michael@0 585
michael@0 586 // Date types
michael@0 587 void passDate(Date arg);
michael@0 588 void passNullableDate(Date? arg);
michael@0 589 void passOptionalDate(optional Date arg);
michael@0 590 void passOptionalNullableDate(optional Date? arg);
michael@0 591 void passOptionalNullableDateWithDefaultValue(optional Date? arg = null);
michael@0 592 void passDateSequence(sequence<Date> arg);
michael@0 593 void passNullableDateSequence(sequence<Date?> arg);
michael@0 594 void passDateMozMap(MozMap<Date> arg);
michael@0 595 Date receiveDate();
michael@0 596 Date? receiveNullableDate();
michael@0 597
michael@0 598 // binaryNames tests
michael@0 599 void methodRenamedFrom();
michael@0 600 void methodRenamedFrom(byte argument);
michael@0 601 readonly attribute byte attributeGetterRenamedFrom;
michael@0 602 attribute byte attributeRenamedFrom;
michael@0 603
michael@0 604 void passDictionary(optional Dict x);
michael@0 605 [Cached, Pure]
michael@0 606 readonly attribute Dict readonlyDictionary;
michael@0 607 [Cached, Pure]
michael@0 608 readonly attribute Dict? readonlyNullableDictionary;
michael@0 609 [Cached, Pure]
michael@0 610 attribute Dict writableDictionary;
michael@0 611 [Cached, Pure, Frozen]
michael@0 612 readonly attribute Dict readonlyFrozenDictionary;
michael@0 613 [Cached, Pure, Frozen]
michael@0 614 readonly attribute Dict? readonlyFrozenNullableDictionary;
michael@0 615 [Cached, Pure, Frozen]
michael@0 616 attribute Dict writableFrozenDictionary;
michael@0 617 Dict receiveDictionary();
michael@0 618 Dict? receiveNullableDictionary();
michael@0 619 void passOtherDictionary(optional GrandparentDict x);
michael@0 620 void passSequenceOfDictionaries(sequence<Dict> x);
michael@0 621 void passMozMapOfDictionaries(MozMap<GrandparentDict> x);
michael@0 622 // No support for nullable dictionaries inside a sequence (nor should there be)
michael@0 623 // void passSequenceOfNullableDictionaries(sequence<Dict?> x);
michael@0 624 void passDictionaryOrLong(optional Dict x);
michael@0 625 void passDictionaryOrLong(long x);
michael@0 626
michael@0 627 void passDictContainingDict(optional DictContainingDict arg);
michael@0 628 void passDictContainingSequence(optional DictContainingSequence arg);
michael@0 629 DictContainingSequence receiveDictContainingSequence();
michael@0 630
michael@0 631 // EnforceRange/Clamp tests
michael@0 632 void dontEnforceRangeOrClamp(byte arg);
michael@0 633 void doEnforceRange([EnforceRange] byte arg);
michael@0 634 void doClamp([Clamp] byte arg);
michael@0 635 [EnforceRange] attribute byte enforcedByte;
michael@0 636 [Clamp] attribute byte clampedByte;
michael@0 637
michael@0 638 // Typedefs
michael@0 639 const myLong myLongConstant = 5;
michael@0 640 void exerciseTypedefInterfaces1(AnotherNameForTestInterface arg);
michael@0 641 AnotherNameForTestInterface exerciseTypedefInterfaces2(NullableTestInterface arg);
michael@0 642 void exerciseTypedefInterfaces3(YetAnotherNameForTestInterface arg);
michael@0 643
michael@0 644 // Static methods and attributes
michael@0 645 static attribute boolean staticAttribute;
michael@0 646 static void staticMethod(boolean arg);
michael@0 647 static void staticMethodWithContext(any arg);
michael@0 648
michael@0 649 // Overload resolution tests
michael@0 650 //void overload1(DOMString... strs);
michael@0 651 boolean overload1(TestInterface arg);
michael@0 652 TestInterface overload1(DOMString strs, TestInterface arg);
michael@0 653 void overload2(TestInterface arg);
michael@0 654 void overload2(optional Dict arg);
michael@0 655 void overload2(boolean arg);
michael@0 656 void overload2(DOMString arg);
michael@0 657 void overload2(Date arg);
michael@0 658 void overload3(TestInterface arg);
michael@0 659 void overload3(TestCallback arg);
michael@0 660 void overload3(boolean arg);
michael@0 661 void overload4(TestInterface arg);
michael@0 662 void overload4(TestCallbackInterface arg);
michael@0 663 void overload4(DOMString arg);
michael@0 664 void overload5(long arg);
michael@0 665 void overload5(TestEnum arg);
michael@0 666 void overload6(long arg);
michael@0 667 void overload6(boolean arg);
michael@0 668 void overload7(long arg);
michael@0 669 void overload7(boolean arg);
michael@0 670 void overload7(ByteString arg);
michael@0 671 void overload8(long arg);
michael@0 672 void overload8(TestInterface arg);
michael@0 673 void overload9(long? arg);
michael@0 674 void overload9(DOMString arg);
michael@0 675 void overload10(long? arg);
michael@0 676 void overload10(object arg);
michael@0 677 void overload11(long arg);
michael@0 678 void overload11(DOMString? arg);
michael@0 679 void overload12(long arg);
michael@0 680 void overload12(boolean? arg);
michael@0 681 void overload13(long? arg);
michael@0 682 void overload13(boolean arg);
michael@0 683 void overload14(optional long arg);
michael@0 684 void overload14(TestInterface arg);
michael@0 685 void overload15(long arg);
michael@0 686 void overload15(optional TestInterface arg);
michael@0 687 void overload16(long arg);
michael@0 688 void overload16(optional TestInterface? arg);
michael@0 689
michael@0 690 // Variadic handling
michael@0 691 void passVariadicThirdArg(DOMString arg1, long arg2, TestInterface... arg3);
michael@0 692
michael@0 693 // Conditionally exposed methods/attributes
michael@0 694 [Pref="abc.def"]
michael@0 695 readonly attribute boolean prefable1;
michael@0 696 [Pref="abc.def"]
michael@0 697 readonly attribute boolean prefable2;
michael@0 698 [Pref="ghi.jkl"]
michael@0 699 readonly attribute boolean prefable3;
michael@0 700 [Pref="ghi.jkl"]
michael@0 701 readonly attribute boolean prefable4;
michael@0 702 [Pref="abc.def"]
michael@0 703 readonly attribute boolean prefable5;
michael@0 704 [Pref="abc.def", Func="nsGenericHTMLElement::TouchEventsEnabled"]
michael@0 705 readonly attribute boolean prefable6;
michael@0 706 [Pref="abc.def", Func="nsGenericHTMLElement::TouchEventsEnabled"]
michael@0 707 readonly attribute boolean prefable7;
michael@0 708 [Pref="ghi.jkl", Func="nsGenericHTMLElement::TouchEventsEnabled"]
michael@0 709 readonly attribute boolean prefable8;
michael@0 710 [Pref="abc.def", Func="nsGenericHTMLElement::TouchEventsEnabled"]
michael@0 711 readonly attribute boolean prefable9;
michael@0 712 [Pref="abc.def"]
michael@0 713 void prefable10();
michael@0 714 [Pref="abc.def", Func="nsGenericHTMLElement::TouchEventsEnabled"]
michael@0 715 void prefable11();
michael@0 716 [Pref="abc.def", Func="TestFuncControlledMember"]
michael@0 717 readonly attribute boolean prefable12;
michael@0 718 [Pref="abc.def", Func="nsGenericHTMLElement::TouchEventsEnabled"]
michael@0 719 void prefable13();
michael@0 720 [Pref="abc.def", Func="TestFuncControlledMember"]
michael@0 721 readonly attribute boolean prefable14;
michael@0 722 [Func="TestFuncControlledMember"]
michael@0 723 readonly attribute boolean prefable15;
michael@0 724 [Func="TestFuncControlledMember"]
michael@0 725 readonly attribute boolean prefable16;
michael@0 726 [Pref="abc.def", Func="TestFuncControlledMember"]
michael@0 727 void prefable17();
michael@0 728 [Func="TestFuncControlledMember"]
michael@0 729 void prefable18();
michael@0 730 [Func="TestFuncControlledMember"]
michael@0 731 void prefable19();
michael@0 732 [Pref="abc.def", Func="TestFuncControlledMember", ChromeOnly]
michael@0 733 void prefable20();
michael@0 734 [Func="TestFuncControlledMember", AvailableIn=CertifiedApps]
michael@0 735 void prefable21();
michael@0 736 [Func="TestFuncControlledMember", AvailableIn=CertifiedApps]
michael@0 737 void prefable22();
michael@0 738 [Pref="abc.def", Func="TestFuncControlledMember", AvailableIn=CertifiedApps]
michael@0 739 void prefable23();
michael@0 740 [Pref="abc.def", Func="TestFuncControlledMember", AvailableIn=PrivilegedApps]
michael@0 741 void prefable24();
michael@0 742
michael@0 743 // Miscellania
michael@0 744 [LenientThis] attribute long attrWithLenientThis;
michael@0 745 [Unforgeable] readonly attribute long unforgeableAttr;
michael@0 746 [Unforgeable, ChromeOnly] readonly attribute long unforgeableAttr2;
michael@0 747 stringifier;
michael@0 748 void passRenamedInterface(TestRenamedInterface arg);
michael@0 749 [PutForwards=writableByte] readonly attribute TestInterface putForwardsAttr;
michael@0 750 [PutForwards=writableByte, LenientThis] readonly attribute TestInterface putForwardsAttr2;
michael@0 751 [PutForwards=writableByte, ChromeOnly] readonly attribute TestInterface putForwardsAttr3;
michael@0 752 [Throws] void throwingMethod();
michael@0 753 [Throws] attribute boolean throwingAttr;
michael@0 754 [GetterThrows] attribute boolean throwingGetterAttr;
michael@0 755 [SetterThrows] attribute boolean throwingSetterAttr;
michael@0 756 legacycaller short(unsigned long arg1, TestInterface arg2);
michael@0 757 void passArgsWithDefaults(optional long arg1,
michael@0 758 optional TestInterface? arg2 = null,
michael@0 759 optional Dict arg3, optional double arg4 = 5.0,
michael@0 760 optional float arg5);
michael@0 761
michael@0 762 attribute any jsonifierShouldSkipThis;
michael@0 763 attribute TestParentInterface jsonifierShouldSkipThis2;
michael@0 764 attribute TestCallbackInterface jsonifierShouldSkipThis3;
michael@0 765 jsonifier;
michael@0 766
michael@0 767 // If you add things here, add them to TestExampleGen and TestJSImplGen as well
michael@0 768 };
michael@0 769
michael@0 770 interface TestParentInterface {
michael@0 771 };
michael@0 772
michael@0 773 interface TestChildInterface : TestParentInterface {
michael@0 774 };
michael@0 775
michael@0 776 interface TestNonWrapperCacheInterface {
michael@0 777 };
michael@0 778
michael@0 779 [NoInterfaceObject]
michael@0 780 interface ImplementedInterfaceParent {
michael@0 781 void implementedParentMethod();
michael@0 782 attribute boolean implementedParentProperty;
michael@0 783
michael@0 784 const long implementedParentConstant = 8;
michael@0 785 };
michael@0 786
michael@0 787 ImplementedInterfaceParent implements IndirectlyImplementedInterface;
michael@0 788
michael@0 789 [NoInterfaceObject]
michael@0 790 interface IndirectlyImplementedInterface {
michael@0 791 void indirectlyImplementedMethod();
michael@0 792 attribute boolean indirectlyImplementedProperty;
michael@0 793
michael@0 794 const long indirectlyImplementedConstant = 9;
michael@0 795 };
michael@0 796
michael@0 797 [NoInterfaceObject]
michael@0 798 interface ImplementedInterface : ImplementedInterfaceParent {
michael@0 799 void implementedMethod();
michael@0 800 attribute boolean implementedProperty;
michael@0 801
michael@0 802 const long implementedConstant = 5;
michael@0 803 };
michael@0 804
michael@0 805 [NoInterfaceObject]
michael@0 806 interface DiamondImplements {
michael@0 807 readonly attribute long diamondImplementedProperty;
michael@0 808 };
michael@0 809 [NoInterfaceObject]
michael@0 810 interface DiamondBranch1A {
michael@0 811 };
michael@0 812 [NoInterfaceObject]
michael@0 813 interface DiamondBranch1B {
michael@0 814 };
michael@0 815 [NoInterfaceObject]
michael@0 816 interface DiamondBranch2A : DiamondImplements {
michael@0 817 };
michael@0 818 [NoInterfaceObject]
michael@0 819 interface DiamondBranch2B : DiamondImplements {
michael@0 820 };
michael@0 821 TestInterface implements DiamondBranch1A;
michael@0 822 TestInterface implements DiamondBranch1B;
michael@0 823 TestInterface implements DiamondBranch2A;
michael@0 824 TestInterface implements DiamondBranch2B;
michael@0 825 DiamondBranch1A implements DiamondImplements;
michael@0 826 DiamondBranch1B implements DiamondImplements;
michael@0 827
michael@0 828 dictionary Dict : ParentDict {
michael@0 829 TestEnum someEnum;
michael@0 830 long x;
michael@0 831 long a;
michael@0 832 long b = 8;
michael@0 833 long z = 9;
michael@0 834 [EnforceRange] unsigned long enforcedUnsignedLong;
michael@0 835 [Clamp] unsigned long clampedUnsignedLong;
michael@0 836 DOMString str;
michael@0 837 DOMString empty = "";
michael@0 838 TestEnum otherEnum = "b";
michael@0 839 DOMString otherStr = "def";
michael@0 840 DOMString? yetAnotherStr = null;
michael@0 841 DOMString template;
michael@0 842 object someObj;
michael@0 843 boolean prototype;
michael@0 844 object? anotherObj = null;
michael@0 845 TestCallback? someCallback = null;
michael@0 846 any someAny;
michael@0 847 any anotherAny = null;
michael@0 848
michael@0 849 unrestricted float urFloat = 0;
michael@0 850 unrestricted float urFloat2 = 1.1;
michael@0 851 unrestricted float urFloat3 = -1.1;
michael@0 852 unrestricted float? urFloat4 = null;
michael@0 853 unrestricted float infUrFloat = Infinity;
michael@0 854 unrestricted float negativeInfUrFloat = -Infinity;
michael@0 855 unrestricted float nanUrFloat = NaN;
michael@0 856
michael@0 857 unrestricted double urDouble = 0;
michael@0 858 unrestricted double urDouble2 = 1.1;
michael@0 859 unrestricted double urDouble3 = -1.1;
michael@0 860 unrestricted double? urDouble4 = null;
michael@0 861 unrestricted double infUrDouble = Infinity;
michael@0 862 unrestricted double negativeInfUrDouble = -Infinity;
michael@0 863 unrestricted double nanUrDouble = NaN;
michael@0 864
michael@0 865 (float or DOMString) floatOrString = "str";
michael@0 866 (object or long) objectOrLong;
michael@0 867 #ifdef DEBUG
michael@0 868 (EventInit or long) eventInitOrLong;
michael@0 869 (EventInit or long)? nullableEventInitOrLong;
michael@0 870 (Node or long)? nullableNodeOrLong;
michael@0 871 // CustomEventInit is useful to test because it needs rooting.
michael@0 872 (CustomEventInit or long) eventInitOrLong2;
michael@0 873 (CustomEventInit or long)? nullableEventInitOrLong2;
michael@0 874 (EventInit or long) eventInitOrLongWithDefaultValue = null;
michael@0 875 (CustomEventInit or long) eventInitOrLongWithDefaultValue2 = null;
michael@0 876 (EventInit or long) eventInitOrLongWithDefaultValue3 = 5;
michael@0 877 (CustomEventInit or long) eventInitOrLongWithDefaultValue4 = 5;
michael@0 878 #endif
michael@0 879
michael@0 880 ArrayBuffer arrayBuffer;
michael@0 881 ArrayBuffer? nullableArrayBuffer;
michael@0 882 Uint8Array uint8Array;
michael@0 883 Float64Array? float64Array = null;
michael@0 884 };
michael@0 885
michael@0 886 dictionary ParentDict : GrandparentDict {
michael@0 887 long c = 5;
michael@0 888 TestInterface someInterface;
michael@0 889 TestInterface? someNullableInterface = null;
michael@0 890 TestExternalInterface someExternalInterface;
michael@0 891 any parentAny;
michael@0 892 };
michael@0 893
michael@0 894 dictionary DictContainingDict {
michael@0 895 Dict memberDict;
michael@0 896 };
michael@0 897
michael@0 898 dictionary DictContainingSequence {
michael@0 899 sequence<long> ourSequence;
michael@0 900 sequence<TestInterface> ourSequence2;
michael@0 901 sequence<any> ourSequence3;
michael@0 902 sequence<object> ourSequence4;
michael@0 903 sequence<object?> ourSequence5;
michael@0 904 sequence<object>? ourSequence6;
michael@0 905 sequence<object?>? ourSequence7;
michael@0 906 sequence<object>? ourSequence8 = null;
michael@0 907 sequence<object?>? ourSequence9 = null;
michael@0 908 sequence<(float or DOMString)> ourSequence10;
michael@0 909 };
michael@0 910
michael@0 911 dictionary DictForConstructor {
michael@0 912 Dict dict;
michael@0 913 DictContainingDict dict2;
michael@0 914 sequence<Dict> seq1;
michael@0 915 sequence<sequence<Dict>>? seq2;
michael@0 916 sequence<sequence<Dict>?> seq3;
michael@0 917 sequence<any> seq4;
michael@0 918 sequence<any> seq5;
michael@0 919 sequence<DictContainingSequence> seq6;
michael@0 920 object obj1;
michael@0 921 object? obj2;
michael@0 922 any any1 = null;
michael@0 923 };
michael@0 924
michael@0 925 interface TestIndexedGetterInterface {
michael@0 926 getter long item(unsigned long idx);
michael@0 927 readonly attribute unsigned long length;
michael@0 928 legacycaller void();
michael@0 929 };
michael@0 930
michael@0 931 interface TestNamedGetterInterface {
michael@0 932 getter DOMString (DOMString name);
michael@0 933 };
michael@0 934
michael@0 935 interface TestIndexedGetterAndSetterAndNamedGetterInterface {
michael@0 936 getter DOMString (DOMString myName);
michael@0 937 getter long (unsigned long index);
michael@0 938 setter creator void (unsigned long index, long arg);
michael@0 939 };
michael@0 940
michael@0 941 interface TestIndexedAndNamedGetterInterface {
michael@0 942 getter long (unsigned long index);
michael@0 943 getter DOMString namedItem(DOMString name);
michael@0 944 readonly attribute unsigned long length;
michael@0 945 };
michael@0 946
michael@0 947 interface TestIndexedSetterInterface {
michael@0 948 setter creator void setItem(unsigned long idx, DOMString item);
michael@0 949 getter DOMString (unsigned long idx);
michael@0 950 };
michael@0 951
michael@0 952 interface TestNamedSetterInterface {
michael@0 953 setter creator void (DOMString myName, TestIndexedSetterInterface item);
michael@0 954 getter TestIndexedSetterInterface (DOMString name);
michael@0 955 };
michael@0 956
michael@0 957 interface TestIndexedAndNamedSetterInterface {
michael@0 958 setter creator void (unsigned long index, TestIndexedSetterInterface item);
michael@0 959 getter TestIndexedSetterInterface (unsigned long index);
michael@0 960 setter creator void setNamedItem(DOMString name, TestIndexedSetterInterface item);
michael@0 961 getter TestIndexedSetterInterface (DOMString name);
michael@0 962 };
michael@0 963
michael@0 964 interface TestIndexedAndNamedGetterAndSetterInterface : TestIndexedSetterInterface {
michael@0 965 getter long item(unsigned long index);
michael@0 966 getter DOMString namedItem(DOMString name);
michael@0 967 setter creator void (unsigned long index, long item);
michael@0 968 setter creator void (DOMString name, DOMString item);
michael@0 969 stringifier DOMString ();
michael@0 970 readonly attribute unsigned long length;
michael@0 971 };
michael@0 972
michael@0 973 interface TestIndexedDeleterInterface {
michael@0 974 deleter void delItem(unsigned long idx);
michael@0 975 getter long (unsigned long index);
michael@0 976 };
michael@0 977
michael@0 978 interface TestIndexedDeleterWithRetvalInterface {
michael@0 979 deleter boolean delItem(unsigned long index);
michael@0 980 getter long (unsigned long index);
michael@0 981 };
michael@0 982
michael@0 983 interface TestNamedDeleterInterface {
michael@0 984 deleter void (DOMString name);
michael@0 985 getter long (DOMString name);
michael@0 986 };
michael@0 987
michael@0 988 interface TestNamedDeleterWithRetvalInterface {
michael@0 989 deleter boolean delNamedItem(DOMString name);
michael@0 990 getter long (DOMString name);
michael@0 991 };
michael@0 992
michael@0 993 interface TestIndexedAndNamedDeleterInterface {
michael@0 994 deleter void (unsigned long index);
michael@0 995 getter long (unsigned long index);
michael@0 996 deleter void delNamedItem(DOMString name);
michael@0 997 getter long (DOMString name);
michael@0 998 };
michael@0 999
michael@0 1000 interface TestCppKeywordNamedMethodsInterface {
michael@0 1001 boolean continue();
michael@0 1002 boolean delete();
michael@0 1003 long volatile();
michael@0 1004 };
michael@0 1005

mercurial