tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

share-simple-manual.https.html (1030B)


      1 <!DOCTYPE html>
      2 <html>
      3  <head>
      4    <meta charset="utf-8">
      5    <title>WebShare Test: Simple share</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 = 'https://www.example.com/some/path?some_query#some_fragment';
     15        const data = {title: 'the title', text: 'the message', url, files: []};
     16        setupManualShareTest(data);
     17        callWhenButtonClicked(() => navigator.share(data)).then(
     18              result => {
     19                // Check that promise resolved with undefined. This is guarded
     20                // by an if statement because we do not want it to register as a
     21                // test if it passes (since this is a manual test).
     22                if (result !== undefined) {
     23                  assert_equals(result, undefined);
     24                }
     25              });
     26    </script>
     27  </body>
     28 </html>