Fix geolocation mock to calculate the correct epoch delta
When calculating the delta between Windows Epoch and Unix Epoch in geolocation mock, Date constructor (that interpretes parameters in terms of *local* time) was used for the Windows epoch (1601-01-01) and Unix epoch (1970-01-01) assuming that the timezone offset didn't change between 1601 and 1970. That assumption does not hold any more when ICU is used to take into account the historical timezone offset changes. As a result, geolocation-api/timestamp.html test failed when the fix for v8:3547 was landed. (https://chromium-review.googlesource.com/c/v8/v8/+/572148 ). This CL uses Date.UTC() to avoid the issue and is a pre-requisite to relanding the above v8 CL. Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_layout_ng Bug: v8:3547, chromium:417640, v8:5714 Test: layout test: geolocation-api/* Change-Id: Iaf718c2818fa9a5f5c64136a38579a1fcafe7805 Reviewed-on: https://chromium-review.googlesource.com/994343Reviewed-by:Jochen Eisinger <jochen@chromium.org> Reviewed-by:
Reilly Grant <reillyg@chromium.org> Commit-Queue: Jungshik Shin <jshin@chromium.org> Cr-Commit-Position: refs/heads/master@{#548095}
Showing
Please register or sign in to comment