Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / bindings / tests / idls / TestObjectPython.idl
1 /*
2  * Copyright (C) 2013 Google Inc. All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions are
6  * met:
7  *
8  *     * Redistributions of source code must retain the above copyright
9  * notice, this list of conditions and the following disclaimer.
10  *     * Redistributions in binary form must reproduce the above
11  * copyright notice, this list of conditions and the following disclaimer
12  * in the documentation and/or other materials provided with the
13  * distribution.
14  *     * Neither the name of Google Inc. nor the names of its
15  * contributors may be used to endorse or promote products derived from
16  * this software without specific prior written permission.
17  *
18  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29  */
30
31 enum TestEnum {"", "EnumValue1", "EnumValue2", "EnumValue3"};
32
33 callback VoidCallbackFunction = void ();
34 callback AnyCallbackFunctionOptionalAnyArg = any (optional any optionalAnyArg);
35
36 interface TestObjectPython {
37     // Constants
38     const unsigned short CONST_VALUE_0 = 0;
39     const unsigned short CONST_VALUE_1 = 1;
40     const unsigned short CONST_VALUE_2 = 2;
41     const unsigned short CONST_VALUE_4 = 4;
42     const unsigned short CONST_VALUE_8 = 8;
43     const short CONST_VALUE_9 = -1;
44     const DOMString CONST_VALUE_10 = "my constant string";
45     const unsigned short CONST_VALUE_11 = 0xffffffff;
46     const unsigned short CONST_VALUE_12 = 0x01;
47     const unsigned short CONST_VALUE_13 = 0X20;
48     const unsigned short CONST_VALUE_14 = 0x1abc;
49     const unsigned short CONST_VALUE_15 = 010;
50     const unsigned short CONST_VALUE_16 = -010;
51     const unsigned short CONST_VALUE_16 = -0x1A;
52     const unsigned short CONST_VALUE_17 = -0X1a;
53
54     // Extended attributes
55     [DeprecateAs=Constant] const short DEPRECATED_CONSTANT = 1;
56     [RuntimeEnabled=FeatureName] const short FEATURE_ENABLED_CONST = 1;
57     [Reflect=CONST_IMPL] const short CONST_JAVASCRIPT = 1;
58
59
60     // Attributes
61     // TestInterfaceEmpty is used as a stub interface type, for testing behavior
62     // that should not depend on particular type (beyond "interface or not").
63     // read only
64     readonly attribute DOMString readonlyStringAttribute;
65     readonly attribute TestInterfaceEmpty readonlyTestInterfaceEmptyAttribute;
66     readonly attribute long readonlyLongAttribute;
67     // Basic types
68     attribute Date dateAttribute;
69     attribute DOMString stringAttribute;
70     readonly attribute DOMTimeStamp readonlyDOMTimeStampAttribute; // FIXME: Perl CG doesn't translate typedef DOMTimeStamp -> unsigned long long; remove readonly once moved to Python-only
71     attribute boolean booleanAttribute;
72     attribute byte byteAttribute;
73     attribute double doubleAttribute;
74     attribute float floatAttribute;
75     attribute long longAttribute;
76     attribute long long longLongAttribute;
77     attribute octet octetAttribute;
78     attribute short shortAttribute;
79     attribute unsigned long unsignedLongAttribute;
80     attribute unsigned long long unsignedLongLongAttribute;
81     attribute unsigned short unsignedShortAttribute;
82     // Interface type
83     attribute TestInterfaceEmpty testInterfaceEmptyAttribute;
84     // Self-reference
85     attribute TestObjectPython testObjectPythonAttribute;
86     // Callback function type
87     attribute VoidCallbackFunction voidCallbackFunctionAttribute;
88     attribute AnyCallbackFunctionOptionalAnyArg anyCallbackFunctionOptionalAnyArgAttribute;
89     // Names that begin with an acronym
90     attribute long cssAttribute;
91     attribute long imeAttribute;
92     attribute long svgAttribute;
93     attribute long xmlAttribute;
94     // Non-wrapper types
95     attribute NodeFilter nodeFilterAttribute;
96     attribute SerializedScriptValue serializedScriptValueAttribute;
97     attribute any anyAttribute;
98     // Custom type conversions
99     attribute Promise promiseAttribute;
100     attribute Window windowAttribute;
101     // DOM Node types
102     attribute Document documentAttribute;
103     attribute DocumentFragment documentFragmentAttribute;
104     attribute DocumentType documentTypeAttribute;
105     attribute Element elementAttribute;
106     attribute Node nodeAttribute;
107     attribute ShadowRoot shadowRootAttribute;
108     // Typed arrays
109     attribute ArrayBuffer arrayBufferAttribute;
110     attribute Float32Array float32ArrayAttribute;
111     attribute Uint8Array uint8ArrayAttribute;
112     // Exceptions for is_keep_alive_for_gc
113     readonly attribute TestInterfaceEmpty self;
114     readonly attribute EventTarget readonlyEventTargetAttribute;
115     readonly attribute Window readonlyWindowAttribute;
116     readonly attribute HTMLCollection htmlCollectionAttribute;
117     readonly attribute HTMLElement htmlElementAttribute;
118     // Arrays
119     attribute DOMString[] stringArrayAttribute;
120     attribute TestInterfaceEmpty[] testInterfaceEmptyArrayAttribute;
121     attribute float[] floatArrayAttribute;
122     // Nullable attributes
123     attribute DOMString? nullableStringAttribute;
124     attribute long? nullableLongAttribute;
125     attribute TestInterface? nullableTestInterfaceAttribute;
126     // Enumerations
127     attribute TestEnum testEnumAttribute;
128     // Static attributes
129     static attribute DOMString staticStringAttribute;
130     static attribute long staticLongAttribute;
131     // Constructors
132     attribute TestObjectAConstructor testObjectAConstructorAttribute;
133     // Exceptional type
134     attribute EventHandler eventHandlerAttribute;
135
136     // Extended attributes
137     [ActivityLogging=ForAllWorlds] attribute long activityLoggingAccessForAllWorldsLongAttribute;
138     [ActivityLogging=GetterForAllWorlds] attribute long activityLoggingGetterForAllWorldsLongAttribute;
139     [ActivityLogging=SetterForAllWorlds] attribute long activityLoggingSetterForAllWorldsLongAttribute;
140     [CachedAttribute=isValueDirty] attribute any cachedAttributeAnyAttribute;
141     [CallWith=ExecutionContext] attribute any callWithExecutionContextAnyAttribute;
142     [CheckSecurity=Node] readonly attribute Document checkSecurityForNodeReadonlyDocumentAttribute; // All uses are read only
143     [Conditional=CONDITION] attribute long conditionalLongAttribute;
144     [Conditional=CONDITION_1&CONDITION_2] attribute long conditionalAndLongAttribute;
145     [Conditional=CONDITION_1|CONDITION_2] attribute long conditionalOrLongAttribute;
146     [Custom] attribute object customObjectAttribute;
147     [Custom=Getter] attribute long customGetterLongAttribute;
148     [Custom=Getter] readonly attribute object customGetterReadonlyObjectAttribute;
149     [Custom=Setter] attribute long customSetterLongAttribute;
150     [Conditional=CONDITION, Custom] attribute long customLongAttribute;
151     [CustomElementCallbacks] readonly attribute long customElementsCallbacksReadonlyLongAttribute;
152     [DeprecateAs=LongAttribute] attribute long deprecatedLongAttribute;
153     [EnforceRange] attribute long enforceRangeLongAttribute;
154     [ExposeJSAccessors] attribute long exposeJSAccessorsLongAttribute;
155     [ImplementedAs=implementedAsName] attribute long implementedAsLongAttribute;
156     [Custom, ImplementedAs=implementedAsNameWithCustom] attribute long customImplementedAsLongAttribute;
157     [Custom=Getter, ImplementedAs=implementedAsNameWithCustomGetter] attribute long customGetterImplementedAsLongAttribute;
158     [Custom=Setter, ImplementedAs=implementedAsNameWithCustomGetter] attribute long customSetterImplementedAsLongAttribute;
159     [MeasureAs=TestFeature] attribute long measureAsLongAttribute;
160     [NotEnumerable] attribute long notEnumerableLongAttribute;
161     [PerContextEnabled=FeatureName] attribute long perContextEnabledLongAttribute;
162     [PerWorldBindings] attribute long perWorldBindingsLongAttribute;
163     [PerWorldBindings] readonly attribute long perWorldBindingsReadonlyLongAttribute; // Separate read only attribute to check attribute configuration
164     [PerWorldBindings] readonly attribute TestInterfaceEmpty perWorldBindingsReadonlyTestInterfaceEmptyAttribute;
165     [ActivityLogging=ForAllWorlds, PerWorldBindings] attribute long activityLoggingAccessPerWorldBindingsLongAttribute;
166     [ActivityLogging=ForIsolatedWorlds, PerWorldBindings] attribute long activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttribute;
167     [ActivityLogging=GetterForAllWorlds, PerWorldBindings] attribute long activityLoggingGetterPerWorldBindingsLongAttribute;
168     [ActivityLogging=GetterForIsolatedWorlds, PerWorldBindings] attribute long activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttribute;
169     [PutForwards=href] readonly attribute TestNode location;
170     [PutForwards=hrefThrows] readonly attribute TestNode locationWithException;
171     [PutForwards=hrefCallWith] readonly attribute TestNode locationWithCallWith;
172     [PerWorldBindings, PutForwards=href] readonly attribute TestNode locationWithPerWorldBindings;
173     [RaisesException] attribute long raisesExceptionLongAttribute;
174     [RaisesException=Getter] attribute long raisesExceptionGetterLongAttribute;
175     [RaisesException=Setter] attribute long setterRaisesExceptionLongAttribute;
176     [RaisesException] attribute TestInterfaceEmpty raisesExceptionTestInterfaceEmptyAttribute;
177     [CachedAttribute=isValueDirty, RaisesException] attribute any cachedAttributeRaisesExceptionGetterAnyAttribute;
178     [Reflect] attribute TestInterface reflectTestInterfaceAttribute;
179     [Reflect=reflectedNameAttribute] attribute TestInterface reflectReflectedNameAttributeTestAttribute;
180     // [Reflect] exceptional types: exceptional getters, exceptional setters,
181     // or range checking for unsigned
182     [Reflect] attribute boolean reflectBooleanAttribute;
183     [Reflect] attribute long reflectLongAttribute;
184     [Reflect] attribute unsigned short reflectUnsignedShortAttribute;
185     [Reflect] attribute unsigned long reflectUnsignedLongAttribute;
186     // [Reflect] exceptional names
187     [Reflect] attribute DOMString id;
188     [Reflect] attribute DOMString name;
189     [Reflect] attribute DOMString class;
190     [Reflect=id] attribute DOMString reflectedId;
191     [Reflect=name] attribute DOMString reflectedName;
192     [Reflect=class] attribute DOMString reflectedClass;
193     // Limited value attributes and enumerated attributes
194     [Reflect, ReflectOnly="unique"] attribute DOMString limitedToOnlyOneAttribute;
195     [Reflect, ReflectOnly="Per"|"Paal"|"Espen"] attribute DOMString limitedToOnlyAttribute;
196     [Reflect=Other, ReflectOnly="Value1"|"Value2" ] attribute DOMString limitedToOnlyOtherAttribute;
197     [Reflect, ReflectOnly="rsa"|"dsa", ReflectMissing="rsa"] attribute DOMString limitedWithMissingDefaultAttribute;
198     [Reflect, ReflectOnly="ltr"|"rtl"|"auto", ReflectMissing="auto", ReflectInvalid="ltr"] attribute DOMString limitedWithInvalidMissingDefaultAttribute;
199     [Reflect, ReflectOnly="anonymous"|"use-credentials", ReflectEmpty="anonymous", ReflectInvalid="anonymous"] readonly attribute DOMString corsSettingAttribute;
200     [Reflect, ReflectOnly="empty"|"missing"|"invalid"|"a-normal", ReflectEmpty="empty", ReflectMissing="missing", ReflectInvalid="invalid"] readonly attribute DOMString limitedWithEmptyMissingInvalidAttribute;
201
202     [Replaceable] readonly attribute long replaceableReadonlyLongAttribute;
203     [Replaceable, PutForwards=href] readonly attribute TestNode locationReplaceable;
204     [RuntimeEnabled=FeatureName] attribute long runtimeEnabledLongAttribute;
205     [PerContextEnabled=FeatureName, RuntimeEnabled=FeatureName] attribute long perContextEnabledRuntimeEnabledLongAttribute;
206     [Conditional=CONDITION, RuntimeEnabled=FeatureName] attribute long conditionalRuntimeEnabledLongAttribute;
207     [SetterCallWith=ActiveWindow&FirstWindow] attribute DOMString setterCallWithActiveWindowAndFirstWindowStringAttribute;
208     [SetterCallWith=ExecutionContext] attribute DOMString setterCallWithExecutionContextStringAttribute;
209     [StrictTypeChecking] attribute float strictTypeCheckingFloatAttribute; // nop for non-interface types
210     [StrictTypeChecking] attribute TestInterface strictTypeCheckingTestInterfaceAttribute;
211     [TreatNullAs=NullString] attribute DOMString treatNullAsNullStringStringAttribute;
212     [TreatReturnedNullStringAs=Null] attribute DOMString treatReturnedNullStringAsNullStringAttribute;
213     [TreatReturnedNullStringAs=Undefined] attribute DOMString treatReturnedNullStringAsUndefinedStringAttribute;
214     [Reflect, URL] attribute DOMString urlStringAttribute;
215     [Reflect=ReflectUrlAttribute, URL] attribute DOMString urlStringAttribute;
216     [Unforgeable] attribute long unforgeableLongAttribute;
217     [Reflect="ReflectUrlAttributeAsAString"] attribute DOMString anotherStringAttribute;
218
219
220     // Methods
221     void voidMethod();
222     static void staticVoidMethod();
223
224     // Types
225     // Basic types
226     Date dateMethod();
227     DOMString stringMethod();
228     DOMTimeStamp readonlyDOMTimeStampMethod();
229     boolean booleanMethod();
230     byte byteMethod();
231     double doubleMethod();
232     float floatMethod();
233     long longMethod();
234     long long longLongMethod();
235     octet octetMethod();
236     short shortMethod();
237     unsigned long unsignedLongMethod();
238     unsigned long long unsignedLongLongMethod();
239     unsigned short unsignedShortMethod();
240
241     void voidMethodDateArg(Date dateArg);
242     void voidMethodStringArg(DOMString stringArg);
243     // void voidMethodDOMTimeStampArg(DOMTimeStamp domTimeStampArg); // FIXME: Perl CG doesn't translate typedef DOMTimeStamp -> unsigned long long; uncomment once moved to Python-only
244     void voidMethodBooleanArg(boolean booleanArg);
245     void voidMethodByteArg(byte byteArg);
246     void voidMethodDoubleArg(double doubleArg);
247     void voidMethodFloatArg(float floatArg);
248     void voidMethodLongArg(long longArg);
249     void voidMethodLongLongArg(long long longLongArg);
250     void voidMethodOctetArg(octet octetArg);
251     void voidMethodShortArg(short shortArg);
252     void voidMethodUnsignedLongArg(unsigned long unsignedLongArg);
253     void voidMethodUnsignedLongLongArg(unsigned long long unsignedLongLongArg);
254     void voidMethodUnsignedShortArg(unsigned short unsignedShortArg);
255     // Interface types
256     TestInterfaceEmpty testInterfaceEmptyMethod();
257     void voidMethodTestInterfaceEmptyArg(TestInterfaceEmpty testInterfaceEmptyArg);
258     void voidMethodLongArgTestInterfaceEmptyArg(long longArg, TestInterfaceEmpty testInterfaceEmptyArg);
259     // Callback function type
260     VoidCallbackFunction voidCallbackFunctionMethod();
261     AnyCallbackFunctionOptionalAnyArg anyCallbackFunctionOptionalAnyArgMethod();
262     void voidMethodVoidCallbackFunctionArg(VoidCallbackFunction voidCallbackFunctionArg);
263     void voidMethodAnyCallbackFunctionOptionalAnyArg(AnyCallbackFunctionOptionalAnyArg anyCallbackFunctionOptionalAnyArgArg);
264     // Custom type conversions
265     CompareHow compareHowMethod();
266     any anyMethod();
267     void voidMethodCompareHowArg(CompareHow compareHowArg);
268     void voidMethodEventTargetArg(EventTarget eventTargetArg);
269     void voidMethodMediaQueryListListenerArg(MediaQueryListListener mediaQueryListListenerArg);
270     void voidMethodAnyArg(any anyArg);
271     // DOM node types
272     void voidMethodAttrArg(Attr attrArg);
273     void voidMethodDocumentArg(Document documentArg);
274     void voidMethodDocumentTypeArg(DocumentType documentTypeArg);
275     void voidMethodElementArg(Element elementArg);
276     void voidMethodNodeArg(Node nodeArg);
277     // Typed arrays
278     ArrayBuffer arrayBufferMethod();
279     ArrayBufferView arrayBufferViewMethod();
280     Float32Array float32ArrayMethod();
281     Int32Array int32ArrayMethod();
282     Uint8Array uint8ArrayMethod();
283     void voidMethodArrayBufferArg(ArrayBuffer arrayBufferArg);
284     void voidMethodArrayBufferViewArg(ArrayBufferView arrayBufferViewArg);
285     void voidMethodFloat32ArrayArg(Float32Array float32ArrayArg);
286     void voidMethodInt32ArrayArg(Int32Array int32ArrayArg);
287     void voidMethodUint8ArrayArg(Uint8Array uint8ArrayArg);
288     // Arrays
289     long[] longArrayMethod();
290     DOMString[] stringArrayMethod();
291     TestInterfaceEmpty[] testInterfaceEmptyArrayMethod();
292     void voidMethodArrayLongArg(long[] arrayLongArg);
293     void voidMethodArrayStringArg(DOMString[] arrayStringArg);
294     void voidMethodArrayTestInterfaceEmptyArg(TestInterfaceEmpty[] arrayTestInterfaceEmptyArg);
295     // Sequences
296     sequence<long> sequenceLongMethod();
297     sequence<DOMString> sequenceStringMethod();
298     sequence<TestInterfaceEmpty> sequenceTestInterfaceEmptyMethod();
299     void voidMethodSequenceLongArg(sequence<long> sequenceLongArg);
300     void voidMethodSequenceStringArg(sequence<DOMString> sequenceStringArg);
301     void voidMethodSequenceTestInterfaceEmptyArg(sequence<TestInterfaceEmpty> sequenceTestInterfaceEmptyArg);
302     // Nullable types
303     // Currently only used on interface type arguments
304     void voidMethodNullableStringArg(TestInterfaceEmpty? nullableTestInterfaceEmptyArg);
305     // Callback interface types
306     void voidMethodTestCallbackInterfaceArg(TestCallbackInterface testCallbackInterfaceArg);
307     void voidMethodOptionalTestCallbackInterfaceArg(optional TestCallbackInterface optionalTestCallbackInterfaceArg);
308     void voidMethodNullableTestCallbackInterfaceArg(TestCallbackInterface? testCallbackInterfaceArg);
309     // Enumerations
310     TestEnum testEnumMethod();
311     void voidMethodTestEnumArg(TestEnum testEnumTypeArg);
312     // Exceptional types
313     Dictionary dictionaryMethod();
314     NodeFilter nodeFilterMethod();
315     Promise promiseMethod();
316     SerializedScriptValue serializedScriptValueMethod();
317     XPathNSResolver xPathNSResolverMethod();
318     void voidMethodDictionaryArg(Dictionary dictionaryArg);
319     void voidMethodNodeFilterArg(NodeFilter nodeFilterArg);
320     void voidMethodPromiseArg(Promise promiseArg);
321     void voidMethodSerializedScriptValueArg(SerializedScriptValue serializedScriptValueArg);
322     void voidMethodXPathNSResolverArg(XPathNSResolver xPathNSResolverArg);
323     void voidMethodSequenceDictionaryArg(sequence<Dictionary> sequenceDictionaryArg);
324
325     // Arguments
326     void voidMethodStringArgLongArg(DOMString stringArg, long longArg);
327     // Optional arguments
328     void voidMethodOptionalStringArg(optional DOMString optionalStringArg);
329     void voidMethodOptionalTestInterfaceEmptyArg(optional TestInterfaceEmpty optionalTestInterfaceEmptyArg);
330     void voidMethodOptionalLongArg(optional long optionalLongArg);
331     DOMString stringMethodOptionalLongArg(optional long optionalLongArg);
332     TestInterfaceEmpty testInterfaceEmptyMethodOptionalLongArg(optional long optionalLongArg);
333     long longMethodOptionalLongArg(optional long optionalLongArg);
334     void voidMethodLongArgOptionalLongArg(long longArg, optional long optionalLongArg);
335     void voidMethodLongArgOptionalLongArgOptionalLongArg(long longArg, optional long optionalLongArg1, optional long optionalLongArg2);
336     void voidMethodLongArgOptionalTestInterfaceEmptyArg(long longArg, optional TestInterfaceEmpty optionalTestInterfaceEmpty);
337     void voidMethodTestInterfaceEmptyArgOptionalLongArg(TestInterfaceEmpty optionalTestInterfaceEmpty, optional long longArg);
338     // Optional arguments: exceptional case
339     void voidMethodOptionalDictionaryArg(optional Dictionary optionalDictionaryArg);
340
341     // Variadic operations
342     void voidMethodVariadicStringArg(DOMString... variadicStringArgs);
343     void voidMethodStringArgVariadicStringArg(DOMString stringArg, DOMString... variadicStringArgs);
344     void voidMethodVariadicTestInterfaceEmptyArg(TestInterfaceEmpty... variadicTestInterfaceEmptyArgs);
345     void voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArg(TestInterfaceEmpty testInterfaceEmptyArg, TestInterfaceEmpty... variadicTestInterfaceEmptyArgs);
346
347     // Overloaded methods
348     void overloadedMethodA(long longArg);
349     void overloadedMethodA(long longArg1, long longArg2);
350     void overloadedMethodB(long longArg);
351     void overloadedMethodB(long longArg1, optional long longArg2);
352     void overloadedMethodC(long longArg);
353     void overloadedMethodC(long longArg, long... longArgs);
354     void overloadedMethodD(long longArg);
355     void overloadedMethodD(TestInterfaceEmpty testInterfaceEmptyArg);
356     void overloadedMethodE(long longArg);
357     void overloadedMethodE(long[] longArrayArg);
358     void overloadedMethodF(long longArg);
359     void overloadedMethodF(TestInterfaceEmpty? testInterfaceEmptyNullableArg);
360     void overloadedMethodG();
361     void overloadedMethodG([StrictTypeChecking] DOMString strictTypeCheckingStringArg);
362     void overloadedMethodH();
363     void overloadedMethodH(TestCallbackInterface testCallbackInterfaceArg);
364
365     [PerWorldBindings] void overloadedPerWorldBindingsMethod();
366     [PerWorldBindings] void overloadedPerWorldBindingsMethod(long longArg);
367
368     static void overloadedStaticMethod(long longArg);
369     static void overloadedStaticMethod(long longArg1, long longArg2);
370
371     // Exceptional methods for EventListener
372     void addEventListener(DOMString type,
373                           EventListener listener,
374                           optional boolean useCapture);
375     void removeEventListener(DOMString type,
376                              EventListener listener,
377                              optional boolean useCapture);
378     [RaisesException] boolean dispatchEvent(Event event);
379
380     // Extended attributes for arguments
381     // [Clamp]
382     void voidMethodClampUnsignedShortArg([Clamp] unsigned short clampUnsignedShortArg);
383     void voidMethodClampUnsignedLongArg([Clamp] unsigned long clampUnsignedLongArg);
384     // [Default]
385     void voidMethodDefaultUndefinedTestInterfaceEmptyArg([Default=Undefined] optional TestInterfaceEmpty defaultUndefinedTestInterfaceEmptyArg);
386     void voidMethodDefaultUndefinedLongArg([Default=Undefined] optional long defaultUndefinedLongArg);
387     void voidMethodDefaultUndefinedStringArg([Default=Undefined] optional DOMString defaultUndefinedStringArg);
388     void voidMethodDefaultNullStringStringArg([Default=NullString] optional DOMString defaultNullStringStringArg);
389     // [EnforceRange]
390     void voidMethodEnforceRangeLongArg([EnforceRange] long enforceRangeLongArg);
391     // [TreatNullAs], [TreatUndefinedAs]
392     void voidMethodTreatNullAsNullStringStringArg([TreatNullAs=NullString] DOMString treatNullAsNullStringStringArg);
393     void voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArg([TreatNullAs=NullString, TreatUndefinedAs=NullString] DOMString treatNullAsNullStringStringArg);
394
395     // Extended attributes for methods
396     [ActivityLogging=ForAllWorlds] void activityLoggingAccessForAllWorldsMethod();
397     [CallWith=ScriptState] void callWithScriptStateVoidMethod();
398     [CallWith=ScriptState] long callWithScriptStateLongMethod();
399     [CallWith=ExecutionContext] void callWithExecutionContextVoidMethod();
400     [CallWith=ScriptState&ExecutionContext] void callWithScriptStateExecutionContextVoidMethod();
401     [CallWith=ScriptState&ScriptArguments] void callWithScriptStateScriptArgumentsVoidMethod();
402     [CallWith=ScriptState&ScriptArguments] void callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArg(optional boolean optionalBooleanArg);
403     [CallWith=ActiveWindow] void callWithActiveWindow();
404     [CallWith=ActiveWindow&FirstWindow] void callWithActiveWindowScriptWindow();
405     [CheckSecurity=Node] void checkSecurityForNodeVoidMethod();
406     [Conditional=CONDITION] void conditionalConditionVoidMethod();
407     [Conditional=CONDITION_1&CONDITION_2] void conditionalCondition1AndCondition2VoidMethod();
408     [Conditional=CONDITION] static void conditionalConditionStaticVoidMethod();
409     [Custom] void customVoidMethod();
410     [Conditional=CONDITION, Custom] void conditionalConditionCustomVoidMethod();
411     [CustomElementCallbacks] void customElementCallbacksVoidMethod();
412     [DeprecateAs=voidMethod] void deprecatedVoidMethod();
413     [DoNotCheckSignature] void doNotCheckSignatureVoidMethod();
414     [ImplementedAs=implementedAsMethodName] void implementedAsVoidMethod();
415     [MeasureAs=TestFeature] void measureAsVoidMethod();
416     [NotEnumerable] void notEnumerableVoidMethod();
417     [PerContextEnabled=FeatureName] void perContextEnabledVoidMethod();
418     [PerWorldBindings] void perWorldBindingsVoidMethod();
419     [PerWorldBindings] void perWorldBindingsVoidMethodTestInterfaceEmptyArg(TestInterfaceEmpty testInterfaceEmptyArg);
420     [ActivityLogging=ForAllWorlds, PerWorldBindings] void activityLoggingForAllWorldsPerWorldBindingsVoidMethod();
421     [ActivityLogging=ForIsolatedWorlds, PerWorldBindings] void activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethod();
422     [RaisesException] void raisesExceptionVoidMethod();
423     [RaisesException] DOMString raisesExceptionStringMethod();
424     [RaisesException] void raisesExceptionVoidMethodOptionalLongArg(optional long optionalLongArg);
425     [RaisesException] void raisesExceptionVoidMethodTestCallbackInterfaceArg(TestCallbackInterface testCallbackInterfaceArg);
426     [RaisesException] void raisesExceptionVoidMethodOptionalTestCallbackInterfaceArg(optional TestCallbackInterface optionalTestCallbackInterfaceArg);
427     [RaisesException] TestInterfaceEmpty raisesExceptionTestInterfaceEmptyVoidMethod();
428     [ReadOnly] void readOnlyVoidMethod();
429     [NotEnumerable, ReadOnly] void notEnumerableReadOnlyVoidMethod();
430     [RuntimeEnabled=FeatureName] void runtimeEnabledVoidMethod();
431     [PerWorldBindings, RuntimeEnabled=FeatureName] void perWorldBindingsRuntimeEnabledVoidMethod();
432     [StrictTypeChecking] void strictTypeCheckingVoidMethodTestInterfaceEmptyArg(TestInterfaceEmpty testInterfaceEmptyArg);
433     [StrictTypeChecking] void strictTypeCheckingVoidMethodNullableTestInterfaceEmptyArg(TestInterfaceEmpty? testInterfaceEmptyArg);
434     [TreatReturnedNullStringAs=Null] DOMString treatReturnedNullStringAsNullStringMethod();
435     [TreatReturnedNullStringAs=Undefined] DOMString treatReturnedNullStringAsUndefinedStringMethod();
436     [Unforgeable] void unforgeableVoidMethod();
437
438     // Extended attributes on referenced interfaces
439     // (not self; self-reference tests at interface themselves)
440     attribute TestInterfacePython testInterfacePythonAttribute; // [ImplementedAs]
441     attribute TestInterfaceWillBeGarbageCollected? testInterfaceWillBeGarbageCollectedAttribute; // [WillBeGarbageCollected]
442 };