Bug 1681342 [wpt PR 26802] - Add WPT test about sandbox_flags and window reuse.,...
commitf2b7b596e12afaadb528b6c47e09fbc588a7aa5b
authorarthursonzogni <arthursonzogni@chromium.org>
Fri, 11 Dec 2020 12:17:55 +0000 (11 12:17 +0000)
committermoz-wptsync-bot <wptsync@mozilla.com>
Mon, 14 Dec 2020 09:48:39 +0000 (14 09:48 +0000)
tree313aef1e8bbc51cb6e324a6631047087522deaa0
parent63a10df3abc5e7fbc01af69b2bf06322a7ea3cf2
Bug 1681342 [wpt PR 26802] - Add WPT test about sandbox_flags and window reuse., a=testonly

Automatic update from web-platform-tests
Add WPT test about sandbox_flags and window reuse.

I found something interesting. The initial empty document's javascript
windows is reused for same-origin new document. We apply the sandbox
flags to the window, instead of documents, which is very weird. My
hypothesis: we are enforcing sandbox_flags twice into the same window.
The bug might be caused by the remanence of the initial sandbox flags?
This turned out to be the case. \o/

This patch adds a WPT test. It triggers a DCHECK in the browser process.

Bug: 1041376
Change-Id: Ic7543148b0c2571e95c0c4dfe6df50563254981b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2578957
Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Ian Clelland <iclelland@chromium.org>
Reviewed-by: Ɓukasz Anforowicz <lukasza@chromium.org>
Cr-Commit-Position: refs/heads/master@{#834826}

--

wpt-commits: 02df604cbf7d272dfa2e75533f345ba8ae74bac7
wpt-pr: 26802
testing/web-platform/tests/html/browsers/sandboxing/resources/check-sandbox-flags.html [new file with mode: 0644]
testing/web-platform/tests/html/browsers/sandboxing/sandbox-initial-empty-document-toward-same-origin.html [new file with mode: 0644]