gecko-dev/testing/web-platform/tests/storage-access-api/sandboxAttribute.window.js
Brandon Maslen cc35c9d9bb Bug 1580070 [wpt PR 18951] - Initial Storage Access API IDL Changes, a=testonly
Automatic update from web-platform-tests
Initial Storage Access API IDL Changes

This change adds the initial surface area for the methods and sandbox token exposed by the Storage Access API behind the storageAccessAPI runtime flag. Initially the promises created will return simple/immediate resolutions or rejections. Future changes will update the logic of each method to ensure it is functioning correctly. Additionally Web Platform Tests have been added to validate the added behaviour.

As the newly added tests rely on running tests within iFrames an exposed bug in the content_shell testrunner JS has been fixed. The change ensures that iframes will not complete the testharness and that only the main frame will trigger completion.

Bug: 989663
Change-Id: I2388fbc25ceb95c49435aa986191b0aca925d7d5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1790583
Reviewed-by: Ilya Sherman <isherman@chromium.org>
Reviewed-by: Ian Clelland <iclelland@chromium.org>
Reviewed-by: Mike West <mkwst@chromium.org>
Commit-Queue: Brandon Maslen <brandm@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#697926}

--

wpt-commits: 423c19a36e9ccf2f212d2af31031bfb02febd454
wpt-pr: 18951
2019-09-20 21:50:05 +00:00

7 lines
331 B
JavaScript

'use strict';
test(() => {
let iframe = document.createElement('iframe');
assert_true(iframe.sandbox.supports('allow-storage-access-by-user-activation'), '`allow-storage-access-by-user-activation`' +
'sandbox attribute should be supported');
}, "`allow-storage-access-by-user-activation` sandbox attribute is supported");