Bug 1529459 [wpt PR 15179] - Add tentative WPT to verify download in sandbox, a=testonly
commit83f96163199147490106b064422073b8e86af56b
authorYao Xiao <yaoxia@chromium.org>
Wed, 6 Mar 2019 12:34:11 +0000 (6 12:34 +0000)
committerJames Graham <james@hoppipolla.co.uk>
Fri, 15 Mar 2019 18:10:33 +0000 (15 18:10 +0000)
treea975d79cd9e81b213af9540318a7349f1171a146
parent21ced0276f6cf8fb724d96f38d417db284f95791
Bug 1529459 [wpt PR 15179] - 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, the server stores a token in stash.
And after a fixed period of time, we validate the token in the
stash to verify a download has happened. Also assert that no
additional navigation should happen.

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, 927183
Change-Id: I7b90d46504603f60938a46acee9fbd7d1483988b
Reviewed-on: https://chromium-review.googlesource.com/c/1446395
Reviewed-by: Mike West <mkwst@chromium.org>
Commit-Queue: Yao Xiao <yaoxia@chromium.org>
Cr-Commit-Position: refs/heads/master@{#634249}

--

wpt-commits: 245334dcc1695c3dbc4e1fcdbe849224234093fc
wpt-pr: 15179
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]