Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Side by Side Diff: test/mjsunit/mirror-object.js

Issue 6529055: [Isolates] Merge crankshaft (r5922 from bleeding_edge). (Closed)
Patch Set: Win32 port Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « test/mjsunit/fuzz-natives.js ('k') | test/mjsunit/mjsunit.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 67
68 var names = mirror.propertyNames(); 68 var names = mirror.propertyNames();
69 var properties = mirror.properties() 69 var properties = mirror.properties()
70 assertEquals(names.length, properties.length); 70 assertEquals(names.length, properties.length);
71 for (var i = 0; i < properties.length; i++) { 71 for (var i = 0; i < properties.length; i++) {
72 assertTrue(properties[i] instanceof debug.Mirror, 'Unexpected mirror hierach y'); 72 assertTrue(properties[i] instanceof debug.Mirror, 'Unexpected mirror hierach y');
73 assertTrue(properties[i] instanceof debug.PropertyMirror, 'Unexpected mirror hierachy'); 73 assertTrue(properties[i] instanceof debug.PropertyMirror, 'Unexpected mirror hierachy');
74 assertEquals('property', properties[i].type(), 'Unexpected mirror type'); 74 assertEquals('property', properties[i].type(), 'Unexpected mirror type');
75 assertEquals(names[i], properties[i].name(), 'Unexpected property name'); 75 assertEquals(names[i], properties[i].name(), 'Unexpected property name');
76 } 76 }
77 77
78 for (var p in obj) { 78 for (var p in obj) {
79 var property_mirror = mirror.property(p); 79 var property_mirror = mirror.property(p);
80 assertTrue(property_mirror instanceof debug.PropertyMirror); 80 assertTrue(property_mirror instanceof debug.PropertyMirror);
81 assertEquals(p, property_mirror.name()); 81 assertEquals(p, property_mirror.name());
82 // If the object has some special properties don't test for these. 82 // If the object has some special properties don't test for these.
83 if (!hasSpecialProperties) { 83 if (!hasSpecialProperties) {
84 assertEquals(0, property_mirror.attributes(), property_mirror.name()); 84 assertEquals(0, property_mirror.attributes(), property_mirror.name());
85 assertFalse(property_mirror.isReadOnly()); 85 assertFalse(property_mirror.isReadOnly());
86 assertTrue(property_mirror.isEnum()); 86 assertTrue(property_mirror.isEnum());
87 assertTrue(property_mirror.canDelete()); 87 assertTrue(property_mirror.canDelete());
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 218
219 // Test objects with native accessors. 219 // Test objects with native accessors.
220 mirror = debug.MakeMirror(new String('abc')); 220 mirror = debug.MakeMirror(new String('abc'));
221 assertTrue(mirror instanceof debug.ObjectMirror); 221 assertTrue(mirror instanceof debug.ObjectMirror);
222 assertFalse(mirror.property('length').hasGetter()); 222 assertFalse(mirror.property('length').hasGetter());
223 assertFalse(mirror.property('length').hasSetter()); 223 assertFalse(mirror.property('length').hasSetter());
224 assertTrue(mirror.property('length').isNative()); 224 assertTrue(mirror.property('length').isNative());
225 assertEquals('a', mirror.property(0).value().value()); 225 assertEquals('a', mirror.property(0).value().value());
226 assertEquals('b', mirror.property(1).value().value()); 226 assertEquals('b', mirror.property(1).value().value());
227 assertEquals('c', mirror.property(2).value().value()); 227 assertEquals('c', mirror.property(2).value().value());
OLDNEW
« no previous file with comments | « test/mjsunit/fuzz-natives.js ('k') | test/mjsunit/mjsunit.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698