OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project 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 // Flags: --expose-debug-as debug --expose-gc --harmony-collections | 5 // Flags: --expose-debug-as debug --expose-gc |
6 | 6 |
7 function testMapMirror(mirror) { | 7 function testMapMirror(mirror) { |
8 // Create JSON representation. | 8 // Create JSON representation. |
9 var serializer = debug.MakeMirrorSerializer(); | 9 var serializer = debug.MakeMirrorSerializer(); |
10 var json = JSON.stringify(serializer.serializeValue(mirror)); | 10 var json = JSON.stringify(serializer.serializeValue(mirror)); |
11 | 11 |
12 // Check the mirror hierachy. | 12 // Check the mirror hierachy. |
13 assertTrue(mirror instanceof debug.Mirror); | 13 assertTrue(mirror instanceof debug.Mirror); |
14 assertTrue(mirror instanceof debug.ValueMirror); | 14 assertTrue(mirror instanceof debug.ValueMirror); |
15 assertTrue(mirror instanceof debug.ObjectMirror); | 15 assertTrue(mirror instanceof debug.ObjectMirror); |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 found++; | 135 found++; |
136 } | 136 } |
137 if (Object.is(values[i], o3)) { | 137 if (Object.is(values[i], o3)) { |
138 found++; | 138 found++; |
139 } | 139 } |
140 } | 140 } |
141 assertEquals(2, found); | 141 assertEquals(2, found); |
142 } | 142 } |
143 | 143 |
144 testWeakSetValues(weakSetMirror); | 144 testWeakSetValues(weakSetMirror); |
OLD | NEW |