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 | |
35 typedef float Float; | 31 typedef float Float; |
36 typedef unsigned long long ULongLong; | 32 typedef unsigned long long ULongLong; |
37 typedef TestInterfaceEmpty TestInterfaceEmptyType; | 33 typedef TestInterfaceEmpty TestInterfaceEmptyType; |
38 typedef long[] ArrayOfLongs; | 34 typedef long[] ArrayOfLongs; |
39 typedef DOMString String; | 35 typedef DOMString String; |
40 typedef DOMString[] ArrayOfStrings; | 36 typedef DOMString[] ArrayOfStrings; |
41 typedef TestCallbackInterface TestCallbackInterfaceType; | 37 typedef TestCallbackInterface TestCallbackInterfaceType; |
42 typedef TestSubObjConstructor T; | 38 typedef TestSubObjConstructor T; |
| 39 typedef DOMException E; |
43 typedef (Foo or Bar) FooOrBar; | 40 typedef (Foo or Bar) FooOrBar; |
44 | 41 |
45 [ | 42 [ |
46 Constructor(String stringArg), | 43 Constructor(String hello), |
47 ] interface TestTypedefs { | 44 ] interface TestTypedefs { |
48 attribute ULongLong uLongLongAttribute; | 45 attribute ULongLong unsignedLongLongAttr; |
49 attribute T tAttribute; | |
50 | 46 |
51 void voidMethodArrayOfLongsArg(optional ArrayOfLongs arrayOfLongsArg); | 47 attribute T TestSubObj; |
52 | 48 |
53 void voidMethodFloatArgStringArg(Float floatArg, String stringArg); | 49 [StrictTypeChecking] void func(optional ArrayOfLongs x); |
54 void voidMethodTestCallbackInterfaceTypeArg(TestCallbackInterfaceType testCa
llbackInterfaceTypeArg); | |
55 | 50 |
56 ULongLong uLongLongMethodTestInterfaceEmptyTypeSequenceArg(sequence<TestInte
rfaceEmptyType> testInterfaceEmptyTypeSequenceArg); | 51 void setShadow(Float width, Float height, float blur, [StrictTypeChecking] o
ptional String color, optional Float alpha); |
| 52 void voidMethodTestCallbackInterfaceArgument(TestCallbackInterfaceType testC
allbackInterface); |
| 53 |
| 54 ULongLong methodWithSequenceArg(sequence<TestInterfaceEmptyType> sequenceArg
); |
57 FooOrBar fooOrBarMethod(); | 55 FooOrBar fooOrBarMethod(); |
58 | 56 |
59 ArrayOfStrings arrayOfStringsMethodArrayOfStringsArg(ArrayOfStrings arrayOfS
tringsArg); | 57 [RaisesException] ArrayOfStrings stringArrayFunction(ArrayOfStrings values); |
60 String[] stringArrayMethodStringArrayArg(String[] stringArrayArg); | 58 [RaisesException] String[] stringArrayFunction2(String[] values); |
| 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; |
61 }; | 66 }; |
OLD | NEW |