Home | History | Annotate | Download | only in mjsunit

Lines Matching full:mirror

29 // Test the mirror object for unresolved functions.
43 var mirror = new debug.UnresolvedFunctionMirror("f");
45 var json = JSON.stringify(serializer.serializeValue(mirror));
49 // Check the mirror hierachy for unresolved functions.
50 assertTrue(mirror instanceof debug.Mirror);
51 assertTrue(mirror instanceof debug.ValueMirror);
52 assertTrue(mirror instanceof debug.ObjectMirror);
53 assertTrue(mirror instanceof debug.FunctionMirror);
55 // Check the mirror properties for unresolved functions.
56 assertTrue(mirror.isUnresolvedFunction());
57 assertEquals('function', mirror.type());
58 assertFalse(mirror.isPrimitive());
59 assertEquals("Function", mirror.className());
60 assertEquals("f", mirror.name());
61 assertEquals('undefined', typeof mirror.inferredName());
62 assertFalse(mirror.resolved());
63 assertEquals(void 0, mirror.source());
64 assertEquals('undefined', mirror.constructorFunction().type());
65 assertEquals('undefined', mirror.protoObject().type());
66 assertEquals('undefined', mirror.prototypeObject().type());
70 assertEquals('function', fromJSON.type, 'Unexpected mirror type in JSON');
71 assertEquals('Function', fromJSON.className, 'Unexpected mirror class name in JSON');
72 assertEquals(mirror.constructorFunction().handle(), fromJSON.constructorFunction.ref, 'Unexpected constructor function handle in JSON');
74 assertEquals(mirror.protoObject().handle(), fromJSON.protoObject.ref, 'Unexpected proto object handle in JSON');
76 assertEquals(mirror.prototypeObject().handle(), fromJSON.prototypeObject.ref, 'Unexpected prototype object handle in JSON');