11cb0ef41Sopenharmony_ci<!DOCTYPE html> 21cb0ef41Sopenharmony_ci<link rel="author" href="mailto:masonf@chromium.org"> 31cb0ef41Sopenharmony_ci<link rel="help" href="https://crbug.com/747207"> 41cb0ef41Sopenharmony_ci<script src="/resources/testharness.js"></script> 51cb0ef41Sopenharmony_ci<script src="/resources/testharnessreport.js"></script> 61cb0ef41Sopenharmony_ci<script src="/resources/testdriver.js"></script> 71cb0ef41Sopenharmony_ci<script src="/resources/testdriver-actions.js"></script> 81cb0ef41Sopenharmony_ci<script src="/resources/testdriver-vendor.js"></script> 91cb0ef41Sopenharmony_ci 101cb0ef41Sopenharmony_ci<script> 111cb0ef41Sopenharmony_ci function handleDown(node) { 121cb0ef41Sopenharmony_ci var d2 = new Document(); 131cb0ef41Sopenharmony_ci d2.appendChild(node); 141cb0ef41Sopenharmony_ci } 151cb0ef41Sopenharmony_ci</script> 161cb0ef41Sopenharmony_ci 171cb0ef41Sopenharmony_ci<!-- No crash should occur if a node is moved during mousedown. --> 181cb0ef41Sopenharmony_ci<div id='click' onmousedown='handleDown(this)'>Click me</div> 191cb0ef41Sopenharmony_ci 201cb0ef41Sopenharmony_ci<script> 211cb0ef41Sopenharmony_ci const target = document.getElementById('click'); 221cb0ef41Sopenharmony_ci async_test(t => { 231cb0ef41Sopenharmony_ci let actions = new test_driver.Actions() 241cb0ef41Sopenharmony_ci .pointerMove(0, 0, {origin: target}) 251cb0ef41Sopenharmony_ci .pointerDown() 261cb0ef41Sopenharmony_ci .pointerUp() 271cb0ef41Sopenharmony_ci .send() 281cb0ef41Sopenharmony_ci .then(t.step_func_done(() => { 291cb0ef41Sopenharmony_ci assert_equals(null,document.getElementById('click')); 301cb0ef41Sopenharmony_ci })) 311cb0ef41Sopenharmony_ci .catch(e => t.step_func(() => assert_unreached('Error'))); 321cb0ef41Sopenharmony_ci },'Moving a node during mousedown should not crash'); 331cb0ef41Sopenharmony_ci</script> 34