From 9b73a187ce53ab271ccc45f93111c1dd1a630380 Mon Sep 17 00:00:00 2001 From: Jeff Walden Date: Fri, 30 Dec 2011 21:23:36 -0600 Subject: [PATCH] Adjust the test for bug 713944 to work in the browser and reenable it there. r=unbust --HG-- extra : rebase_source : 790fe3e662d723eddb956d156654b931327c603d --- js/src/tests/ecma_5/Object/jstests.list | 2 +- .../proto-property-change-writability-set.js | 26 ++++++++++++++----- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/js/src/tests/ecma_5/Object/jstests.list b/js/src/tests/ecma_5/Object/jstests.list index cb0adde04dbe..3bad7957e167 100644 --- a/js/src/tests/ecma_5/Object/jstests.list +++ b/js/src/tests/ecma_5/Object/jstests.list @@ -38,7 +38,7 @@ skip-if(!xulRuntime.shell) script 15.2.3.6-dictionary-redefinition-8-of-8.js # u script 15.2.3.6-define-over-method.js script mutation-prevention-methods.js script object-toString-01.js -skip script proto-property-change-writability-set.js # needs browser/shell fixup, happening shortly +script proto-property-change-writability-set.js script vacuous-accessor-unqualified-name.js script add-property-non-extensible.js skip-if(!xulRuntime.shell) script freeze-global-eval-const.js # uses evalcx diff --git a/js/src/tests/ecma_5/Object/proto-property-change-writability-set.js b/js/src/tests/ecma_5/Object/proto-property-change-writability-set.js index f9b0eebd48e6..d81f844e9316 100644 --- a/js/src/tests/ecma_5/Object/proto-property-change-writability-set.js +++ b/js/src/tests/ecma_5/Object/proto-property-change-writability-set.js @@ -7,26 +7,38 @@ * Jason Orendorff */ +//----------------------------------------------------------------------------- +var BUGNUMBER = 713944; +var summary = + "Don't assert anything about a shape from the property cache until it's " + + "known the cache entry matches"; + +print(BUGNUMBER + ": " + summary); + +/************** + * BEGIN TEST * + **************/ + var accDesc = { set: function() {} }; var dataDesc = { value: 3 }; function f() { - constructor = {}; + propertyIsEnumerable = {}; } function g() { - constructor = {}; + propertyIsEnumerable = {}; } -Object.defineProperty(Object.prototype, "constructor", accDesc); +Object.defineProperty(Object.prototype, "propertyIsEnumerable", accDesc); f(); -Object.defineProperty(Object.prototype, "constructor", dataDesc); -assertEq(constructor, 3); +Object.defineProperty(Object.prototype, "propertyIsEnumerable", dataDesc); +assertEq(propertyIsEnumerable, 3); f(); -assertEq(constructor, 3); +assertEq(propertyIsEnumerable, 3); g(); -assertEq(constructor, 3); +assertEq(propertyIsEnumerable, 3);