|
1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
|
2 /* This Source Code Form is subject to the terms of the Mozilla Public |
|
3 * License, v. 2.0. If a copy of the MPL was not distributed with this file, |
|
4 * You can obtain one at http://mozilla.org/MPL/2.0/. |
|
5 */ |
|
6 [Constructor, |
|
7 Constructor(DOMString str), |
|
8 Constructor(unsigned long num, boolean? boolArg), |
|
9 Constructor(TestInterface? iface), |
|
10 Constructor(long arg1, IndirectlyImplementedInterface iface), |
|
11 // Constructor(long arg1, long arg2, (TestInterface or OnlyForUseInConstructor) arg3), |
|
12 NamedConstructor=Example, |
|
13 NamedConstructor=Example(DOMString str), |
|
14 NamedConstructor=Example2(DictForConstructor dict, any any1, object obj1, |
|
15 object? obj2, sequence<Dict> seq, optional any any2, |
|
16 optional object obj3, optional object? obj4) |
|
17 ] |
|
18 interface TestExampleInterface { |
|
19 // Integer types |
|
20 // XXXbz add tests for throwing versions of all the integer stuff |
|
21 readonly attribute byte readonlyByte; |
|
22 attribute byte writableByte; |
|
23 void passByte(byte arg); |
|
24 byte receiveByte(); |
|
25 void passOptionalByte(optional byte arg); |
|
26 void passOptionalByteBeforeRequired(optional byte arg1, byte arg2); |
|
27 void passOptionalByteWithDefault(optional byte arg = 0); |
|
28 void passOptionalByteWithDefaultBeforeRequired(optional byte arg1 = 0, byte arg2); |
|
29 void passNullableByte(byte? arg); |
|
30 void passOptionalNullableByte(optional byte? arg); |
|
31 void passVariadicByte(byte... arg); |
|
32 [Cached, Pure] |
|
33 readonly attribute byte cachedByte; |
|
34 [StoreInSlot, Constant] |
|
35 readonly attribute byte cachedConstantByte; |
|
36 [Cached, Pure] |
|
37 attribute byte cachedWritableByte; |
|
38 |
|
39 readonly attribute short readonlyShort; |
|
40 attribute short writableShort; |
|
41 void passShort(short arg); |
|
42 short receiveShort(); |
|
43 void passOptionalShort(optional short arg); |
|
44 void passOptionalShortWithDefault(optional short arg = 5); |
|
45 |
|
46 readonly attribute long readonlyLong; |
|
47 attribute long writableLong; |
|
48 void passLong(long arg); |
|
49 long receiveLong(); |
|
50 void passOptionalLong(optional long arg); |
|
51 void passOptionalLongWithDefault(optional long arg = 7); |
|
52 |
|
53 readonly attribute long long readonlyLongLong; |
|
54 attribute long long writableLongLong; |
|
55 void passLongLong(long long arg); |
|
56 long long receiveLongLong(); |
|
57 void passOptionalLongLong(optional long long arg); |
|
58 void passOptionalLongLongWithDefault(optional long long arg = -12); |
|
59 |
|
60 readonly attribute octet readonlyOctet; |
|
61 attribute octet writableOctet; |
|
62 void passOctet(octet arg); |
|
63 octet receiveOctet(); |
|
64 void passOptionalOctet(optional octet arg); |
|
65 void passOptionalOctetWithDefault(optional octet arg = 19); |
|
66 |
|
67 readonly attribute unsigned short readonlyUnsignedShort; |
|
68 attribute unsigned short writableUnsignedShort; |
|
69 void passUnsignedShort(unsigned short arg); |
|
70 unsigned short receiveUnsignedShort(); |
|
71 void passOptionalUnsignedShort(optional unsigned short arg); |
|
72 void passOptionalUnsignedShortWithDefault(optional unsigned short arg = 2); |
|
73 |
|
74 readonly attribute unsigned long readonlyUnsignedLong; |
|
75 attribute unsigned long writableUnsignedLong; |
|
76 void passUnsignedLong(unsigned long arg); |
|
77 unsigned long receiveUnsignedLong(); |
|
78 void passOptionalUnsignedLong(optional unsigned long arg); |
|
79 void passOptionalUnsignedLongWithDefault(optional unsigned long arg = 6); |
|
80 |
|
81 readonly attribute unsigned long long readonlyUnsignedLongLong; |
|
82 attribute unsigned long long writableUnsignedLongLong; |
|
83 void passUnsignedLongLong(unsigned long long arg); |
|
84 unsigned long long receiveUnsignedLongLong(); |
|
85 void passOptionalUnsignedLongLong(optional unsigned long long arg); |
|
86 void passOptionalUnsignedLongLongWithDefault(optional unsigned long long arg = 17); |
|
87 |
|
88 attribute float writableFloat; |
|
89 attribute unrestricted float writableUnrestrictedFloat; |
|
90 attribute float? writableNullableFloat; |
|
91 attribute unrestricted float? writableNullableUnrestrictedFloat; |
|
92 attribute double writableDouble; |
|
93 attribute unrestricted double writableUnrestrictedDouble; |
|
94 attribute double? writableNullableDouble; |
|
95 attribute unrestricted double? writableNullableUnrestrictedDouble; |
|
96 void passFloat(float arg1, unrestricted float arg2, |
|
97 float? arg3, unrestricted float? arg4, |
|
98 double arg5, unrestricted double arg6, |
|
99 double? arg7, unrestricted double? arg8, |
|
100 sequence<float> arg9, sequence<unrestricted float> arg10, |
|
101 sequence<float?> arg11, sequence<unrestricted float?> arg12, |
|
102 sequence<double> arg13, sequence<unrestricted double> arg14, |
|
103 sequence<double?> arg15, sequence<unrestricted double?> arg16); |
|
104 [LenientFloat] |
|
105 void passLenientFloat(float arg1, unrestricted float arg2, |
|
106 float? arg3, unrestricted float? arg4, |
|
107 double arg5, unrestricted double arg6, |
|
108 double? arg7, unrestricted double? arg8, |
|
109 sequence<float> arg9, |
|
110 sequence<unrestricted float> arg10, |
|
111 sequence<float?> arg11, |
|
112 sequence<unrestricted float?> arg12, |
|
113 sequence<double> arg13, |
|
114 sequence<unrestricted double> arg14, |
|
115 sequence<double?> arg15, |
|
116 sequence<unrestricted double?> arg16); |
|
117 [LenientFloat] |
|
118 attribute float lenientFloatAttr; |
|
119 [LenientFloat] |
|
120 attribute double lenientDoubleAttr; |
|
121 |
|
122 // Castable interface types |
|
123 // XXXbz add tests for throwing versions of all the castable interface stuff |
|
124 TestInterface receiveSelf(); |
|
125 TestInterface? receiveNullableSelf(); |
|
126 TestInterface receiveWeakSelf(); |
|
127 TestInterface? receiveWeakNullableSelf(); |
|
128 void passSelf(TestInterface arg); |
|
129 void passNullableSelf(TestInterface? arg); |
|
130 attribute TestInterface nonNullSelf; |
|
131 attribute TestInterface? nullableSelf; |
|
132 [Cached, Pure] |
|
133 readonly attribute TestInterface cachedSelf; |
|
134 // Optional arguments |
|
135 void passOptionalSelf(optional TestInterface? arg); |
|
136 void passOptionalNonNullSelf(optional TestInterface arg); |
|
137 void passOptionalSelfWithDefault(optional TestInterface? arg = null); |
|
138 |
|
139 // Non-wrapper-cache interface types |
|
140 [NewObject] |
|
141 TestNonWrapperCacheInterface receiveNonWrapperCacheInterface(); |
|
142 [NewObject] |
|
143 TestNonWrapperCacheInterface? receiveNullableNonWrapperCacheInterface(); |
|
144 [NewObject] |
|
145 sequence<TestNonWrapperCacheInterface> receiveNonWrapperCacheInterfaceSequence(); |
|
146 [NewObject] |
|
147 sequence<TestNonWrapperCacheInterface?> receiveNullableNonWrapperCacheInterfaceSequence(); |
|
148 [NewObject] |
|
149 sequence<TestNonWrapperCacheInterface>? receiveNonWrapperCacheInterfaceNullableSequence(); |
|
150 [NewObject] |
|
151 sequence<TestNonWrapperCacheInterface?>? receiveNullableNonWrapperCacheInterfaceNullableSequence(); |
|
152 |
|
153 // Non-castable interface types |
|
154 IndirectlyImplementedInterface receiveOther(); |
|
155 IndirectlyImplementedInterface? receiveNullableOther(); |
|
156 IndirectlyImplementedInterface receiveWeakOther(); |
|
157 IndirectlyImplementedInterface? receiveWeakNullableOther(); |
|
158 void passOther(IndirectlyImplementedInterface arg); |
|
159 void passNullableOther(IndirectlyImplementedInterface? arg); |
|
160 attribute IndirectlyImplementedInterface nonNullOther; |
|
161 attribute IndirectlyImplementedInterface? nullableOther; |
|
162 // Optional arguments |
|
163 void passOptionalOther(optional IndirectlyImplementedInterface? arg); |
|
164 void passOptionalNonNullOther(optional IndirectlyImplementedInterface arg); |
|
165 void passOptionalOtherWithDefault(optional IndirectlyImplementedInterface? arg = null); |
|
166 |
|
167 // External interface types |
|
168 TestExternalInterface receiveExternal(); |
|
169 TestExternalInterface? receiveNullableExternal(); |
|
170 TestExternalInterface receiveWeakExternal(); |
|
171 TestExternalInterface? receiveWeakNullableExternal(); |
|
172 void passExternal(TestExternalInterface arg); |
|
173 void passNullableExternal(TestExternalInterface? arg); |
|
174 attribute TestExternalInterface nonNullExternal; |
|
175 attribute TestExternalInterface? nullableExternal; |
|
176 // Optional arguments |
|
177 void passOptionalExternal(optional TestExternalInterface? arg); |
|
178 void passOptionalNonNullExternal(optional TestExternalInterface arg); |
|
179 void passOptionalExternalWithDefault(optional TestExternalInterface? arg = null); |
|
180 |
|
181 // Callback interface types |
|
182 TestCallbackInterface receiveCallbackInterface(); |
|
183 TestCallbackInterface? receiveNullableCallbackInterface(); |
|
184 TestCallbackInterface receiveWeakCallbackInterface(); |
|
185 TestCallbackInterface? receiveWeakNullableCallbackInterface(); |
|
186 void passCallbackInterface(TestCallbackInterface arg); |
|
187 void passNullableCallbackInterface(TestCallbackInterface? arg); |
|
188 attribute TestCallbackInterface nonNullCallbackInterface; |
|
189 attribute TestCallbackInterface? nullableCallbackInterface; |
|
190 // Optional arguments |
|
191 void passOptionalCallbackInterface(optional TestCallbackInterface? arg); |
|
192 void passOptionalNonNullCallbackInterface(optional TestCallbackInterface arg); |
|
193 void passOptionalCallbackInterfaceWithDefault(optional TestCallbackInterface? arg = null); |
|
194 |
|
195 // Miscellaneous interface tests |
|
196 IndirectlyImplementedInterface receiveConsequentialInterface(); |
|
197 void passConsequentialInterface(IndirectlyImplementedInterface arg); |
|
198 |
|
199 // Sequence types |
|
200 [Cached, Pure] |
|
201 readonly attribute sequence<long> readonlySequence; |
|
202 [Cached, Pure] |
|
203 readonly attribute sequence<Dict> readonlySequenceOfDictionaries; |
|
204 [Cached, Pure] |
|
205 readonly attribute sequence<Dict>? readonlyNullableSequenceOfDictionaries; |
|
206 [Cached, Pure, Frozen] |
|
207 readonly attribute sequence<long> readonlyFrozenSequence; |
|
208 [Cached, Pure, Frozen] |
|
209 readonly attribute sequence<long>? readonlyFrozenNullableSequence; |
|
210 sequence<long> receiveSequence(); |
|
211 sequence<long>? receiveNullableSequence(); |
|
212 sequence<long?> receiveSequenceOfNullableInts(); |
|
213 sequence<long?>? receiveNullableSequenceOfNullableInts(); |
|
214 void passSequence(sequence<long> arg); |
|
215 void passNullableSequence(sequence<long>? arg); |
|
216 void passSequenceOfNullableInts(sequence<long?> arg); |
|
217 void passOptionalSequenceOfNullableInts(optional sequence<long?> arg); |
|
218 void passOptionalNullableSequenceOfNullableInts(optional sequence<long?>? arg); |
|
219 sequence<TestInterface> receiveCastableObjectSequence(); |
|
220 sequence<TestCallbackInterface> receiveCallbackObjectSequence(); |
|
221 sequence<TestInterface?> receiveNullableCastableObjectSequence(); |
|
222 sequence<TestCallbackInterface?> receiveNullableCallbackObjectSequence(); |
|
223 sequence<TestInterface>? receiveCastableObjectNullableSequence(); |
|
224 sequence<TestInterface?>? receiveNullableCastableObjectNullableSequence(); |
|
225 sequence<TestInterface> receiveWeakCastableObjectSequence(); |
|
226 sequence<TestInterface?> receiveWeakNullableCastableObjectSequence(); |
|
227 sequence<TestInterface>? receiveWeakCastableObjectNullableSequence(); |
|
228 sequence<TestInterface?>? receiveWeakNullableCastableObjectNullableSequence(); |
|
229 void passCastableObjectSequence(sequence<TestInterface> arg); |
|
230 void passNullableCastableObjectSequence(sequence<TestInterface?> arg); |
|
231 void passCastableObjectNullableSequence(sequence<TestInterface>? arg); |
|
232 void passNullableCastableObjectNullableSequence(sequence<TestInterface?>? arg); |
|
233 void passOptionalSequence(optional sequence<long> arg); |
|
234 void passOptionalNullableSequence(optional sequence<long>? arg); |
|
235 void passOptionalNullableSequenceWithDefaultValue(optional sequence<long>? arg = null); |
|
236 void passOptionalObjectSequence(optional sequence<TestInterface> arg); |
|
237 void passExternalInterfaceSequence(sequence<TestExternalInterface> arg); |
|
238 void passNullableExternalInterfaceSequence(sequence<TestExternalInterface?> arg); |
|
239 |
|
240 sequence<DOMString> receiveStringSequence(); |
|
241 void passStringSequence(sequence<DOMString> arg); |
|
242 |
|
243 sequence<ByteString> receiveByteStringSequence(); |
|
244 void passByteStringSequence(sequence<ByteString> arg); |
|
245 |
|
246 sequence<any> receiveAnySequence(); |
|
247 sequence<any>? receiveNullableAnySequence(); |
|
248 //XXXbz No support for sequence of sequence return values yet. |
|
249 //sequence<sequence<any>> receiveAnySequenceSequence(); |
|
250 |
|
251 sequence<object> receiveObjectSequence(); |
|
252 sequence<object?> receiveNullableObjectSequence(); |
|
253 |
|
254 void passSequenceOfSequences(sequence<sequence<long>> arg); |
|
255 //XXXbz No support for sequence of sequence return values yet. |
|
256 //sequence<sequence<long>> receiveSequenceOfSequences(); |
|
257 |
|
258 // MozMap types |
|
259 void passMozMap(MozMap<long> arg); |
|
260 void passNullableMozMap(MozMap<long>? arg); |
|
261 void passMozMapOfNullableInts(MozMap<long?> arg); |
|
262 void passOptionalMozMapOfNullableInts(optional MozMap<long?> arg); |
|
263 void passOptionalNullableMozMapOfNullableInts(optional MozMap<long?>? arg); |
|
264 void passCastableObjectMozMap(MozMap<TestInterface> arg); |
|
265 void passNullableCastableObjectMozMap(MozMap<TestInterface?> arg); |
|
266 void passCastableObjectNullableMozMap(MozMap<TestInterface>? arg); |
|
267 void passNullableCastableObjectNullableMozMap(MozMap<TestInterface?>? arg); |
|
268 void passOptionalMozMap(optional MozMap<long> arg); |
|
269 void passOptionalNullableMozMap(optional MozMap<long>? arg); |
|
270 void passOptionalNullableMozMapWithDefaultValue(optional MozMap<long>? arg = null); |
|
271 void passOptionalObjectMozMap(optional MozMap<TestInterface> arg); |
|
272 void passExternalInterfaceMozMap(MozMap<TestExternalInterface> arg); |
|
273 void passNullableExternalInterfaceMozMap(MozMap<TestExternalInterface?> arg); |
|
274 void passStringMozMap(MozMap<DOMString> arg); |
|
275 void passByteStringMozMap(MozMap<ByteString> arg); |
|
276 void passMozMapOfMozMaps(MozMap<MozMap<long>> arg); |
|
277 MozMap<long> receiveMozMap(); |
|
278 MozMap<long>? receiveNullableMozMap(); |
|
279 MozMap<long?> receiveMozMapOfNullableInts(); |
|
280 MozMap<long?>? receiveNullableMozMapOfNullableInts(); |
|
281 //XXXbz No support for MozMap of MozMaps return values yet. |
|
282 //MozMap<MozMap<long>> receiveMozMapOfMozMaps(); |
|
283 MozMap<any> receiveAnyMozMap(); |
|
284 |
|
285 // Typed array types |
|
286 void passArrayBuffer(ArrayBuffer arg); |
|
287 void passNullableArrayBuffer(ArrayBuffer? arg); |
|
288 void passOptionalArrayBuffer(optional ArrayBuffer arg); |
|
289 void passOptionalNullableArrayBuffer(optional ArrayBuffer? arg); |
|
290 void passOptionalNullableArrayBufferWithDefaultValue(optional ArrayBuffer? arg= null); |
|
291 void passArrayBufferView(ArrayBufferView arg); |
|
292 void passInt8Array(Int8Array arg); |
|
293 void passInt16Array(Int16Array arg); |
|
294 void passInt32Array(Int32Array arg); |
|
295 void passUint8Array(Uint8Array arg); |
|
296 void passUint16Array(Uint16Array arg); |
|
297 void passUint32Array(Uint32Array arg); |
|
298 void passUint8ClampedArray(Uint8ClampedArray arg); |
|
299 void passFloat32Array(Float32Array arg); |
|
300 void passFloat64Array(Float64Array arg); |
|
301 void passSequenceOfArrayBuffers(sequence<ArrayBuffer> arg); |
|
302 void passSequenceOfNullableArrayBuffers(sequence<ArrayBuffer?> arg); |
|
303 void passMozMapOfArrayBuffers(MozMap<ArrayBuffer> arg); |
|
304 void passMozMapOfNullableArrayBuffers(MozMap<ArrayBuffer?> arg); |
|
305 void passVariadicTypedArray(Float32Array... arg); |
|
306 void passVariadicNullableTypedArray(Float32Array?... arg); |
|
307 Uint8Array receiveUint8Array(); |
|
308 |
|
309 // DOMString types |
|
310 void passString(DOMString arg); |
|
311 void passNullableString(DOMString? arg); |
|
312 void passOptionalString(optional DOMString arg); |
|
313 void passOptionalStringWithDefaultValue(optional DOMString arg = "abc"); |
|
314 void passOptionalNullableString(optional DOMString? arg); |
|
315 void passOptionalNullableStringWithDefaultValue(optional DOMString? arg = null); |
|
316 void passVariadicString(DOMString... arg); |
|
317 |
|
318 // ByteString types |
|
319 void passByteString(ByteString arg); |
|
320 void passNullableByteString(ByteString? arg); |
|
321 void passOptionalByteString(optional ByteString arg); |
|
322 void passOptionalNullableByteString(optional ByteString? arg); |
|
323 void passVariadicByteString(ByteString... arg); |
|
324 |
|
325 // Enumerated types |
|
326 void passEnum(TestEnum arg); |
|
327 void passNullableEnum(TestEnum? arg); |
|
328 void passOptionalEnum(optional TestEnum arg); |
|
329 void passEnumWithDefault(optional TestEnum arg = "a"); |
|
330 void passOptionalNullableEnum(optional TestEnum? arg); |
|
331 void passOptionalNullableEnumWithDefaultValue(optional TestEnum? arg = null); |
|
332 void passOptionalNullableEnumWithDefaultValue2(optional TestEnum? arg = "a"); |
|
333 TestEnum receiveEnum(); |
|
334 TestEnum? receiveNullableEnum(); |
|
335 attribute TestEnum enumAttribute; |
|
336 readonly attribute TestEnum readonlyEnumAttribute; |
|
337 |
|
338 // Callback types |
|
339 void passCallback(TestCallback arg); |
|
340 void passNullableCallback(TestCallback? arg); |
|
341 void passOptionalCallback(optional TestCallback arg); |
|
342 void passOptionalNullableCallback(optional TestCallback? arg); |
|
343 void passOptionalNullableCallbackWithDefaultValue(optional TestCallback? arg = null); |
|
344 TestCallback receiveCallback(); |
|
345 TestCallback? receiveNullableCallback(); |
|
346 void passNullableTreatAsNullCallback(TestTreatAsNullCallback? arg); |
|
347 void passOptionalNullableTreatAsNullCallback(optional TestTreatAsNullCallback? arg); |
|
348 void passOptionalNullableTreatAsNullCallbackWithDefaultValue(optional TestTreatAsNullCallback? arg = null); |
|
349 |
|
350 // Any types |
|
351 void passAny(any arg); |
|
352 void passVariadicAny(any... arg); |
|
353 void passOptionalAny(optional any arg); |
|
354 void passAnyDefaultNull(optional any arg = null); |
|
355 void passSequenceOfAny(sequence<any> arg); |
|
356 void passNullableSequenceOfAny(sequence<any>? arg); |
|
357 void passOptionalSequenceOfAny(optional sequence<any> arg); |
|
358 void passOptionalNullableSequenceOfAny(optional sequence<any>? arg); |
|
359 void passOptionalSequenceOfAnyWithDefaultValue(optional sequence<any>? arg = null); |
|
360 void passSequenceOfSequenceOfAny(sequence<sequence<any>> arg); |
|
361 void passSequenceOfNullableSequenceOfAny(sequence<sequence<any>?> arg); |
|
362 void passNullableSequenceOfNullableSequenceOfAny(sequence<sequence<any>?>? arg); |
|
363 void passOptionalNullableSequenceOfNullableSequenceOfAny(optional sequence<sequence<any>?>? arg); |
|
364 void passMozMapOfAny(MozMap<any> arg); |
|
365 void passNullableMozMapOfAny(MozMap<any>? arg); |
|
366 void passOptionalMozMapOfAny(optional MozMap<any> arg); |
|
367 void passOptionalNullableMozMapOfAny(optional MozMap<any>? arg); |
|
368 void passOptionalMozMapOfAnyWithDefaultValue(optional MozMap<any>? arg = null); |
|
369 void passMozMapOfMozMapOfAny(MozMap<MozMap<any>> arg); |
|
370 void passMozMapOfNullableMozMapOfAny(MozMap<MozMap<any>?> arg); |
|
371 void passNullableMozMapOfNullableMozMapOfAny(MozMap<MozMap<any>?>? arg); |
|
372 void passOptionalNullableMozMapOfNullableMozMapOfAny(optional MozMap<MozMap<any>?>? arg); |
|
373 void passOptionalNullableMozMapOfNullableSequenceOfAny(optional MozMap<sequence<any>?>? arg); |
|
374 void passOptionalNullableSequenceOfNullableMozMapOfAny(optional sequence<MozMap<any>?>? arg); |
|
375 any receiveAny(); |
|
376 |
|
377 // object types |
|
378 void passObject(object arg); |
|
379 void passVariadicObject(object... arg); |
|
380 void passNullableObject(object? arg); |
|
381 void passVariadicNullableObject(object... arg); |
|
382 void passOptionalObject(optional object arg); |
|
383 void passOptionalNullableObject(optional object? arg); |
|
384 void passOptionalNullableObjectWithDefaultValue(optional object? arg = null); |
|
385 void passSequenceOfObject(sequence<object> arg); |
|
386 void passSequenceOfNullableObject(sequence<object?> arg); |
|
387 void passNullableSequenceOfObject(sequence<object>? arg); |
|
388 void passOptionalNullableSequenceOfNullableSequenceOfObject(optional sequence<sequence<object>?>? arg); |
|
389 void passOptionalNullableSequenceOfNullableSequenceOfNullableObject(optional sequence<sequence<object?>?>? arg); |
|
390 void passMozMapOfObject(MozMap<object> arg); |
|
391 object receiveObject(); |
|
392 object? receiveNullableObject(); |
|
393 |
|
394 // Union types |
|
395 void passUnion((object or long) arg); |
|
396 // Some union tests are debug-only to avoid creating all those |
|
397 // unused union types in opt builds. |
|
398 #ifdef DEBUG |
|
399 void passUnion2((long or boolean) arg); |
|
400 void passUnion3((object or long or boolean) arg); |
|
401 void passUnion4((Node or long or boolean) arg); |
|
402 void passUnion5((object or boolean) arg); |
|
403 void passUnion6((object or DOMString) arg); |
|
404 void passUnion7((object or DOMString or long) arg); |
|
405 void passUnion8((object or DOMString or boolean) arg); |
|
406 void passUnion9((object or DOMString or long or boolean) arg); |
|
407 void passUnion10(optional (EventInit or long) arg); |
|
408 void passUnion11(optional (CustomEventInit or long) arg); |
|
409 void passUnion12(optional (EventInit or long) arg = 5); |
|
410 void passUnion13(optional (object or long?) arg = null); |
|
411 void passUnion14(optional (object or long?) arg = 5); |
|
412 void passUnionWithCallback((EventHandler or long) arg); |
|
413 #endif |
|
414 void passUnionWithNullable((object? or long) arg); |
|
415 void passNullableUnion((object or long)? arg); |
|
416 void passOptionalUnion(optional (object or long) arg); |
|
417 void passOptionalNullableUnion(optional (object or long)? arg); |
|
418 void passOptionalNullableUnionWithDefaultValue(optional (object or long)? arg = null); |
|
419 //void passUnionWithInterfaces((TestInterface or TestExternalInterface) arg); |
|
420 //void passUnionWithInterfacesAndNullable((TestInterface? or TestExternalInterface) arg); |
|
421 //void passUnionWithSequence((sequence<object> or long) arg); |
|
422 void passUnionWithArrayBuffer((ArrayBuffer or long) arg); |
|
423 void passUnionWithString((DOMString or object) arg); |
|
424 //void passUnionWithEnum((TestEnum or object) arg); |
|
425 // Trying to use a callback in a union won't include the test |
|
426 // headers, unfortunately, so won't compile. |
|
427 // void passUnionWithCallback((TestCallback or long) arg); |
|
428 void passUnionWithObject((object or long) arg); |
|
429 //void passUnionWithDict((Dict or long) arg); |
|
430 |
|
431 void passUnionWithDefaultValue1(optional (double or DOMString) arg = ""); |
|
432 void passUnionWithDefaultValue2(optional (double or DOMString) arg = 1); |
|
433 void passUnionWithDefaultValue3(optional (double or DOMString) arg = 1.5); |
|
434 void passUnionWithDefaultValue4(optional (float or DOMString) arg = ""); |
|
435 void passUnionWithDefaultValue5(optional (float or DOMString) arg = 1); |
|
436 void passUnionWithDefaultValue6(optional (float or DOMString) arg = 1.5); |
|
437 void passUnionWithDefaultValue7(optional (unrestricted double or DOMString) arg = ""); |
|
438 void passUnionWithDefaultValue8(optional (unrestricted double or DOMString) arg = 1); |
|
439 void passUnionWithDefaultValue9(optional (unrestricted double or DOMString) arg = 1.5); |
|
440 void passUnionWithDefaultValue10(optional (unrestricted double or DOMString) arg = Infinity); |
|
441 void passUnionWithDefaultValue11(optional (unrestricted float or DOMString) arg = ""); |
|
442 void passUnionWithDefaultValue12(optional (unrestricted float or DOMString) arg = 1); |
|
443 void passUnionWithDefaultValue13(optional (unrestricted float or DOMString) arg = Infinity); |
|
444 |
|
445 void passNullableUnionWithDefaultValue1(optional (double or DOMString)? arg = ""); |
|
446 void passNullableUnionWithDefaultValue2(optional (double or DOMString)? arg = 1); |
|
447 void passNullableUnionWithDefaultValue3(optional (double or DOMString)? arg = null); |
|
448 void passNullableUnionWithDefaultValue4(optional (float or DOMString)? arg = ""); |
|
449 void passNullableUnionWithDefaultValue5(optional (float or DOMString)? arg = 1); |
|
450 void passNullableUnionWithDefaultValue6(optional (float or DOMString)? arg = null); |
|
451 void passNullableUnionWithDefaultValue7(optional (unrestricted double or DOMString)? arg = ""); |
|
452 void passNullableUnionWithDefaultValue8(optional (unrestricted double or DOMString)? arg = 1); |
|
453 void passNullableUnionWithDefaultValue9(optional (unrestricted double or DOMString)? arg = null); |
|
454 void passNullableUnionWithDefaultValue10(optional (unrestricted float or DOMString)? arg = ""); |
|
455 void passNullableUnionWithDefaultValue11(optional (unrestricted float or DOMString)? arg = 1); |
|
456 void passNullableUnionWithDefaultValue12(optional (unrestricted float or DOMString)? arg = null); |
|
457 |
|
458 void passSequenceOfUnions(sequence<(CanvasPattern or CanvasGradient)> arg); |
|
459 void passSequenceOfUnions2(sequence<(object or long)> arg); |
|
460 void passVariadicUnion((CanvasPattern or CanvasGradient)... arg); |
|
461 |
|
462 void passSequenceOfNullableUnions(sequence<(CanvasPattern or CanvasGradient)?> arg); |
|
463 void passVariadicNullableUnion((CanvasPattern or CanvasGradient)?... arg); |
|
464 void passMozMapOfUnions(MozMap<(CanvasPattern or CanvasGradient)> arg); |
|
465 // XXXbz no move constructor on some unions |
|
466 // void passMozMapOfUnions2(MozMap<(object or long)> arg); |
|
467 |
|
468 //(CanvasPattern or CanvasGradient) receiveUnion(); |
|
469 //(object or long) receiveUnion2(); |
|
470 //(CanvasPattern? or CanvasGradient) receiveUnionContainingNull(); |
|
471 //(CanvasPattern or CanvasGradient)? receiveNullableUnion(); |
|
472 //(object or long)? receiveNullableUnion2(); |
|
473 |
|
474 //attribute (CanvasPattern or CanvasGradient) writableUnion; |
|
475 //attribute (CanvasPattern? or CanvasGradient) writableUnionContainingNull; |
|
476 //attribute (CanvasPattern or CanvasGradient)? writableNullableUnion; |
|
477 |
|
478 // Date types |
|
479 void passDate(Date arg); |
|
480 void passNullableDate(Date? arg); |
|
481 void passOptionalDate(optional Date arg); |
|
482 void passOptionalNullableDate(optional Date? arg); |
|
483 void passOptionalNullableDateWithDefaultValue(optional Date? arg = null); |
|
484 void passDateSequence(sequence<Date> arg); |
|
485 void passNullableDateSequence(sequence<Date?> arg); |
|
486 void passDateMozMap(MozMap<Date> arg); |
|
487 Date receiveDate(); |
|
488 Date? receiveNullableDate(); |
|
489 |
|
490 // binaryNames tests |
|
491 void methodRenamedFrom(); |
|
492 void methodRenamedFrom(byte argument); |
|
493 readonly attribute byte attributeGetterRenamedFrom; |
|
494 attribute byte attributeRenamedFrom; |
|
495 |
|
496 void passDictionary(optional Dict x); |
|
497 [Cached, Pure] |
|
498 readonly attribute Dict readonlyDictionary; |
|
499 [Cached, Pure] |
|
500 readonly attribute Dict? readonlyNullableDictionary; |
|
501 [Cached, Pure] |
|
502 attribute Dict writableDictionary; |
|
503 [Cached, Pure, Frozen] |
|
504 readonly attribute Dict readonlyFrozenDictionary; |
|
505 [Cached, Pure, Frozen] |
|
506 readonly attribute Dict? readonlyFrozenNullableDictionary; |
|
507 [Cached, Pure, Frozen] |
|
508 attribute Dict writableFrozenDictionary; |
|
509 Dict receiveDictionary(); |
|
510 Dict? receiveNullableDictionary(); |
|
511 void passOtherDictionary(optional GrandparentDict x); |
|
512 void passSequenceOfDictionaries(sequence<Dict> x); |
|
513 void passMozMapOfDictionaries(MozMap<GrandparentDict> x); |
|
514 // No support for nullable dictionaries inside a sequence (nor should there be) |
|
515 // void passSequenceOfNullableDictionaries(sequence<Dict?> x); |
|
516 void passDictionaryOrLong(optional Dict x); |
|
517 void passDictionaryOrLong(long x); |
|
518 |
|
519 void passDictContainingDict(optional DictContainingDict arg); |
|
520 void passDictContainingSequence(optional DictContainingSequence arg); |
|
521 DictContainingSequence receiveDictContainingSequence(); |
|
522 |
|
523 // EnforceRange/Clamp tests |
|
524 void dontEnforceRangeOrClamp(byte arg); |
|
525 void doEnforceRange([EnforceRange] byte arg); |
|
526 void doClamp([Clamp] byte arg); |
|
527 [EnforceRange] attribute byte enforcedByte; |
|
528 [Clamp] attribute byte clampedByte; |
|
529 |
|
530 // Typedefs |
|
531 const myLong myLongConstant = 5; |
|
532 void exerciseTypedefInterfaces1(AnotherNameForTestInterface arg); |
|
533 AnotherNameForTestInterface exerciseTypedefInterfaces2(NullableTestInterface arg); |
|
534 void exerciseTypedefInterfaces3(YetAnotherNameForTestInterface arg); |
|
535 |
|
536 // Static methods and attributes |
|
537 static attribute boolean staticAttribute; |
|
538 static void staticMethod(boolean arg); |
|
539 static void staticMethodWithContext(any arg); |
|
540 |
|
541 // Overload resolution tests |
|
542 //void overload1(DOMString... strs); |
|
543 boolean overload1(TestInterface arg); |
|
544 TestInterface overload1(DOMString strs, TestInterface arg); |
|
545 void overload2(TestInterface arg); |
|
546 void overload2(optional Dict arg); |
|
547 void overload2(boolean arg); |
|
548 void overload2(DOMString arg); |
|
549 void overload2(Date arg); |
|
550 void overload3(TestInterface arg); |
|
551 void overload3(TestCallback arg); |
|
552 void overload3(boolean arg); |
|
553 void overload4(TestInterface arg); |
|
554 void overload4(TestCallbackInterface arg); |
|
555 void overload4(DOMString arg); |
|
556 void overload5(long arg); |
|
557 void overload5(TestEnum arg); |
|
558 void overload6(long arg); |
|
559 void overload6(boolean arg); |
|
560 void overload7(long arg); |
|
561 void overload7(boolean arg); |
|
562 void overload7(ByteString arg); |
|
563 void overload8(long arg); |
|
564 void overload8(TestInterface arg); |
|
565 void overload9(long? arg); |
|
566 void overload9(DOMString arg); |
|
567 void overload10(long? arg); |
|
568 void overload10(object arg); |
|
569 void overload11(long arg); |
|
570 void overload11(DOMString? arg); |
|
571 void overload12(long arg); |
|
572 void overload12(boolean? arg); |
|
573 void overload13(long? arg); |
|
574 void overload13(boolean arg); |
|
575 void overload14(optional long arg); |
|
576 void overload14(TestInterface arg); |
|
577 void overload15(long arg); |
|
578 void overload15(optional TestInterface arg); |
|
579 void overload16(long arg); |
|
580 void overload16(optional TestInterface? arg); |
|
581 |
|
582 // Variadic handling |
|
583 void passVariadicThirdArg(DOMString arg1, long arg2, TestInterface... arg3); |
|
584 |
|
585 // Conditionally exposed methods/attributes |
|
586 [Pref="abc.def"] |
|
587 readonly attribute boolean prefable1; |
|
588 [Pref="abc.def"] |
|
589 readonly attribute boolean prefable2; |
|
590 [Pref="ghi.jkl"] |
|
591 readonly attribute boolean prefable3; |
|
592 [Pref="ghi.jkl"] |
|
593 readonly attribute boolean prefable4; |
|
594 [Pref="abc.def"] |
|
595 readonly attribute boolean prefable5; |
|
596 [Pref="abc.def", Func="nsGenericHTMLElement::TouchEventsEnabled"] |
|
597 readonly attribute boolean prefable6; |
|
598 [Pref="abc.def", Func="nsGenericHTMLElement::TouchEventsEnabled"] |
|
599 readonly attribute boolean prefable7; |
|
600 [Pref="ghi.jkl", Func="nsGenericHTMLElement::TouchEventsEnabled"] |
|
601 readonly attribute boolean prefable8; |
|
602 [Pref="abc.def", Func="nsGenericHTMLElement::TouchEventsEnabled"] |
|
603 readonly attribute boolean prefable9; |
|
604 [Pref="abc.def"] |
|
605 void prefable10(); |
|
606 [Pref="abc.def", Func="nsGenericHTMLElement::TouchEventsEnabled"] |
|
607 void prefable11(); |
|
608 [Pref="abc.def", Func="TestFuncControlledMember"] |
|
609 readonly attribute boolean prefable12; |
|
610 [Pref="abc.def", Func="nsGenericHTMLElement::TouchEventsEnabled"] |
|
611 void prefable13(); |
|
612 [Pref="abc.def", Func="TestFuncControlledMember"] |
|
613 readonly attribute boolean prefable14; |
|
614 [Func="TestFuncControlledMember"] |
|
615 readonly attribute boolean prefable15; |
|
616 [Func="TestFuncControlledMember"] |
|
617 readonly attribute boolean prefable16; |
|
618 [Pref="abc.def", Func="TestFuncControlledMember"] |
|
619 void prefable17(); |
|
620 [Func="TestFuncControlledMember"] |
|
621 void prefable18(); |
|
622 [Func="TestFuncControlledMember"] |
|
623 void prefable19(); |
|
624 |
|
625 // Miscellania |
|
626 [LenientThis] attribute long attrWithLenientThis; |
|
627 [Unforgeable] readonly attribute long unforgeableAttr; |
|
628 [Unforgeable, ChromeOnly] readonly attribute long unforgeableAttr2; |
|
629 stringifier; |
|
630 void passRenamedInterface(TestRenamedInterface arg); |
|
631 [PutForwards=writableByte] readonly attribute TestExampleInterface putForwardsAttr; |
|
632 [PutForwards=writableByte, LenientThis] readonly attribute TestExampleInterface putForwardsAttr2; |
|
633 [PutForwards=writableByte, ChromeOnly] readonly attribute TestExampleInterface putForwardsAttr3; |
|
634 [Throws] void throwingMethod(); |
|
635 [Throws] attribute boolean throwingAttr; |
|
636 [GetterThrows] attribute boolean throwingGetterAttr; |
|
637 [SetterThrows] attribute boolean throwingSetterAttr; |
|
638 legacycaller short(unsigned long arg1, TestInterface arg2); |
|
639 void passArgsWithDefaults(optional long arg1, |
|
640 optional TestInterface? arg2 = null, |
|
641 optional Dict arg3, optional double arg4 = 5.0, |
|
642 optional float arg5); |
|
643 attribute any jsonifierShouldSkipThis; |
|
644 attribute TestParentInterface jsonifierShouldSkipThis2; |
|
645 attribute TestCallbackInterface jsonifierShouldSkipThis3; |
|
646 jsonifier; |
|
647 |
|
648 // If you add things here, add them to TestCodeGen and TestJSImplGen as well |
|
649 }; |
|
650 |
|
651 interface TestExampleProxyInterface { |
|
652 getter long longIndexedGetter(unsigned long ix); |
|
653 deleter void (unsigned long ix); |
|
654 setter creator void longIndexedSetter(unsigned long y, long z); |
|
655 stringifier DOMString myStringifier(); |
|
656 getter short shortNameGetter(DOMString nom); |
|
657 deleter void (DOMString nomnom); |
|
658 setter creator void shortNamedSetter(DOMString me, short value); |
|
659 }; |