1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dom/bindings/test/TestCodeGen.webidl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,1005 @@ 1.4 +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this file, 1.7 + * You can obtain one at http://mozilla.org/MPL/2.0/. 1.8 + */ 1.9 + 1.10 +typedef long myLong; 1.11 +typedef TestInterface AnotherNameForTestInterface; 1.12 +typedef TestInterface? NullableTestInterface; 1.13 + 1.14 +interface TestExternalInterface; 1.15 + 1.16 +[AvailableIn=PrivilegedApps, Pref="xyz"] 1.17 +interface TestRenamedInterface { 1.18 +}; 1.19 + 1.20 +callback interface TestCallbackInterface { 1.21 + readonly attribute long foo; 1.22 + attribute DOMString bar; 1.23 + void doSomething(); 1.24 + long doSomethingElse(DOMString arg, TestInterface otherArg); 1.25 + void doSequenceLongArg(sequence<long> arg); 1.26 + void doSequenceStringArg(sequence<DOMString> arg); 1.27 + void doMozMapLongArg(MozMap<long> arg); 1.28 + sequence<long> getSequenceOfLong(); 1.29 + sequence<TestInterface> getSequenceOfInterfaces(); 1.30 + sequence<TestInterface>? getNullableSequenceOfInterfaces(); 1.31 + sequence<TestInterface?> getSequenceOfNullableInterfaces(); 1.32 + sequence<TestInterface?>? getNullableSequenceOfNullableInterfaces(); 1.33 + sequence<TestCallbackInterface> getSequenceOfCallbackInterfaces(); 1.34 + sequence<TestCallbackInterface>? getNullableSequenceOfCallbackInterfaces(); 1.35 + sequence<TestCallbackInterface?> getSequenceOfNullableCallbackInterfaces(); 1.36 + sequence<TestCallbackInterface?>? getNullableSequenceOfNullableCallbackInterfaces(); 1.37 + MozMap<long> getMozMapOfLong(); 1.38 + Dict? getDictionary(); 1.39 +}; 1.40 + 1.41 +callback interface TestSingleOperationCallbackInterface { 1.42 + TestInterface doSomething(short arg, sequence<double> anotherArg); 1.43 +}; 1.44 + 1.45 +enum TestEnum { 1.46 + "1", 1.47 + "a", 1.48 + "b" 1.49 +}; 1.50 + 1.51 +callback TestCallback = void(); 1.52 +[TreatNonCallableAsNull] callback TestTreatAsNullCallback = void(); 1.53 + 1.54 +// Callback return value tests 1.55 +callback TestIntegerReturn = long(); 1.56 +callback TestNullableIntegerReturn = long?(); 1.57 +callback TestBooleanReturn = boolean(); 1.58 +callback TestFloatReturn = float(); 1.59 +callback TestStringReturn = DOMString(long arg); 1.60 +callback TestEnumReturn = TestEnum(); 1.61 +callback TestInterfaceReturn = TestInterface(); 1.62 +callback TestNullableInterfaceReturn = TestInterface?(); 1.63 +callback TestExternalInterfaceReturn = TestExternalInterface(); 1.64 +callback TestNullableExternalInterfaceReturn = TestExternalInterface?(); 1.65 +callback TestCallbackInterfaceReturn = TestCallbackInterface(); 1.66 +callback TestNullableCallbackInterfaceReturn = TestCallbackInterface?(); 1.67 +callback TestCallbackReturn = TestCallback(); 1.68 +callback TestNullableCallbackReturn = TestCallback?(); 1.69 +callback TestObjectReturn = object(); 1.70 +callback TestNullableObjectReturn = object?(); 1.71 +callback TestTypedArrayReturn = ArrayBuffer(); 1.72 +callback TestNullableTypedArrayReturn = ArrayBuffer?(); 1.73 +callback TestSequenceReturn = sequence<boolean>(); 1.74 +callback TestNullableSequenceReturn = sequence<boolean>?(); 1.75 +// Callback argument tests 1.76 +callback TestIntegerArguments = sequence<long>(long arg1, long? arg2, 1.77 + sequence<long> arg3, 1.78 + sequence<long?>? arg4); 1.79 +callback TestInterfaceArguments = void(TestInterface arg1, TestInterface? arg2, 1.80 + TestExternalInterface arg3, 1.81 + TestExternalInterface? arg4, 1.82 + TestCallbackInterface arg5, 1.83 + TestCallbackInterface? arg6, 1.84 + sequence<TestInterface> arg7, 1.85 + sequence<TestInterface?>? arg8, 1.86 + sequence<TestExternalInterface> arg9, 1.87 + sequence<TestExternalInterface?>? arg10, 1.88 + sequence<TestCallbackInterface> arg11, 1.89 + sequence<TestCallbackInterface?>? arg12); 1.90 +callback TestStringEnumArguments = void(DOMString myString, DOMString? nullString, 1.91 + TestEnum myEnum); 1.92 +callback TestObjectArguments = void(object anObj, object? anotherObj, 1.93 + ArrayBuffer buf, ArrayBuffer? buf2); 1.94 +callback TestOptionalArguments = void(optional DOMString aString, 1.95 + optional object something, 1.96 + optional sequence<TestInterface> aSeq, 1.97 + optional TestInterface? anInterface, 1.98 + optional TestInterface anotherInterface, 1.99 + optional long aLong); 1.100 + 1.101 +TestInterface implements ImplementedInterface; 1.102 + 1.103 +// This interface is only for use in the constructor below 1.104 +interface OnlyForUseInConstructor { 1.105 +}; 1.106 + 1.107 +[Constructor, 1.108 + Constructor(DOMString str), 1.109 + Constructor(unsigned long num, boolean? boolArg), 1.110 + Constructor(TestInterface? iface), 1.111 + Constructor(long arg1, IndirectlyImplementedInterface iface), 1.112 + Constructor(Date arg1), 1.113 + // Constructor(long arg1, long arg2, (TestInterface or OnlyForUseInConstructor) arg3), 1.114 + AvailableIn=CertifiedApps, 1.115 + NamedConstructor=Test, 1.116 + NamedConstructor=Test(DOMString str), 1.117 + NamedConstructor=Test2(DictForConstructor dict, any any1, object obj1, 1.118 + object? obj2, sequence<Dict> seq, optional any any2, 1.119 + optional object obj3, optional object? obj4) 1.120 + ] 1.121 +interface TestInterface { 1.122 + // Integer types 1.123 + // XXXbz add tests for throwing versions of all the integer stuff 1.124 + readonly attribute byte readonlyByte; 1.125 + attribute byte writableByte; 1.126 + void passByte(byte arg); 1.127 + byte receiveByte(); 1.128 + void passOptionalByte(optional byte arg); 1.129 + void passOptionalByteBeforeRequired(optional byte arg1, byte arg2); 1.130 + void passOptionalByteWithDefault(optional byte arg = 0); 1.131 + void passOptionalByteWithDefaultBeforeRequired(optional byte arg1 = 0, byte arg2); 1.132 + void passNullableByte(byte? arg); 1.133 + void passOptionalNullableByte(optional byte? arg); 1.134 + void passVariadicByte(byte... arg); 1.135 + [StoreInSlot, Pure] 1.136 + readonly attribute byte cachedByte; 1.137 + [StoreInSlot, Constant] 1.138 + readonly attribute byte cachedConstantByte; 1.139 + [StoreInSlot, Pure] 1.140 + attribute byte cachedWritableByte; 1.141 + 1.142 + readonly attribute short readonlyShort; 1.143 + attribute short writableShort; 1.144 + void passShort(short arg); 1.145 + short receiveShort(); 1.146 + void passOptionalShort(optional short arg); 1.147 + void passOptionalShortWithDefault(optional short arg = 5); 1.148 + 1.149 + readonly attribute long readonlyLong; 1.150 + attribute long writableLong; 1.151 + void passLong(long arg); 1.152 + long receiveLong(); 1.153 + void passOptionalLong(optional long arg); 1.154 + void passOptionalLongWithDefault(optional long arg = 7); 1.155 + 1.156 + readonly attribute long long readonlyLongLong; 1.157 + attribute long long writableLongLong; 1.158 + void passLongLong(long long arg); 1.159 + long long receiveLongLong(); 1.160 + void passOptionalLongLong(optional long long arg); 1.161 + void passOptionalLongLongWithDefault(optional long long arg = -12); 1.162 + 1.163 + readonly attribute octet readonlyOctet; 1.164 + attribute octet writableOctet; 1.165 + void passOctet(octet arg); 1.166 + octet receiveOctet(); 1.167 + void passOptionalOctet(optional octet arg); 1.168 + void passOptionalOctetWithDefault(optional octet arg = 19); 1.169 + 1.170 + readonly attribute unsigned short readonlyUnsignedShort; 1.171 + attribute unsigned short writableUnsignedShort; 1.172 + void passUnsignedShort(unsigned short arg); 1.173 + unsigned short receiveUnsignedShort(); 1.174 + void passOptionalUnsignedShort(optional unsigned short arg); 1.175 + void passOptionalUnsignedShortWithDefault(optional unsigned short arg = 2); 1.176 + 1.177 + readonly attribute unsigned long readonlyUnsignedLong; 1.178 + attribute unsigned long writableUnsignedLong; 1.179 + void passUnsignedLong(unsigned long arg); 1.180 + unsigned long receiveUnsignedLong(); 1.181 + void passOptionalUnsignedLong(optional unsigned long arg); 1.182 + void passOptionalUnsignedLongWithDefault(optional unsigned long arg = 6); 1.183 + 1.184 + readonly attribute unsigned long long readonlyUnsignedLongLong; 1.185 + attribute unsigned long long writableUnsignedLongLong; 1.186 + void passUnsignedLongLong(unsigned long long arg); 1.187 + unsigned long long receiveUnsignedLongLong(); 1.188 + void passOptionalUnsignedLongLong(optional unsigned long long arg); 1.189 + void passOptionalUnsignedLongLongWithDefault(optional unsigned long long arg = 17); 1.190 + 1.191 + attribute float writableFloat; 1.192 + attribute unrestricted float writableUnrestrictedFloat; 1.193 + attribute float? writableNullableFloat; 1.194 + attribute unrestricted float? writableNullableUnrestrictedFloat; 1.195 + attribute double writableDouble; 1.196 + attribute unrestricted double writableUnrestrictedDouble; 1.197 + attribute double? writableNullableDouble; 1.198 + attribute unrestricted double? writableNullableUnrestrictedDouble; 1.199 + void passFloat(float arg1, unrestricted float arg2, 1.200 + float? arg3, unrestricted float? arg4, 1.201 + double arg5, unrestricted double arg6, 1.202 + double? arg7, unrestricted double? arg8, 1.203 + sequence<float> arg9, sequence<unrestricted float> arg10, 1.204 + sequence<float?> arg11, sequence<unrestricted float?> arg12, 1.205 + sequence<double> arg13, sequence<unrestricted double> arg14, 1.206 + sequence<double?> arg15, sequence<unrestricted double?> arg16); 1.207 + [LenientFloat] 1.208 + void passLenientFloat(float arg1, unrestricted float arg2, 1.209 + float? arg3, unrestricted float? arg4, 1.210 + double arg5, unrestricted double arg6, 1.211 + double? arg7, unrestricted double? arg8, 1.212 + sequence<float> arg9, 1.213 + sequence<unrestricted float> arg10, 1.214 + sequence<float?> arg11, 1.215 + sequence<unrestricted float?> arg12, 1.216 + sequence<double> arg13, 1.217 + sequence<unrestricted double> arg14, 1.218 + sequence<double?> arg15, 1.219 + sequence<unrestricted double?> arg16); 1.220 + [LenientFloat] 1.221 + attribute float lenientFloatAttr; 1.222 + [LenientFloat] 1.223 + attribute double lenientDoubleAttr; 1.224 + 1.225 + void passUnrestricted(optional unrestricted float arg1 = 0, 1.226 + optional unrestricted float arg2 = Infinity, 1.227 + optional unrestricted float arg3 = -Infinity, 1.228 + optional unrestricted float arg4 = NaN, 1.229 + optional unrestricted double arg5 = 0, 1.230 + optional unrestricted double arg6 = Infinity, 1.231 + optional unrestricted double arg7 = -Infinity, 1.232 + optional unrestricted double arg8 = NaN); 1.233 + 1.234 + // Castable interface types 1.235 + // XXXbz add tests for throwing versions of all the castable interface stuff 1.236 + TestInterface receiveSelf(); 1.237 + TestInterface? receiveNullableSelf(); 1.238 + TestInterface receiveWeakSelf(); 1.239 + TestInterface? receiveWeakNullableSelf(); 1.240 + void passSelf(TestInterface arg); 1.241 + void passNullableSelf(TestInterface? arg); 1.242 + attribute TestInterface nonNullSelf; 1.243 + attribute TestInterface? nullableSelf; 1.244 + [Cached, Pure] 1.245 + readonly attribute TestInterface cachedSelf; 1.246 + // Optional arguments 1.247 + void passOptionalSelf(optional TestInterface? arg); 1.248 + void passOptionalNonNullSelf(optional TestInterface arg); 1.249 + void passOptionalSelfWithDefault(optional TestInterface? arg = null); 1.250 + 1.251 + // Non-wrapper-cache interface types 1.252 + [NewObject] 1.253 + TestNonWrapperCacheInterface receiveNonWrapperCacheInterface(); 1.254 + [NewObject] 1.255 + TestNonWrapperCacheInterface? receiveNullableNonWrapperCacheInterface(); 1.256 + [NewObject] 1.257 + sequence<TestNonWrapperCacheInterface> receiveNonWrapperCacheInterfaceSequence(); 1.258 + [NewObject] 1.259 + sequence<TestNonWrapperCacheInterface?> receiveNullableNonWrapperCacheInterfaceSequence(); 1.260 + [NewObject] 1.261 + sequence<TestNonWrapperCacheInterface>? receiveNonWrapperCacheInterfaceNullableSequence(); 1.262 + [NewObject] 1.263 + sequence<TestNonWrapperCacheInterface?>? receiveNullableNonWrapperCacheInterfaceNullableSequence(); 1.264 + 1.265 + // Non-castable interface types 1.266 + IndirectlyImplementedInterface receiveOther(); 1.267 + IndirectlyImplementedInterface? receiveNullableOther(); 1.268 + IndirectlyImplementedInterface receiveWeakOther(); 1.269 + IndirectlyImplementedInterface? receiveWeakNullableOther(); 1.270 + void passOther(IndirectlyImplementedInterface arg); 1.271 + void passNullableOther(IndirectlyImplementedInterface? arg); 1.272 + attribute IndirectlyImplementedInterface nonNullOther; 1.273 + attribute IndirectlyImplementedInterface? nullableOther; 1.274 + // Optional arguments 1.275 + void passOptionalOther(optional IndirectlyImplementedInterface? arg); 1.276 + void passOptionalNonNullOther(optional IndirectlyImplementedInterface arg); 1.277 + void passOptionalOtherWithDefault(optional IndirectlyImplementedInterface? arg = null); 1.278 + 1.279 + // External interface types 1.280 + TestExternalInterface receiveExternal(); 1.281 + TestExternalInterface? receiveNullableExternal(); 1.282 + TestExternalInterface receiveWeakExternal(); 1.283 + TestExternalInterface? receiveWeakNullableExternal(); 1.284 + void passExternal(TestExternalInterface arg); 1.285 + void passNullableExternal(TestExternalInterface? arg); 1.286 + attribute TestExternalInterface nonNullExternal; 1.287 + attribute TestExternalInterface? nullableExternal; 1.288 + // Optional arguments 1.289 + void passOptionalExternal(optional TestExternalInterface? arg); 1.290 + void passOptionalNonNullExternal(optional TestExternalInterface arg); 1.291 + void passOptionalExternalWithDefault(optional TestExternalInterface? arg = null); 1.292 + 1.293 + // Callback interface types 1.294 + TestCallbackInterface receiveCallbackInterface(); 1.295 + TestCallbackInterface? receiveNullableCallbackInterface(); 1.296 + TestCallbackInterface receiveWeakCallbackInterface(); 1.297 + TestCallbackInterface? receiveWeakNullableCallbackInterface(); 1.298 + void passCallbackInterface(TestCallbackInterface arg); 1.299 + void passNullableCallbackInterface(TestCallbackInterface? arg); 1.300 + attribute TestCallbackInterface nonNullCallbackInterface; 1.301 + attribute TestCallbackInterface? nullableCallbackInterface; 1.302 + // Optional arguments 1.303 + void passOptionalCallbackInterface(optional TestCallbackInterface? arg); 1.304 + void passOptionalNonNullCallbackInterface(optional TestCallbackInterface arg); 1.305 + void passOptionalCallbackInterfaceWithDefault(optional TestCallbackInterface? arg = null); 1.306 + 1.307 + // Miscellaneous interface tests 1.308 + IndirectlyImplementedInterface receiveConsequentialInterface(); 1.309 + void passConsequentialInterface(IndirectlyImplementedInterface arg); 1.310 + 1.311 + // Sequence types 1.312 + [Cached, Pure] 1.313 + readonly attribute sequence<long> readonlySequence; 1.314 + [Cached, Pure] 1.315 + readonly attribute sequence<Dict> readonlySequenceOfDictionaries; 1.316 + [Cached, Pure] 1.317 + readonly attribute sequence<Dict>? readonlyNullableSequenceOfDictionaries; 1.318 + [Cached, Pure, Frozen] 1.319 + readonly attribute sequence<Dict> readonlyFrozenSequence; 1.320 + [Cached, Pure, Frozen] 1.321 + readonly attribute sequence<Dict>? readonlyFrozenNullableSequence; 1.322 + sequence<long> receiveSequence(); 1.323 + sequence<long>? receiveNullableSequence(); 1.324 + sequence<long?> receiveSequenceOfNullableInts(); 1.325 + sequence<long?>? receiveNullableSequenceOfNullableInts(); 1.326 + void passSequence(sequence<long> arg); 1.327 + void passNullableSequence(sequence<long>? arg); 1.328 + void passSequenceOfNullableInts(sequence<long?> arg); 1.329 + void passOptionalSequenceOfNullableInts(optional sequence<long?> arg); 1.330 + void passOptionalNullableSequenceOfNullableInts(optional sequence<long?>? arg); 1.331 + sequence<TestInterface> receiveCastableObjectSequence(); 1.332 + sequence<TestCallbackInterface> receiveCallbackObjectSequence(); 1.333 + sequence<TestInterface?> receiveNullableCastableObjectSequence(); 1.334 + sequence<TestCallbackInterface?> receiveNullableCallbackObjectSequence(); 1.335 + sequence<TestInterface>? receiveCastableObjectNullableSequence(); 1.336 + sequence<TestInterface?>? receiveNullableCastableObjectNullableSequence(); 1.337 + sequence<TestInterface> receiveWeakCastableObjectSequence(); 1.338 + sequence<TestInterface?> receiveWeakNullableCastableObjectSequence(); 1.339 + sequence<TestInterface>? receiveWeakCastableObjectNullableSequence(); 1.340 + sequence<TestInterface?>? receiveWeakNullableCastableObjectNullableSequence(); 1.341 + void passCastableObjectSequence(sequence<TestInterface> arg); 1.342 + void passNullableCastableObjectSequence(sequence<TestInterface?> arg); 1.343 + void passCastableObjectNullableSequence(sequence<TestInterface>? arg); 1.344 + void passNullableCastableObjectNullableSequence(sequence<TestInterface?>? arg); 1.345 + void passOptionalSequence(optional sequence<long> arg); 1.346 + void passOptionalNullableSequence(optional sequence<long>? arg); 1.347 + void passOptionalNullableSequenceWithDefaultValue(optional sequence<long>? arg = null); 1.348 + void passOptionalObjectSequence(optional sequence<TestInterface> arg); 1.349 + void passExternalInterfaceSequence(sequence<TestExternalInterface> arg); 1.350 + void passNullableExternalInterfaceSequence(sequence<TestExternalInterface?> arg); 1.351 + 1.352 + sequence<DOMString> receiveStringSequence(); 1.353 + void passStringSequence(sequence<DOMString> arg); 1.354 + 1.355 + sequence<ByteString> receiveByteStringSequence(); 1.356 + void passByteStringSequence(sequence<ByteString> arg); 1.357 + 1.358 + sequence<any> receiveAnySequence(); 1.359 + sequence<any>? receiveNullableAnySequence(); 1.360 + sequence<sequence<any>> receiveAnySequenceSequence(); 1.361 + 1.362 + sequence<object> receiveObjectSequence(); 1.363 + sequence<object?> receiveNullableObjectSequence(); 1.364 + 1.365 + void passSequenceOfSequences(sequence<sequence<long>> arg); 1.366 + sequence<sequence<long>> receiveSequenceOfSequences(); 1.367 + 1.368 + // MozMap types 1.369 + void passMozMap(MozMap<long> arg); 1.370 + void passNullableMozMap(MozMap<long>? arg); 1.371 + void passMozMapOfNullableInts(MozMap<long?> arg); 1.372 + void passOptionalMozMapOfNullableInts(optional MozMap<long?> arg); 1.373 + void passOptionalNullableMozMapOfNullableInts(optional MozMap<long?>? arg); 1.374 + void passCastableObjectMozMap(MozMap<TestInterface> arg); 1.375 + void passNullableCastableObjectMozMap(MozMap<TestInterface?> arg); 1.376 + void passCastableObjectNullableMozMap(MozMap<TestInterface>? arg); 1.377 + void passNullableCastableObjectNullableMozMap(MozMap<TestInterface?>? arg); 1.378 + void passOptionalMozMap(optional MozMap<long> arg); 1.379 + void passOptionalNullableMozMap(optional MozMap<long>? arg); 1.380 + void passOptionalNullableMozMapWithDefaultValue(optional MozMap<long>? arg = null); 1.381 + void passOptionalObjectMozMap(optional MozMap<TestInterface> arg); 1.382 + void passExternalInterfaceMozMap(MozMap<TestExternalInterface> arg); 1.383 + void passNullableExternalInterfaceMozMap(MozMap<TestExternalInterface?> arg); 1.384 + void passStringMozMap(MozMap<DOMString> arg); 1.385 + void passByteStringMozMap(MozMap<ByteString> arg); 1.386 + void passMozMapOfMozMaps(MozMap<MozMap<long>> arg); 1.387 + MozMap<long> receiveMozMap(); 1.388 + MozMap<long>? receiveNullableMozMap(); 1.389 + MozMap<long?> receiveMozMapOfNullableInts(); 1.390 + MozMap<long?>? receiveNullableMozMapOfNullableInts(); 1.391 + MozMap<MozMap<long>> receiveMozMapOfMozMaps(); 1.392 + MozMap<any> receiveAnyMozMap(); 1.393 + 1.394 + // Typed array types 1.395 + void passArrayBuffer(ArrayBuffer arg); 1.396 + void passNullableArrayBuffer(ArrayBuffer? arg); 1.397 + void passOptionalArrayBuffer(optional ArrayBuffer arg); 1.398 + void passOptionalNullableArrayBuffer(optional ArrayBuffer? arg); 1.399 + void passOptionalNullableArrayBufferWithDefaultValue(optional ArrayBuffer? arg= null); 1.400 + void passArrayBufferView(ArrayBufferView arg); 1.401 + void passInt8Array(Int8Array arg); 1.402 + void passInt16Array(Int16Array arg); 1.403 + void passInt32Array(Int32Array arg); 1.404 + void passUint8Array(Uint8Array arg); 1.405 + void passUint16Array(Uint16Array arg); 1.406 + void passUint32Array(Uint32Array arg); 1.407 + void passUint8ClampedArray(Uint8ClampedArray arg); 1.408 + void passFloat32Array(Float32Array arg); 1.409 + void passFloat64Array(Float64Array arg); 1.410 + void passSequenceOfArrayBuffers(sequence<ArrayBuffer> arg); 1.411 + void passSequenceOfNullableArrayBuffers(sequence<ArrayBuffer?> arg); 1.412 + void passMozMapOfArrayBuffers(MozMap<ArrayBuffer> arg); 1.413 + void passMozMapOfNullableArrayBuffers(MozMap<ArrayBuffer?> arg); 1.414 + void passVariadicTypedArray(Float32Array... arg); 1.415 + void passVariadicNullableTypedArray(Float32Array?... arg); 1.416 + Uint8Array receiveUint8Array(); 1.417 + 1.418 + // DOMString types 1.419 + void passString(DOMString arg); 1.420 + void passNullableString(DOMString? arg); 1.421 + void passOptionalString(optional DOMString arg); 1.422 + void passOptionalStringWithDefaultValue(optional DOMString arg = "abc"); 1.423 + void passOptionalNullableString(optional DOMString? arg); 1.424 + void passOptionalNullableStringWithDefaultValue(optional DOMString? arg = null); 1.425 + void passVariadicString(DOMString... arg); 1.426 + 1.427 + // ByteString types 1.428 + void passByteString(ByteString arg); 1.429 + void passNullableByteString(ByteString? arg); 1.430 + void passOptionalByteString(optional ByteString arg); 1.431 + void passOptionalNullableByteString(optional ByteString? arg); 1.432 + void passVariadicByteString(ByteString... arg); 1.433 + 1.434 + // Enumerated types 1.435 + void passEnum(TestEnum arg); 1.436 + void passNullableEnum(TestEnum? arg); 1.437 + void passOptionalEnum(optional TestEnum arg); 1.438 + void passEnumWithDefault(optional TestEnum arg = "a"); 1.439 + void passOptionalNullableEnum(optional TestEnum? arg); 1.440 + void passOptionalNullableEnumWithDefaultValue(optional TestEnum? arg = null); 1.441 + void passOptionalNullableEnumWithDefaultValue2(optional TestEnum? arg = "a"); 1.442 + TestEnum receiveEnum(); 1.443 + TestEnum? receiveNullableEnum(); 1.444 + attribute TestEnum enumAttribute; 1.445 + readonly attribute TestEnum readonlyEnumAttribute; 1.446 + 1.447 + // Callback types 1.448 + void passCallback(TestCallback arg); 1.449 + void passNullableCallback(TestCallback? arg); 1.450 + void passOptionalCallback(optional TestCallback arg); 1.451 + void passOptionalNullableCallback(optional TestCallback? arg); 1.452 + void passOptionalNullableCallbackWithDefaultValue(optional TestCallback? arg = null); 1.453 + TestCallback receiveCallback(); 1.454 + TestCallback? receiveNullableCallback(); 1.455 + void passNullableTreatAsNullCallback(TestTreatAsNullCallback? arg); 1.456 + void passOptionalNullableTreatAsNullCallback(optional TestTreatAsNullCallback? arg); 1.457 + void passOptionalNullableTreatAsNullCallbackWithDefaultValue(optional TestTreatAsNullCallback? arg = null); 1.458 + attribute TestTreatAsNullCallback treatAsNullCallback; 1.459 + attribute TestTreatAsNullCallback? nullableTreatAsNullCallback; 1.460 + 1.461 + // Any types 1.462 + void passAny(any arg); 1.463 + void passVariadicAny(any... arg); 1.464 + void passOptionalAny(optional any arg); 1.465 + void passAnyDefaultNull(optional any arg = null); 1.466 + void passSequenceOfAny(sequence<any> arg); 1.467 + void passNullableSequenceOfAny(sequence<any>? arg); 1.468 + void passOptionalSequenceOfAny(optional sequence<any> arg); 1.469 + void passOptionalNullableSequenceOfAny(optional sequence<any>? arg); 1.470 + void passOptionalSequenceOfAnyWithDefaultValue(optional sequence<any>? arg = null); 1.471 + void passSequenceOfSequenceOfAny(sequence<sequence<any>> arg); 1.472 + void passSequenceOfNullableSequenceOfAny(sequence<sequence<any>?> arg); 1.473 + void passNullableSequenceOfNullableSequenceOfAny(sequence<sequence<any>?>? arg); 1.474 + void passOptionalNullableSequenceOfNullableSequenceOfAny(optional sequence<sequence<any>?>? arg); 1.475 + void passMozMapOfAny(MozMap<any> arg); 1.476 + void passNullableMozMapOfAny(MozMap<any>? arg); 1.477 + void passOptionalMozMapOfAny(optional MozMap<any> arg); 1.478 + void passOptionalNullableMozMapOfAny(optional MozMap<any>? arg); 1.479 + void passOptionalMozMapOfAnyWithDefaultValue(optional MozMap<any>? arg = null); 1.480 + void passMozMapOfMozMapOfAny(MozMap<MozMap<any>> arg); 1.481 + void passMozMapOfNullableMozMapOfAny(MozMap<MozMap<any>?> arg); 1.482 + void passNullableMozMapOfNullableMozMapOfAny(MozMap<MozMap<any>?>? arg); 1.483 + void passOptionalNullableMozMapOfNullableMozMapOfAny(optional MozMap<MozMap<any>?>? arg); 1.484 + void passOptionalNullableMozMapOfNullableSequenceOfAny(optional MozMap<sequence<any>?>? arg); 1.485 + void passOptionalNullableSequenceOfNullableMozMapOfAny(optional sequence<MozMap<any>?>? arg); 1.486 + any receiveAny(); 1.487 + 1.488 + // object types 1.489 + void passObject(object arg); 1.490 + void passVariadicObject(object... arg); 1.491 + void passNullableObject(object? arg); 1.492 + void passVariadicNullableObject(object... arg); 1.493 + void passOptionalObject(optional object arg); 1.494 + void passOptionalNullableObject(optional object? arg); 1.495 + void passOptionalNullableObjectWithDefaultValue(optional object? arg = null); 1.496 + void passSequenceOfObject(sequence<object> arg); 1.497 + void passSequenceOfNullableObject(sequence<object?> arg); 1.498 + void passNullableSequenceOfObject(sequence<object>? arg); 1.499 + void passOptionalNullableSequenceOfNullableSequenceOfObject(optional sequence<sequence<object>?>? arg); 1.500 + void passOptionalNullableSequenceOfNullableSequenceOfNullableObject(optional sequence<sequence<object?>?>? arg); 1.501 + void passMozMapOfObject(MozMap<object> arg); 1.502 + object receiveObject(); 1.503 + object? receiveNullableObject(); 1.504 + 1.505 + // Union types 1.506 + void passUnion((object or long) arg); 1.507 + // Some union tests are debug-only to avoid creating all those 1.508 + // unused union types in opt builds. 1.509 +#ifdef DEBUG 1.510 + void passUnion2((long or boolean) arg); 1.511 + void passUnion3((object or long or boolean) arg); 1.512 + void passUnion4((Node or long or boolean) arg); 1.513 + void passUnion5((object or boolean) arg); 1.514 + void passUnion6((object or DOMString) arg); 1.515 + void passUnion7((object or DOMString or long) arg); 1.516 + void passUnion8((object or DOMString or boolean) arg); 1.517 + void passUnion9((object or DOMString or long or boolean) arg); 1.518 + void passUnion10(optional (EventInit or long) arg); 1.519 + void passUnion11(optional (CustomEventInit or long) arg); 1.520 + void passUnion12(optional (EventInit or long) arg = 5); 1.521 + void passUnion13(optional (object or long?) arg = null); 1.522 + void passUnion14(optional (object or long?) arg = 5); 1.523 + void passUnionWithCallback((EventHandler or long) arg); 1.524 +#endif 1.525 + void passUnionWithNullable((object? or long) arg); 1.526 + void passNullableUnion((object or long)? arg); 1.527 + void passOptionalUnion(optional (object or long) arg); 1.528 + void passOptionalNullableUnion(optional (object or long)? arg); 1.529 + void passOptionalNullableUnionWithDefaultValue(optional (object or long)? arg = null); 1.530 + //void passUnionWithInterfaces((TestInterface or TestExternalInterface) arg); 1.531 + //void passUnionWithInterfacesAndNullable((TestInterface? or TestExternalInterface) arg); 1.532 + //void passUnionWithSequence((sequence<object> or long) arg); 1.533 + void passUnionWithArrayBuffer((ArrayBuffer or long) arg); 1.534 + void passUnionWithString((DOMString or object) arg); 1.535 + //void passUnionWithEnum((TestEnum or object) arg); 1.536 + // Trying to use a callback in a union won't include the test 1.537 + // headers, unfortunately, so won't compile. 1.538 + //void passUnionWithCallback((TestCallback or long) arg); 1.539 + void passUnionWithObject((object or long) arg); 1.540 + //void passUnionWithDict((Dict or long) arg); 1.541 + 1.542 + void passUnionWithDefaultValue1(optional (double or DOMString) arg = ""); 1.543 + void passUnionWithDefaultValue2(optional (double or DOMString) arg = 1); 1.544 + void passUnionWithDefaultValue3(optional (double or DOMString) arg = 1.5); 1.545 + void passUnionWithDefaultValue4(optional (float or DOMString) arg = ""); 1.546 + void passUnionWithDefaultValue5(optional (float or DOMString) arg = 1); 1.547 + void passUnionWithDefaultValue6(optional (float or DOMString) arg = 1.5); 1.548 + void passUnionWithDefaultValue7(optional (unrestricted double or DOMString) arg = ""); 1.549 + void passUnionWithDefaultValue8(optional (unrestricted double or DOMString) arg = 1); 1.550 + void passUnionWithDefaultValue9(optional (unrestricted double or DOMString) arg = 1.5); 1.551 + void passUnionWithDefaultValue10(optional (unrestricted double or DOMString) arg = Infinity); 1.552 + void passUnionWithDefaultValue11(optional (unrestricted float or DOMString) arg = ""); 1.553 + void passUnionWithDefaultValue12(optional (unrestricted float or DOMString) arg = 1); 1.554 + void passUnionWithDefaultValue13(optional (unrestricted float or DOMString) arg = Infinity); 1.555 + 1.556 + void passNullableUnionWithDefaultValue1(optional (double or DOMString)? arg = ""); 1.557 + void passNullableUnionWithDefaultValue2(optional (double or DOMString)? arg = 1); 1.558 + void passNullableUnionWithDefaultValue3(optional (double or DOMString)? arg = null); 1.559 + void passNullableUnionWithDefaultValue4(optional (float or DOMString)? arg = ""); 1.560 + void passNullableUnionWithDefaultValue5(optional (float or DOMString)? arg = 1); 1.561 + void passNullableUnionWithDefaultValue6(optional (float or DOMString)? arg = null); 1.562 + void passNullableUnionWithDefaultValue7(optional (unrestricted double or DOMString)? arg = ""); 1.563 + void passNullableUnionWithDefaultValue8(optional (unrestricted double or DOMString)? arg = 1); 1.564 + void passNullableUnionWithDefaultValue9(optional (unrestricted double or DOMString)? arg = null); 1.565 + void passNullableUnionWithDefaultValue10(optional (unrestricted float or DOMString)? arg = ""); 1.566 + void passNullableUnionWithDefaultValue11(optional (unrestricted float or DOMString)? arg = 1); 1.567 + void passNullableUnionWithDefaultValue12(optional (unrestricted float or DOMString)? arg = null); 1.568 + 1.569 + void passSequenceOfUnions(sequence<(CanvasPattern or CanvasGradient)> arg); 1.570 + void passSequenceOfUnions2(sequence<(object or long)> arg); 1.571 + void passVariadicUnion((CanvasPattern or CanvasGradient)... arg); 1.572 + 1.573 + void passSequenceOfNullableUnions(sequence<(CanvasPattern or CanvasGradient)?> arg); 1.574 + void passVariadicNullableUnion((CanvasPattern or CanvasGradient)?... arg); 1.575 + void passMozMapOfUnions(MozMap<(CanvasPattern or CanvasGradient)> arg); 1.576 + // XXXbz no move constructor on some unions 1.577 + // void passMozMapOfUnions2(MozMap<(object or long)> arg); 1.578 + 1.579 + (CanvasPattern or CanvasGradient) receiveUnion(); 1.580 + (object or long) receiveUnion2(); 1.581 + (CanvasPattern? or CanvasGradient) receiveUnionContainingNull(); 1.582 + (CanvasPattern or CanvasGradient)? receiveNullableUnion(); 1.583 + (object or long)? receiveNullableUnion2(); 1.584 + 1.585 + attribute (CanvasPattern or CanvasGradient) writableUnion; 1.586 + attribute (CanvasPattern? or CanvasGradient) writableUnionContainingNull; 1.587 + attribute (CanvasPattern or CanvasGradient)? writableNullableUnion; 1.588 + 1.589 + // Date types 1.590 + void passDate(Date arg); 1.591 + void passNullableDate(Date? arg); 1.592 + void passOptionalDate(optional Date arg); 1.593 + void passOptionalNullableDate(optional Date? arg); 1.594 + void passOptionalNullableDateWithDefaultValue(optional Date? arg = null); 1.595 + void passDateSequence(sequence<Date> arg); 1.596 + void passNullableDateSequence(sequence<Date?> arg); 1.597 + void passDateMozMap(MozMap<Date> arg); 1.598 + Date receiveDate(); 1.599 + Date? receiveNullableDate(); 1.600 + 1.601 + // binaryNames tests 1.602 + void methodRenamedFrom(); 1.603 + void methodRenamedFrom(byte argument); 1.604 + readonly attribute byte attributeGetterRenamedFrom; 1.605 + attribute byte attributeRenamedFrom; 1.606 + 1.607 + void passDictionary(optional Dict x); 1.608 + [Cached, Pure] 1.609 + readonly attribute Dict readonlyDictionary; 1.610 + [Cached, Pure] 1.611 + readonly attribute Dict? readonlyNullableDictionary; 1.612 + [Cached, Pure] 1.613 + attribute Dict writableDictionary; 1.614 + [Cached, Pure, Frozen] 1.615 + readonly attribute Dict readonlyFrozenDictionary; 1.616 + [Cached, Pure, Frozen] 1.617 + readonly attribute Dict? readonlyFrozenNullableDictionary; 1.618 + [Cached, Pure, Frozen] 1.619 + attribute Dict writableFrozenDictionary; 1.620 + Dict receiveDictionary(); 1.621 + Dict? receiveNullableDictionary(); 1.622 + void passOtherDictionary(optional GrandparentDict x); 1.623 + void passSequenceOfDictionaries(sequence<Dict> x); 1.624 + void passMozMapOfDictionaries(MozMap<GrandparentDict> x); 1.625 + // No support for nullable dictionaries inside a sequence (nor should there be) 1.626 + // void passSequenceOfNullableDictionaries(sequence<Dict?> x); 1.627 + void passDictionaryOrLong(optional Dict x); 1.628 + void passDictionaryOrLong(long x); 1.629 + 1.630 + void passDictContainingDict(optional DictContainingDict arg); 1.631 + void passDictContainingSequence(optional DictContainingSequence arg); 1.632 + DictContainingSequence receiveDictContainingSequence(); 1.633 + 1.634 + // EnforceRange/Clamp tests 1.635 + void dontEnforceRangeOrClamp(byte arg); 1.636 + void doEnforceRange([EnforceRange] byte arg); 1.637 + void doClamp([Clamp] byte arg); 1.638 + [EnforceRange] attribute byte enforcedByte; 1.639 + [Clamp] attribute byte clampedByte; 1.640 + 1.641 + // Typedefs 1.642 + const myLong myLongConstant = 5; 1.643 + void exerciseTypedefInterfaces1(AnotherNameForTestInterface arg); 1.644 + AnotherNameForTestInterface exerciseTypedefInterfaces2(NullableTestInterface arg); 1.645 + void exerciseTypedefInterfaces3(YetAnotherNameForTestInterface arg); 1.646 + 1.647 + // Static methods and attributes 1.648 + static attribute boolean staticAttribute; 1.649 + static void staticMethod(boolean arg); 1.650 + static void staticMethodWithContext(any arg); 1.651 + 1.652 + // Overload resolution tests 1.653 + //void overload1(DOMString... strs); 1.654 + boolean overload1(TestInterface arg); 1.655 + TestInterface overload1(DOMString strs, TestInterface arg); 1.656 + void overload2(TestInterface arg); 1.657 + void overload2(optional Dict arg); 1.658 + void overload2(boolean arg); 1.659 + void overload2(DOMString arg); 1.660 + void overload2(Date arg); 1.661 + void overload3(TestInterface arg); 1.662 + void overload3(TestCallback arg); 1.663 + void overload3(boolean arg); 1.664 + void overload4(TestInterface arg); 1.665 + void overload4(TestCallbackInterface arg); 1.666 + void overload4(DOMString arg); 1.667 + void overload5(long arg); 1.668 + void overload5(TestEnum arg); 1.669 + void overload6(long arg); 1.670 + void overload6(boolean arg); 1.671 + void overload7(long arg); 1.672 + void overload7(boolean arg); 1.673 + void overload7(ByteString arg); 1.674 + void overload8(long arg); 1.675 + void overload8(TestInterface arg); 1.676 + void overload9(long? arg); 1.677 + void overload9(DOMString arg); 1.678 + void overload10(long? arg); 1.679 + void overload10(object arg); 1.680 + void overload11(long arg); 1.681 + void overload11(DOMString? arg); 1.682 + void overload12(long arg); 1.683 + void overload12(boolean? arg); 1.684 + void overload13(long? arg); 1.685 + void overload13(boolean arg); 1.686 + void overload14(optional long arg); 1.687 + void overload14(TestInterface arg); 1.688 + void overload15(long arg); 1.689 + void overload15(optional TestInterface arg); 1.690 + void overload16(long arg); 1.691 + void overload16(optional TestInterface? arg); 1.692 + 1.693 + // Variadic handling 1.694 + void passVariadicThirdArg(DOMString arg1, long arg2, TestInterface... arg3); 1.695 + 1.696 + // Conditionally exposed methods/attributes 1.697 + [Pref="abc.def"] 1.698 + readonly attribute boolean prefable1; 1.699 + [Pref="abc.def"] 1.700 + readonly attribute boolean prefable2; 1.701 + [Pref="ghi.jkl"] 1.702 + readonly attribute boolean prefable3; 1.703 + [Pref="ghi.jkl"] 1.704 + readonly attribute boolean prefable4; 1.705 + [Pref="abc.def"] 1.706 + readonly attribute boolean prefable5; 1.707 + [Pref="abc.def", Func="nsGenericHTMLElement::TouchEventsEnabled"] 1.708 + readonly attribute boolean prefable6; 1.709 + [Pref="abc.def", Func="nsGenericHTMLElement::TouchEventsEnabled"] 1.710 + readonly attribute boolean prefable7; 1.711 + [Pref="ghi.jkl", Func="nsGenericHTMLElement::TouchEventsEnabled"] 1.712 + readonly attribute boolean prefable8; 1.713 + [Pref="abc.def", Func="nsGenericHTMLElement::TouchEventsEnabled"] 1.714 + readonly attribute boolean prefable9; 1.715 + [Pref="abc.def"] 1.716 + void prefable10(); 1.717 + [Pref="abc.def", Func="nsGenericHTMLElement::TouchEventsEnabled"] 1.718 + void prefable11(); 1.719 + [Pref="abc.def", Func="TestFuncControlledMember"] 1.720 + readonly attribute boolean prefable12; 1.721 + [Pref="abc.def", Func="nsGenericHTMLElement::TouchEventsEnabled"] 1.722 + void prefable13(); 1.723 + [Pref="abc.def", Func="TestFuncControlledMember"] 1.724 + readonly attribute boolean prefable14; 1.725 + [Func="TestFuncControlledMember"] 1.726 + readonly attribute boolean prefable15; 1.727 + [Func="TestFuncControlledMember"] 1.728 + readonly attribute boolean prefable16; 1.729 + [Pref="abc.def", Func="TestFuncControlledMember"] 1.730 + void prefable17(); 1.731 + [Func="TestFuncControlledMember"] 1.732 + void prefable18(); 1.733 + [Func="TestFuncControlledMember"] 1.734 + void prefable19(); 1.735 + [Pref="abc.def", Func="TestFuncControlledMember", ChromeOnly] 1.736 + void prefable20(); 1.737 + [Func="TestFuncControlledMember", AvailableIn=CertifiedApps] 1.738 + void prefable21(); 1.739 + [Func="TestFuncControlledMember", AvailableIn=CertifiedApps] 1.740 + void prefable22(); 1.741 + [Pref="abc.def", Func="TestFuncControlledMember", AvailableIn=CertifiedApps] 1.742 + void prefable23(); 1.743 + [Pref="abc.def", Func="TestFuncControlledMember", AvailableIn=PrivilegedApps] 1.744 + void prefable24(); 1.745 + 1.746 + // Miscellania 1.747 + [LenientThis] attribute long attrWithLenientThis; 1.748 + [Unforgeable] readonly attribute long unforgeableAttr; 1.749 + [Unforgeable, ChromeOnly] readonly attribute long unforgeableAttr2; 1.750 + stringifier; 1.751 + void passRenamedInterface(TestRenamedInterface arg); 1.752 + [PutForwards=writableByte] readonly attribute TestInterface putForwardsAttr; 1.753 + [PutForwards=writableByte, LenientThis] readonly attribute TestInterface putForwardsAttr2; 1.754 + [PutForwards=writableByte, ChromeOnly] readonly attribute TestInterface putForwardsAttr3; 1.755 + [Throws] void throwingMethod(); 1.756 + [Throws] attribute boolean throwingAttr; 1.757 + [GetterThrows] attribute boolean throwingGetterAttr; 1.758 + [SetterThrows] attribute boolean throwingSetterAttr; 1.759 + legacycaller short(unsigned long arg1, TestInterface arg2); 1.760 + void passArgsWithDefaults(optional long arg1, 1.761 + optional TestInterface? arg2 = null, 1.762 + optional Dict arg3, optional double arg4 = 5.0, 1.763 + optional float arg5); 1.764 + 1.765 + attribute any jsonifierShouldSkipThis; 1.766 + attribute TestParentInterface jsonifierShouldSkipThis2; 1.767 + attribute TestCallbackInterface jsonifierShouldSkipThis3; 1.768 + jsonifier; 1.769 + 1.770 + // If you add things here, add them to TestExampleGen and TestJSImplGen as well 1.771 +}; 1.772 + 1.773 +interface TestParentInterface { 1.774 +}; 1.775 + 1.776 +interface TestChildInterface : TestParentInterface { 1.777 +}; 1.778 + 1.779 +interface TestNonWrapperCacheInterface { 1.780 +}; 1.781 + 1.782 +[NoInterfaceObject] 1.783 +interface ImplementedInterfaceParent { 1.784 + void implementedParentMethod(); 1.785 + attribute boolean implementedParentProperty; 1.786 + 1.787 + const long implementedParentConstant = 8; 1.788 +}; 1.789 + 1.790 +ImplementedInterfaceParent implements IndirectlyImplementedInterface; 1.791 + 1.792 +[NoInterfaceObject] 1.793 +interface IndirectlyImplementedInterface { 1.794 + void indirectlyImplementedMethod(); 1.795 + attribute boolean indirectlyImplementedProperty; 1.796 + 1.797 + const long indirectlyImplementedConstant = 9; 1.798 +}; 1.799 + 1.800 +[NoInterfaceObject] 1.801 +interface ImplementedInterface : ImplementedInterfaceParent { 1.802 + void implementedMethod(); 1.803 + attribute boolean implementedProperty; 1.804 + 1.805 + const long implementedConstant = 5; 1.806 +}; 1.807 + 1.808 +[NoInterfaceObject] 1.809 +interface DiamondImplements { 1.810 + readonly attribute long diamondImplementedProperty; 1.811 +}; 1.812 +[NoInterfaceObject] 1.813 +interface DiamondBranch1A { 1.814 +}; 1.815 +[NoInterfaceObject] 1.816 +interface DiamondBranch1B { 1.817 +}; 1.818 +[NoInterfaceObject] 1.819 +interface DiamondBranch2A : DiamondImplements { 1.820 +}; 1.821 +[NoInterfaceObject] 1.822 +interface DiamondBranch2B : DiamondImplements { 1.823 +}; 1.824 +TestInterface implements DiamondBranch1A; 1.825 +TestInterface implements DiamondBranch1B; 1.826 +TestInterface implements DiamondBranch2A; 1.827 +TestInterface implements DiamondBranch2B; 1.828 +DiamondBranch1A implements DiamondImplements; 1.829 +DiamondBranch1B implements DiamondImplements; 1.830 + 1.831 +dictionary Dict : ParentDict { 1.832 + TestEnum someEnum; 1.833 + long x; 1.834 + long a; 1.835 + long b = 8; 1.836 + long z = 9; 1.837 + [EnforceRange] unsigned long enforcedUnsignedLong; 1.838 + [Clamp] unsigned long clampedUnsignedLong; 1.839 + DOMString str; 1.840 + DOMString empty = ""; 1.841 + TestEnum otherEnum = "b"; 1.842 + DOMString otherStr = "def"; 1.843 + DOMString? yetAnotherStr = null; 1.844 + DOMString template; 1.845 + object someObj; 1.846 + boolean prototype; 1.847 + object? anotherObj = null; 1.848 + TestCallback? someCallback = null; 1.849 + any someAny; 1.850 + any anotherAny = null; 1.851 + 1.852 + unrestricted float urFloat = 0; 1.853 + unrestricted float urFloat2 = 1.1; 1.854 + unrestricted float urFloat3 = -1.1; 1.855 + unrestricted float? urFloat4 = null; 1.856 + unrestricted float infUrFloat = Infinity; 1.857 + unrestricted float negativeInfUrFloat = -Infinity; 1.858 + unrestricted float nanUrFloat = NaN; 1.859 + 1.860 + unrestricted double urDouble = 0; 1.861 + unrestricted double urDouble2 = 1.1; 1.862 + unrestricted double urDouble3 = -1.1; 1.863 + unrestricted double? urDouble4 = null; 1.864 + unrestricted double infUrDouble = Infinity; 1.865 + unrestricted double negativeInfUrDouble = -Infinity; 1.866 + unrestricted double nanUrDouble = NaN; 1.867 + 1.868 + (float or DOMString) floatOrString = "str"; 1.869 + (object or long) objectOrLong; 1.870 +#ifdef DEBUG 1.871 + (EventInit or long) eventInitOrLong; 1.872 + (EventInit or long)? nullableEventInitOrLong; 1.873 + (Node or long)? nullableNodeOrLong; 1.874 + // CustomEventInit is useful to test because it needs rooting. 1.875 + (CustomEventInit or long) eventInitOrLong2; 1.876 + (CustomEventInit or long)? nullableEventInitOrLong2; 1.877 + (EventInit or long) eventInitOrLongWithDefaultValue = null; 1.878 + (CustomEventInit or long) eventInitOrLongWithDefaultValue2 = null; 1.879 + (EventInit or long) eventInitOrLongWithDefaultValue3 = 5; 1.880 + (CustomEventInit or long) eventInitOrLongWithDefaultValue4 = 5; 1.881 +#endif 1.882 + 1.883 + ArrayBuffer arrayBuffer; 1.884 + ArrayBuffer? nullableArrayBuffer; 1.885 + Uint8Array uint8Array; 1.886 + Float64Array? float64Array = null; 1.887 +}; 1.888 + 1.889 +dictionary ParentDict : GrandparentDict { 1.890 + long c = 5; 1.891 + TestInterface someInterface; 1.892 + TestInterface? someNullableInterface = null; 1.893 + TestExternalInterface someExternalInterface; 1.894 + any parentAny; 1.895 +}; 1.896 + 1.897 +dictionary DictContainingDict { 1.898 + Dict memberDict; 1.899 +}; 1.900 + 1.901 +dictionary DictContainingSequence { 1.902 + sequence<long> ourSequence; 1.903 + sequence<TestInterface> ourSequence2; 1.904 + sequence<any> ourSequence3; 1.905 + sequence<object> ourSequence4; 1.906 + sequence<object?> ourSequence5; 1.907 + sequence<object>? ourSequence6; 1.908 + sequence<object?>? ourSequence7; 1.909 + sequence<object>? ourSequence8 = null; 1.910 + sequence<object?>? ourSequence9 = null; 1.911 + sequence<(float or DOMString)> ourSequence10; 1.912 +}; 1.913 + 1.914 +dictionary DictForConstructor { 1.915 + Dict dict; 1.916 + DictContainingDict dict2; 1.917 + sequence<Dict> seq1; 1.918 + sequence<sequence<Dict>>? seq2; 1.919 + sequence<sequence<Dict>?> seq3; 1.920 + sequence<any> seq4; 1.921 + sequence<any> seq5; 1.922 + sequence<DictContainingSequence> seq6; 1.923 + object obj1; 1.924 + object? obj2; 1.925 + any any1 = null; 1.926 +}; 1.927 + 1.928 +interface TestIndexedGetterInterface { 1.929 + getter long item(unsigned long idx); 1.930 + readonly attribute unsigned long length; 1.931 + legacycaller void(); 1.932 +}; 1.933 + 1.934 +interface TestNamedGetterInterface { 1.935 + getter DOMString (DOMString name); 1.936 +}; 1.937 + 1.938 +interface TestIndexedGetterAndSetterAndNamedGetterInterface { 1.939 + getter DOMString (DOMString myName); 1.940 + getter long (unsigned long index); 1.941 + setter creator void (unsigned long index, long arg); 1.942 +}; 1.943 + 1.944 +interface TestIndexedAndNamedGetterInterface { 1.945 + getter long (unsigned long index); 1.946 + getter DOMString namedItem(DOMString name); 1.947 + readonly attribute unsigned long length; 1.948 +}; 1.949 + 1.950 +interface TestIndexedSetterInterface { 1.951 + setter creator void setItem(unsigned long idx, DOMString item); 1.952 + getter DOMString (unsigned long idx); 1.953 +}; 1.954 + 1.955 +interface TestNamedSetterInterface { 1.956 + setter creator void (DOMString myName, TestIndexedSetterInterface item); 1.957 + getter TestIndexedSetterInterface (DOMString name); 1.958 +}; 1.959 + 1.960 +interface TestIndexedAndNamedSetterInterface { 1.961 + setter creator void (unsigned long index, TestIndexedSetterInterface item); 1.962 + getter TestIndexedSetterInterface (unsigned long index); 1.963 + setter creator void setNamedItem(DOMString name, TestIndexedSetterInterface item); 1.964 + getter TestIndexedSetterInterface (DOMString name); 1.965 +}; 1.966 + 1.967 +interface TestIndexedAndNamedGetterAndSetterInterface : TestIndexedSetterInterface { 1.968 + getter long item(unsigned long index); 1.969 + getter DOMString namedItem(DOMString name); 1.970 + setter creator void (unsigned long index, long item); 1.971 + setter creator void (DOMString name, DOMString item); 1.972 + stringifier DOMString (); 1.973 + readonly attribute unsigned long length; 1.974 +}; 1.975 + 1.976 +interface TestIndexedDeleterInterface { 1.977 + deleter void delItem(unsigned long idx); 1.978 + getter long (unsigned long index); 1.979 +}; 1.980 + 1.981 +interface TestIndexedDeleterWithRetvalInterface { 1.982 + deleter boolean delItem(unsigned long index); 1.983 + getter long (unsigned long index); 1.984 +}; 1.985 + 1.986 +interface TestNamedDeleterInterface { 1.987 + deleter void (DOMString name); 1.988 + getter long (DOMString name); 1.989 +}; 1.990 + 1.991 +interface TestNamedDeleterWithRetvalInterface { 1.992 + deleter boolean delNamedItem(DOMString name); 1.993 + getter long (DOMString name); 1.994 +}; 1.995 + 1.996 +interface TestIndexedAndNamedDeleterInterface { 1.997 + deleter void (unsigned long index); 1.998 + getter long (unsigned long index); 1.999 + deleter void delNamedItem(DOMString name); 1.1000 + getter long (DOMString name); 1.1001 +}; 1.1002 + 1.1003 +interface TestCppKeywordNamedMethodsInterface { 1.1004 + boolean continue(); 1.1005 + boolean delete(); 1.1006 + long volatile(); 1.1007 +}; 1.1008 +