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

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

Issue 2219383002: Require a user gesture to use navigator.share. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@webshare-dictionary
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
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 6a8af6860648484a66550075ad0a5214753933a6..a99943b863812e8e23e115246040ed4d639f9c0e 100644
--- a/third_party/WebKit/LayoutTests/webshare/share-arity.html
+++ b/third_party/WebKit/LayoutTests/webshare/share-arity.html
@@ -6,17 +6,17 @@
<script>
share_test((t, mock) => {
- return promise_rejects(t, new TypeError(), navigator.share());
+ return callWithKeyDown(() => promise_rejects(t, new TypeError(), navigator.share()));
}, '0 arguments (promise rejection)');
share_test((t, mock) => {
mock.pushShareResult('the title', 'the message', null);
- return navigator.share({title: 'the title', text: 'the message', unused: 'unexpected field'});
+ return callWithKeyDown(() => 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({title: 'the title', text: 'the message'}, 'more than required');
+ return callWithKeyDown(() => navigator.share({title: 'the title', text: 'the message'}, 'more than required'));
}, '2 arguments (extra argument ignored)');
</script>

Powered by Google App Engine
This is Rietveld 408576698