blob: b70f8fc23d2e31e1f0ddc0aa62c7ad28917faabf [file] [log] [blame]
Matt Giuca67406a42017-06-27 08:13:581<!DOCTYPE html>
2<html>
3 <head>
4 <meta charset="utf-8">
5 <title>WebShare Test: Share non-string types (test implicit conversion)</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 // Expect that each of the non-string values is converted into a string.
15 setupManualShareTest(
16 {title: 'true', text: 'the object', url: getAbsoluteUrl('384957')});
17
18 const objectWithToString = {toString() { return 'the object'; }};
19 callWhenButtonClicked(() => navigator.share(
20 {title: true, text: objectWithToString, url: 384957}));
21 </script>
22 </body>
23</html>