Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(513)

Side by Side Diff: Source/bindings/tests/idls/TestObject.idl

Issue 112383002: IDL compiler: sync Python to r163665 (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: New test results Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * Copyright (C) 2010 Apple Inc. All rights reserved. 3 * Copyright (C) 2010 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary formstrArg, with or without 5 * Redistribution and use in source and binary formstrArg, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 17 matching lines...) Expand all
28 */ 28 */
29 29
30 // This IDL file is for testing the bindings code generator and for tracking 30 // This IDL file is for testing the bindings code generator and for tracking
31 // changes in its ouput. 31 // changes in its ouput.
32 32
33 enum TestEnumType { "", "EnumValue1", "EnumValue2", "EnumValue3" }; 33 enum TestEnumType { "", "EnumValue1", "EnumValue2", "EnumValue3" };
34 34
35 callback TestCallbackFunction = void (TestEnumType formal1, TestObject formal2); 35 callback TestCallbackFunction = void (TestEnumType formal1, TestObject formal2);
36 36
37 [ 37 [
38 Constructor(TestCallback testCallback), 38 Constructor(TestCallbackInterface testCallbackInterface),
39 ImplementedAs=TestObj 39 ImplementedAs=TestObj
40 ] interface TestObject : EventTarget { 40 ] interface TestObject : EventTarget {
41 // Attributes 41 // Attributes
42 readonly attribute long readOnlyLongAttr; 42 readonly attribute long readOnlyLongAttr;
43 readonly attribute DOMString readOnlyStringAttr; 43 readonly attribute DOMString readOnlyStringAttr;
44 readonly attribute TestObject readOnlyTestObjectAttr; 44 readonly attribute TestObject readOnlyTestObjectAttr;
45 static readonly attribute long staticReadOnlyLongAttr; 45 static readonly attribute long staticReadOnlyLongAttr;
46 static attribute DOMString staticStringAttr; 46 static attribute DOMString staticStringAttr;
47 static readonly attribute TestSubObjConstructor TestSubObj; 47 static readonly attribute TestSubObjConstructor TestSubObj;
48 attribute TestEnumType enumAttr; 48 attribute TestEnumType enumAttr;
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 [CallWith= ExecutionContext & ScriptState ] attribute TestObject withExe cutionContextAndScriptStateWithSpacesAttribute; 140 [CallWith= ExecutionContext & ScriptState ] attribute TestObject withExe cutionContextAndScriptStateWithSpacesAttribute;
141 141
142 // optional parameters 142 // optional parameters
143 void methodWithOptionalArg(optional long opt); 143 void methodWithOptionalArg(optional long opt);
144 void methodWithNonOptionalArgAndOptionalArg(long nonOpt, optional long op t); 144 void methodWithNonOptionalArgAndOptionalArg(long nonOpt, optional long op t);
145 void methodWithNonOptionalArgAndTwoOptionalArgs(long nonOpt, optional lon g opt1, optional long opt2); 145 void methodWithNonOptionalArgAndTwoOptionalArgs(long nonOpt, optional lon g opt1, optional long opt2);
146 void methodWithOptionalString(optional DOMString str); 146 void methodWithOptionalString(optional DOMString str);
147 void methodWithOptionalStringIsUndefined([Default=Undefined] optional DOM String str); 147 void methodWithOptionalStringIsUndefined([Default=Undefined] optional DOM String str);
148 void methodWithOptionalStringIsNullString([Default=NullString] optional D OMString str); 148 void methodWithOptionalStringIsNullString([Default=NullString] optional D OMString str);
149 149
150 // Callback parameters 150 // Callback interface parameters
151 void methodWithCallbackArg(TestCallback callback); 151 void methodWithCallbackInterfaceArg(TestCallbackInterface callbackInterfa ce);
152 void methodWithNonCallbackArgAndCallbackArg(long nonCallback, TestCallbac k callback); 152 void methodWithNonCallbackArgAndCallbackInterfaceArg(long nonCallback, Te stCallbackInterface callbackInterface);
153 void methodWithCallbackAndOptionalArg(optional TestCallback callback); 153 void methodWithCallbackInterfaceAndOptionalArg(optional TestCallbackInter face callbackInterface);
154 void methodWithNullableCallbackArg(TestCallback? callback); 154 void methodWithNullableCallbackInterfaceArg(TestCallbackInterface? callba ckInterface);
155 // static methods with Callback parameter 155 // static methods with callback interface parameter
156 static void staticMethodWithCallbackAndOptionalArg(optional TestCallback callback); 156 static void staticMethodWithCallbackAndOptionalArg(optional TestCallbackI nterface callbackInterface);
157 static void staticMethodWithCallbackArg(TestCallback callback); 157 static void staticMethodWithCallbackArg(TestCallbackInterface callbackInt erface);
158 158
159 // 'EnforceRange' extended attribute 159 // 'EnforceRange' extended attribute
160 void methodWithEnforceRangeInt8([EnforceRange] byte value); 160 void methodWithEnforceRangeInt8([EnforceRange] byte value);
161 void methodWithEnforceRangeUInt8([EnforceRange] octet value); 161 void methodWithEnforceRangeUInt8([EnforceRange] octet value);
162 void methodWithEnforceRangeInt16([EnforceRange] short value); 162 void methodWithEnforceRangeInt16([EnforceRange] short value);
163 void methodWithEnforceRangeUInt16([EnforceRange] unsigned short value); 163 void methodWithEnforceRangeUInt16([EnforceRange] unsigned short value);
164 void methodWithEnforceRangeInt32([EnforceRange] long value); 164 void methodWithEnforceRangeInt32([EnforceRange] long value);
165 void methodWithEnforceRangeUInt32([EnforceRange] unsigned long value); 165 void methodWithEnforceRangeUInt32([EnforceRange] unsigned long value);
166 void methodWithEnforceRangeInt64([EnforceRange] long long value); 166 void methodWithEnforceRangeInt64([EnforceRange] long long value);
167 void methodWithEnforceRangeUInt64([EnforceRange] unsigned long long value ); 167 void methodWithEnforceRangeUInt64([EnforceRange] unsigned long long value );
(...skipping 27 matching lines...) Expand all
195 [RaisesException=Getter, CachedAttribute=isValueDirty] readonly attribute an y cachedDirtyableAttributeRaises; 195 [RaisesException=Getter, CachedAttribute=isValueDirty] readonly attribute an y cachedDirtyableAttributeRaises;
196 196
197 attribute any anyAttribute; 197 attribute any anyAttribute;
198 198
199 attribute TestCallbackFunction callbackFunctionAttribute; 199 attribute TestCallbackFunction callbackFunctionAttribute;
200 TestCallbackFunction callbackFunctionReturnValue(); 200 TestCallbackFunction callbackFunctionReturnValue();
201 void callbackFunctionArgument(TestCallbackFunction function); 201 void callbackFunctionArgument(TestCallbackFunction function);
202 202
203 // Overloads 203 // Overloads
204 void overloadedMethod(long longArg); 204 void overloadedMethod(long longArg);
205 void overloadedMethod(TestCallback callbackArg); 205 void overloadedMethod(TestCallbackInterface callbackInterfaceArg);
206 void overloadedMethod(TestObject objArg); 206 void overloadedMethod(TestObject objArg);
207 void overloadedMethod(DOMString[] arrayArg); 207 void overloadedMethod(DOMString[] arrayArg);
208 void overloadedMethod(sequence<unsigned long> sequenceArg); 208 void overloadedMethod(sequence<unsigned long> sequenceArg);
209 void overloadedMethodA(TestObject? objArg, optional long longArg); 209 void overloadedMethodA(TestObject? objArg, optional long longArg);
210 void overloadedMethodA(TestObject? objArg, DOMString strArg); 210 void overloadedMethodA(TestObject? objArg, DOMString strArg);
211 void overloadedMethodB(DOMString strArg); 211 void overloadedMethodB(DOMString strArg);
212 void overloadedMethodB([StrictTypeChecking] DOMString strArg); 212 void overloadedMethodB([StrictTypeChecking] DOMString strArg);
213 213
214 // Class methods within JavaScript (like what's used for IDBKeyRange). 214 // Class methods within JavaScript (like what's used for IDBKeyRange).
215 static void classMethod(); 215 static void classMethod();
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 [DeprecateAs=Constant] const unsigned short DEPRECATED_CONSTANT = 1; 303 [DeprecateAs=Constant] const unsigned short DEPRECATED_CONSTANT = 1;
304 304
305 // PutForwards 305 // PutForwards
306 [PutForwards=href] readonly attribute TestNode location; 306 [PutForwards=href] readonly attribute TestNode location;
307 [PutForwards=hrefThrows] readonly attribute TestNode locationWithException; 307 [PutForwards=hrefThrows] readonly attribute TestNode locationWithException;
308 }; 308 };
309 309
310 // The following comment should not generate any code 310 // The following comment should not generate any code
311 // TestObject implements TestImplements; 311 // TestObject implements TestImplements;
312 312
OLDNEW
« no previous file with comments | « Source/bindings/tests/idls/TestCallbackInterface.idl ('k') | Source/bindings/tests/idls/TestTypedefs.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698