| <!DOCTYPE html> |
| <script src="../resources/testharness.js"></script> |
| <script src="../resources/testharnessreport.js"></script> |
| <script src="../resources/mojo-helpers.js"></script> |
| <script src="resources/mock-share-service.js"></script> |
| <script> |
| |
| share_test((t, mock) => { |
| mock.pushShareResult('the title', 'the message', 'data:the url', 'error from browser'); |
| return callWithKeyDown(() => promise_rejects( |
| t, new DOMException('error from browser', 'AbortError'), |
| navigator.share({title: 'the title', text: 'the message', url: 'data:the url'}))); |
| }, 'share with browser-side error'); |
| |
| </script> |