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 14 matching lines...) Expand all Loading... |
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 // Test for interface extended attributes and special operations. | 31 // Test for interface extended attributes and special operations. |
32 // Also used as a target by TestObject | 32 // Also used as a target by TestObject |
33 | 33 |
34 [ | 34 [ |
35 ActiveDOMObject, | 35 DependentLifetime, |
36 Conditional=CONDITION, | |
37 Custom=LegacyCallAsFunction, | 36 Custom=LegacyCallAsFunction, |
38 DoNotCheckConstants, | 37 DoNotCheckConstants, |
39 ImplementedAs=TestInterfaceImplementation, | 38 ImplementedAs=TestInterfaceImplementation, |
40 Iterable, | 39 Iterable, |
41 Measure, | 40 OriginTrialEnabled=OriginTrialFeatureName, |
42 RuntimeEnabled=FeatureName, | 41 RuntimeEnabled=FeatureName, |
43 SetWrapperReferenceTo(TestInterface referencedName), | 42 SetWrapperReferenceTo(TestInterface referencedName), |
44 TypeChecking=Interface, | |
45 Exposed=(Worker,Window), | 43 Exposed=(Worker,Window), |
46 ] interface TestInterface : TestInterfaceEmpty { | 44 ] interface TestInterface : TestInterfaceEmpty { |
47 // members needed to test [ImplementedAs], as this affect attribute | 45 // members needed to test [ImplementedAs], as this affect attribute |
48 // configuration and method configuration, and [TypeChecking] | 46 // configuration and method configuration |
49 // constants also needed for [DoNotCheckConstants] | |
50 const unsigned long UNSIGNED_LONG = 0; | 47 const unsigned long UNSIGNED_LONG = 0; |
51 [Reflect=CONST_CPP] const short CONST_JAVASCRIPT = 1; | 48 [Reflect=CONST_CPP] const short CONST_JAVASCRIPT = 1; |
52 | 49 |
53 [Measure] attribute TestInterface testInterfaceAttribute; // Self-referentia
l interface type with [ImplementedAs] | 50 [Measure] attribute TestInterface testInterfaceAttribute; // Self-referentia
l interface type with [ImplementedAs] |
54 attribute TestInterfaceConstructor testInterfaceConstructorAttribute; | 51 attribute TestInterfaceConstructor testInterfaceConstructorAttribute; |
55 attribute TestInterfaceConstructor TestInterface; | 52 attribute TestInterfaceConstructor TestInterface; |
56 attribute TestInterface2Constructor TestInterface2; | 53 attribute TestInterface2Constructor TestInterface2; |
57 attribute double doubleAttribute; | 54 attribute double doubleAttribute; |
58 attribute float floatAttribute; | 55 attribute float floatAttribute; |
59 attribute unrestricted double unrestrictedDoubleAttribute; | 56 attribute unrestricted double unrestrictedDoubleAttribute; |
60 attribute unrestricted float unrestrictedFloatAttribute; | 57 attribute unrestricted float unrestrictedFloatAttribute; |
61 attribute TestEnum testEnumAttribute; | 58 attribute TestEnum testEnumAttribute; |
62 attribute DOMStringOrDouble stringOrDoubleAttribute; | 59 attribute DOMStringOrDouble stringOrDoubleAttribute; |
| 60 [RuntimeEnabled=FeatureName] attribute long conditionalLongAttribute; |
| 61 [RuntimeEnabled=FeatureName] readonly attribute long conditionalReadOnlyLong
Attribute; |
63 static attribute DOMString staticStringAttribute; | 62 static attribute DOMString staticStringAttribute; |
64 static attribute TestInterface staticReturnDOMWrapperAttribute; | 63 static attribute TestInterface staticReturnDOMWrapperAttribute; |
| 64 static readonly attribute DOMString staticReadOnlyStringAttribute; |
| 65 static readonly attribute TestInterface staticReadOnlyReturnDOMWrapperAttrib
ute; |
| 66 [RuntimeEnabled=FeatureName] static readonly attribute long staticConditiona
lReadOnlyLongAttribute; |
65 [LegacyInterfaceTypeChecking] attribute TestInterfaceEmpty legacyInterfaceTy
peCheckingAttribute; | 67 [LegacyInterfaceTypeChecking] attribute TestInterfaceEmpty legacyInterfaceTy
peCheckingAttribute; |
66 | 68 |
67 void voidMethodTestInterfaceEmptyArg(TestInterfaceEmpty testInterfaceEmptyAr
g); | 69 void voidMethodTestInterfaceEmptyArg(TestInterfaceEmpty testInterfaceEmptyAr
g); |
68 void voidMethodDoubleArgFloatArg(double doubleArg, float floatArg); | 70 void voidMethodDoubleArgFloatArg(double doubleArg, float floatArg); |
69 void voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg(unrestricted double
unrestrictedDoubleArg, unrestricted float unrestrictedFloatArg); | 71 void voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg(unrestricted double
unrestrictedDoubleArg, unrestricted float unrestrictedFloatArg); |
70 void voidMethodTestEnumArg(TestEnum testEnumArg); | 72 void voidMethodTestEnumArg(TestEnum testEnumArg); |
71 [PerWorldBindings] void voidMethod(); | 73 [PerWorldBindings] void voidMethod(); |
72 | 74 |
73 // Anonymous indexed property operations | 75 // Anonymous indexed property operations |
74 [DoNotCheckSecurity] getter DOMString (unsigned long index); | 76 [DoNotCheckSecurity] getter DOMString (unsigned long index); |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 static Promise staticPromiseMethodPartialOverload(); | 117 static Promise staticPromiseMethodPartialOverload(); |
116 | 118 |
117 [LenientThis] attribute any lenientThisAttribute; | 119 [LenientThis] attribute any lenientThisAttribute; |
118 | 120 |
119 [LegacyInterfaceTypeChecking] void legacyInterfaceTypeCheckingMethod(TestInt
erfaceEmpty testInterfaceEmptyArg); | 121 [LegacyInterfaceTypeChecking] void legacyInterfaceTypeCheckingMethod(TestInt
erfaceEmpty testInterfaceEmptyArg); |
120 }; | 122 }; |
121 | 123 |
122 TestInterface implements TestImplements; | 124 TestInterface implements TestImplements; |
123 // TestInterface implements TestImplements2; // at implement*ed* interface | 125 // TestInterface implements TestImplements2; // at implement*ed* interface |
124 TestInterface implements TestImplements3; | 126 TestInterface implements TestImplements3; |
OLD | NEW |