OLD | NEW |
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 define([ | 5 define([ |
6 "console", | 6 "console", |
7 "mojo/apps/js/test/hexdump", | 7 "mojo/apps/js/test/hexdump", |
8 "gin/test/expect", | 8 "gin/test/expect", |
9 "mojo/public/interfaces/bindings/tests/sample_service.mojom", | 9 "mojo/public/interfaces/bindings/tests/sample_service.mojom", |
10 "mojo/public/interfaces/bindings/tests/sample_import.mojom", | 10 "mojo/public/interfaces/bindings/tests/sample_import.mojom", |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 expect(full.a3).toBe(34567); | 105 expect(full.a3).toBe(34567); |
106 expect(full.a4).toBe(123456); | 106 expect(full.a4).toBe(123456); |
107 // TODO(vtl): crbug.com/375522 | 107 // TODO(vtl): crbug.com/375522 |
108 // expect(full.a5).toBe(3456789012); | 108 // expect(full.a5).toBe(3456789012); |
109 expect(full.a6).toBe(111111111111); | 109 expect(full.a6).toBe(111111111111); |
110 // TODO(vtl): crbug.com/375522 (Also, can we get exact values for large | 110 // TODO(vtl): crbug.com/375522 (Also, can we get exact values for large |
111 // int64/uint64's in JS?) | 111 // int64/uint64's in JS?) |
112 // expect(full.a7).toBe(9999999999999999999); | 112 // expect(full.a7).toBe(9999999999999999999); |
113 expect(full.a8).toBe(0x12345); | 113 expect(full.a8).toBe(0x12345); |
114 expect(full.a9).toBe(-0x12345); | 114 expect(full.a9).toBe(-0x12345); |
115 // TODO(vtl): crbug.com/375829 | 115 expect(full.a10).toBe(1234); |
116 // expect(full.a10).toBe(8); | 116 expect(full.a11).toBe(true); |
117 // expect(full.a11).toBe(-8); | 117 expect(full.a12).toBe(false); |
118 expect(full.a12).toBe(1234); | 118 expect(full.a13).toBe(123.25); |
119 expect(full.a13).toBe(true); | 119 expect(full.a14).toBe(1234567890.123); |
120 expect(full.a14).toBe(false); | 120 expect(full.a15).toBe(1E10); |
121 expect(full.a15).toBe(123.25); | 121 expect(full.a16).toBe(-1.2E+20); |
122 expect(full.a16).toBe(1234567890.123); | 122 expect(full.a17).toBe(1.23E-20); |
123 expect(full.a17).toBe(1E10); | 123 expect(full.a18).toBeNull(); |
124 expect(full.a18).toBe(-1.2E+20); | |
125 expect(full.a19).toBe(1.23E-20); | |
126 expect(full.a20).toBeNull(); | |
127 // TODO(vtl): crbug.com/375845 | 124 // TODO(vtl): crbug.com/375845 |
128 // expect(full.a21).toBeNull(); | 125 // expect(full.a21).toBeNull(); |
129 // expect(full.a22).toBeNull(); | 126 // expect(full.a22).toBeNull(); |
130 } | 127 } |
131 | 128 |
132 function ServiceImpl() { | 129 function ServiceImpl() { |
133 } | 130 } |
134 | 131 |
135 ServiceImpl.prototype = Object.create(sample.ServiceStub.prototype); | 132 ServiceImpl.prototype = Object.create(sample.ServiceStub.prototype); |
136 | 133 |
(...skipping 21 matching lines...) Expand all Loading... |
158 var serviceProxy = new sample.ServiceProxy(receiver); | 155 var serviceProxy = new sample.ServiceProxy(receiver); |
159 | 156 |
160 checkDefaultValues(); | 157 checkDefaultValues(); |
161 | 158 |
162 var foo = makeFoo(); | 159 var foo = makeFoo(); |
163 checkFoo(foo); | 160 checkFoo(foo); |
164 | 161 |
165 var port = 10; | 162 var port = 10; |
166 serviceProxy.frobinate(foo, sample.ServiceProxy.BazOptions.BAZ_EXTRA, port); | 163 serviceProxy.frobinate(foo, sample.ServiceProxy.BazOptions.BAZ_EXTRA, port); |
167 }); | 164 }); |
OLD | NEW |