Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1167)

Unified Diff: third_party/chrome/tools/test/idl_basics.idl

Issue 12261015: Import chrome idl into third_party (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/chrome/tools/test/idl_basics.idl
diff --git a/third_party/chrome/tools/test/idl_basics.idl b/third_party/chrome/tools/test/idl_basics.idl
new file mode 100644
index 0000000000000000000000000000000000000000..0fa9b439bed9c2df7159cd3f05d2acd0cd1dbd96
--- /dev/null
+++ b/third_party/chrome/tools/test/idl_basics.idl
@@ -0,0 +1,85 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Tests a variety of basic API definition features.
+
+[internal] namespace idl_basics {
+ // Enum description
+ enum EnumType {
+ name1,
+ name2
+ };
+
+ dictionary MyType1 {
+ // This comment tests "double-quotes".
+ [legalValues=(1,2)] long x;
+ DOMString y;
+ DOMString z;
+ DOMString a;
+ DOMString b;
+ DOMString c;
+ };
+
+ dictionary MyType2 {
+ DOMString x;
+ };
+
+ callback Callback1 = void();
+ callback Callback2 = void(long x);
+ callback Callback3 = void(MyType1 arg);
+ callback Callback4 = void(MyType2[] arg);
+ callback Callback5 = void(EnumType type);
+ // A comment on a callback.
+ // |x|: A parameter.
+ callback Callback6 = void(long x);
+ // |x|: Just a parameter comment, with no comment on the callback.
+ callback Callback7 = void(long x);
+
+ interface Functions {
+ static void function1();
+ static void function2(long x);
+ // This comment should appear in the documentation,
+ // despite occupying multiple lines.
+ //
+ // |arg|: So should this comment
+ // about the argument.
+ // <em>HTML</em> is fine too.
+ static void function3(MyType1 arg);
+
+ // This tests if "double-quotes" are escaped correctly.
+ //
+ // It also tests a comment with two newlines.
+ static void function4(Callback1 cb);
+ static void function5(Callback2 cb);
+ static void function6(Callback3 cb);
+
+ static void function7(optional long arg);
+ static void function8(long arg1, optional DOMString arg2);
+ static void function9(optional MyType1 arg);
+
+ static void function10(long x, long[] y);
+ static void function11(MyType1[] arg);
+
+ static void function12(Callback4 cb);
+
+ static void function13(EnumType type, Callback5 cb);
+ static void function14(EnumType[] types);
+
+ // "switch" is a reserved word and should cause a C++ compile error if we
+ // emit code for this declaration.
+ [nocompile] static void function15(long switch);
+
+ static void function16(Callback6 cb);
+ static void function17(Callback7 cb);
+ // |cb|: Override callback comment.
+ static void function18(Callback7 cb);
+ };
+
+ interface Events {
+ static void onFoo1();
+ static void onFoo2(long x);
+ static void onFoo2(MyType1 arg);
+ static void onFoo3(EnumType type);
+ };
+};
« no previous file with comments | « third_party/chrome/tools/test/functions_on_types.json ('k') | third_party/chrome/tools/test/idl_callback_arrays.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698