tor-browser

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

text-overflow-023.html (1656B)


      1 <!DOCTYPE html>
      2 <html>
      3 <meta charset="utf-8">
      4 <title>CSS Basic User Interface Test: interacting with the ellipsis</title>
      5 <link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
      6 <link rel="help" href="http://www.w3.org/TR/css3-ui/#text-overflow">
      7 <meta name="flags" content="ahem dom should">
      8 <meta name="assert" content="Pointer events on the ellipsis should be dispatched to the elided inline element if there's one, rather than directly to the block.">
      9 <!-- This is tested indirectly, using elementFromPoint instead of actually triggering a pointer event, because:
     10  * Actual pointer events can only be dispatched in an manual test, while elementFromPoint allows for an automated test
     11  * These two methods are expected to give the same result
     12 
     13  This indirection and the slight risk of false positive or false negative it introduces
     14  is preferable to a manual test which would hardly anyone would ever run.
     15 -->
     16 <script src="/resources/testharness.js"></script>
     17 <script src="/resources/testharnessreport.js"></script>
     18 <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
     19 <style>
     20 #parent {
     21  position: absolute;
     22  top: 0; left: 0;
     23  font: 50px/1 Ahem ;
     24  overflow: hidden;
     25  width: 3em;
     26  text-overflow: ellipsis;
     27 }
     28 </style>
     29 <div id=parent>&nbsp;&nbsp;<span id=target>&nbsp;&nbsp;</span></div>
     30 <script>
     31 setup({explicit_done: true});
     32 document.fonts.ready.then(()=> {
     33  test(
     34    function() {
     35      var e = document.elementFromPoint(125,25);
     36      assert_equals(e.id,"target", "the element targeted by a hit on the ellipsis is the elided inline.");
     37    }, "Checks hit testing on the ellipsis");
     38  done();
     39 });
     40 </script>