Bug 1724309 [wpt PR 29921] - App history: fix event.formData to be POST-only, plus...
commit781308f0f9bd88461d053ac900abe174ba01c8dc
authorDomenic Denicola <domenic@chromium.org>
Fri, 13 Aug 2021 14:25:17 +0000 (13 14:25 +0000)
committermoz-wptsync-bot <wptsync@mozilla.com>
Sat, 14 Aug 2021 08:15:07 +0000 (14 08:15 +0000)
treeb6bdfd91652bd4d54fedcbc688d57eb0519ff1e9
parentab3f4409c80758e335f6c454249d4bad43c4d584
Bug 1724309 [wpt PR 29921] - App history: fix event.formData to be POST-only, plus tests, a=testonly

Automatic update from web-platform-tests
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/c/chromium/src/+/3076282
Commit-Queue: Domenic Denicola <domenic@chromium.org>
Reviewed-by: Nate Chapin <japhet@chromium.org>
Reviewed-by: Mason Freed <masonf@chromium.org>
Cr-Commit-Position: refs/heads/master@{#909507}

--

wpt-commits: bd68e1184f5068f85df9fc545e0c990a00ff204f
wpt-pr: 29921
testing/web-platform/tests/app-history/navigate-event/navigate-form-get.html [copied from testing/web-platform/tests/app-history/navigate-event/navigate-form.html with 82% similarity]
testing/web-platform/tests/app-history/navigate-event/navigate-form-reload.html [new file with mode: 0644]
testing/web-platform/tests/app-history/navigate-event/navigate-form-traverse.html [new file with mode: 0644]
testing/web-platform/tests/app-history/navigate-event/navigate-form-userInitiated.html
testing/web-platform/tests/app-history/navigate-event/navigate-form-with-target.html
testing/web-platform/tests/app-history/navigate-event/navigate-form.html