Commit 4751776d authored by rossberg@chromium.org's avatar rossberg@chromium.org

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 <adamk@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13027 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent ce81fb7b
......@@ -56,6 +56,8 @@ function createObserver() {
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 @@ var properties = ["a", "1", 1, "length", "prototype"];
// 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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment