3 <title>navigator.clipboard.readText() fails when permission denied
</title>
4 <link rel=
"help" href=
"https://w3c.github.io/clipboard-apis/#async-clipboard-api">
5 <body>Body needed for test_driver.click()
</body>
6 <script src=
"/resources/testharness.js"></script>
7 <script src=
"/resources/testharnessreport.js"></script>
8 <script src=
"/resources/testdriver.js"></script>
9 <script src=
"/resources/testdriver-vendor.js"></script>
10 <script src=
"../resources/user-activation.js"></script>
14 promise_test(async t
=> {
15 await test_driver
.set_permission({name
: 'clipboard-read'}, 'denied');
16 await
waitForUserActivation();
17 await
promise_rejects_dom(t
,
18 'NotAllowedError', navigator
.clipboard
.readText());
19 }, 'navigator.clipboard.readText() fails when permission denied');