Closed Bug 1705146 Opened 4 years ago Closed 3 years ago

[wpt-sync] Sync PR 28480 - Attempt to test replace before load

Categories

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

task

Tracking

()

RESOLVED FIXED
91 Branch
Tracking Status
firefox91 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

(Blocks 1 open bug, )

Details

(Whiteboard: [wptsync downstream])

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

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

b'Domenic Denicola <d@domenic.me>' wrote:

Attempt to test replace before load

This is an attempt to test the situation in https://github.com/whatwg/html/issues/6579 but it doesn't seem to be working so I'm uploading it for help debugging.

The setup:

  • Insert a sentinel iframe navigated to /common/blank.html?sentinelstart. Wait for it to tally load (plus a setTimeout(,0) for good measure.)

  • Insert a system-under-test iframe that contains <script>window.open("/common/blank.html?thereplacement", "_self")</script>. The idea is that this should do a replace since that window.open() call happens before the iframe loads.

  • Wait for that to load /common/blank.html?thereplacement, plus a setTimeout(,0) for good measure.

  • Call history.back(). This should navigate the sentinel iframe, because it can't navigate the system-under-test iframe because that has only one session history entry (because it was replaced).

This works in Firefox, which passes all of these tests. It works poorly in Chrome:

  • The window.open() test never passes
  • The location.assign() and location setter tests are flaky. I can get them to pass in a fresh window but they seem to timeout sometimes when I reload or navigate to them from the directory listing or even when I open them in a background tab.

This is contrary to what I was led to believe in https://github.com/whatwg/html/issues/6579 where I thought Chrome always did a replace and Firefox did not (at least for the window.open() case). So I suspect something is wrong with how I wrote the tests.

Component: web-platform-tests → DOM: Core & HTML
Product: Testing → Core

CI Results

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

Total 37 tests and 1 subtests

Status Summary

Firefox

OK : 37
PASS : 32
FAIL : 15

Chrome

OK : 37
PASS : 45
FAIL : 2

Safari

OK : 18
PASS : 8
FAIL : 10
TIMEOUT: 6
ERROR : 15

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

/html/browsers/browsing-the-web/navigating-across-documents/replace-before-load/form-requestsubmit.html
Replace before load, triggered by formElement.requestSubmit(): FAIL (Chrome: PASS, Safari: FAIL)
/html/browsers/browsing-the-web/navigating-across-documents/replace-before-load/form-submit-button-click.html
Replace before load, triggered by submitButton.click(): FAIL (Chrome: PASS)
/html/browsers/browsing-the-web/navigating-across-documents/replace-before-load/form-submit.html
Replace before load, triggered by formElement.submit(): FAIL (Chrome: PASS)
/html/browsers/browsing-the-web/navigating-across-documents/replace-before-load/location-assign-user-click.html
NO replace before load, triggered by location.assign(): FAIL (Chrome: PASS, Safari: FAIL)
/html/browsers/browsing-the-web/navigating-across-documents/replace-before-load/location-setter-user-click.html
href: FAIL (Chrome: PASS)
search: FAIL (Chrome: PASS)
hash: FAIL (Chrome: PASS)
/html/browsers/browsing-the-web/navigating-across-documents/replace-before-load/location-setter-user-mouseup.html
href: FAIL (Chrome: PASS)
search: FAIL (Chrome: PASS)
hash: FAIL (Chrome: PASS)
/html/browsers/browsing-the-web/navigating-across-documents/replace-before-load/window-open-popup-during-load.html
No replace before load, triggered by window.open() on a non-_self window: FAIL (Chrome: FAIL, Safari: FAIL)
/html/browsers/browsing-the-web/navigating-across-documents/replace-before-load/window-open-popup-during-pageshow.html
No replace before load, triggered by window.open() on a non-_self window: FAIL (Chrome: FAIL, Safari: FAIL)
/html/browsers/browsing-the-web/navigating-across-documents/replace-before-load/window-open-self-during-load.html
No replace during load, triggered by window.open(_self) on an iframe: FAIL (Chrome: PASS, Safari: FAIL)
/html/browsers/browsing-the-web/navigating-across-documents/replace-before-load/window-open-self-during-pageshow.html
No replace during pageshow, triggered by window.open(_self) on an iframe: FAIL (Chrome: PASS, Safari: FAIL)
/html/browsers/browsing-the-web/navigating-across-documents/replace-before-load/window-open-self.html
No replace before load, triggered by window.open(_self) on an iframe: FAIL (Chrome: PASS, Safari: FAIL)

Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/9f60adfd3e81 [wpt PR 28480] - Attempt to test replace before load, a=testonly https://hg.mozilla.org/integration/autoland/rev/db680169140c [wpt PR 28480] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 91 Branch
You need to log in before you can comment on or make changes to this bug.