share-image-manual.tentative.https.html (885B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <title>WebShare Test: Share single image file</title> 6 <script src="/resources/testharness.js"></script> 7 <script src="/resources/testharnessreport.js"></script> 8 <script src="resources/manual-helper.js"></script> 9 </head> 10 <body> 11 <script> 12 setup({explicit_timeout: true}); 13 14 const fileBits = [ 15 '<svg xmlns="http://www.w3.org/2000/svg" width="80px" height="80px">', 16 '<circle cx="40" cy="40" r="28" fill="lime" />', 17 '</svg>' 18 ]; 19 const fileName = 'circle.svg'; 20 const options = {type: 'image/svg+xml'}; 21 const file = new File(fileBits, fileName, options); 22 setupManualShareTest({title: '', text: '', url: '', files: [file]}); 23 callWhenButtonClicked(() => navigator.share({files: [file]})); 24 </script> 25 </body> 26 </html>