mac: Fix SystemSnapshotMacTest.TimeZone on macOS 10.12.4

macOS 10.12.4 includes an updated timezone database. Abbreviations for
Australia/Eucla (formerly ACWST, now +0845) and Australia/Lord_Howe
(formerly LHST/LHDT, now +1030/+11) were dropped in IANA TZ 2017a. The
test is updated so that the abbreviations for these two time zones are
no longer checked.

References:
a25d615495
https://mm.icann.org/pipermail/tz/2017-February/024837.html

Test: crashpad_snapshot_test SystemSnapshotMacTest.TimeZone
Change-Id: I2845c6aee7b7b6a8fcdc6faa4d5cefe5e0f72e5c
Reviewed-on: https://chromium-review.googlesource.com/461500
Reviewed-by: Scott Graham <scottmg@chromium.org>
This commit is contained in:
Mark Mentovai 2017-03-28 13:03:36 -04:00
parent 449dfc4b5d
commit d6837b2b86

View File

@ -207,6 +207,9 @@ TEST_F(SystemSnapshotMacTest, TimeZone) {
// Test a variety of time zones. Some of these observe daylight saving time,
// some dont. Some used to but no longer do. Some have uncommon UTC offsets.
// standard_name and daylight_name can be nullptr where no name exists to
// verify, as may happen when some versions of the timezone database carry
// invented names and others do not.
const struct {
const char* tz;
bool observes_dst;
@ -229,8 +232,8 @@ TEST_F(SystemSnapshotMacTest, TimeZone) {
{"Australia/Adelaide", true, 9.5, 10.5, "ACST", "ACDT"},
{"Australia/Brisbane", false, 10, 10, "AEST", "AEST"},
{"Australia/Darwin", false, 9.5, 9.5, "ACST", "ACST"},
{"Australia/Eucla", false, 8.75, 8.75, "ACWST", "ACWST"},
{"Australia/Lord_Howe", true, 10.5, 11, "LHST", "LHDT"},
{"Australia/Eucla", false, 8.75, 8.75, nullptr, nullptr},
{"Australia/Lord_Howe", true, 10.5, 11, nullptr, nullptr},
{"Australia/Perth", false, 8, 8, "AWST", "AWST"},
{"Australia/Sydney", true, 10, 11, "AEST", "AEDT"},
{"Europe/Bucharest", true, 2, 3, "EET", "EEST"},
@ -263,8 +266,12 @@ TEST_F(SystemSnapshotMacTest, TimeZone) {
standard_offset_seconds);
EXPECT_EQ(test_time_zone.daylight_offset_hours * 60 * 60,
daylight_offset_seconds);
EXPECT_EQ(test_time_zone.standard_name, standard_name);
EXPECT_EQ(test_time_zone.daylight_name, daylight_name);
if (test_time_zone.standard_name) {
EXPECT_EQ(test_time_zone.standard_name, standard_name);
}
if (test_time_zone.daylight_name) {
EXPECT_EQ(test_time_zone.daylight_name, daylight_name);
}
}
}