tor-browser

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

helper_tap.html (979B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <head>
      4  <meta charset="utf-8">
      5  <meta name="viewport" content="width=device-width; initial-scale=1.0">
      6  <title>Sanity touch-tapping test</title>
      7  <script type="application/javascript" src="apz_test_native_event_utils.js"></script>
      8  <script type="application/javascript" src="apz_test_utils.js"></script>
      9  <script src="/tests/SimpleTest/paint_listener.js"></script>
     10  <script type="application/javascript">
     11 
     12 async function clickButton() {
     13  document.addEventListener("click", clicked);
     14 
     15  await synthesizeNativeTap(document.getElementById("b"), 5, 5, function() {
     16    dump("Finished synthesizing tap, waiting for button to be clicked...\n");
     17  });
     18 }
     19 
     20 function clicked(e) {
     21  is(e.target, document.getElementById("b"), "Clicked on button, yay! (at " + e.clientX + "," + e.clientY + ")");
     22  subtestDone();
     23 }
     24 
     25 waitUntilApzStable().then(clickButton);
     26 
     27  </script>
     28 </head>
     29 <body>
     30 <button id="b" style="width: 10px; height: 10px"></button>
     31 </body>
     32 </html>