OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "gin/test/expect", | 6 "gin/test/expect", |
7 "mojo/public/interfaces/bindings/tests/rect.mojom", | 7 "mojo/public/interfaces/bindings/tests/rect.mojom", |
8 "mojo/public/interfaces/bindings/tests/test_structs.mojom", | 8 "mojo/public/interfaces/bindings/tests/test_structs.mojom", |
9 "mojo/public/js/bindings/codec", | 9 "mojo/public/js/codec", |
10 "mojo/public/js/bindings/validator", | 10 "mojo/public/js/validator", |
11 ], function(expect, | 11 ], function(expect, |
12 rect, | 12 rect, |
13 testStructs, | 13 testStructs, |
14 codec, | 14 codec, |
15 validator) { | 15 validator) { |
16 | 16 |
17 function testConstructors() { | 17 function testConstructors() { |
18 var r = new rect.Rect(); | 18 var r = new rect.Rect(); |
19 expect(r).toEqual(new rect.Rect({x:0, y:0, width:0, height:0})); | 19 expect(r).toEqual(new rect.Rect({x:0, y:0, width:0, height:0})); |
20 expect(r).toEqual(new rect.Rect({foo:100, bar:200})); | 20 expect(r).toEqual(new rect.Rect({foo:100, bar:200})); |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 } | 160 } |
161 | 161 |
162 testConstructors(); | 162 testConstructors(); |
163 testNoDefaultFieldValues(); | 163 testNoDefaultFieldValues(); |
164 testDefaultFieldValues(); | 164 testDefaultFieldValues(); |
165 testScopedConstants(); | 165 testScopedConstants(); |
166 testMapKeyTypes(); | 166 testMapKeyTypes(); |
167 testMapValueTypes(); | 167 testMapValueTypes(); |
168 this.result = "PASS"; | 168 this.result = "PASS"; |
169 }); | 169 }); |
OLD | NEW |