4 <meta charset=
"utf-8" />
5 <title>WebShare Test: Can be disabled by permissions policy
</title>
6 <link rel=
"help" href=
"https://w3c.github.io/web-share/#permissions-policy">
7 <script src=
"/resources/testharness.js"></script>
8 <script src=
"/resources/testharnessreport.js"></script>
9 <script src=
"/resources/testdriver.js"></script>
10 <script src=
"/resources/testdriver-vendor.js"></script>
14 promise_test(async (t
) => {
15 await test_driver
.bless("web share");
16 await
promise_rejects_dom(t
, "NotAllowedError", navigator
.share({}));
17 }, "share() can be disabled by permissions policy");
21 navigator
.canShare({ text
: "foo" }),
22 "not allowed to share"
24 }, "canShare() can be disabled by permissions policy");