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

Unified Diff: test/mjsunit/override-read-only-property.js

Issue 10534090: Rollback of r11719, r11717, r11716, r11714, r11700, r11699, r11697, r11695, r11694 in trunk branch. (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Created 8 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/mjsunit/harmony/proxies.js ('k') | test/mjsunit/readonly.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/override-read-only-property.js
diff --git a/test/mjsunit/override-read-only-property.js b/test/mjsunit/override-read-only-property.js
index 2876ae1f849999992245d9f41b5ea1b4e2e690ec..b8fa5015a387b17e03ac437a232659dc6b9a7467 100644
--- a/test/mjsunit/override-read-only-property.js
+++ b/test/mjsunit/override-read-only-property.js
@@ -25,8 +25,6 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --es5_readonly
-
// According to ECMA-262, sections 8.6.2.2 and 8.6.2.3 you're not
// allowed to override read-only properties, not even if the read-only
// property is in the prototype chain.
@@ -40,19 +38,19 @@ F.prototype = Number;
var original_number_max = Number.MAX_VALUE;
// Assignment to a property which does not exist on the object itself,
-// but is read-only in a prototype does not take effect.
+// but is read-only in a prototype takes effect.
var f = new F();
assertEquals(original_number_max, f.MAX_VALUE);
f.MAX_VALUE = 42;
-assertEquals(original_number_max, f.MAX_VALUE);
+assertEquals(42, f.MAX_VALUE);
// Assignment to a property which does not exist on the object itself,
-// but is read-only in a prototype does not take effect.
+// but is read-only in a prototype takes effect.
f = new F();
with (f) {
MAX_VALUE = 42;
}
-assertEquals(original_number_max, f.MAX_VALUE);
+assertEquals(42, f.MAX_VALUE);
// Assignment to read-only property on the object itself is ignored.
Number.MAX_VALUE = 42;
« no previous file with comments | « test/mjsunit/harmony/proxies.js ('k') | test/mjsunit/readonly.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698