Home | History | Annotate | Download | only in mjsunit

Lines Matching full:mirror

29 // Test the mirror object for objects
44 // Create mirror and JSON representation.
45 var mirror = debug.MakeMirror(a);
47 var json = JSON.stringify(serializer.serializeValue(mirror));
51 // Check the mirror hierachy.
52 assertTrue(mirror instanceof debug.Mirror, 'Unexpected mirror hierachy');
53 assertTrue(mirror instanceof debug.ValueMirror, 'Unexpected mirror hierachy');
54 assertTrue(mirror instanceof debug.ObjectMirror, 'Unexpected mirror hierachy');
55 assertTrue(mirror instanceof debug.ArrayMirror, 'Unexpected mirror hierachy');
57 // Check the mirror properties.
58 assertTrue(mirror.isArray(), 'Unexpected mirror');
59 assertEquals('object', mirror.type(), 'Unexpected mirror type');
60 assertFalse(mirror.isPrimitive(), 'Unexpected primitive mirror');
61 assertEquals('Array', mirror.className(), 'Unexpected mirror class name');
62 assertTrue(mirror.constructorFunction() instanceof debug.ObjectMirror, 'Unexpected mirror hierachy');
63 assertEquals('Array', mirror.constructorFunction().name(), 'Unexpected constructor function name');
64 assertTrue(mirror.protoObject() instanceof debug.Mirror, 'Unexpected mirror hierachy');
65 assertTrue(mirror.prototypeObject() instanceof debug.Mirror, 'Unexpected mirror hierachy');
66 assertEquals(mirror.length(), a.length, "Length mismatch");
68 var indexedProperties = mirror.indexedPropertiesFromRange();
71 assertTrue(indexedProperties[i] instanceof debug.Mirror, 'Unexpected mirror hierachy');
72 assertTrue(indexedProperties[i] instanceof debug.PropertyMirror, 'Unexpected mirror hierachy');
77 assertEquals('object', fromJSON.type, 'Unexpected mirror type in JSON');
78 assertEquals('Array', fromJSON.className, 'Unexpected mirror class name in JSON');
79 assertEquals(mirror.constructorFunction().handle(), fromJSON.constructorFunction.ref, 'Unexpected constructor function handle in JSON');