OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Tests a variety of basic API definition features. | 5 // Tests a variety of basic API definition features. |
6 | 6 |
7 namespace idl_basics { | 7 namespace idl_basics { |
8 enum EnumType { | 8 enum EnumType { |
9 name1, | 9 name1, |
10 name2 | 10 name2 |
(...skipping 27 matching lines...) Expand all Loading... |
38 static void function8(long arg1, optional DOMString arg2); | 38 static void function8(long arg1, optional DOMString arg2); |
39 static void function9(optional MyType1 arg); | 39 static void function9(optional MyType1 arg); |
40 | 40 |
41 static void function10(long x, long[] y); | 41 static void function10(long x, long[] y); |
42 static void function11(MyType1[] arg); | 42 static void function11(MyType1[] arg); |
43 | 43 |
44 static void function12(Callback4 cb); | 44 static void function12(Callback4 cb); |
45 | 45 |
46 static void function13(EnumType type, Callback5 cb); | 46 static void function13(EnumType type, Callback5 cb); |
47 static void function14(EnumType[] types); | 47 static void function14(EnumType[] types); |
| 48 |
| 49 // "switch" is a reserved word and should cause a C++ compile error if we |
| 50 // emit code for this declaration. |
| 51 [nocompile] static void function15(long switch); |
48 }; | 52 }; |
49 | 53 |
50 interface Events { | 54 interface Events { |
51 static void onFoo1(); | 55 static void onFoo1(); |
52 static void onFoo2(long x); | 56 static void onFoo2(long x); |
53 static void onFoo2(MyType1 arg); | 57 static void onFoo2(MyType1 arg); |
54 static void onFoo3(EnumType type); | 58 static void onFoo3(EnumType type); |
55 }; | 59 }; |
56 }; | 60 }; |
OLD | NEW |