Skip to content

Commit ec8a154

Browse files
ericwilligersmoz-wptsync-bot
authored andcommitted
Bug 1653268 [wpt PR 24628] - WebShare: Introduce web-share feature policy, a=testonly
Automatic update from web-platform-tests WebShare: Introduce web-share feature policy share() requests fail with a rejected promise if the 'web-share' feature is not enabled. We define 'self' as the default feature policy for web-share. The spec has been updated w3c/web-share#166 Intent to Ship https://groups.google.com/a/chromium.org/g/blink-dev/c/fgme9KOd8CU/m/TCYPKQAXAwAJ Bug: 1079104 Change-Id: Id4030448a54589eddb45185cbd6fd8970aee34c3 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2299791 Commit-Queue: Eric Willigers <ericwilligers@chromium.org> Reviewed-by: Ian Clelland <iclelland@chromium.org> Reviewed-by: Daniel Murphy <dmurph@chromium.org> Reviewed-by: Dominick Ng <dominickn@chromium.org> Cr-Commit-Position: refs/heads/master@{#789872} -- wpt-commits: 1bd9297b8aa6870267c0c0ad1fa445f897ddecd7 wpt-pr: 24628
1 parent 4f487e6 commit ec8a154

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8" />
5+
<title>WebShare Test: Can be disabled by feature policy</title>
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+
</head>
11+
<body>
12+
<script>
13+
promise_test(async t => {
14+
await test_driver.bless("web share");
15+
16+
await promise_rejects_dom(t, "NotAllowedError", navigator.share({}));
17+
}, "share can be disabled by feature policy");
18+
</script>
19+
</body>
20+
</html>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Feature-Policy: web-share 'none'

0 commit comments

Comments
 (0)