share-url-encoding-manual.https.html (868B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <title>WebShare Test: Share URL with illegal characters (test percent encoding)</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 url = 'http://example.com/foo\\ab%63\r\n\t "<>`{}'; 15 // Expect '\' to normalize to '/', "%63" to normalize to 'c', '\r\n\t' 16 // to be removed, and all the other illegal characters to be percent-escaped. 17 const url_encoded = 'http://example.com/foo/abc%20%22%3C%3E%60%7B%7D'; 18 setupManualShareTest({title: '', text: '', url: url_encoded}); 19 callWhenButtonClicked(() => navigator.share({url})); 20 </script> 21 </body> 22 </html>