Backed out changeset 5cbcce6ef3e5 (bug 1649548) for Mochitest failures in components/test/chrome/test_searchbox-with-autocomplete.html. CLOSED TREE

This commit is contained in:
Dorel Luca 2020-07-06 18:22:39 +03:00
Родитель 69bd04067f
Коммит 8f18f8e4c5
2 изменённых файлов: 0 добавлений и 15 удалений

Просмотреть файл

@ -161,11 +161,9 @@ class SearchBox extends PureComponent {
switch (e.key) {
case "ArrowDown":
e.preventDefault();
autocomplete.jumpBy(1);
break;
case "ArrowUp":
e.preventDefault();
autocomplete.jumpBy(-1);
break;
case "PageDown":

Просмотреть файл

@ -39,13 +39,6 @@ window.onload = async function () {
"Autocomplete items are rendered as expected");
}
function compareCursorPosition(initialElement) {
const initialPosition = initialElement.selectionStart;
return (element) => {
is(element.selectionStart, initialPosition, "Input cursor position is not changed");
}
}
const React = browserRequire("devtools/client/shared/vendor/react");
const SearchBox = React.createFactory(
browserRequire("devtools/client/shared/components/SearchBox")
@ -123,7 +116,6 @@ window.onload = async function () {
async function testKeyEventsWithAutocomplete() {
// Clear the initial input
$(".devtools-searchinput").focus();
const cursorPositionIsNotChanged = compareCursorPosition($(".devtools-searchinput"));
// ArrowDown
synthesizeKey("KEY_ArrowDown");
@ -154,7 +146,6 @@ window.onload = async function () {
"a5",
"[abc]",
]);
cursorPositionIsNotChanged($(".devtools-searchinput"));
// PageDown should take -5 places up
synthesizeKey("KEY_PageUp");
@ -168,7 +159,6 @@ window.onload = async function () {
"a5",
"abc",
]);
cursorPositionIsNotChanged($(".devtools-searchinput"));
// PageDown should take +5 places down
synthesizeKey("KEY_PageDown");
@ -182,7 +172,6 @@ window.onload = async function () {
"a5",
"[abc]",
]);
cursorPositionIsNotChanged($(".devtools-searchinput"));
// Home should take to the top of the list
synthesizeKey("KEY_Home");
@ -196,7 +185,6 @@ window.onload = async function () {
"a5",
"abc",
]);
cursorPositionIsNotChanged($(".devtools-searchinput"));
// End should take to the bottom of the list
synthesizeKey("KEY_End");
@ -210,7 +198,6 @@ window.onload = async function () {
"a5",
"[abc]",
]);
cursorPositionIsNotChanged($(".devtools-searchinput"));
// Key down in existing state should rollover to the top
synthesizeKey("KEY_ArrowDown");