Bug 1863338 [wpt PR 42973] - Make XHR document.lastModified test handle summer to...
commit593a4a2f374903bce9213b6083630e5ce1a5dd19
authorL. David Baron <dbaron@chromium.org>
Wed, 8 Nov 2023 08:54:34 +0000 (8 08:54 +0000)
committermoz-wptsync-bot <wptsync@mozilla.com>
Tue, 14 Nov 2023 09:51:49 +0000 (14 09:51 +0000)
tree173a5cba2c589a6db202087e0229a233f634ec3a
parent9ef0aa57eb2ed7e8bc75ce290ae022a3c2c4ec4d
Bug 1863338 [wpt PR 42973] - Make XHR document.lastModified test handle summer to winter time change., a=testonly

Automatic update from web-platform-tests
Make XHR document.lastModified test handle summer to winter time change.

document.lastModified is a legacy API which is tricky to test because it
reports times in the local timezone, but without any timezone indicator.
Such times cannot be reliably converted to UTC, because times during the
hour on either side of the change from summer to winter time produce the
same local time string as times on the other side of the change.

This change moves the code in document-lastModified-01.html that already
deals with this complexity into a shared support script and then uses it
to fix the equivalent test in responsexml-document-properties.htm, which
still has failures around the change from summer time to winter time, as
document-lastModified-01.html used to have.  This also renames the moved
function and constant to fit better in a separate support script.

Bug: 1382239
Change-Id: I3f45cdaae3908016235c715f8e7400b6eaf6492b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5006704
Reviewed-by: Mason Freed <masonf@chromium.org>
Commit-Queue: David Baron <dbaron@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1220700}

--

wpt-commits: 4bd41bb00b97d753b7c0a75146c23243296918b2
wpt-pr: 42973
testing/web-platform/tests/html/dom/documents/resource-metadata-management/document-lastModified-01.html
testing/web-platform/tests/html/dom/documents/resource-metadata-management/support/document-lastModified-utils.js [new file with mode: 0644]
testing/web-platform/tests/xhr/responsexml-document-properties.htm