chromium/third_party/blink/web_tests/fast/forms/disabled-mousedown-event.html

<!DOCTYPE html>
<link rel=author href="mailto:[email protected]">
<link rel=author href="mailto:[email protected]">
<link rel=help href="https://bugs.webkit.org/show_bug.cgi?id=27795">
<link rel=help href="https://github.com/whatwg/html/issues/2368">
<link rel=help href="https://github.com/whatwg/html/issues/5886">
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../../resources/testdriver.js"></script>
<script src="../../resources/testdriver-vendor.js"></script>
<script src="../../resources/testdriver-actions.js"></script>

<span><input id="test" type="text" disabled></span>

<script>
async function rafPromise() {
  return new Promise(resolve => requestAnimationFrame(resolve));
}

promise_test(async () => {
  const test = document.getElementById('test');
  test.parentNode.addEventListener('mousedown', () => assert_unreached('mousedown should not be fired.'));

  const x = test.offsetLeft + test.offsetWidth / 2;
  const y = test.offsetTop + test.offsetHeight / 2;
  const actions = new test_driver.Actions()
    .pointerMove(x, y)
    .pointerDown()
    .pointerUp()
    .pointerMove(0, 0);
  await actions.send();

  await rafPromise();
  await rafPromise();
}, 'mousedown events should not be fired on parents of disabled input elements.');
</script>