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

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

Issue 2207343002: Update navigator.share API to match draft specs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/webshare/share-error.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/webshare/share-arity.html
diff --git a/third_party/WebKit/LayoutTests/webshare/share-arity.html b/third_party/WebKit/LayoutTests/webshare/share-arity.html
index 7ba23f1a94f64938734e8b7a18c3bd8eb4f4caf0..6a8af6860648484a66550075ad0a5214753933a6 100644
--- a/third_party/WebKit/LayoutTests/webshare/share-arity.html
+++ b/third_party/WebKit/LayoutTests/webshare/share-arity.html
@@ -10,12 +10,13 @@ share_test((t, mock) => {
}, '0 arguments (promise rejection)');
share_test((t, mock) => {
- return promise_rejects(t, new TypeError(), navigator.share('the title'));
-}, '1 argument (promise rejection)');
+ mock.pushShareResult('the title', 'the message', null);
+ return navigator.share({title: 'the title', text: 'the message', unused: 'unexpected field'});
+}, 'extra ShareData field (extra field ignored)');
share_test((t, mock) => {
mock.pushShareResult('the title', 'the message', null);
- return navigator.share('the title', 'the message', 'more than required');
-}, '3 arguments (extra argument ignored)');
+ return navigator.share({title: 'the title', text: 'the message'}, 'more than required');
+}, '2 arguments (extra argument ignored)');
</script>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/webshare/share-error.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698