| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 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. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 enum TestEnum {"", "EnumValue1", "EnumValue2", "EnumValue3"}; | 31 enum TestEnum {"", "EnumValue1", "EnumValue2", "EnumValue3"}; |
| 32 | 32 |
| 33 interface TestObjectPython { | 33 interface TestObjectPython { |
| 34 // Constants |
| 35 const unsigned short CONST_VALUE_0 = 0; |
| 36 const unsigned short CONST_VALUE_1 = 1; |
| 37 const unsigned short CONST_VALUE_2 = 2; |
| 38 const unsigned short CONST_VALUE_4 = 4; |
| 39 const unsigned short CONST_VALUE_8 = 8; |
| 40 const short CONST_VALUE_9 = -1; |
| 41 const DOMString CONST_VALUE_10 = "my constant string"; |
| 42 const unsigned short CONST_VALUE_11 = 0xffffffff; |
| 43 const unsigned short CONST_VALUE_12 = 0x01; |
| 44 const unsigned short CONST_VALUE_13 = 0X20; |
| 45 const unsigned short CONST_VALUE_14 = 0x1abc; |
| 46 const unsigned short CONST_VALUE_15 = 010; |
| 47 const unsigned short CONST_VALUE_16 = -010; |
| 48 const unsigned short CONST_VALUE_16 = -0x1A; |
| 49 const unsigned short CONST_VALUE_17 = -0X1a; |
| 50 |
| 51 // Extended attributes |
| 52 [DeprecateAs=Constant] const short DEPRECATED_CONSTANT = 1; |
| 53 [RuntimeEnabled=FeatureName] const short FEATURE_ENABLED_CONST = 1; |
| 54 [Reflect=CONST_IMPL] const short CONST_JAVASCRIPT = 1; |
| 55 |
| 56 |
| 57 // Attributes |
| 34 // TestInterfaceEmpty is used as a stub interface type, for testing behavior | 58 // TestInterfaceEmpty is used as a stub interface type, for testing behavior |
| 35 // that should not depend on particular type (beyond "interface or not"). | 59 // that should not depend on particular type (beyond "interface or not"). |
| 36 // read only | 60 // read only |
| 37 readonly attribute DOMString readonlyStringAttribute; | 61 readonly attribute DOMString readonlyStringAttribute; |
| 38 readonly attribute TestInterfaceEmpty readonlyTestInterfaceEmptyAttribute; | 62 readonly attribute TestInterfaceEmpty readonlyTestInterfaceEmptyAttribute; |
| 39 readonly attribute long readonlyLongAttribute; | 63 readonly attribute long readonlyLongAttribute; |
| 40 // Basic types | 64 // Basic types |
| 41 attribute Date dateAttribute; | 65 attribute Date dateAttribute; |
| 42 attribute DOMString stringAttribute; | 66 attribute DOMString stringAttribute; |
| 43 readonly attribute DOMTimeStamp readonlyDOMTimeStampAttribute; // FIXME: Pe
rl CG doesn't translate typedef DOMTimeStamp -> unsigned long long; remove reado
nly once moved to Python-only | 67 readonly attribute DOMTimeStamp readonlyDOMTimeStampAttribute; // FIXME: Pe
rl CG doesn't translate typedef DOMTimeStamp -> unsigned long long; remove reado
nly once moved to Python-only |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 [RaisesException=Setter] attribute long setterRaisesExceptionLongAttribute; | 180 [RaisesException=Setter] attribute long setterRaisesExceptionLongAttribute; |
| 157 [StrictTypeChecking] attribute float strictTypeCheckingFloatAttribute; // n
op for non-interface types | 181 [StrictTypeChecking] attribute float strictTypeCheckingFloatAttribute; // n
op for non-interface types |
| 158 [StrictTypeChecking] attribute TestInterface strictTypeCheckingTestInterface
Attribute; | 182 [StrictTypeChecking] attribute TestInterface strictTypeCheckingTestInterface
Attribute; |
| 159 [TreatNullAs=NullString] attribute DOMString treatNullAsNullStringStringAttr
ibute; | 183 [TreatNullAs=NullString] attribute DOMString treatNullAsNullStringStringAttr
ibute; |
| 160 [TreatReturnedNullStringAs=Null] attribute DOMString treatReturnedNullString
AsNullStringAttribute; | 184 [TreatReturnedNullStringAs=Null] attribute DOMString treatReturnedNullString
AsNullStringAttribute; |
| 161 [TreatReturnedNullStringAs=Undefined] attribute DOMString treatReturnedNullS
tringAsUndefinedStringAttribute; | 185 [TreatReturnedNullStringAs=Undefined] attribute DOMString treatReturnedNullS
tringAsUndefinedStringAttribute; |
| 162 [Reflect, URL] attribute DOMString urlStringAttribute; | 186 [Reflect, URL] attribute DOMString urlStringAttribute; |
| 163 [Reflect=ReflectUrlAttribute, URL] attribute DOMString urlStringAttribute; | 187 [Reflect=ReflectUrlAttribute, URL] attribute DOMString urlStringAttribute; |
| 164 [Unforgeable] attribute long unforgeableLongAttribute; | 188 [Unforgeable] attribute long unforgeableLongAttribute; |
| 165 | 189 |
| 190 |
| 166 // Methods | 191 // Methods |
| 167 void voidMethod(); | 192 void voidMethod(); |
| 168 static void staticVoidMethod(); | 193 static void staticVoidMethod(); |
| 169 | 194 |
| 170 // Types | 195 // Types |
| 171 // Basic types | 196 // Basic types |
| 172 Date dateMethod(); | 197 Date dateMethod(); |
| 173 DOMString stringMethod(); | 198 DOMString stringMethod(); |
| 174 DOMTimeStamp readonlyDOMTimeStampMethod(); | 199 DOMTimeStamp readonlyDOMTimeStampMethod(); |
| 175 boolean booleanMethod(); | 200 boolean booleanMethod(); |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 356 [RaisesException] void raisesExceptionVoidMethodOptionalLongArg(optional lon
g optionalLongArg); | 381 [RaisesException] void raisesExceptionVoidMethodOptionalLongArg(optional lon
g optionalLongArg); |
| 357 [ReadOnly] void readOnlyVoidMethod(); | 382 [ReadOnly] void readOnlyVoidMethod(); |
| 358 [NotEnumerable, ReadOnly] void notEnumerableReadOnlyVoidMethod(); | 383 [NotEnumerable, ReadOnly] void notEnumerableReadOnlyVoidMethod(); |
| 359 [RuntimeEnabled=FeatureName] void runtimeEnabledVoidMethod(); | 384 [RuntimeEnabled=FeatureName] void runtimeEnabledVoidMethod(); |
| 360 [PerWorldBindings, RuntimeEnabled=FeatureName] void perWorldBindingsRuntimeE
nabledVoidMethod(); | 385 [PerWorldBindings, RuntimeEnabled=FeatureName] void perWorldBindingsRuntimeE
nabledVoidMethod(); |
| 361 [StrictTypeChecking] void strictTypeCheckingVoidMethodTestInterfaceEmptyArg(
TestInterfaceEmpty testInterfaceEmptyArg); | 386 [StrictTypeChecking] void strictTypeCheckingVoidMethodTestInterfaceEmptyArg(
TestInterfaceEmpty testInterfaceEmptyArg); |
| 362 [TreatReturnedNullStringAs=Null] DOMString treatReturnedNullStringAsNullStri
ngMethod(); | 387 [TreatReturnedNullStringAs=Null] DOMString treatReturnedNullStringAsNullStri
ngMethod(); |
| 363 [TreatReturnedNullStringAs=Undefined] DOMString treatReturnedNullStringAsUnd
efinedStringMethod(); | 388 [TreatReturnedNullStringAs=Undefined] DOMString treatReturnedNullStringAsUnd
efinedStringMethod(); |
| 364 [Unforgeable] void unforgeableVoidMethod(); | 389 [Unforgeable] void unforgeableVoidMethod(); |
| 365 }; | 390 }; |
| OLD | NEW |