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

Side by Side Diff: test/mjsunit/regress/regress-crbug-487322.js

Issue 1529363005: tzname check fix (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: todo comment added for Etc/GMT{offset} Created 5 years 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/regress/regress-crbug-364374.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 if (this.Intl) {
6 // Normalizes Kat{h,}mandu (chromium:487322)
7 // According to the IANA timezone db, Kathmandu is the current canonical
8 // name, but ICU got it backward. To make this test robust against a future
9 // ICU change ( http://bugs.icu-project.org/trac/ticket/12044 ),
10 // just check that Kat(h)mandu is resolved identically.
11 df1 = new Intl.DateTimeFormat('en-US', {'timeZone': 'Asia/Katmandu'})
12 df2 = new Intl.DateTimeFormat('en-US', {'timeZone': 'Asia/Kathmandu'})
13 assertEquals(df1.resolvedOptions().timeZone, df2.resolvedOptions().timeZone);
14
15 // Normalizes Ulan_Bator to Ulaanbaatar. Unlike Kat(h)mandu, ICU got this
16 // right so that we make sure that Ulan_Bator is resolved to Ulaanbaatar.
17 df = new Intl.DateTimeFormat('en-US', {'timeZone': 'Asia/Ulaanbaatar'})
18 assertEquals('Asia/Ulaanbaatar', df.resolvedOptions().timeZone);
19
20 df = new Intl.DateTimeFormat('en-US', {'timeZone': 'Asia/Ulan_Bator'})
21 assertEquals('Asia/Ulaanbaatar', df.resolvedOptions().timeZone);
22
23 // Throws for unsupported time zones.
24 assertThrows(() => Intl.DateTimeFormat(undefined, {timeZone: 'Aurope/Paris'})) ;
25 }
OLDNEW
« no previous file with comments | « test/mjsunit/regress/regress-crbug-364374.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698