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-without-user-gesture.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-without-user-gesture.html
diff --git a/third_party/WebKit/LayoutTests/webshare/share-error.html b/third_party/WebKit/LayoutTests/webshare/share-without-user-gesture.html
similarity index 81%
copy from third_party/WebKit/LayoutTests/webshare/share-error.html
copy to third_party/WebKit/LayoutTests/webshare/share-without-user-gesture.html
index 267f0e41ac42c926415cdb4afd8c73fd1938d998..bd681b63bb6b43ede2ed6af7e83b72f0d771f28f 100644
--- a/third_party/WebKit/LayoutTests/webshare/share-error.html
+++ b/third_party/WebKit/LayoutTests/webshare/share-without-user-gesture.html
@@ -8,7 +8,7 @@
share_test((t, mock) => {
mock.pushShareResult('the title', 'the message', 'error from browser');
Matt Giuca 2016/08/08 08:00:06 I think this test should be based on the success t
Sam McNally 2016/08/08 09:08:44 Removed this line entirely so the mock will cause
Matt Giuca 2016/08/09 00:09:26 Right, my reading of the code is that it will fail
Sam McNally 2016/08/09 01:24:36 Yes.
return promise_rejects(
- t, new DOMException('error from browser', 'AbortError'),
+ t, new DOMException('Must be handling a user gesture to perform a share request.', 'SecurityError'),
navigator.share({title: 'the title', text: 'the message'}));
}, 'share with browser-side error');

Powered by Google App Engine
This is Rietveld 408576698