Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / bindings / tests / idls / TestObject.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 dictionary TestDict {
37     boolean booleanMember;
38     long longMember1 = 1;
39 };
40
41 dictionary TestDictDerived : TestDict {
42     unsigned short unsignedShortMember;
43     float floatMember4 = 4.0;
44 };
45
46 // No extended attributes on the interface; those go in TestInterface.idl
47 interface TestObject {
48     // Constants
49     const unsigned short CONST_VALUE_0 = 0;
50     const unsigned short CONST_VALUE_1 = 1;
51     const unsigned short CONST_VALUE_2 = 2;
52     const unsigned short CONST_VALUE_4 = 4;
53     const unsigned short CONST_VALUE_8 = 8;
54     const short CONST_VALUE_9 = -1;
55     const DOMString CONST_VALUE_10 = "my constant string";
56     const unsigned short CONST_VALUE_11 = 0xffffffff;
57     const unsigned short CONST_VALUE_12 = 0x01;
58     const unsigned short CONST_VALUE_13 = 0X20;
59     const unsigned short CONST_VALUE_14 = 0x1abc;
60     const unsigned short CONST_VALUE_15 = 010;
61     const unsigned short CONST_VALUE_16 = -010;
62     const unsigned short CONST_VALUE_16 = -0x1A;
63     const unsigned short CONST_VALUE_17 = -0X1a;
64
65     // Extended attributes
66     [DeprecateAs=Constant] const short DEPRECATED_CONSTANT = 1;
67     [RuntimeEnabled=FeatureName] const short FEATURE_ENABLED_CONST = 1;
68     [Reflect=CONST_IMPL] const short CONST_JAVASCRIPT = 1;
69
70
71     // Attributes
72     //
73     // Naming convention:
74     // [ExtAttr] attribute Type extAttrTypeNameAttribute;
75     // E.g.,
76     // [Foo] attribute DOMString? fooStringOrNullAttribute
77     //
78     // Type name reference:
79     // http://heycam.github.io/webidl/#dfn-type-name
80     //
81     // TestInterfaceEmpty is used as a stub interface type, for testing behavior
82     // that should not depend on particular type (beyond "interface or not").
83     // read only
84     readonly attribute DOMString readonlyStringAttribute;
85     readonly attribute TestInterfaceEmpty readonlyTestInterfaceEmptyAttribute;
86     readonly attribute long readonlyLongAttribute;
87     // Basic types
88     attribute Date dateAttribute;
89     attribute DOMString stringAttribute;
90     attribute DOMTimeStamp domTimeStampAttribute;
91     attribute boolean booleanAttribute;
92     attribute byte byteAttribute;
93     attribute double doubleAttribute;
94     attribute float floatAttribute;
95     attribute long longAttribute;
96     attribute long long longLongAttribute;
97     attribute octet octetAttribute;
98     attribute short shortAttribute;
99     attribute unrestricted double unrestrictedDoubleAttribute;
100     attribute unrestricted float unrestrictedFloatAttribute;
101     attribute unsigned long unsignedLongAttribute;
102     attribute unsigned long long unsignedLongLongAttribute;
103     attribute unsigned short unsignedShortAttribute;
104     // Interface type
105     attribute TestInterfaceEmpty testInterfaceEmptyAttribute;
106     // Self-reference
107     attribute TestObject testObjectAttribute;
108     // Callback function type
109     attribute VoidCallbackFunction voidCallbackFunctionAttribute;
110     attribute AnyCallbackFunctionOptionalAnyArg anyCallbackFunctionOptionalAnyArgAttribute;
111     // Names that begin with an acronym
112     attribute long cssAttribute;
113     attribute long imeAttribute;
114     attribute long svgAttribute;
115     attribute long xmlAttribute;
116     // Non-wrapper types
117     attribute NodeFilter nodeFilterAttribute;
118     attribute SerializedScriptValue serializedScriptValueAttribute;
119     attribute any anyAttribute;
120     // Custom type conversions
121     attribute Promise promiseAttribute;
122     attribute Window windowAttribute;
123     // DOM Node types
124     attribute Document documentAttribute;
125     attribute DocumentFragment documentFragmentAttribute;
126     attribute DocumentType documentTypeAttribute;
127     attribute Element elementAttribute;
128     attribute Node nodeAttribute;
129     attribute ShadowRoot shadowRootAttribute;
130     // Typed arrays
131     attribute ArrayBuffer arrayBufferAttribute;
132     attribute Float32Array float32ArrayAttribute;
133     attribute Uint8Array uint8ArrayAttribute;
134     // Exceptions for is_keep_alive_for_gc
135     readonly attribute TestInterfaceEmpty self;
136     readonly attribute EventTarget readonlyEventTargetAttribute;
137     readonly attribute EventTarget? readonlyEventTargetOrNullAttribute;
138     readonly attribute Window readonlyWindowAttribute;
139     readonly attribute HTMLCollection htmlCollectionAttribute;
140     readonly attribute HTMLElement htmlElementAttribute;
141     // Arrays
142     attribute DOMString[] stringArrayAttribute;
143     attribute TestInterfaceEmpty[] testInterfaceEmptyArrayAttribute;
144     attribute float[] floatArrayAttribute;
145     // Nullable attributes
146     attribute DOMString? stringOrNullAttribute;
147     attribute long? longOrNullAttribute;
148     attribute TestInterface? testInterfaceOrNullAttribute;
149     // Enumerations
150     attribute TestEnum testEnumAttribute;
151     // Static attributes
152     static attribute DOMString staticStringAttribute;
153     static attribute long staticLongAttribute;
154     // Exceptional type
155     attribute EventHandler eventHandlerAttribute;
156
157     // Extended attributes
158     [LogActivity, LogAllWorlds] attribute long activityLoggingAccessForAllWorldsLongAttribute;
159     [LogActivity=GetterOnly, LogAllWorlds] attribute long activityLoggingGetterForAllWorldsLongAttribute;
160     [LogActivity=SetterOnly, LogAllWorlds] attribute long activityLoggingSetterForAllWorldsLongAttribute;
161     [CachedAttribute=isValueDirty] attribute any cachedAttributeAnyAttribute;
162     [CallWith=ExecutionContext] attribute any callWithExecutionContextAnyAttribute;
163     [CallWith=ScriptState] attribute any callWithScriptStateAnyAttribute;
164     [CallWith=ExecutionContext|ScriptState] attribute any callWithExecutionContextAndScriptStateAnyAttribute;
165     [CheckSecurity=Node] readonly attribute Document checkSecurityForNodeReadonlyDocumentAttribute; // All uses are read only
166     [Conditional=CONDITION] attribute long conditionalLongAttribute;
167     [Conditional=CONDITION_1&CONDITION_2] attribute long conditionalAndLongAttribute;
168     [Conditional=CONDITION_1|CONDITION_2] attribute long conditionalOrLongAttribute;
169     // Constructors: FIXME: replace suffix with [ConstructorAttribute]
170     attribute TestInterfaceEmptyConstructor testInterfaceEmptyConstructorAttribute;
171     [DeprecateAs=deprecatedTestInterfaceEmptyConstructorAttribute] attribute TestInterfaceEmptyConstructor testInterfaceEmptyConstructorAttribute;
172     [MeasureAs=FeatureName] attribute TestInterfaceEmptyConstructor measureAsFeatureNameTestInterfaceEmptyConstructorAttribute;
173     [Custom] attribute object customObjectAttribute;
174     [Custom=Getter] attribute long customGetterLongAttribute;
175     [Custom=Getter] readonly attribute object customGetterReadonlyObjectAttribute;
176     [Custom=Setter] attribute long customSetterLongAttribute;
177     [Conditional=CONDITION, Custom] attribute long customLongAttribute;
178     [CustomElementCallbacks] readonly attribute long customElementsCallbacksReadonlyLongAttribute;
179     [DeprecateAs=LongAttribute] attribute long deprecatedLongAttribute;
180     [EnforceRange] attribute long enforceRangeLongAttribute;
181     [ExposeJSAccessors] attribute long exposeJSAccessorsLongAttribute;
182     [ImplementedAs=implementedAsName] attribute long implementedAsLongAttribute;
183     [Custom, ImplementedAs=implementedAsNameWithCustom] attribute long customImplementedAsLongAttribute;
184     [Custom=Getter, ImplementedAs=implementedAsNameWithCustomGetter] attribute long customGetterImplementedAsLongAttribute;
185     [Custom=Setter, ImplementedAs=implementedAsNameWithCustomGetter] attribute long customSetterImplementedAsLongAttribute;
186     [MeasureAs=TestFeature] attribute long measureAsLongAttribute;
187     [NotEnumerable] attribute long notEnumerableLongAttribute;
188     [PerContextEnabled=FeatureName] attribute long perContextEnabledLongAttribute;
189     [PerWorldBindings] readonly attribute TestInterfaceEmpty perWorldBindingsReadonlyTestInterfaceEmptyAttribute;
190     [LogActivity, LogAllWorlds, PerWorldBindings] attribute long activityLoggingAccessPerWorldBindingsLongAttribute;
191     [LogActivity, PerWorldBindings] attribute long activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttribute;
192     [LogActivity=GetterOnly, LogAllWorlds, PerWorldBindings] attribute long activityLoggingGetterPerWorldBindingsLongAttribute;
193     [LogActivity=GetterOnly, PerWorldBindings] attribute long activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttribute;
194     [PutForwards=href] readonly attribute TestNode location;
195     [PutForwards=hrefThrows] readonly attribute TestNode locationWithException;
196     [PutForwards=hrefCallWith] readonly attribute TestNode locationWithCallWith;
197     [PerWorldBindings, PutForwards=href] readonly attribute TestNode locationWithPerWorldBindings;
198     [PutForwards=attr1] readonly attribute TestInterfaceGarbageCollected locationGarbageCollected;
199     [PutForwards=attr1] readonly attribute TestInterfaceWillBeGarbageCollected locationWillBeGarbageCollected;
200     [RaisesException] attribute long raisesExceptionLongAttribute;
201     [RaisesException=Getter] attribute long raisesExceptionGetterLongAttribute;
202     [RaisesException=Setter] attribute long setterRaisesExceptionLongAttribute;
203     [RaisesException] attribute TestInterfaceEmpty raisesExceptionTestInterfaceEmptyAttribute;
204     [CachedAttribute=isValueDirty, RaisesException] attribute any cachedAttributeRaisesExceptionGetterAnyAttribute;
205     [Reflect] attribute TestInterface reflectTestInterfaceAttribute;
206     [Reflect=reflectedNameAttribute] attribute TestInterface reflectReflectedNameAttributeTestAttribute;
207     // [Reflect] exceptional types: exceptional getters, exceptional setters,
208     // or range checking for unsigned
209     [Reflect] attribute boolean reflectBooleanAttribute;
210     [Reflect] attribute long reflectLongAttribute;
211     [Reflect] attribute unsigned short reflectUnsignedShortAttribute;
212     [Reflect] attribute unsigned long reflectUnsignedLongAttribute;
213     // [Reflect] exceptional names
214     [Reflect] attribute DOMString id;
215     [Reflect] attribute DOMString name;
216     [Reflect] attribute DOMString class;
217     [Reflect=id] attribute DOMString reflectedId;
218     [Reflect=name] attribute DOMString reflectedName;
219     [Reflect=class] attribute DOMString reflectedClass;
220     // Limited value attributes and enumerated attributes
221     [Reflect, ReflectOnly="unique"] attribute DOMString limitedToOnlyOneAttribute;
222     [Reflect, ReflectOnly="Per"|"Paal"|"Espen"] attribute DOMString limitedToOnlyAttribute;
223     [Reflect=other, ReflectOnly="Value1"|"Value2" ] attribute DOMString limitedToOnlyOtherAttribute;
224     [Reflect, ReflectOnly="rsa"|"dsa", ReflectMissing="rsa"] attribute DOMString limitedWithMissingDefaultAttribute;
225     [Reflect, ReflectOnly="ltr"|"rtl"|"auto", ReflectMissing="auto", ReflectInvalid="ltr"] attribute DOMString limitedWithInvalidMissingDefaultAttribute;
226     [Reflect, ReflectOnly="anonymous"|"use-credentials", ReflectEmpty="anonymous", ReflectInvalid="anonymous"] readonly attribute DOMString corsSettingAttribute;
227     [Reflect, ReflectOnly="empty"|"missing"|"invalid"|"a-normal", ReflectEmpty="empty", ReflectMissing="missing", ReflectInvalid="invalid"] readonly attribute DOMString limitedWithEmptyMissingInvalidAttribute;
228
229     [Replaceable] readonly attribute long replaceableReadonlyLongAttribute;
230     [Replaceable, PutForwards=href] readonly attribute TestNode locationReplaceable;
231     [RuntimeEnabled=FeatureName] attribute long runtimeEnabledLongAttribute;
232     [PerContextEnabled=FeatureName, RuntimeEnabled=FeatureName] attribute long perContextEnabledRuntimeEnabledLongAttribute;
233     [Conditional=CONDITION, RuntimeEnabled=FeatureName] attribute long conditionalRuntimeEnabledLongAttribute;
234     [SetterCallWith=ActiveWindow&FirstWindow] attribute DOMString setterCallWithActiveWindowAndFirstWindowStringAttribute;
235     [SetterCallWith=ExecutionContext] attribute DOMString setterCallWithExecutionContextStringAttribute;
236     [TreatNullAs=NullString] attribute DOMString treatNullAsNullStringStringAttribute;
237     [TreatReturnedNullStringAs=Null] attribute DOMString treatReturnedNullStringAsNullStringAttribute;
238     [TreatReturnedNullStringAs=Undefined] attribute DOMString treatReturnedNullStringAsUndefinedStringAttribute;
239     [TypeChecking=Interface|Nullable] attribute float typeCheckingInterfaceNullableStringFloatAttribute; // nop for non-interface types
240     [TypeChecking=Interface] attribute TestInterface typeCheckingInterfaceTestInterfaceAttribute;
241     [TypeChecking=Nullable] attribute TestInterface? typeCheckingNullableTestInterfaceOrNullAttribute;
242     [TypeChecking=Interface|Nullable] attribute TestInterface? typeCheckingInterfaceNullableTestInterfaceOrNullAttribute;
243     [Reflect, URL] attribute DOMString urlStringAttribute;
244     [Reflect=reflectUrlAttribute, URL] attribute DOMString urlStringAttribute;
245     [Unforgeable] attribute long unforgeableLongAttribute;
246     [LogActivity=SetterOnly, LogPreviousValue] attribute long activityLoggingSetterOnlyLogPreviousValueAttribute;
247     [LogActivity, LogPreviousValue] attribute TestInterfaceEmpty activityLoggingLogPreviousValueInterfaceAttribute;
248
249
250     // Methods
251     //
252     // Naming convention:
253     // ReturnType returnTypeMethodTypeName1ArgTypeName2Arg(Type1 typeName1Arg, Type2 typeName2Arg);
254     // E.g.,
255     // void voidMethodStringArgLongArrayArg(DOMString stringArg, long[] longArrayArg);
256     void voidMethod();
257     static void staticVoidMethod();
258
259     // Types
260     // Basic types
261     Date dateMethod();
262     DOMString stringMethod();
263     DOMTimeStamp readonlyDOMTimeStampMethod();
264     boolean booleanMethod();
265     byte byteMethod();
266     double doubleMethod();
267     float floatMethod();
268     long longMethod();
269     long long longLongMethod();
270     octet octetMethod();
271     short shortMethod();
272     unsigned long unsignedLongMethod();
273     unsigned long long unsignedLongLongMethod();
274     unsigned short unsignedShortMethod();
275
276     void voidMethodDateArg(Date dateArg);
277     void voidMethodStringArg(DOMString stringArg);
278     void voidMethodDOMTimeStampArg(DOMTimeStamp domTimeStampArg);
279     void voidMethodBooleanArg(boolean booleanArg);
280     void voidMethodByteArg(byte byteArg);
281     void voidMethodDoubleArg(double doubleArg);
282     void voidMethodFloatArg(float floatArg);
283     void voidMethodLongArg(long longArg);
284     void voidMethodLongLongArg(long long longLongArg);
285     void voidMethodOctetArg(octet octetArg);
286     void voidMethodShortArg(short shortArg);
287     void voidMethodUnsignedLongArg(unsigned long unsignedLongArg);
288     void voidMethodUnsignedLongLongArg(unsigned long long unsignedLongLongArg);
289     void voidMethodUnsignedShortArg(unsigned short unsignedShortArg);
290     // Interface types
291     TestInterfaceEmpty testInterfaceEmptyMethod();
292     void voidMethodTestInterfaceEmptyArg(TestInterfaceEmpty testInterfaceEmptyArg);
293     void voidMethodLongArgTestInterfaceEmptyArg(long longArg, TestInterfaceEmpty testInterfaceEmptyArg);
294     // Callback function type
295     VoidCallbackFunction voidCallbackFunctionMethod();
296     AnyCallbackFunctionOptionalAnyArg anyCallbackFunctionOptionalAnyArgMethod();
297     void voidMethodVoidCallbackFunctionArg(VoidCallbackFunction voidCallbackFunctionArg);
298     void voidMethodAnyCallbackFunctionOptionalAnyArg(AnyCallbackFunctionOptionalAnyArg anyCallbackFunctionOptionalAnyArgArg);
299     // Custom type conversions
300     CompareHow compareHowMethod();
301     any anyMethod();
302     void voidMethodCompareHowArg(CompareHow compareHowArg);
303     void voidMethodEventTargetArg(EventTarget eventTargetArg);
304     void voidMethodMediaQueryListListenerArg(MediaQueryListListener mediaQueryListListenerArg);
305     void voidMethodAnyArg(any anyArg);
306     // DOM node types
307     void voidMethodAttrArg(Attr attrArg);
308     void voidMethodDocumentArg(Document documentArg);
309     void voidMethodDocumentTypeArg(DocumentType documentTypeArg);
310     void voidMethodElementArg(Element elementArg);
311     void voidMethodNodeArg(Node nodeArg);
312     // Typed arrays
313     ArrayBuffer arrayBufferMethod();
314     ArrayBufferView arrayBufferViewMethod();
315     Float32Array float32ArrayMethod();
316     Int32Array int32ArrayMethod();
317     Uint8Array uint8ArrayMethod();
318     void voidMethodArrayBufferArg(ArrayBuffer arrayBufferArg);
319     void voidMethodArrayBufferOrNullArg(ArrayBuffer? arrayBufferArg);
320     void voidMethodArrayBufferViewArg(ArrayBufferView arrayBufferViewArg);
321     void voidMethodFloat32ArrayArg(Float32Array float32ArrayArg);
322     void voidMethodInt32ArrayArg(Int32Array int32ArrayArg);
323     void voidMethodUint8ArrayArg(Uint8Array uint8ArrayArg);
324     // Arrays
325     long[] longArrayMethod();
326     DOMString[] stringArrayMethod();
327     TestInterfaceEmpty[] testInterfaceEmptyArrayMethod();
328     void voidMethodArrayLongArg(long[] arrayLongArg);
329     void voidMethodArrayStringArg(DOMString[] arrayStringArg);
330     void voidMethodArrayTestInterfaceEmptyArg(TestInterfaceEmpty[] arrayTestInterfaceEmptyArg);
331     // Sequences
332     sequence<long> longSequenceMethod();
333     sequence<DOMString> stringSequenceMethod();
334     sequence<TestInterfaceEmpty> testInterfaceEmptySequenceMethod();
335     void voidMethodSequenceLongArg(sequence<long> longSequenceArg);
336     void voidMethodSequenceStringArg(sequence<DOMString> stringSequenceArg);
337     void voidMethodSequenceTestInterfaceEmptyArg(sequence<TestInterfaceEmpty> testInterfaceEmptySequenceArg);
338     // Nullable types
339     // Currently only used on interface type arguments
340     void voidMethodTestInterfaceEmptyOrNullArg(TestInterfaceEmpty? nullableTestInterfaceEmptyArg);
341     // Callback interface types
342     void voidMethodTestCallbackInterfaceArg(TestCallbackInterface testCallbackInterfaceArg);
343     void voidMethodOptionalTestCallbackInterfaceArg(optional TestCallbackInterface optionalTestCallbackInterfaceArg);
344     void voidMethodTestCallbackInterfaceOrNullArg(TestCallbackInterface? testCallbackInterfaceArg);
345     // Enumerations
346     TestEnum testEnumMethod();
347     void voidMethodTestEnumArg(TestEnum testEnumTypeArg);
348     // Exceptional types
349     Dictionary dictionaryMethod();
350     NodeFilter nodeFilterMethod();
351     Promise promiseMethod();
352     SerializedScriptValue serializedScriptValueMethod();
353     XPathNSResolver xPathNSResolverMethod();
354     void voidMethodDictionaryArg(Dictionary dictionaryArg);
355     void voidMethodEventListenerArg(EventListener eventListenerArg);
356     void voidMethodNodeFilterArg(NodeFilter nodeFilterArg);
357     void voidMethodPromiseArg(Promise promiseArg);
358     void voidMethodSerializedScriptValueArg(SerializedScriptValue serializedScriptValueArg);
359     void voidMethodXPathNSResolverArg(XPathNSResolver xPathNSResolverArg);
360     void voidMethodDictionarySequenceArg(sequence<Dictionary> dictionarySequenceArg);
361
362     // Arguments
363     void voidMethodStringArgLongArg(DOMString stringArg, long longArg);
364     // Optional arguments
365     void voidMethodOptionalStringArg(optional DOMString optionalStringArg);
366     void voidMethodOptionalTestInterfaceEmptyArg(optional TestInterfaceEmpty optionalTestInterfaceEmptyArg);
367     void voidMethodOptionalLongArg(optional long optionalLongArg);
368     DOMString stringMethodOptionalLongArg(optional long optionalLongArg);
369     TestInterfaceEmpty testInterfaceEmptyMethodOptionalLongArg(optional long optionalLongArg);
370     long longMethodOptionalLongArg(optional long optionalLongArg);
371     void voidMethodLongArgOptionalLongArg(long longArg, optional long optionalLongArg);
372     void voidMethodLongArgOptionalLongArgOptionalLongArg(long longArg, optional long optionalLongArg1, optional long optionalLongArg2);
373     void voidMethodLongArgOptionalTestInterfaceEmptyArg(long longArg, optional TestInterfaceEmpty optionalTestInterfaceEmpty);
374     void voidMethodTestInterfaceEmptyArgOptionalLongArg(TestInterfaceEmpty optionalTestInterfaceEmpty, optional long longArg);
375     // Optional arguments: exceptional case
376     void voidMethodOptionalDictionaryArg(optional Dictionary optionalDictionaryArg);
377
378     // Variadic operations
379     void voidMethodVariadicStringArg(DOMString... variadicStringArgs);
380     void voidMethodStringArgVariadicStringArg(DOMString stringArg, DOMString... variadicStringArgs);
381     void voidMethodVariadicTestInterfaceEmptyArg(TestInterfaceEmpty... variadicTestInterfaceEmptyArgs);
382     void voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArg(TestInterfaceEmpty testInterfaceEmptyArg, TestInterfaceEmpty... variadicTestInterfaceEmptyArgs);
383     void voidMethodVariadicTestInterfaceGarbageCollectedArg(TestInterfaceGarbageCollected... variadicTestInterfaceGarbageCollectedArg);
384     void voidMethodVariadicTestInterfaceWillBeGarbageCollectedArg(TestInterfaceWillBeGarbageCollected... variadicTestInterfaceWillBeGarbageCollectedArg);
385
386     // Overloaded methods
387     void overloadedMethodA(long longArg);
388     void overloadedMethodA(long longArg1, long longArg2);
389     void overloadedMethodB(long longArg);
390     void overloadedMethodB(boolean booleanArg, optional long longArg);
391     void overloadedMethodC(long longArg);
392     void overloadedMethodC(boolean booleanArg, long... longArgs);
393     void overloadedMethodD(long longArg);
394     void overloadedMethodD(TestInterfaceEmpty testInterfaceEmptyArg);
395     void overloadedMethodE(long longArg);
396     void overloadedMethodE(long[] longArrayArg);
397     void overloadedMethodF(long longArg);
398     void overloadedMethodF(TestInterfaceEmpty? testInterfaceEmptyOrNullArg);
399     void overloadedMethodG();
400     void overloadedMethodG([LegacyOverloadString] DOMString legacyOverloadStringStringArg);
401     void overloadedMethodH();
402     void overloadedMethodH(TestCallbackInterface testCallbackInterfaceArg);
403     // FIXME: Should be in order double, Dictionary, but Blink implementation of
404     // overload resolution can't handle this. http://crbug.com/293561
405     void overloadedMethodI(Dictionary dictionaryArg); // Non-wrapper type
406     void overloadedMethodI(double doubleArg);
407     void overloadedMethodJ(long longArg);
408     void overloadedMethodJ([Default=Null] TestInterfaceEmpty? testInterfaceEmptyOrNullArg);
409
410
411     [PerWorldBindings] void overloadedPerWorldBindingsMethod();
412     [PerWorldBindings] void overloadedPerWorldBindingsMethod(long longArg);
413
414     static void overloadedStaticMethod(long longArg);
415     static void overloadedStaticMethod(long longArg1, long longArg2);
416
417     // Extended attributes for arguments
418     // [Clamp]
419     void voidMethodClampUnsignedShortArg([Clamp] unsigned short clampUnsignedShortArg);
420     void voidMethodClampUnsignedLongArg([Clamp] unsigned long clampUnsignedLongArg);
421     // [Default]
422     void voidMethodDefaultUndefinedTestInterfaceEmptyArg([Default=Undefined] optional TestInterfaceEmpty defaultUndefinedTestInterfaceEmptyArg);
423     void voidMethodDefaultUndefinedLongArg([Default=Undefined] optional long defaultUndefinedLongArg);
424     void voidMethodDefaultUndefinedStringArg([Default=Undefined] optional DOMString defaultUndefinedStringArg);
425     void voidMethodDefaultNullStringStringArg([Default=NullString] optional DOMString defaultNullStringStringArg);
426     // [EnforceRange]
427     void voidMethodEnforceRangeLongArg([EnforceRange] long enforceRangeLongArg);
428     // [TreatNullAs], [TreatUndefinedAs]
429     void voidMethodTreatNullAsNullStringStringArg([TreatNullAs=NullString] DOMString treatNullAsNullStringStringArg);
430     void voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArg([TreatNullAs=NullString, TreatUndefinedAs=NullString] DOMString treatNullAsNullStringStringArg);
431
432     // Extended attributes for methods
433     [LogActivity, LogAllWorlds] void activityLoggingAccessForAllWorldsMethod();
434     [CallWith=ExecutionContext] void callWithExecutionContextVoidMethod();
435     [CallWith=ScriptState] void callWithScriptStateVoidMethod();
436     [CallWith=ScriptState] long callWithScriptStateLongMethod();
437     [CallWith=ScriptState&ExecutionContext] void callWithScriptStateExecutionContextVoidMethod();
438     [CallWith=ScriptState&ScriptArguments] void callWithScriptStateScriptArgumentsVoidMethod();
439     [CallWith=ScriptState&ScriptArguments] void callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArg(optional boolean optionalBooleanArg);
440     [CallWith=ActiveWindow] void callWithActiveWindow();
441     [CallWith=ActiveWindow&FirstWindow] void callWithActiveWindowScriptWindow();
442     [CheckSecurity=Node] void checkSecurityForNodeVoidMethod();
443     [Conditional=CONDITION] void conditionalConditionVoidMethod();
444     [Conditional=CONDITION_1&CONDITION_2] void conditionalCondition1AndCondition2VoidMethod();
445     [Conditional=CONDITION] static void conditionalConditionStaticVoidMethod();
446     [Custom] void customVoidMethod();
447     [Conditional=CONDITION, Custom] void conditionalConditionCustomVoidMethod();
448     [CustomElementCallbacks] void customElementCallbacksVoidMethod();
449     [DeprecateAs=voidMethod] void deprecatedVoidMethod();
450     [DoNotCheckSignature] void doNotCheckSignatureVoidMethod();
451     [ImplementedAs=implementedAsMethodName] void implementedAsVoidMethod();
452     [MeasureAs=TestFeature] void measureAsVoidMethod();
453     [DeprecateAs=TestFeatureA] void DeprecateAsOverloadedMethod();
454     [DeprecateAs=TestFeatureB] void DeprecateAsOverloadedMethod(long arg);
455     [DeprecateAs=TestFeature] void DeprecateAsSameValueOverloadedMethod();
456     [DeprecateAs=TestFeature] void DeprecateAsSameValueOverloadedMethod(long arg);
457     [MeasureAs=TestFeatureA] void measureAsOverloadedMethod();
458     [MeasureAs=TestFeatureB] void measureAsOverloadedMethod(long arg);
459     [MeasureAs=TestFeature] void measureAsSameValueOverloadedMethod();
460     [MeasureAs=TestFeature] void measureAsSameValueOverloadedMethod(long arg);
461     [DeprecateAs=TestFeatureA, MeasureAs=TestFeature] void deprecateAsMeasureAsSameValueOverloadedMethod();
462     [DeprecateAs=TestFeatureB, MeasureAs=TestFeature] void deprecateAsMeasureAsSameValueOverloadedMethod(long arg);
463     [DeprecateAs=TestFeature, MeasureAs=TestFeatureA] void deprecateAsSameValueMeasureAsOverloadedMethod();
464     [DeprecateAs=TestFeature, MeasureAs=TestFeatureB] void deprecateAsSameValueMeasureAsOverloadedMethod(long arg);
465     [DeprecateAs=TestFeatureA, MeasureAs=TestFeatureB] void deprecateAsSameValueMeasureAsSameValueOverloadedMethod();
466     [DeprecateAs=TestFeatureA, MeasureAs=TestFeatureB] void deprecateAsSameValueMeasureAsSameValueOverloadedMethod(long arg);
467     [NotEnumerable] void notEnumerableVoidMethod();
468     [PerContextEnabled=FeatureName] void perContextEnabledVoidMethod();
469     [PerWorldBindings] void perWorldBindingsVoidMethod();
470     [PerWorldBindings] void perWorldBindingsVoidMethodTestInterfaceEmptyArg(TestInterfaceEmpty testInterfaceEmptyArg);
471     [LogActivity, LogAllWorlds, PerWorldBindings] void activityLoggingForAllWorldsPerWorldBindingsVoidMethod();
472     [LogActivity, PerWorldBindings] void activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethod();
473     [RaisesException] void raisesExceptionVoidMethod();
474     [RaisesException] DOMString raisesExceptionStringMethod();
475     [RaisesException] void raisesExceptionVoidMethodOptionalLongArg(optional long optionalLongArg);
476     [RaisesException] void raisesExceptionVoidMethodTestCallbackInterfaceArg(TestCallbackInterface testCallbackInterfaceArg);
477     [RaisesException] void raisesExceptionVoidMethodOptionalTestCallbackInterfaceArg(optional TestCallbackInterface optionalTestCallbackInterfaceArg);
478     [RaisesException] TestInterfaceEmpty raisesExceptionTestInterfaceEmptyVoidMethod();
479     [CallWith=ExecutionContext, RaisesException] void callWithExecutionContextRaisesExceptionVoidMethodLongArg(long longArg);
480     [ReadOnly] void readOnlyVoidMethod();
481     [NotEnumerable, ReadOnly] void notEnumerableReadOnlyVoidMethod();
482     [RuntimeEnabled=FeatureName] void runtimeEnabledVoidMethod();
483     [PerWorldBindings, RuntimeEnabled=FeatureName] void perWorldBindingsRuntimeEnabledVoidMethod();
484     [TreatReturnedNullStringAs=Null] DOMString treatReturnedNullStringAsNullStringMethod();
485     [TreatReturnedNullStringAs=Undefined] DOMString treatReturnedNullStringAsUndefinedStringMethod();
486     [TypeChecking=Interface] void typeCheckingInterfaceVoidMethodTestInterfaceEmptyArg(TestInterfaceEmpty testInterfaceEmptyArg);
487     [TypeChecking=Nullable] void typeCheckingNullableVoidMethodTestInterfaceEmptyOrNullArg(TestInterfaceEmpty? testInterfaceEmptyOrNullArg);
488     [TypeChecking=Interface|Nullable] void typeCheckingInterfaceNullableVoidMethodTestInterfaceEmptyOrNullArg(TestInterfaceEmpty? testInterfaceEmptyOrNullArg);
489     [TypeChecking=Unrestricted] void typeCheckingUnrestrictedVoidMethodFloatArgDoubleArg(float floatArg, double doubleArg);
490     [Unforgeable] void unforgeableVoidMethod();
491     void voidMethodTestInterfaceGarbageCollectedSequenceArg(sequence<TestInterfaceGarbageCollected> testInterfaceGarbageCollectedSequenceArg);
492     void voidMethodTestInterfaceGarbageCollectedArrayArg(TestInterfaceGarbageCollected[] testInterfaceGarbageCollectedArrayArg);
493     void voidMethodTestInterfaceWillBeGarbageCollectedSequenceArg(sequence<TestInterfaceWillBeGarbageCollected> testInterfaceWillBeGarbageCollectedSequenceArg);
494     void voidMethodTestInterfaceWillBeGarbageCollectedArrayArg(TestInterfaceWillBeGarbageCollected[] testInterfaceWillBeGarbageCollectedArrayArg);
495
496     // Extended attributes on referenced interfaces
497     // (not self; self-reference tests at interface themselves)
498     attribute TestInterface testInterfaceAttribute; // [ImplementedAs]
499     attribute TestInterfaceGarbageCollected testInterfaceGarbageCollectedAttribute; // [GarbageCollected]
500     attribute TestInterfaceGarbageCollected? testInterfaceGarbageCollectedOrNullAttribute; // [GarbageCollected]
501     attribute TestInterfaceWillBeGarbageCollected testInterfaceWillBeGarbageCollectedAttribute; // [WillBeGarbageCollected]
502     attribute TestInterfaceWillBeGarbageCollected? testInterfaceWillBeGarbageCollectedOrNullAttribute; // [WillBeGarbageCollected]
503 };