tor-browser

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

test_HapticFeedback.html (937B)


      1 <!DOCTYPE HTML>
      2 <!--
      3 https://bugzilla.mozilla.org/show_bug.cgi?id=1954534
      4 -->
      5 <html>
      6  <meta charset="utf-8">
      7  <title>Test for HapticFeedback</title>
      8  <script src="/tests/SimpleTest/SimpleTest.js"></script>
      9  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css">
     10 </head>
     11 <body>
     12 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1954534">Mozilla Bug 1954534</a>
     13 <p id="display"></p>
     14 <div id="content" style="display: none"></div>
     15 </div>
     16 <pre id="test"></pre>
     17 <script>
     18 add_task(() => {
     19  // Don't crash performSimpleAction.
     20  const Cc = SpecialPowers.Cc;
     21  const Ci = SpecialPowers.Ci;
     22  let hapticFeedback = Cc["@mozilla.org/widget/hapticfeedback;1"].getService(Ci.nsIHapticFeedback);
     23  hapticFeedback.performSimpleAction(Ci.nsIHapticFeedback.ShortPress);
     24  hapticFeedback.performSimpleAction(Ci.nsIHapticFeedback.LongPress);
     25  ok(true, "HapticFeedback performed");
     26 });
     27 </script>
     28 </body>
     29 </html>