| 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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 expect(defaults.a10).toBe(1234); | 116 expect(defaults.a10).toBe(1234); |
| 117 expect(defaults.a11).toBe(true); | 117 expect(defaults.a11).toBe(true); |
| 118 expect(defaults.a12).toBe(false); | 118 expect(defaults.a12).toBe(false); |
| 119 expect(defaults.a13).toBe(123.25); | 119 expect(defaults.a13).toBe(123.25); |
| 120 expect(defaults.a14).toBe(1234567890.123); | 120 expect(defaults.a14).toBe(1234567890.123); |
| 121 expect(defaults.a15).toBe(1E10); | 121 expect(defaults.a15).toBe(1E10); |
| 122 expect(defaults.a16).toBe(-1.2E+20); | 122 expect(defaults.a16).toBe(-1.2E+20); |
| 123 expect(defaults.a17).toBe(1.23E-20); | 123 expect(defaults.a17).toBe(1.23E-20); |
| 124 expect(defaults.a20).toBe(sample.Bar.Type.TYPE_BOTH); | 124 expect(defaults.a20).toBe(sample.Bar.Type.TYPE_BOTH); |
| 125 expect(defaults.a21).toBeNull(); | 125 expect(defaults.a21).toBeNull(); |
| 126 expect(defaults.a22).toBeNull(); | 126 expect(defaults.a22).toBeTruthy(); |
| 127 expect(defaults.a22.shape).toBe(imported.Shape.SHAPE_RECTANGLE); |
| 128 expect(defaults.a22.color).toBe(imported2.Color.COLOR_BLACK); |
| 127 // TODO(vtl): crbug.com/375845 | 129 // TODO(vtl): crbug.com/375845 |
| 128 // expect(defaults.a21).toBeNull(); | 130 // expect(defaults.a21).toBeNull(); |
| 129 // expect(defaults.a22).toBeNull(); | 131 // expect(defaults.a22).toBeNull(); |
| 130 } | 132 } |
| 131 | 133 |
| 132 function ServiceImpl() { | 134 function ServiceImpl() { |
| 133 } | 135 } |
| 134 | 136 |
| 135 ServiceImpl.prototype = Object.create(sample.ServiceStub.prototype); | 137 ServiceImpl.prototype = Object.create(sample.ServiceStub.prototype); |
| 136 | 138 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 158 var serviceProxy = new sample.ServiceProxy(receiver); | 160 var serviceProxy = new sample.ServiceProxy(receiver); |
| 159 | 161 |
| 160 checkDefaultValues(); | 162 checkDefaultValues(); |
| 161 | 163 |
| 162 var foo = makeFoo(); | 164 var foo = makeFoo(); |
| 163 checkFoo(foo); | 165 checkFoo(foo); |
| 164 | 166 |
| 165 var port = 10; | 167 var port = 10; |
| 166 serviceProxy.frobinate(foo, sample.ServiceProxy.BazOptions.BAZ_EXTRA, port); | 168 serviceProxy.frobinate(foo, sample.ServiceProxy.BazOptions.BAZ_EXTRA, port); |
| 167 }); | 169 }); |
| OLD | NEW |