diff options
Diffstat (limited to 'testing/web-platform/tests/clipboard-apis/feature-policy/clipboard-write')
3 files changed, 4 insertions, 3 deletions
diff --git a/testing/web-platform/tests/clipboard-apis/feature-policy/clipboard-write/clipboard-write-disabled-by-feature-policy.tentative.https.sub.html b/testing/web-platform/tests/clipboard-apis/feature-policy/clipboard-write/clipboard-write-disabled-by-feature-policy.tentative.https.sub.html index 5d19d8dd6f..b328debde2 100644 --- a/testing/web-platform/tests/clipboard-apis/feature-policy/clipboard-write/clipboard-write-disabled-by-feature-policy.tentative.https.sub.html +++ b/testing/web-platform/tests/clipboard-apis/feature-policy/clipboard-write/clipboard-write-disabled-by-feature-policy.tentative.https.sub.html @@ -5,6 +5,7 @@ <script src="/resources/testdriver.js"></script> <script src="/resources/testdriver-vendor.js"></script> <script src="/feature-policy/resources/featurepolicy.js"></script> +<script src="../../resources/user-activation.js"></script> <script> 'use strict'; @@ -14,7 +15,7 @@ const cross_origin_src = 'https://{{domains[www]}}:{{ports[https][0]}}' + same_origin_src; promise_test(async t => { - await test_driver.set_permission({ name: 'clipboard-write' }, 'granted'); + await tryGrantWritePermission(); return promise_rejects_dom(t, 'NotAllowedError', navigator.clipboard.writeText('test text')); }, 'Feature-Policy header clipboard-write "none" disallows the top-level document.'); diff --git a/testing/web-platform/tests/clipboard-apis/feature-policy/clipboard-write/clipboard-write-enabled-by-feature-policy.tentative.https.sub.html b/testing/web-platform/tests/clipboard-apis/feature-policy/clipboard-write/clipboard-write-enabled-by-feature-policy.tentative.https.sub.html index ca97994c61..cb908df65f 100644 --- a/testing/web-platform/tests/clipboard-apis/feature-policy/clipboard-write/clipboard-write-enabled-by-feature-policy.tentative.https.sub.html +++ b/testing/web-platform/tests/clipboard-apis/feature-policy/clipboard-write/clipboard-write-enabled-by-feature-policy.tentative.https.sub.html @@ -15,7 +15,7 @@ const cross_origin_src = 'https://{{domains[www]}}:{{ports[https][0]}}' + same_origin_src; promise_test(async t => { - await test_driver.set_permission({ name: 'clipboard-write' }, 'granted'); + await tryGrantWritePermission(); await waitForUserActivation(); await navigator.clipboard.writeText('test text'); }, 'Feature-Policy header clipboard-write "*" allows the top-level document.'); diff --git a/testing/web-platform/tests/clipboard-apis/feature-policy/clipboard-write/clipboard-write-enabled-on-self-origin-by-feature-policy.tentative.https.sub.html b/testing/web-platform/tests/clipboard-apis/feature-policy/clipboard-write/clipboard-write-enabled-on-self-origin-by-feature-policy.tentative.https.sub.html index 5615a68ac5..532c72545c 100644 --- a/testing/web-platform/tests/clipboard-apis/feature-policy/clipboard-write/clipboard-write-enabled-on-self-origin-by-feature-policy.tentative.https.sub.html +++ b/testing/web-platform/tests/clipboard-apis/feature-policy/clipboard-write/clipboard-write-enabled-on-self-origin-by-feature-policy.tentative.https.sub.html @@ -15,7 +15,7 @@ const cross_origin_src = 'https://{{domains[www]}}:{{ports[https][0]}}' + same_origin_src; promise_test(async t => { - await test_driver.set_permission({ name: 'clipboard-write' }, 'granted'); + await tryGrantWritePermission(); await waitForUserActivation(); await navigator.clipboard.writeText('test text'); }, 'Feature-Policy header clipboard-write "self" allows the top-level document.'); |