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

Side by Side 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 unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <script src="../resources/testharness.js"></script> 2 <script src="../resources/testharness.js"></script>
3 <script src="../resources/testharnessreport.js"></script> 3 <script src="../resources/testharnessreport.js"></script>
4 <script src="../resources/mojo-helpers.js"></script> 4 <script src="../resources/mojo-helpers.js"></script>
5 <script src="resources/mock-share-service.js"></script> 5 <script src="resources/mock-share-service.js"></script>
6 <script> 6 <script>
7 7
8 share_test((t, mock) => { 8 share_test((t, mock) => {
9 mock.pushShareResult('the title', 'the message', 'error from browser'); 9 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.
10 return promise_rejects( 10 return promise_rejects(
11 t, new DOMException('error from browser', 'AbortError'), 11 t, new DOMException('Must be handling a user gesture to perform a share re quest.', 'SecurityError'),
12 navigator.share({title: 'the title', text: 'the message'})); 12 navigator.share({title: 'the title', text: 'the message'}));
13 }, 'share with browser-side error'); 13 }, 'share with browser-side error');
14 14
15 </script> 15 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698