| <!DOCTYPE html> |
| <script src="../resources/testharness.js"></script> |
| <script src="../resources/testharnessreport.js"></script> |
| <script src="file:///gen/layout_test_data/mojo/public/js/mojo_bindings.js"></script> |
| <script src="file:///gen/third_party/WebKit/public/platform/modules/webshare/webshare.mojom.js"></script> |
| <script src="resources/mock-share-service.js"></script> |
| <script> |
| |
| share_test(mock => { |
| mock.pushShareResult('the title', 'the message', 'data:the url', |
| blink.mojom.ShareError.OK); |
| return callWithKeyDown(() => { |
| navigator.share({ |
| title: 'the title', |
| text: 'the message', |
| url: 'data:the url', |
| unused: 'unexpected field'}); |
| }); |
| }, 'extra ShareData field (extra field ignored)'); |
| |
| share_test(mock => { |
| mock.pushShareResult('the title', 'the message', 'data:the url', |
| blink.mojom.ShareError.OK); |
| return callWithKeyDown(() => { |
| navigator.share({ |
| title: 'the title', |
| text: 'the message', |
| url: 'data:the url'}, 'more than required'); |
| }); |
| }, '2 arguments (extra argument ignored)'); |
| |
| </script> |