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 16 matching lines...) Expand all Loading... |
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 ActiveDOMObject, |
36 Conditional=CONDITION, | 36 Conditional=CONDITION, |
37 Custom=(LegacyCallAsFunction,ToV8), | 37 Custom=LegacyCallAsFunction, |
38 DoNotCheckConstants, | 38 DoNotCheckConstants, |
39 ImplementedAs=TestInterfaceImplementation, | 39 ImplementedAs=TestInterfaceImplementation, |
40 Iterable, | 40 Iterable, |
| 41 Measure, |
41 RuntimeEnabled=FeatureName, | 42 RuntimeEnabled=FeatureName, |
42 SetWrapperReferenceTo(TestInterface referencedName), | 43 SetWrapperReferenceTo(TestInterface referencedName), |
43 TypeChecking=(Interface,Unrestricted), | 44 TypeChecking=Interface, |
44 Exposed=(Worker,Window), | 45 Exposed=(Worker,Window), |
45 ] interface TestInterface : TestInterfaceEmpty { | 46 ] interface TestInterface : TestInterfaceEmpty { |
46 // members needed to test [ImplementedAs], as this affect attribute | 47 // members needed to test [ImplementedAs], as this affect attribute |
47 // configuration and method configuration, and [TypeChecking] | 48 // configuration and method configuration, and [TypeChecking] |
48 // constants also needed for [DoNotCheckConstants] | 49 // constants also needed for [DoNotCheckConstants] |
49 const unsigned long UNSIGNED_LONG = 0; | 50 const unsigned long UNSIGNED_LONG = 0; |
50 [Reflect=CONST_CPP] const short CONST_JAVASCRIPT = 1; | 51 [Reflect=CONST_CPP] const short CONST_JAVASCRIPT = 1; |
51 | 52 |
52 attribute TestInterface testInterfaceAttribute; // Self-referential interfac
e type with [ImplementedAs] | 53 [Measure] attribute TestInterface testInterfaceAttribute; // Self-referentia
l interface type with [ImplementedAs] |
53 attribute TestInterfaceConstructor testInterfaceConstructorAttribute; | 54 attribute TestInterfaceConstructor testInterfaceConstructorAttribute; |
| 55 attribute TestInterfaceConstructor TestInterface; |
| 56 attribute TestInterface2Constructor TestInterface2; |
54 attribute double doubleAttribute; | 57 attribute double doubleAttribute; |
55 attribute float floatAttribute; | 58 attribute float floatAttribute; |
56 attribute unrestricted double unrestrictedDoubleAttribute; | 59 attribute unrestricted double unrestrictedDoubleAttribute; |
57 attribute unrestricted float unrestrictedFloatAttribute; | 60 attribute unrestricted float unrestrictedFloatAttribute; |
| 61 attribute TestEnum testEnumAttribute; |
| 62 attribute DOMStringOrDouble stringOrDoubleAttribute; |
58 static attribute DOMString staticStringAttribute; | 63 static attribute DOMString staticStringAttribute; |
| 64 static attribute TestInterface staticReturnDOMWrapperAttribute; |
| 65 [LegacyInterfaceTypeChecking] attribute TestInterfaceEmpty legacyInterfaceTy
peCheckingAttribute; |
59 | 66 |
60 void voidMethodTestInterfaceEmptyArg(TestInterfaceEmpty testInterfaceEmptyAr
g); | 67 void voidMethodTestInterfaceEmptyArg(TestInterfaceEmpty testInterfaceEmptyAr
g); |
61 void voidMethodDoubleArgFloatArg(double doubleArg, float floatArg); | 68 void voidMethodDoubleArgFloatArg(double doubleArg, float floatArg); |
62 void voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg(unrestricted double
unrestrictedDoubleArg, unrestricted float unrestrictedFloatArg); | 69 void voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg(unrestricted double
unrestrictedDoubleArg, unrestricted float unrestrictedFloatArg); |
| 70 void voidMethodTestEnumArg(TestEnum testEnumArg); |
63 [PerWorldBindings] void voidMethod(); | 71 [PerWorldBindings] void voidMethod(); |
64 | 72 |
65 // Anonymous indexed property operations | 73 // Anonymous indexed property operations |
66 getter DOMString (unsigned long index); | 74 [DoNotCheckSecurity] getter DOMString (unsigned long index); |
67 setter DOMString (unsigned long index, DOMString value); | 75 setter DOMString (unsigned long index, DOMString value); |
68 deleter boolean (unsigned long index); | 76 deleter boolean (unsigned long index); |
69 | 77 |
70 // Anonymous named property operations | 78 // Anonymous named property operations |
71 getter DOMString (DOMString name); | 79 [DoNotCheckSecurity] getter DOMString (DOMString name); |
72 setter DOMString (DOMString name, DOMString value); | 80 setter DOMString (DOMString name, DOMString value); |
73 deleter boolean (DOMString name); | 81 deleter boolean (DOMString name); |
74 | 82 |
75 [NotEnumerable] stringifier; | 83 [NotEnumerable] stringifier; |
| 84 [NotEnumerable, RaisesException] serializer; |
76 | 85 |
77 // Per-method [Exposed] annotation support. | 86 // Per-method [Exposed] annotation support. |
78 void alwaysExposedMethod(); | 87 void alwaysExposedMethod(); |
79 [Exposed=Worker] void workerExposedMethod(); | 88 [Exposed=Worker] void workerExposedMethod(); |
80 [Exposed=Window] void windowExposedMethod(); | 89 [Exposed=Window] void windowExposedMethod(); |
81 | 90 |
82 static void alwaysExposedStaticMethod(); | 91 static void alwaysExposedStaticMethod(); |
83 [Exposed=Worker] static void workerExposedStaticMethod(); | 92 [Exposed=Worker] static void workerExposedStaticMethod(); |
84 [Exposed=Window] static void windowExposedStaticMethod(); | 93 [Exposed=Window] static void windowExposedStaticMethod(); |
| 94 static TestInterface staticReturnDOMWrapperMethod(); |
85 | 95 |
86 attribute long alwaysExposedAttribute; | 96 attribute long alwaysExposedAttribute; |
87 [Exposed=Worker] attribute long workerExposedAttribute; | 97 [Exposed=Worker] attribute long workerExposedAttribute; |
88 [Exposed=Window] attribute long windowExposedAttribute; | 98 [Exposed=Window] attribute long windowExposedAttribute; |
89 | 99 |
| 100 [Exposed=Window, RuntimeEnabled=FeatureName] void methodWithExposedAndRuntim
eEnabledFlag(); |
| 101 [Exposed=Window] void overloadMethodWithExposedAndRuntimeEnabledFlag(long lo
ngArg); |
| 102 [Exposed=Window, RuntimeEnabled=FeatureName] void overloadMethodWithExposedA
ndRuntimeEnabledFlag(DOMString string); |
| 103 [Exposed=Window, RuntimeEnabled=FeatureName2] void overloadMethodWithExposed
AndRuntimeEnabledFlag(Window window); |
| 104 |
| 105 [Exposed(Window FeatureName, Worker FeatureName2)] void methodWithExposedHav
ingRuntimeEnabldFlag(); |
| 106 |
90 [Exposed=(Window,ServiceWorker)] void windowAndServiceWorkerExposedMethod(); | 107 [Exposed=(Window,ServiceWorker)] void windowAndServiceWorkerExposedMethod(); |
91 | 108 |
92 void voidMethodPartailOverload(); | 109 void voidMethodPartialOverload(); |
93 static void voidMethodPartailOverload(); | 110 void voidMethodPartialOverload(double doubleArg); |
| 111 static void staticVoidMethodPartialOverload(); |
| 112 |
| 113 Promise promiseMethodPartialOverload(); |
| 114 Promise promiseMethodPartialOverload(Window window); |
| 115 static Promise staticPromiseMethodPartialOverload(); |
| 116 |
| 117 [LenientThis] attribute any lenientThisAttribute; |
| 118 |
| 119 [LegacyInterfaceTypeChecking] void legacyInterfaceTypeCheckingMethod(TestInt
erfaceEmpty testInterfaceEmptyArg); |
94 }; | 120 }; |
95 | 121 |
96 TestInterface implements TestImplements; | 122 TestInterface implements TestImplements; |
97 // TestInterface implements TestImplements2; // at implement*ed* interface | 123 // TestInterface implements TestImplements2; // at implement*ed* interface |
98 TestInterface implements TestImplements3; | 124 TestInterface implements TestImplements3; |
OLD | NEW |