tor-browser

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

test_area_url_cursor.html (911B)


      1 <!doctype html>
      2 <title>cursor: url() doesn't assert for area elements</title>
      3 <script src="/tests/SimpleTest/SimpleTest.js"></script>
      4 <script src="/tests/SimpleTest/EventUtils.js"></script>
      5 <style>
      6 area {
      7  /* Doesn't matter to trigger the assert */
      8  cursor: url(invalid.cur), auto;
      9 }
     10 </style>
     11 <img width="300" height="98" usemap="#map">
     12 <map name="map" id="map">
     13  <area class="url" shape="rect" coords="0,0,300,98" href="https://mozilla.org"></area>
     14 </map>
     15 <div></div>
     16 <script>
     17 SimpleTest.waitForExplicitFinish();
     18 SimpleTest.waitForFocus(() => {
     19 
     20  let checked = false;
     21  document.querySelector("area").addEventListener("mousemove", function() {
     22    setTimeout(() => {
     23      if (checked) {
     24        return;
     25      }
     26      checked = true;
     27      ok(true, "Didn't assert");
     28      SimpleTest.finish()
     29    }, 0);
     30  });
     31 
     32  synthesizeMouseAtCenter(document.querySelector("img"), { type: "mousemove" });
     33 });
     34 </script>