Closed Bug 1724309 Opened 3 years ago Closed 3 years ago

[wpt-sync] Sync PR 29921 - App history: fix event.formData to be POST-only, plus tests

Categories

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

task

Tracking

(firefox93 fixed)

RESOLVED FIXED
93 Branch
Tracking Status
firefox93 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

b'Domenic Denicola <domenic@chromium.org>' wrote:

App history: fix event.formData to be POST-only, plus tests

  • event.formData is only supposed to be populated for POST form submissions. Fix that and update tests accordingly.

  • A number of tests were using e.preventDefault() after all the asserts. This was subpar because if the asserts failed the event would not be prevented, i.e. we would leave the test page. Put the e.preventDefault() first.

  • Test that event.formData does not appear for "traverse" or "reload" navigations even if the session history entry contains form data

Fixed: 1233710
Bug: 1183545
Change-Id: Ibc6307a9a8629df769c2eeae19b2d332af77843b
Reviewed-on: https://chromium-review.googlesource.com/3076282
WPT-Export-Revision: 554bfb12d0605605fd629cbed0f31e36608e65c6

CI Results

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

Total 6 tests and 1 subtests

Status Summary

Firefox

OK : 6
FAIL: 6

Safari

OK : 6
FAIL: 6

Links

GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

/app-history/navigate-event/navigate-form-get.html
<form> submission with GET method fires navigate event but with formData null: FAIL (Safari: FAIL)
/app-history/navigate-event/navigate-form-reload.html
reloading a page created from form submission results in formData of null, not the original form data: FAIL (Safari: FAIL)
/app-history/navigate-event/navigate-form-traverse.html
reloading a page created from form submission results in formData of null, not the original form data: FAIL (Safari: FAIL)
/app-history/navigate-event/navigate-form-userInitiated.html
<form> submission fires navigate event: FAIL (Safari: FAIL)
/app-history/navigate-event/navigate-form-with-target.html
<form> submission with a target fires navigate event in target window but not source: FAIL (Safari: FAIL)
/app-history/navigate-event/navigate-form.html
<form> submission fires navigate event: FAIL (Safari: FAIL)

Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/141770415b4c
[wpt PR 29921] - App history: fix event.formData to be POST-only, plus tests, a=testonly
https://hg.mozilla.org/integration/autoland/rev/d5a770eaa10e
[wpt PR 29921] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 93 Branch
You need to log in before you can comment on or make changes to this bug.