Backed out changeset 3de491b80e70 (bug 1638275) for causing failures in browser_searchbar_openpopup.js CLOSED TREE

This commit is contained in:
Noemi Erli 2020-06-01 18:19:29 +03:00
Родитель 716734fea5
Коммит 0ea7241e5e
2 изменённых файлов: 1 добавлений и 37 удалений

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

@ -173,42 +173,6 @@ add_task(async function open_empty() {
textbox.value = "";
});
add_task(async function open_empty_hiddenOneOffs() {
// Disable all the engines but the current one and check the oneoffs.
let defaultEngine = await Services.search.getDefault();
let engines = (await Services.search.getVisibleEngines()).filter(
e => e.name != defaultEngine.name
);
await SpecialPowers.pushPrefEnv({
set: [["browser.search.hiddenOneOffs", engines.map(e => e.name).join(",")]],
});
let promise = promiseEvent(searchPopup, "popupshown");
info("Clicking icon");
EventUtils.synthesizeMouseAtCenter(searchIcon, {});
await promise;
let oneOffButtons = searchPopup.querySelector(".search-panel-one-offs");
Assert.equal(
oneOffButtons.getAttribute("hidden"),
"true",
"The one-offs buttons should have the hidden attribute."
);
Assert.equal(
getComputedStyle(oneOffButtons).display,
"none",
"The one-off buttons should be hidden."
);
promise = promiseEvent(searchPopup, "popuphidden");
info("Hiding popup");
await synthesizeNativeMouseClick(searchIcon);
await promise;
await SpecialPowers.popPrefEnv();
});
// With no text in the search box left clicking it should not open the popup.
add_no_popup_task(function click_doesnt_open_popup() {
gURLBar.focus();

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

@ -53,7 +53,7 @@
border-top: none;
}
.search-panel-one-offs:not([hidden]),
.search-panel-one-offs,
.search-panel-one-offs-container {
display: flex;
flex-direction: row;