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 // This IDL file is for testing the front end, not code generator, | |
32 // as typedefs are resolved during IR construction (after parsing, | |
33 // before code generation), and thus the code generator never sees them. | |
34 | |
31 typedef float Float; | 35 typedef float Float; |
32 typedef unsigned long long ULongLong; | 36 typedef unsigned long long ULongLong; |
33 typedef TestInterfaceEmpty TestInterfaceEmptyType; | 37 typedef TestInterfaceEmpty TestInterfaceEmptyType; |
34 typedef long[] ArrayOfLongs; | 38 typedef long[] ArrayOfLongs; |
35 typedef DOMString String; | 39 typedef DOMString String; |
36 typedef DOMString[] ArrayOfStrings; | 40 typedef DOMString[] ArrayOfStrings; |
37 typedef TestCallbackInterface TestCallbackInterfaceType; | 41 typedef TestCallbackInterface TestCallbackInterfaceType; |
38 typedef TestSubObjConstructor T; | 42 typedef TestSubObjConstructor T; |
39 typedef DOMException E; | |
Nils Barth (inactive)
2014/03/28 06:31:13
No uses of the 1 exception (DOMException) as a typ
| |
40 typedef (Foo or Bar) FooOrBar; | 43 typedef (Foo or Bar) FooOrBar; |
41 | 44 |
42 [ | 45 [ |
43 Constructor(String hello), | 46 Constructor(String stringArg), |
44 ] interface TestTypedefs { | 47 ] interface TestTypedefs { |
45 attribute ULongLong unsignedLongLongAttr; | 48 attribute ULongLong uLongLongAttribute; |
49 attribute T tAttribute; | |
46 | 50 |
47 attribute T TestSubObj; | 51 void voidMethodArrayOfLongsArg(optional ArrayOfLongs arrayOfLongsArg); |
48 | 52 |
49 [StrictTypeChecking] void func(optional ArrayOfLongs x); | 53 void voidMethodFloatArgStringArg(Float floatArg, String stringArg); |
54 void voidMethodTestCallbackInterfaceTypeArg(TestCallbackInterfaceType testCa llbackInterfaceTypeArg); | |
50 | 55 |
51 void setShadow(Float width, Float height, float blur, [StrictTypeChecking] o ptional String color, optional Float alpha); | 56 ULongLong uLongLongMethodTestInterfaceEmptyTypeSequenceArg(sequence<TestInte rfaceEmptyType> testInterfaceEmptyTypeSequenceArg); |
52 void voidMethodTestCallbackInterfaceArgument(TestCallbackInterfaceType testC allbackInterface); | |
53 | |
54 ULongLong methodWithSequenceArg(sequence<TestInterfaceEmptyType> sequenceArg ); | |
55 FooOrBar fooOrBarMethod(); | 57 FooOrBar fooOrBarMethod(); |
56 | 58 |
57 [RaisesException] ArrayOfStrings stringArrayFunction(ArrayOfStrings values); | 59 ArrayOfStrings arrayOfStringsMethodArrayOfStringsArg(ArrayOfStrings arrayOfS tringsArg); |
58 [RaisesException] String[] stringArrayFunction2(String[] values); | 60 String[] stringArrayMethodStringArrayArg(String[] stringArrayArg); |
59 | |
60 // Exceptions | |
61 [RaisesException] void methodWithException(); | |
62 [RaisesException=Getter] attribute long attrWithGetterException; | |
63 [RaisesException=Setter] attribute long attrWithSetterException; | |
64 [RaisesException=Getter] attribute DOMString stringAttrWithGetterException; | |
65 [RaisesException=Setter] attribute DOMString stringAttrWithSetterException; | |
66 }; | 61 }; |
OLD | NEW |