| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <script src="../resources/testharness.js"></script> | 2 <script src="../resources/testharness.js"></script> |
| 3 <script src="../resources/testharnessreport.js"></script> | 3 <script src="../resources/testharnessreport.js"></script> |
| 4 <script src="../resources/mojo-helpers.js"></script> | 4 <script src="../resources/mojo-helpers.js"></script> |
| 5 <script src="resources/mock-share-service.js"></script> | 5 <script src="resources/mock-share-service.js"></script> |
| 6 <script> | 6 <script> |
| 7 | 7 |
| 8 share_test((t, mock) => { | 8 share_test((t, mock) => { |
| 9 mock.pushShareResult('the title', 'the message', 'error from browser'); | |
| 10 return promise_rejects( | 9 return promise_rejects( |
| 11 t, new DOMException('error from browser', 'AbortError'), | 10 t, new DOMException('Must be handling a user gesture to perform a share re
quest.', 'SecurityError'), |
| 12 navigator.share({title: 'the title', text: 'the message'})); | 11 navigator.share({title: 'the title', text: 'the message'})); |
| 13 }, 'share with browser-side error'); | 12 }, 'share without a user gesture'); |
| 14 | 13 |
| 15 </script> | 14 </script> |
| OLD | NEW |