tor-browser

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

extend-selection-backward-on-input.html (1020B)


      1 <!DOCTYPE html>
      2 <title>
      3  This test crashes if block_flow is a pseudo node and first or last is null
      4  while creating inline contents from block flow if there is a block_node in an
      5  inline node.
      6 </title>
      7 <script src="/resources/testharness.js"></script>
      8 <script src="/resources/testharnessreport.js"></script>
      9 <script>
     10  function runTest() {
     11    test(() => {
     12      const div = document.createElement("div");
     13      document.body.appendChild(div);
     14      const bold = document.createElement("b");
     15      document.body.appendChild(bold);
     16      const input = document.createElement("input");
     17      bold.appendChild(input);
     18      input.setAttribute("type", "file");
     19      document.execCommand("selectall");
     20      const p = document.createElement("p");
     21      bold.appendChild(p);
     22      window.getSelection().modify("extend", "backward", "word");
     23    }, "Should not crash if block node is in an inline node and block_flow is a pseudo node");
     24    done();
     25  }
     26  window.addEventListener("load", runTest, { once: true });
     27 </script>