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

Side by Side Diff: content/test/data/android/webshare.html

Issue 2338203002: Added end-to-end tests for navigator.share. (Closed)
Patch Set: Rebase. Created 4 years, 2 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
« no previous file with comments | « chrome/android/javatests/src/org/chromium/chrome/browser/WebShareTest.java ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <title>Web Share</title>
5 <script>
6 function initiate_share() {
7 if (navigator.share === undefined) {
8 window.document.title = 'Fail: navigator.share === undefined ';
9 return;
10 }
11
12 var data = {title: "Test Title", text: "Test Text",
13 url: "https://test.url"};
14 navigator.share(data).then(() => {
15 window.document.title = 'Success';
16 }).catch(e => {
17 window.document.title = 'Fail: ' + e;
18 });
19 }
20
21 window.addEventListener('load', () => {
22 window.addEventListener('click', initiate_share);
23 });
24 </script>
25 </head>
26 <body>
27 </body>
28 </html>
OLDNEW
« no previous file with comments | « chrome/android/javatests/src/org/chromium/chrome/browser/WebShareTest.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698