зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1577371 - Fix timezone range check in TelemetrySession unit test. r=chutten
Differential Revision: https://phabricator.services.mozilla.com/D51032 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
733a6ca66b
Коммит
4971fdeb88
|
@ -266,12 +266,17 @@ function checkPayloadInfo(data, reason) {
|
|||
Date.parse(data.subsessionStartDate) >= Date.parse(data.sessionStartDate)
|
||||
);
|
||||
Assert.ok(data.profileSubsessionCounter >= data.subsessionCounter);
|
||||
|
||||
// According to https://en.wikipedia.org/wiki/List_of_UTC_time_offsets,
|
||||
// UTC offsets range from -12 to +14 hours.
|
||||
// Don't think the extremes of the range are affected by further
|
||||
// daylight-savings adjustments, but it is possible.
|
||||
Assert.ok(
|
||||
data.timezoneOffset >= -12 * 60,
|
||||
"The timezone must be in a valid range."
|
||||
);
|
||||
Assert.ok(
|
||||
data.timezoneOffset <= 12 * 60,
|
||||
data.timezoneOffset <= 14 * 60,
|
||||
"The timezone must be in a valid range."
|
||||
);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче