Closed Bug 1556674 Opened 5 years ago Closed 5 years ago

[wpt-sync] Sync PR 16381 - Add test for Joint session state manipulation

Categories

(Core :: DOM: Core & HTML, defect, P4)

defect

Tracking

()

RESOLVED FIXED
mozilla69
Tracking Status
firefox69 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync upstream])

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

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

Justas Brazauskas <brazauskasjustas@gmail.com> wrote:

Add test for Joint session state manipulation

Some browsers don't seem to agree on how top-level container should handle the navigation of the child, particularly around if the state should be overwritten by the child or not. This is particularly prominent in WebKit based browsers, such as Safari.

As far as I've tested this, it appears that these browsers pass the test:

  • Chrome 73.0.3683.103
  • Chrome Canary 75.0.3767.0
  • Firefox ESR 60

These browsers don't pass the test:

  • Safari 12.1 (14607.1.40.1.4)
  • Safari TP (Safari 12.2, WebKit 14608.1.14)

This leads me to believe that Chrome & Firefox's implementation is correct, thus this test is geared to pass in these browsers. Ideally we'd follow the history spec, but as far as I'm aware, it does not specify how browsers should work in this particular scenario.

Looking at this pragmatically as well, it appears that keeping the window.history.state in the navigation makes sense, as the top window did not actually change it's state, just the child iframe, even if navigation occurred and going back in history means that child iframe will navigate back. That, however, does not alter the state of the parent window, which is why it appears that implementation in Chrome/Firefox seems correct.

References

Component: web-platform-tests → DOM: Core & HTML
Product: Testing → Core
Pushed by james@hoppipolla.co.uk:
https://hg.mozilla.org/integration/mozilla-inbound/rev/939fc1fd56ff
[wpt PR 16381] - Add test for Joint session state manipulation, a=testonly
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla69
Whiteboard: [wptsync downstream] → [wptsync upstream]
You need to log in before you can comment on or make changes to this bug.