Closed Bug 1745748 Opened 2 years ago Closed 2 years ago

[wpt-sync] Sync PR 30858 - appHistory transitionWhile() custom start/stop notifications

Categories

(Testing :: web-platform-tests, task, P4)

task

Tracking

(firefox97 fixed)

RESOLVED FIXED
97 Branch
Tracking Status
firefox97 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 30858 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/30858
Details from upstream follow.

Nate Chapin <japhet@chromium.org> wrote:

appHistory transitionWhile() custom start/stop notifications

The appHistory prototype introduces a way for web developers to
intercept a navigation and cause it to be treated as an async
same-document navigation. AppHistoryNavigateEvent has a
function called transitionWhile() that takes a promise and considers
the navigation complete when the promise is resolved.

In order to have a transitionWhile()-intercepted navigation be a full
fledged navigation, the browser UI should show a navigation in process
until the promise is resolved. This requires:

  1. Making same-documents generally use the same start/stop
    navigation tracking as cross-document navigations in blink.
  2. Special-casing transitionWhile() to not immediately complete like
    other same-document navigations, and instead completing when the
    promise resolves.
  3. Adding logic to FrameLoader::DidFinishNavigation() to ensure that
    it does not erroneously complete while AppHistory thinks a
    navigation is still in progress.
  4. Browser-side special-casing to ensure that the browser UI
    shows the navigation-in-progress UI elements for transitionWhile().
    Currently, it only does this for cross-document navigations.

Bug: 1241202
Change-Id: I3fccebded69a74c9c8679501755acb531fa05841
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3049791
Reviewed-by: Sreeja Kamishetty \<sreejakshetty@chromium.org>
Reviewed-by: Charles Reis \<creis@chromium.org>
Reviewed-by: Rakina Zata Amni \<rakina@chromium.org>
Reviewed-by: Domenic Denicola \<domenic@chromium.org>
Reviewed-by: Alexander Timin \<altimin@chromium.org>
Commit-Queue: Nate Chapin \<japhet@chromium.org>
Cr-Commit-Position: refs/heads/main@{#950735}

CI Results

Ran 11 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 1 tests and 1 subtests

Status Summary

Firefox

OK : 1
FAIL: 1

Chrome

OK : 1
FAIL: 1

Safari

OK : 1
FAIL: 1

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

/app-history/navigate/navigate-transitionWhile-reject-event-order.html
navigate() event ordering for same-document navigation: FAIL (Chrome: FAIL, Safari: FAIL)

Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/83f8301f8ba6
[wpt PR 30858] - appHistory transitionWhile() custom start/stop notifications, a=testonly
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 97 Branch
You need to log in before you can comment on or make changes to this bug.