| Index: third_party/WebKit/LayoutTests/webshare/share-error.html
|
| diff --git a/third_party/WebKit/LayoutTests/webshare/share-error.html b/third_party/WebKit/LayoutTests/webshare/share-error.html
|
| index a59ffc6691805f1466d10d00c51f30774e5d647d..070d9e76cd07d035f551fea346da7fc337db9f7c 100644
|
| --- a/third_party/WebKit/LayoutTests/webshare/share-error.html
|
| +++ b/third_party/WebKit/LayoutTests/webshare/share-error.html
|
| @@ -5,11 +5,21 @@
|
| <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');
|
| +share_test((t, webshare, mock) => {
|
| + mock.pushShareResult('the title', 'the message', 'data:the url',
|
| + webshare.ShareError.CANCELED);
|
| + // promise_rejects doesn't test the exception message, so just undefined.
|
| return callWithKeyDown(() => promise_rejects(
|
| - t, new DOMException('error from browser', 'AbortError'),
|
| + t, new DOMException(undefined, 'AbortError'),
|
| navigator.share({title: 'the title', text: 'the message', url: 'data:the url'})));
|
| -}, 'share with browser-side error');
|
| +}, 'share with user cancellation');
|
| +
|
| +share_test((t, webshare, mock) => {
|
| + mock.pushShareResult('the title', 'the message', 'data:the url',
|
| + webshare.ShareError.INTERNAL_ERROR);
|
| + return callWithKeyDown(() => promise_rejects(
|
| + t, new DOMException(undefined, 'AbortError'),
|
| + navigator.share({title: 'the title', text: 'the message', url: 'data:the url'})));
|
| +}, 'share with invalid url template');
|
|
|
| </script>
|
|
|