Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(98)

Unified Diff: third_party/WebKit/LayoutTests/webshare/share-success.html

Issue 2703333002: Web Share: Refactor Mojo interface to now return an enum error. (Closed)
Patch Set: Fix assignment statement. #oops Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/webshare/share-success.html
diff --git a/third_party/WebKit/LayoutTests/webshare/share-success.html b/third_party/WebKit/LayoutTests/webshare/share-success.html
index d5d943639351992562dc70a085d9093d5d689189..c16799c1918f8441abebc29daefe487747003cad 100644
--- a/third_party/WebKit/LayoutTests/webshare/share-success.html
+++ b/third_party/WebKit/LayoutTests/webshare/share-success.html
@@ -9,45 +9,46 @@ function getAbsoluteUrl(url) {
return new URL(url, location).toString();
}
-share_test((t, mock) => {
+share_test((t, webshare, mock) => {
let url = 'https://www.example.com/some/path?some_query#some_fragment';
- mock.pushShareResult('the title', 'the message', getAbsoluteUrl(url), null);
+ mock.pushShareResult('the title', 'the message', getAbsoluteUrl(url),
+ webshare.ShareError.OK);
return callWithKeyDown(() => navigator.share(
{title: 'the title', text: 'the message', url: url}));
}, 'successful share');
-share_test((t, mock) => {
- mock.pushShareResult('', '', '', null);
+share_test((t, webshare, mock) => {
+ mock.pushShareResult('', '', '', webshare.ShareError.OK);
return callWithKeyDown(() => navigator.share({}));
}, 'successful share with empty ShareData');
-share_test((t, mock) => {
+share_test((t, webshare, mock) => {
let url = '//www.example.com/some/path?some_query#some_fragment';
- mock.pushShareResult('', '', getAbsoluteUrl(url), null);
+ mock.pushShareResult('', '', getAbsoluteUrl(url), webshare.ShareError.OK);
return callWithKeyDown(() => navigator.share({url: url}));
}, 'successful share with URL without a scheme');
-share_test((t, mock) => {
+share_test((t, webshare, mock) => {
let url = '/some/path?some_query#some_fragment';
- mock.pushShareResult('', '', getAbsoluteUrl(url), null);
+ mock.pushShareResult('', '', getAbsoluteUrl(url), webshare.ShareError.OK);
return callWithKeyDown(() => navigator.share({url: url}));
}, 'successful share with a path-only URL');
-share_test((t, mock) => {
+share_test((t, webshare, mock) => {
let url = 'foo';
- mock.pushShareResult('', '', getAbsoluteUrl(url), null);
+ mock.pushShareResult('', '', getAbsoluteUrl(url), webshare.ShareError.OK);
return callWithKeyDown(() => navigator.share({url: url}));
}, 'successful share with a relative URL');
-share_test((t, mock) => {
+share_test((t, webshare, mock) => {
let url = '';
- mock.pushShareResult('', '', getAbsoluteUrl(url), null);
+ mock.pushShareResult('', '', getAbsoluteUrl(url), webshare.ShareError.OK);
return callWithKeyDown(() => navigator.share({url: url}));
}, 'successful share with an empty URL');
-share_test((t, mock) => {
+share_test((t, webshare, mock) => {
let url = 'data:foo';
- mock.pushShareResult('', '', getAbsoluteUrl(url), null);
+ mock.pushShareResult('', '', getAbsoluteUrl(url), webshare.ShareError.OK);
return callWithKeyDown(() => navigator.share({url: url}));
}, 'successful share with a data URL');
« no previous file with comments | « third_party/WebKit/LayoutTests/webshare/share-error.html ('k') | third_party/WebKit/LayoutTests/webshare/share-types.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698