Bug 1809179 [wpt PR 37810] - Refactor nested-navigations resource-timing flow, a...
commitcd983def8749df5d340d502f749727e52cc250b1
authorNoam Rosenthal <nrosenthal@chromium.org>
Mon, 16 Jan 2023 14:21:49 +0000 (16 14:21 +0000)
committermoz-wptsync-bot <wptsync@mozilla.com>
Wed, 18 Jan 2023 09:10:51 +0000 (18 09:10 +0000)
tree720578648ff11f5651ce7c2f11eb54f495cc8632
parentdf0eeb91481e3c6314fad58aaccf91d1bc8ee391
Bug 1809179 [wpt PR 37810] - Refactor nested-navigations resource-timing flow, a=testonly

Automatic update from web-platform-tests
Refactor nested-navigations resource-timing flow

This changes how frames, iframes & objects decide how to report
their navigations as resource timing entries to their parent:

- Any frame-initiated navigation (e.g. iframe.src change) is
  reported as an entry. This complies with current spec.
- For nested navigations that fail Timing-Allow-Origin, we don't
  report the normal responseEnd - instead we report the load event
  time as the responseEnd, to prevent leakage of navigation-related
  cross-origin information
  (see https://github.com/w3c/resource-timing/issues/340)

This incidentally fixes other existing issues with nested navigations
and resource timing, such as flaky tests and inconsistencies regarding
restored iframes.

Bug: 1404695
Bug: 1348080
Bug: 1290721
Bug: 1380078
Bug: 1378015
Bug: 957181

Spec changes: https://github.com/whatwg/html/pull/8643
https://github.com/whatwg/fetch/pull/1579

Change-Id: I010b026788193cc77a7de3f3d75304602f41fcd5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4145963
Reviewed-by: Yoav Weiss <yoavweiss@chromium.org>
Commit-Queue: Noam Rosenthal <nrosenthal@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1091970}

--

wpt-commits: 6cd6741bc20cd6b3ad9f95d19123b7850c696d79
wpt-pr: 37810
testing/web-platform/tests/performance-timeline/resources/parent-frame-with-cross-origin-child.sub.html
testing/web-platform/tests/performance-timeline/resources/parent-frame-with-same-origin-child.html
testing/web-platform/tests/resource-timing/iframe-sequence-of-events.html
testing/web-platform/tests/resource-timing/nested-nav-fallback-timing.html [new file with mode: 0644]
testing/web-platform/tests/resource-timing/resources/delay-load.html [new file with mode: 0644]
testing/web-platform/tests/resource-timing/resources/frame-timing.js