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

Side by Side Diff: mojo/public/bindings/tests/sample_service.mojom

Issue 164873002: Fix bug with using enums as default values in mojom. We were previously (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 import "sample_import.mojom" 5 import "sample_import.mojom"
6 import "sample_import2.mojom" 6 import "sample_import2.mojom"
7 7
8 module sample { 8 module sample {
9 9
10 enum BarType { 10 enum BarType {
(...skipping 30 matching lines...) Expand all
41 int32 age @2; 41 int32 age @2;
42 string[] names = ["Jim"] @1; 42 string[] names = ["Jim"] @1;
43 int32 height = 6*12 @3; 43 int32 height = 6*12 @3;
44 }; 44 };
45 45
46 struct DefaultsTest { 46 struct DefaultsTest {
47 sample.DefaultsTestInner[] people = [{32, ["Bob", "Bobby"]}] @1; 47 sample.DefaultsTestInner[] people = [{32, ["Bob", "Bobby"]}] @1;
48 uint8[] data = [1, 2, 3] @2; 48 uint8[] data = [1, 2, 3] @2;
49 imported.Point point = {7, 15} @3; 49 imported.Point point = {7, 15} @3;
50 int32[] shape_masks = [1 << imported.SHAPE_RECTANGLE] @4; 50 int32[] shape_masks = [1 << imported.SHAPE_RECTANGLE] @4;
51 imported.Thing thing = {imported.SHAPE_RECTANGLE, imported.COLOR_RED}; 51 imported.Thing thing = {imported.SHAPE_CIRCLE, imported.COLOR_BLACK};
52 }; 52 };
53 53
54 interface Port { 54 interface Port {
55 void PostMessage(string message_text @0) @0; 55 void PostMessage(string message_text @0) @0;
56 }; 56 };
57 57
58 [Peer=ServiceClient] 58 [Peer=ServiceClient]
59 interface Service { 59 interface Service {
60 enum BazOptions { 60 enum BazOptions {
61 BAZ_REGULAR = 0, 61 BAZ_REGULAR = 0,
62 BAZ_EXTRA 62 BAZ_EXTRA
63 }; 63 };
64 void Frobinate(Foo foo @0, int32 baz @1, Port port @2) @0; 64 void Frobinate(Foo foo @0, int32 baz @1, Port port @2) @0;
65 }; 65 };
66 66
67 [Peer=Service] 67 [Peer=Service]
68 interface ServiceClient { 68 interface ServiceClient {
69 void DidFrobinate(int32 result @0) @0; 69 void DidFrobinate(int32 result @0) @0;
70 }; 70 };
71 71
72 } 72 }
OLDNEW
« no previous file with comments | « mojo/public/bindings/tests/sample_import2.mojom ('k') | mojo/public/bindings/tests/sample_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698