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

Side by Side Diff: test/mjsunit/harmony/harmony-string-pad-start.js

Issue 2610853010: Include harmony-string-padding.js in the context snapshot (Closed)
Patch Set: Rename again Created 3 years, 11 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/harmony-string-pad-end.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
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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-string-padding
6
7 (function TestMeta() { 5 (function TestMeta() {
8 assertEquals(1, String.prototype.padStart.length); 6 assertEquals(1, String.prototype.padStart.length);
9 assertEquals("function", typeof String.prototype.padStart); 7 assertEquals("function", typeof String.prototype.padStart);
10 assertEquals(Object.getPrototypeOf(Function), 8 assertEquals(Object.getPrototypeOf(Function),
11 Object.getPrototypeOf(String.prototype.padStart)); 9 Object.getPrototypeOf(String.prototype.padStart));
12 assertEquals("padStart", String.prototype.padStart.name); 10 assertEquals("padStart", String.prototype.padStart.name);
13 11
14 var desc = Object.getOwnPropertyDescriptor(String.prototype, "padStart"); 12 var desc = Object.getOwnPropertyDescriptor(String.prototype, "padStart");
15 assertFalse(desc.enumerable); 13 assertFalse(desc.enumerable);
16 assertTrue(desc.configurable); 14 assertTrue(desc.configurable);
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 var actual = "123".padStart(i, "xoxo"); 87 var actual = "123".padStart(i, "xoxo");
90 assertEquals(expected, actual); 88 assertEquals(expected, actual);
91 assertEquals(i > "123".length ? i : 3, actual.length); 89 assertEquals(i > "123".length ? i : 3, actual.length);
92 } 90 }
93 })(); 91 })();
94 92
95 93
96 (function TestTruncation() { 94 (function TestTruncation() {
97 assertEquals("ba", "a".padStart(2, "bc")); 95 assertEquals("ba", "a".padStart(2, "bc"));
98 })(); 96 })();
OLDNEW
« no previous file with comments | « test/mjsunit/harmony/harmony-string-pad-end.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698