| 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 10 matching lines...) Expand all Loading... |
| 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
| 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
| 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
| 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 // Test for interface extended attributes and special operations. | |
| 32 // Also used as a target by TestObject | |
| 33 | |
| 34 [ | 31 [ |
| 35 ActiveDOMObject, | 32 ActiveDOMObject, |
| 36 Conditional=CONDITION, | 33 Conditional=CONDITION, |
| 37 Custom=LegacyCallAsFunction|ToV8, | 34 Custom=LegacyCallAsFunction|ToV8, |
| 38 DoNotCheckConstants, | 35 ImplementedAs=TestInterfacePythonImplementation, |
| 39 ImplementedAs=TestInterfaceImplementation, | |
| 40 RuntimeEnabled=FeatureName, | 36 RuntimeEnabled=FeatureName, |
| 41 SetWrapperReferenceTo(TestInterface referencedName), | 37 SetWrapperReferenceTo(TestInterfacePython referencedName), |
| 42 StrictTypeChecking, | 38 StrictTypeChecking, |
| 43 ] interface TestInterface : TestInterfaceEmpty { | 39 ] interface TestInterfacePython : TestInterfaceEmpty { |
| 44 // members needed to test [ImplementedAs], as this affect attribute | 40 // members needed to test [ImplementedAs], as this affect attribute |
| 45 // configuration and method configuration, and [StrictTypeChecking] | 41 // configuration and method configuration, and [StrictTypeChecking] |
| 46 // constants also needed for [DoNotCheckConstants] | |
| 47 const unsigned long UNSIGNED_LONG = 0; | 42 const unsigned long UNSIGNED_LONG = 0; |
| 48 [Reflect=CONST_CPP] const short CONST_JAVASCRIPT = 1; | 43 attribute TestInterfacePython testInterfacePythonAttribute; // Self-referent
ial interface type with [ImplementedAs] |
| 49 | |
| 50 attribute TestInterface testInterfaceAttribute; // Self-referential interfac
e type with [ImplementedAs] | |
| 51 attribute TestImplementedAsConstructor testImplementedAsConstructorAttribute
; | 44 attribute TestImplementedAsConstructor testImplementedAsConstructorAttribute
; |
| 52 static attribute DOMString staticStringAttribute; | 45 static attribute DOMString staticStringAttribute; |
| 53 | |
| 54 void voidMethodTestInterfaceEmptyArg(TestInterfaceEmpty testInterfaceEmptyAr
g); | 46 void voidMethodTestInterfaceEmptyArg(TestInterfaceEmpty testInterfaceEmptyAr
g); |
| 55 [PerWorldBindings] attribute DOMString perWorldBindingsStringAttribute; | 47 [PerWorldBindings] attribute DOMString perWorldBindingsStringAttribute; |
| 56 [PerWorldBindings] void voidMethod(); | 48 [PerWorldBindings] void voidMethod(); |
| 57 | |
| 58 // Anonymous indexed property operations | |
| 59 getter DOMString (unsigned long index); | |
| 60 setter DOMString (unsigned long index, DOMString value); | |
| 61 deleter boolean (unsigned long index); | |
| 62 | |
| 63 // Anonymous named property operations | |
| 64 getter DOMString (DOMString name); | |
| 65 setter DOMString (DOMString name, DOMString value); | |
| 66 deleter boolean (DOMString name); | |
| 67 }; | 49 }; |
| 68 | 50 |
| 69 TestInterface implements TestImplements; | 51 TestInterfacePython implements TestImplements; |
| 70 TestInterface implements TestImplements2; | 52 TestInterfacePython implements TestImplements2; |
| 71 TestInterface implements TestImplements3; | 53 TestInterfacePython implements TestImplements3; |
| OLD | NEW |