| OLD | NEW |
| 1 // Copyright 2008 the V8 project authors. All rights reserved. | 1 // Copyright 2008 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 assertEquals('function', mirror.type()); | 57 assertEquals('function', mirror.type()); |
| 58 assertFalse(mirror.isPrimitive()); | 58 assertFalse(mirror.isPrimitive()); |
| 59 assertEquals("Function", mirror.className()); | 59 assertEquals("Function", mirror.className()); |
| 60 assertEquals("f", mirror.name()); | 60 assertEquals("f", mirror.name()); |
| 61 assertEquals('undefined', typeof mirror.inferredName()); | 61 assertEquals('undefined', typeof mirror.inferredName()); |
| 62 assertFalse(mirror.resolved()); | 62 assertFalse(mirror.resolved()); |
| 63 assertEquals(void 0, mirror.source()); | 63 assertEquals(void 0, mirror.source()); |
| 64 assertEquals('undefined', mirror.constructorFunction().type()); | 64 assertEquals('undefined', mirror.constructorFunction().type()); |
| 65 assertEquals('undefined', mirror.protoObject().type()); | 65 assertEquals('undefined', mirror.protoObject().type()); |
| 66 assertEquals('undefined', mirror.prototypeObject().type()); | 66 assertEquals('undefined', mirror.prototypeObject().type()); |
| 67 | 67 |
| 68 // Parse JSON representation of unresolved functions and check. | 68 // Parse JSON representation of unresolved functions and check. |
| 69 var fromJSON = eval('(' + json + ')'); | 69 var fromJSON = eval('(' + json + ')'); |
| 70 assertEquals('function', fromJSON.type, 'Unexpected mirror type in JSON'); | 70 assertEquals('function', fromJSON.type, 'Unexpected mirror type in JSON'); |
| 71 assertEquals('Function', fromJSON.className, 'Unexpected mirror class name in JS
ON'); | 71 assertEquals('Function', fromJSON.className, 'Unexpected mirror class name in JS
ON'); |
| 72 assertEquals(mirror.constructorFunction().handle(), fromJSON.constructorFunction
.ref, 'Unexpected constructor function handle in JSON'); | 72 assertEquals(mirror.constructorFunction().handle(), fromJSON.constructorFunction
.ref, 'Unexpected constructor function handle in JSON'); |
| 73 assertEquals('undefined', refs.lookup(fromJSON.constructorFunction.ref).type, 'U
nexpected constructor function type in JSON'); | 73 assertEquals('undefined', refs.lookup(fromJSON.constructorFunction.ref).type, 'U
nexpected constructor function type in JSON'); |
| 74 assertEquals(mirror.protoObject().handle(), fromJSON.protoObject.ref, 'Unexpecte
d proto object handle in JSON'); | 74 assertEquals(mirror.protoObject().handle(), fromJSON.protoObject.ref, 'Unexpecte
d proto object handle in JSON'); |
| 75 assertEquals('undefined', refs.lookup(fromJSON.protoObject.ref).type, 'Unexpecte
d proto object type in JSON'); | 75 assertEquals('undefined', refs.lookup(fromJSON.protoObject.ref).type, 'Unexpecte
d proto object type in JSON'); |
| 76 assertEquals(mirror.prototypeObject().handle(), fromJSON.prototypeObject.ref, 'U
nexpected prototype object handle in JSON'); | 76 assertEquals(mirror.prototypeObject().handle(), fromJSON.prototypeObject.ref, 'U
nexpected prototype object handle in JSON'); |
| 77 assertEquals('undefined', refs.lookup(fromJSON.prototypeObject.ref).type, 'Unexp
ected prototype object type in JSON'); | 77 assertEquals('undefined', refs.lookup(fromJSON.prototypeObject.ref).type, 'Unexp
ected prototype object type in JSON'); |
| 78 assertFalse(fromJSON.resolved); | 78 assertFalse(fromJSON.resolved); |
| 79 assertEquals("f", fromJSON.name); | 79 assertEquals("f", fromJSON.name); |
| 80 assertFalse('inferredName' in fromJSON); | 80 assertFalse('inferredName' in fromJSON); |
| 81 assertEquals(void 0, fromJSON.source); | 81 assertEquals(void 0, fromJSON.source); |
| OLD | NEW |