Revision: 13027
Author: [email protected]
Date: Wed Nov 21 04:50:49 2012
Log: Object.observe: Unblacklist some tests involving indexed
properties
These were erroneously disabled because they were expecting indexed
properties to be of Number type when appearing as the "name" in change
records. But the "name" property will always be a string. Fixed
assertRecordsEqual() to enforce this in expectations.
BUG=v8:2409
Review URL: https://codereview.chromium.org/11280105
Patch from Adam Klein <[email protected]>.
http://code.google.com/p/v8/source/detail?r=13027
Modified:
/branches/bleeding_edge/test/mjsunit/harmony/object-observe.js
=======================================
--- /branches/bleeding_edge/test/mjsunit/harmony/object-observe.js Tue Nov
20 06:45:21 2012
+++ /branches/bleeding_edge/test/mjsunit/harmony/object-observe.js Wed Nov
21 04:50:49 2012
@@ -56,6 +56,8 @@
assertCallbackRecords: function(recs) {
this.assertRecordCount(recs.length);
for (var i = 0; i < recs.length; i++) {
+ if ('name' in recs[i])
+ recs[i].name = String(recs[i].name);
print(i, JSON.stringify(this.records[i]), JSON.stringify(recs[i]));
assertSame(this.records[i].object, recs[i].object);
assertEquals('string', typeof recs[i].type);
@@ -495,11 +497,9 @@
// Cases that yield non-standard results.
// TODO(observe): ...or don't work yet.
function blacklisted(obj, prop) {
- return (obj instanceof Array && prop == 1) ||
- (obj instanceof Int32Array && prop == 1) ||
+ return (obj instanceof Int32Array && prop == 1) ||
(obj instanceof Int32Array && prop === "length") ||
- // TODO(observe): oldValue when deleting/reconfiguring indexed accessor
- prop == 1 ||
+ (obj instanceof ArrayBuffer && prop == 1) ||
// TODO(observe): oldValue when reconfiguring array length
(obj instanceof Array && prop === "length") ||
// TODO(observe): prototype property on functions
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev