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

Side by Side Diff: test/mjsunit/property-name-eval-arguments.js

Issue 899363002: Allow eval and arguments as property names (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Cleanup based on code review Created 5 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/harmony/method-name-eval-arguments.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5
6 (function TestSloppyMode() {
7 var e = 1, a = 2;
8 var o = {
9 get eval() {
10 return e;
11 },
12 set eval(v) {
13 e = v;
14 },
15 get arguments() {
16 return a;
17 },
18 set arguments(v) {
19 a = v;
20 },
21 };
22
23 assertEquals(1, o.eval);
24 o.eval = 3;
25 assertEquals(3, e);
26
27 assertEquals(2, o.arguments);
28 o.arguments = 4;
29 assertEquals(4, a);
30 })();
31
32
33 (function TestStrictMode() {
34 'use strict';
35
36 var e = 1, a = 2;
37 var o = {
38 get eval() {
39 return e;
40 },
41 set eval(v) {
42 e = v;
43 },
44 get arguments() {
45 return a;
46 },
47 set arguments(v) {
48 a = v;
49 },
50 };
51
52 assertEquals(1, o.eval);
53 o.eval = 3;
54 assertEquals(3, e);
55
56 assertEquals(2, o.arguments);
57 o.arguments = 4;
58 assertEquals(4, a);
59 })();
OLDNEW
« no previous file with comments | « test/mjsunit/harmony/method-name-eval-arguments.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698