Bug 1523562 [wpt PR 14944] - Add tentative WPT to verify download in sandbox, a=testonly
commitc178abebd9dbe4beacf5f2f8a7bee04ab3b21ae1
authorYao Xiao <yaoxia@chromium.org>
Fri, 1 Feb 2019 11:40:17 +0000 (1 11:40 +0000)
committerJames Graham <james@hoppipolla.co.uk>
Tue, 5 Feb 2019 17:54:38 +0000 (5 17:54 +0000)
tree4a38e161ca825f817f3e5d7fd02148157c11e527
parenta7587b2da8a19de587a66b9bdec4dd51a0ac476d
Bug 1523562 [wpt PR 14944] - Add tentative WPT to verify download in sandbox, a=testonly

Automatic update from web-platform-tests
Add tentative WPT to verify download in sandbox

General testing idea:
For a network request, we store a token in stash. And after a fixed
period of time sufficient for the download to finish, if there are
any, we validate the token in the stash to see if the network request
was issued and finished successfully.

In the case of <a download> where the decision of download can be made
before resource fetching, the server sets the token immediately.

In the case of navigation to a download, the server will stream a
response over 1 seconds and set the token at the end only when the
socket has been connected. So it is able to detect any download
cancellation while fetching the resource.

Bug: 539938
Change-Id: I734c8cc18d1f761f16646c6b859a6b731ab40ff5
Reviewed-on: https://chromium-review.googlesource.com/c/1422667
Commit-Queue: Yao Xiao <yaoxia@chromium.org>
Reviewed-by: Mike West <mkwst@chromium.org>
Cr-Commit-Position: refs/heads/master@{#626289}

--

wpt-commits: 3b1b4cff2e7078df6d6e1be8bd04e3daf551c727
wpt-pr: 14944
testing/web-platform/tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_anchor_download_allow_downloads_without_user_activation.sub.tentative.html [new file with mode: 0644]
testing/web-platform/tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_anchor_download_block_downloads_without_user_activation.sub.tentative.html [new file with mode: 0644]
testing/web-platform/tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigation_download_allow_downloads_without_user_activation.sub.tentative.html [new file with mode: 0644]
testing/web-platform/tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigation_download_block_downloads_without_user_activation.sub.tentative.html [new file with mode: 0644]
testing/web-platform/tests/html/semantics/embedded-content/the-iframe-element/support/download_stash.py [new file with mode: 0644]
testing/web-platform/tests/html/semantics/embedded-content/the-iframe-element/support/iframe_sandbox_download_helper.js [new file with mode: 0644]