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/codec", | 9 "mojo/public/js/codec", |
10 "mojo/public/js/validator", | 10 "mojo/public/js/validator", |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 | 72 |
73 // f15,16 a default instance of Rect | 73 // f15,16 a default instance of Rect |
74 var r = new rect.Rect(); | 74 var r = new rect.Rect(); |
75 expect(s.f15).toEqual(r); | 75 expect(s.f15).toEqual(r); |
76 expect(s.f16).toEqual(r); | 76 expect(s.f16).toEqual(r); |
77 } | 77 } |
78 | 78 |
79 function testScopedConstants() { | 79 function testScopedConstants() { |
80 expect(testStructs.ScopedConstants.TEN).toEqual(10); | 80 expect(testStructs.ScopedConstants.TEN).toEqual(10); |
81 expect(testStructs.ScopedConstants.ALSO_TEN).toEqual(10); | 81 expect(testStructs.ScopedConstants.ALSO_TEN).toEqual(10); |
82 expect(testStructs.ScopedConstants.TEN_TOO).toEqual(10); | |
83 | 82 |
84 expect(testStructs.ScopedConstants.EType.E0).toEqual(0); | 83 expect(testStructs.ScopedConstants.EType.E0).toEqual(0); |
85 expect(testStructs.ScopedConstants.EType.E1).toEqual(1); | 84 expect(testStructs.ScopedConstants.EType.E1).toEqual(1); |
86 expect(testStructs.ScopedConstants.EType.E2).toEqual(10); | 85 expect(testStructs.ScopedConstants.EType.E2).toEqual(10); |
87 expect(testStructs.ScopedConstants.EType.E3).toEqual(10); | 86 expect(testStructs.ScopedConstants.EType.E3).toEqual(10); |
88 expect(testStructs.ScopedConstants.EType.E4).toEqual(11); | 87 expect(testStructs.ScopedConstants.EType.E4).toEqual(11); |
89 | 88 |
90 var s = new testStructs.ScopedConstants(); | 89 var s = new testStructs.ScopedConstants(); |
91 expect(s.f0).toEqual(0); | 90 expect(s.f0).toEqual(0); |
92 expect(s.f1).toEqual(1); | 91 expect(s.f1).toEqual(1); |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 testDefaultFieldValues(); | 270 testDefaultFieldValues(); |
272 testScopedConstants(); | 271 testScopedConstants(); |
273 testMapKeyTypes(); | 272 testMapKeyTypes(); |
274 testMapValueTypes(); | 273 testMapValueTypes(); |
275 testFloatNumberValues(); | 274 testFloatNumberValues(); |
276 testIntegerNumberValues(); | 275 testIntegerNumberValues(); |
277 testUnsignedNumberValues(); | 276 testUnsignedNumberValues(); |
278 testBitArrayValues(); | 277 testBitArrayValues(); |
279 this.result = "PASS"; | 278 this.result = "PASS"; |
280 }); | 279 }); |
OLD | NEW |