3 <title>Test for TextEditor triple click and SetValue
</title>
4 <script src=
"/tests/SimpleTest/SimpleTest.js"></script>
5 <script src=
"/tests/SimpleTest/EventUtils.js"></script>
11 <input id=
"input" value=
"foo bar baz">
13 SimpleTest
.waitForExplicitFinish();
14 SimpleTest
.waitForFocus(() => {
15 const { input
} = document
.all
;
17 synthesizeMouse(input
, 5, 5, { clickCount
: 3 }, window
);
18 is(input
.selectionStart
, 0, "selectionStart should be 0");
19 is(input
.selectionEnd
, input
.value
.length
, "selectionEnd should be the end of the value");
20 synthesizeKey("KEY_Backspace");
21 is(input
.value
, "", ".value should be empty");
24 is(input
.value
, "hmm", ".value must be set");