Lines Matching full:properties
56 // Check the mirror properties.
69 var properties = mirror.properties();
70 assertEquals(names.length, properties.length);
71 for (var i = 0; i < properties.length; i++) {
72 assertTrue(properties[i] instanceof debug.Mirror, 'Unexpected mirror hierachy');
73 assertTrue(properties[i] instanceof debug.PropertyMirror, 'Unexpected mirror hierachy');
74 assertEquals('property', properties[i].type(), 'Unexpected mirror type');
75 assertEquals(names[i], properties[i].name(), 'Unexpected property name');
82 // If the object has some special properties don't test for these.
105 // Check that the serialization contains all properties.
106 assertEquals(names.length, fromJSON.properties.length, 'Some properties missing in JSON');
107 for (var i = 0; i < fromJSON.properties.length; i++) {
108 var name = fromJSON.properties[i].name;
109 if (typeof name == 'undefined') name = fromJSON.properties[i].index;
114 assertEquals(properties[i].value().handle(), fromJSON.properties[i].ref, 'Unexpected serialized handle');
117 assertEquals(properties[i].name(), fromJSON.properties[i].name, 'Unexpected serialized name');
120 if (properties[i].propertyType() != debug.PropertyType.Normal) {
121 assertEquals(properties[i].propertyType(), fromJSON.properties[i].propertyType, 'Unexpected serialized property type');
123 assertTrue(typeof(fromJSON.properties[i].propertyType) === 'undefined', 'Unexpected serialized property type');
127 if (properties[i].attributes() != debug.PropertyAttribute.None) {
128 assertEquals(properties[i].attributes(), fromJSON.properties[i].attributes, 'Unexpected serialized attributes');
130 assertTrue(typeof(fromJSON.properties[i].attributes) === 'undefined', 'Unexpected serialized attributes');
134 var o = refs.lookup(fromJSON.properties[i].ref);
137 assertEquals(properties[i].value().type(), o.type, 'Unexpected serialized property type for ' + name);
138 if (properties[i].value().isPrimitive()) {
139 if (properties[i].value().type() == "null" ||
140 properties[i].value().type() == "undefined") {
143 } else if (properties[i].value().type() == "number" &&
144 !isFinite(properties[i].value().value())) {
145 assertEquals(String(properties[i].value().value()), o.value,
148 assertEquals(properties[i].value().value(), o.value, 'Unexpected serialized property value for ' + name);
150 } else if (properties[i].value().isFunction()) {
151 assertEquals(properties[i].value().source(), o.source, 'Unexpected serialized property value for ' + name);
171 testObjectMirror(this, 'global', '', true); // Global object has special properties
181 // Test that non enumerable properties are part of the mirror