Bug 1885702 - Add a WPT testcase that triggers the crash here. r=dholbert

Differential Revision: https://phabricator.services.mozilla.com/D223577
This commit is contained in:
Jonathan Kew 2024-09-25 17:44:22 +00:00
parent 660398feb5
commit a948eb9576

View File

@ -0,0 +1,24 @@
<!DOCTYPE HTML>
<meta charset=utf-8>
<title>Mozilla bug 1885702</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-actions.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<input id="pwd" type="password" value="foo&#x202e;bar&#x202c;"></input>
<script>
promise_test(async () => {
let actions = new test_driver.Actions();
await actions
.pointerMove( 1, 1, { origin: pwd } )
.pointerDown( { button: actions.ButtonType.LEFT } )
.pointerUp( { button: actions.ButtonType.LEFT } )
.pointerDown( { button: actions.ButtonType.LEFT } )
.pointerUp( { button: actions.ButtonType.LEFT } )
.send();
assert_true(true, 'double-click sent');
}, 'Double-clicking the password field should not crash' );
</script>