Bug 1752445 [wpt PR 32578] - App history: implement transition.finished promise,...
commitd613bf98cd14cc9bcd91b5d680b5ebcda176aa85
authorDomenic Denicola <domenic@chromium.org>
Sat, 26 Feb 2022 22:08:26 +0000 (26 22:08 +0000)
committermoz-wptsync-bot <wptsync@mozilla.com>
Mon, 7 Mar 2022 14:48:06 +0000 (7 14:48 +0000)
treefb5af4d5e9fd1590ee1161ab11af3b5b46fc2d24
parent27762a9a3a6630baad2b97a4ea2bce3a3243af52
Bug 1752445 [wpt PR 32578] - App history: implement transition.finished promise, a=testonly

Automatic update from web-platform-tests
App history: implement transition.finished promise

This also changes the abort reason used to signal abort on canceled navigations to be the same as the error passed to navigateerror and used for promise rejections. (This is tested by how the tests assert all errors are the same object.)

Also, in the course of working on this, I realized that NavigateReaction::_transition was always equal to AppHistory::_transition, so we could remove the former instead of checking them for equality. This led to a bit of refactoring.

This contains a large overhaul of tests related to appHistory.transition and further refinement of the previously-introduced tests related to ordering, to be more exhaustive and to use a small event-recorder framework. It consolidates all tests about appHistory.transition into the ordering tests (with the directory now renamed ordering-and-transition). This is because both types of tests were setting up various situations and checking either the ordering of events (often not exhaustively), or the properties of appHistory.transition, or both.

Bug: 1183545
Change-Id: Idc914a98a4dd6579d003806a992b710881944770
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3413934
Reviewed-by: Nate Chapin <japhet@chromium.org>
Commit-Queue: Domenic Denicola <domenic@chromium.org>
Cr-Commit-Position: refs/heads/main@{#966216}

--

wpt-commits: 197bef9817160f643ea4bc50ce980562c2a4b61f
wpt-pr: 32578
50 files changed:
testing/web-platform/tests/app-history/ordering-and-transition/README.md [moved from testing/web-platform/tests/app-history/ordering/README.md with 54% similarity]
testing/web-platform/tests/app-history/ordering-and-transition/back-same-document-transitionWhile-reject.html [new file with mode: 0644]
testing/web-platform/tests/app-history/ordering-and-transition/back-same-document-transitionWhile.html [new file with mode: 0644]
testing/web-platform/tests/app-history/ordering-and-transition/back-same-document.html [new file with mode: 0644]
testing/web-platform/tests/app-history/ordering-and-transition/currentchange-dispose-ordering.html [moved from testing/web-platform/tests/app-history/ordering/currentchange-dispose-ordering.html with 100% similarity]
testing/web-platform/tests/app-history/ordering-and-transition/location-href-canceled.html [new file with mode: 0644]
testing/web-platform/tests/app-history/ordering-and-transition/location-href-double-transitionWhile.html [new file with mode: 0644]
testing/web-platform/tests/app-history/ordering-and-transition/location-href-transitionWhile-reentrant.html [new file with mode: 0644]
testing/web-platform/tests/app-history/ordering-and-transition/location-href-transitionWhile-reject.html [new file with mode: 0644]
testing/web-platform/tests/app-history/ordering-and-transition/location-href-transitionWhile.html [new file with mode: 0644]
testing/web-platform/tests/app-history/ordering-and-transition/navigate-canceled.html [new file with mode: 0644]
testing/web-platform/tests/app-history/ordering-and-transition/navigate-cross-document-double.html [moved from testing/web-platform/tests/app-history/ordering/navigateerror-ordering-navigate-cross-document.html with 100% similarity]
testing/web-platform/tests/app-history/ordering-and-transition/navigate-cross-document-event-order.html [moved from testing/web-platform/tests/app-history/ordering/navigate-cross-document-event-order.html with 100% similarity]
testing/web-platform/tests/app-history/ordering-and-transition/navigate-double-transitionWhile.html [new file with mode: 0644]
testing/web-platform/tests/app-history/ordering-and-transition/navigate-in-transition-finished.html [new file with mode: 0644]
testing/web-platform/tests/app-history/ordering-and-transition/navigate-same-document-transitionWhile-reentrant.html [new file with mode: 0644]
testing/web-platform/tests/app-history/ordering-and-transition/navigate-same-document-transitionWhile-reject.html [new file with mode: 0644]
testing/web-platform/tests/app-history/ordering-and-transition/navigate-same-document.html [new file with mode: 0644]
testing/web-platform/tests/app-history/ordering-and-transition/navigate-transitionWhile-stop.html [new file with mode: 0644]
testing/web-platform/tests/app-history/ordering-and-transition/navigate-transitionWhile.html [new file with mode: 0644]
testing/web-platform/tests/app-history/ordering-and-transition/reload-canceled.html [new file with mode: 0644]
testing/web-platform/tests/app-history/ordering-and-transition/reload-transitionWhile-reject.html [new file with mode: 0644]
testing/web-platform/tests/app-history/ordering-and-transition/reload-transitionWhile.html [new file with mode: 0644]
testing/web-platform/tests/app-history/ordering-and-transition/resources/helpers.mjs [new file with mode: 0644]
testing/web-platform/tests/app-history/ordering-and-transition/resources/notify-top-early.html [moved from testing/web-platform/tests/app-history/ordering/resources/notify-top-early.html with 100% similarity]
testing/web-platform/tests/app-history/ordering-and-transition/transition-cross-document.html [moved from testing/web-platform/tests/app-history/transition/cross-document.html with 100% similarity]
testing/web-platform/tests/app-history/ordering-and-transition/transition-finished-mark-as-handled.html [new file with mode: 0644]
testing/web-platform/tests/app-history/ordering-and-transition/transition-realms-and-identity.html [new file with mode: 0644]
testing/web-platform/tests/app-history/ordering/back-same-document.html [deleted file]
testing/web-platform/tests/app-history/ordering/navigate-same-document-transitionWhile-reject.html [deleted file]
testing/web-platform/tests/app-history/ordering/navigate-same-document.html [deleted file]
testing/web-platform/tests/app-history/ordering/navigateerror-ordering-location-api-reentrant.html [deleted file]
testing/web-platform/tests/app-history/ordering/navigateerror-ordering-location-api.html [deleted file]
testing/web-platform/tests/app-history/ordering/navigateerror-ordering-transitionWhile-reentrant.html [deleted file]
testing/web-platform/tests/app-history/ordering/navigateerror-ordering-transitionWhile.html [deleted file]
testing/web-platform/tests/app-history/transition/back-transitionWhile-rejected.html [deleted file]
testing/web-platform/tests/app-history/transition/back-transitionWhile.html [deleted file]
testing/web-platform/tests/app-history/transition/fragment-nav-transitionWhile.html [deleted file]
testing/web-platform/tests/app-history/transition/fragment-nav.html [deleted file]
testing/web-platform/tests/app-history/transition/location-href-canceled.html [deleted file]
testing/web-platform/tests/app-history/transition/location-href-transitionWhile-rejected.html [deleted file]
testing/web-platform/tests/app-history/transition/location-href-transitionWhile.html [deleted file]
testing/web-platform/tests/app-history/transition/navigate-canceled.html [deleted file]
testing/web-platform/tests/app-history/transition/navigate-transitionWhile-interrupted.html [deleted file]
testing/web-platform/tests/app-history/transition/navigate-transitionWhile-rejected.html [deleted file]
testing/web-platform/tests/app-history/transition/navigate-transitionWhile-stop.html [deleted file]
testing/web-platform/tests/app-history/transition/navigate-transitionWhile.html [deleted file]
testing/web-platform/tests/app-history/transition/reload-canceled.html [deleted file]
testing/web-platform/tests/app-history/transition/reload-transitionWhile-rejected.html [deleted file]
testing/web-platform/tests/app-history/transition/reload-transitionWhile.html [deleted file]