| 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', null); | 9 mock.pushShareResult('the title', 'the message', null); |
| 10 return navigator.share({title: 'the title', text: 'the message', | 10 return callWithKeyDown(() => navigator.share( |
| 11 url: 'the URL'}); | 11 {title: 'the title', text: 'the message', url: 'the URL'})); |
| 12 }, 'successful share'); | 12 }, 'successful share'); |
| 13 | 13 |
| 14 share_test((t, mock) => { | 14 share_test((t, mock) => { |
| 15 mock.pushShareResult('', '', null); | 15 mock.pushShareResult('', '', null); |
| 16 return navigator.share({}); | 16 return callWithKeyDown(() => navigator.share({})); |
| 17 }, 'successful share with empty ShareData'); | 17 }, 'successful share with empty ShareData'); |
| 18 | 18 |
| 19 </script> | 19 </script> |
| OLD | NEW |