tor-browser

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

focus-event-document-move.html (1090B)


      1 <!DOCTYPE html>
      2 <link rel="author" href="mailto:masonf@chromium.org">
      3 <link rel="help" href="https://crbug.com/747207">
      4 <script src="/resources/testharness.js"></script>
      5 <script src="/resources/testharnessreport.js"></script>
      6 <script src="/resources/testdriver.js"></script>
      7 <script src="/resources/testdriver-actions.js"></script>
      8 <script src="/resources/testdriver-vendor.js"></script>
      9 
     10 <script>
     11  function handleDown(node) {
     12    var d2 = new Document();
     13    d2.appendChild(node);
     14  }
     15 </script>
     16 
     17 <!-- No crash should occur if a node is moved during mousedown. -->
     18 <div id='click' onmousedown='handleDown(this)'>Click me</div>
     19 
     20 <script>
     21  const target = document.getElementById('click');
     22  async_test(t => {
     23    let actions = new test_driver.Actions()
     24      .pointerMove(0, 0, {origin: target})
     25      .pointerDown()
     26      .pointerUp()
     27      .send()
     28      .then(t.step_func_done(() => {
     29        assert_equals(null,document.getElementById('click'));
     30      }))
     31      .catch(e => t.step_func(() => assert_unreached('Error')));
     32  },'Moving a node during mousedown should not crash');
     33 </script>