Bug 1770047 [wpt PR 34117] - [Clipboard API] Clipboard Web Custom Formats implementat...
[gecko.git] / testing / web-platform / tests / web-share / share-cancel-manual.https.html
blobe27d1975be0b594cb068b08f52075dfe9dec077c
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <meta charset="utf-8">
5 <title>WebShare Test: Share cancelled by user</title>
6 <script src="/resources/testharness.js"></script>
7 <script src="/resources/testharnessreport.js"></script>
8 <script src="resources/manual-helper.js"></script>
9 </head>
10 <body>
11 <script>
12 setup({explicit_timeout: true});
14 setupManualShareTestRequiringCancellation();
16 promise_test(t => {
17 return callWhenButtonClicked(() => promise_rejects_dom(
18 t, 'AbortError',
19 navigator.share({title: 'the title', text: 'the message',
20 url: 'https://example.com'})));
21 }, 'share with user cancellation');
22 </script>
23 </body>
24 </html>