OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 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 | 5 * modification, are permitted provided that the following conditions are |
6 * are met: | 6 * met: |
7 * | 7 * |
8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * * Redistributions in binary form must reproduce the above |
11 * notice, this list of conditions and the following disclaimer in the | 11 * copyright notice, this list of conditions and the following disclaimer |
12 * documentation and/or other materials provided with the distribution. | 12 * in the documentation and/or other materials provided with the |
13 * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of | 13 * distribution. |
14 * its contributors may be used to endorse or promote products derived | 14 * * Neither the name of Google Inc. nor the names of its |
15 * from this software without specific prior written permission. | 15 * contributors may be used to endorse or promote products derived from |
| 16 * this software without specific prior written permission. |
16 * | 17 * |
17 * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY | 18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
18 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
19 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
20 * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY | 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
21 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
22 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
23 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 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. |
27 */ | 29 */ |
28 | 30 |
29 // This IDL file is for testing the bindings code generator and for tracking | 31 // Test for interface extended attributes and special operations. |
30 // changes in its ouput. | 32 // Also used as a target by TestObject |
| 33 |
31 [ | 34 [ |
32 ActiveDOMObject, | 35 ActiveDOMObject, |
33 Conditional=Condition1|Condition2, | 36 Conditional=CONDITION, |
34 ConstructorCallWith=ExecutionContext, | 37 Custom=LegacyCallAsFunction|ToV8, |
35 Constructor(DOMString str1, [Default=Undefined] optional DOMString str2), | 38 DoNotCheckConstants, |
36 RaisesException=Constructor, | 39 ImplementedAs=TestInterfaceImplementation, |
37 SetWrapperReferenceTo(TestObject referencedName), | 40 RuntimeEnabled=FeatureName, |
38 ] interface TestInterface { | 41 SetWrapperReferenceTo(TestInterface referencedName), |
39 [ImplementedAs=getItem] getter (Node or NodeList) namedItem(DOMString name); | 42 StrictTypeChecking, |
40 [Custom] setter Node (DOMString name, Node value); | 43 ] interface TestInterface : TestInterfaceEmpty { |
| 44 // members needed to test [ImplementedAs], as this affect attribute |
| 45 // configuration and method configuration, and [StrictTypeChecking] |
| 46 // constants also needed for [DoNotCheckConstants] |
| 47 const unsigned long UNSIGNED_LONG = 0; |
| 48 [Reflect=CONST_CPP] const short CONST_JAVASCRIPT = 1; |
| 49 |
| 50 attribute TestInterface testInterfaceAttribute; // Self-referential interfac
e type with [ImplementedAs] |
| 51 attribute TestImplementedAsConstructor testImplementedAsConstructorAttribute
; |
| 52 static attribute DOMString staticStringAttribute; |
| 53 |
| 54 void voidMethodTestInterfaceEmptyArg(TestInterfaceEmpty testInterfaceEmptyAr
g); |
| 55 [PerWorldBindings] attribute DOMString perWorldBindingsStringAttribute; |
| 56 [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); |
41 }; | 67 }; |
42 | 68 |
43 TestInterface implements TestImplements; | 69 TestInterface implements TestImplements; |
| 70 TestInterface implements TestImplements2; |
| 71 TestInterface implements TestImplements3; |
OLD | NEW |