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

Side by Side Diff: test/mjsunit/es6/object-assign.js

Issue 1356793002: Remove on-by-default flag --harmony-object (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 3 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/js-perf-test/JSTests.json ('k') | test/mjsunit/harmony/object-assign.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Flags: --harmony-object
6
7 // Based on Mozilla Object.assign() tests 5 // Based on Mozilla Object.assign() tests
8 6
9 function checkDataProperty(object, propertyKey, value, writable, enumerable, con figurable) { 7 function checkDataProperty(object, propertyKey, value, writable, enumerable, con figurable) {
10 var desc = Object.getOwnPropertyDescriptor(object, propertyKey); 8 var desc = Object.getOwnPropertyDescriptor(object, propertyKey);
11 assertFalse(desc === undefined); 9 assertFalse(desc === undefined);
12 assertTrue('value' in desc); 10 assertTrue('value' in desc);
13 assertEquals(desc.value, value); 11 assertEquals(desc.value, value);
14 assertEquals(desc.writable, writable); 12 assertEquals(desc.writable, writable);
15 assertEquals(desc.enumerable, enumerable); 13 assertEquals(desc.enumerable, enumerable);
16 assertEquals(desc.configurable, configurable); 14 assertEquals(desc.configurable, configurable);
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 var ErrorB = function ErrorB() {}; 131 var ErrorB = function ErrorB() {};
134 var log = ""; 132 var log = "";
135 var source = { b: 1, a: 1 }; 133 var source = { b: 1, a: 1 };
136 var target = { 134 var target = {
137 set a(v) { log += "a"; throw new ErrorA }, 135 set a(v) { log += "a"; throw new ErrorA },
138 set b(v) { log += "b"; throw new ErrorB }, 136 set b(v) { log += "b"; throw new ErrorB },
139 }; 137 };
140 assertThrows(function() { return Object.assign(target, source); }, ErrorB); 138 assertThrows(function() { return Object.assign(target, source); }, ErrorB);
141 assertEquals(log, "b"); 139 assertEquals(log, "b");
142 })(); 140 })();
OLDNEW
« no previous file with comments | « test/js-perf-test/JSTests.json ('k') | test/mjsunit/harmony/object-assign.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698