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

Side by Side Diff: test/intl/not-constructors.js

Issue 2587713002: [intl] Remove new.target check in Intl functions and method (Closed)
Patch Set: rebase Created 3 years, 12 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 | « src/js/i18n.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 2016 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 assertThrows(() => new Intl.getCanonicalLocales('en'), TypeError);
6
7 let collator = new Intl.Collator('en');
8 assertThrows(() => new collator.resolvedOptions(), TypeError);
9
10 assertThrows(() => new Intl.Collator.supportedLocalesOf('en'), TypeError);
11
12 let numberformat = new Intl.NumberFormat('en');
13 assertThrows(() => new numberformat.resolvedOptions(), TypeError);
14
15 assertThrows(() => new Intl.NumberFormat.supportedLocalesOf('en'), TypeError);
16
17 let datetimeformat = new Intl.DateTimeFormat('en');
18 assertThrows(() => new datetimeformat.resolvedOptions(), TypeError);
19 assertThrows(() => new datetimeformat.formatToParts(new Date()), TypeError);
20
21 assertThrows(() => new Intl.DateTimeFormat.supportedLocalesOf('en'), TypeError);
22
23 assertThrows(() => new "".localCompare(""), TypeError);
24
25 assertThrows(() => new "".normalize(), TypeError);
26 assertThrows(() => new "".toLocaleLowerCase(), TypeError);
27 assertThrows(() => new "".toLocaleUpperCase(), TypeError);
28 assertThrows(() => new "".toLowerCase(), TypeError);
29 assertThrows(() => new "".toUpperCase(), TypeError);
30
31 assertThrows(() => new 3..toLocaleString(), TypeError);
32 assertThrows(() => new (new Date()).toLocaleString(), TypeError);
33 assertThrows(() => new (new Date()).toLocaleDateString(), TypeError);
34 assertThrows(() => new (new Date()).toLocaleTimeString(), TypeError);
OLDNEW
« no previous file with comments | « src/js/i18n.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698