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

Side by Side Diff: mojo/public/interfaces/bindings/tests/test_structs.mojom

Issue 628763002: Mojo JS bindings: simplify mojo.connectToService() usage - Part 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed template indentation Created 6 years, 2 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
« no previous file with comments | « mojo/apps/js/test/js_to_cpp_unittest.js ('k') | mojo/public/js/bindings/connection.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "mojo/public/interfaces/bindings/tests/rect.mojom" 5 import "mojo/public/interfaces/bindings/tests/rect.mojom"
6 6
7 [JavaPackage="org.chromium.mojo.bindings.test.mojom.test_structs"] 7 [JavaPackage="org.chromium.mojo.bindings.test.mojom.test_structs"]
8 module mojo.test { 8 module mojo.test {
9 9
10 struct NamedRegion { 10 struct NamedRegion {
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 float f9 = 100; 75 float f9 = 100;
76 float f10 = 100.0; 76 float f10 = 100.0;
77 double f11 = 100; 77 double f11 = 100;
78 double f12 = 100.0; 78 double f12 = 100.0;
79 string f13 = kFoo; 79 string f13 = kFoo;
80 string? f14 = kFoo; 80 string? f14 = kFoo;
81 Rect f15 = default; 81 Rect f15 = default;
82 Rect? f16 = default; 82 Rect? f16 = default;
83 }; 83 };
84 84
85
86 // Used to verify that the code generated for enum and const values defined
87 // within a struct is correct. Assuming that a constant's value can be a literal
88 // or another constant and that enum values can either be an integer constant or
89 // another value from the same enum type.
90
91 struct ScopedConstants {
92 const int32 TEN = 10;
93 const int32 ALSO_TEN = TEN;
94 enum EType {
95 E0,
96 E1,
97 E2 = 10,
98 E3 = E2,
99 E4,
100 };
101 const int32 TEN_TOO = EType.E2;
102 EType f0 = E0; // 0
103 EType f1 = E1; // 1
104 EType f2 = E2; // 10
105 EType f3 = E3; // 10
106 EType f4 = E4; // 11
107 int32 f5 = TEN;
108 int32 f6 = ALSO_TEN;
109 };
110
85 } 111 }
OLDNEW
« no previous file with comments | « mojo/apps/js/test/js_to_cpp_unittest.js ('k') | mojo/public/js/bindings/connection.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698