| 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 [internal] namespace idl_basics { | 7 [internal] namespace idl_basics { |
| 8 // Enum description | 8 // Enum description |
| 9 enum EnumType { | 9 enum EnumType { |
| 10 // comment1 | 10 // comment1 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 DOMString z; | 24 DOMString z; |
| 25 DOMString a; | 25 DOMString a; |
| 26 DOMString b; | 26 DOMString b; |
| 27 DOMString c; | 27 DOMString c; |
| 28 }; | 28 }; |
| 29 | 29 |
| 30 dictionary MyType2 { | 30 dictionary MyType2 { |
| 31 DOMString x; | 31 DOMString x; |
| 32 }; | 32 }; |
| 33 | 33 |
| 34 dictionary UnionType { |
| 35 (EnumType or DOMString)? x; |
| 36 (DOMString or EnumType) y; |
| 37 }; |
| 38 |
| 34 callback Callback1 = void(); | 39 callback Callback1 = void(); |
| 35 callback Callback2 = void(long x); | 40 callback Callback2 = void(long x); |
| 36 callback Callback3 = void(MyType1 arg); | 41 callback Callback3 = void(MyType1 arg); |
| 37 callback Callback4 = void(MyType2[] arg); | 42 callback Callback4 = void(MyType2[] arg); |
| 38 callback Callback5 = void(EnumType type); | 43 callback Callback5 = void(EnumType type); |
| 39 // A comment on a callback. | 44 // A comment on a callback. |
| 40 // |x|: A parameter. | 45 // |x|: A parameter. |
| 41 callback Callback6 = void(long x); | 46 callback Callback6 = void(long x); |
| 42 // |x|: Just a parameter comment, with no comment on the callback. | 47 // |x|: Just a parameter comment, with no comment on the callback. |
| 43 callback Callback7 = void(long x); | 48 callback Callback7 = void(long x); |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 static idl_other_namespace.SomeType[] function30(); | 102 static idl_other_namespace.SomeType[] function30(); |
| 98 }; | 103 }; |
| 99 | 104 |
| 100 interface Events { | 105 interface Events { |
| 101 static void onFoo1(); | 106 static void onFoo1(); |
| 102 static void onFoo2(long x); | 107 static void onFoo2(long x); |
| 103 static void onFoo2(MyType1 arg); | 108 static void onFoo2(MyType1 arg); |
| 104 static void onFoo3(EnumType type); | 109 static void onFoo3(EnumType type); |
| 105 }; | 110 }; |
| 106 }; | 111 }; |
| OLD | NEW |