mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1101999 - Fix/add UITour highlighting for the new search UI. r=florian
This commit is contained in:
parent
8730c90560
commit
f8901eae35
@ -128,12 +128,49 @@ this.UITour = {
|
||||
["searchProvider", {
|
||||
query: (aDocument) => {
|
||||
let searchbar = aDocument.getElementById("searchbar");
|
||||
if (searchbar.hasAttribute("oneoffui")) {
|
||||
return null;
|
||||
}
|
||||
return aDocument.getAnonymousElementByAttribute(searchbar,
|
||||
"anonid",
|
||||
"searchbar-engine-button");
|
||||
},
|
||||
widgetName: "search-container",
|
||||
}],
|
||||
["searchIcon", {
|
||||
query: (aDocument) => {
|
||||
let searchbar = aDocument.getElementById("searchbar");
|
||||
if (!searchbar.hasAttribute("oneoffui")) {
|
||||
return null;
|
||||
}
|
||||
return aDocument.getAnonymousElementByAttribute(searchbar,
|
||||
"anonid",
|
||||
"searchbar-search-button");
|
||||
},
|
||||
widgetName: "search-container",
|
||||
}],
|
||||
["searchPrefsLink", {
|
||||
query: (aDocument) => {
|
||||
let element = null;
|
||||
let searchbar = aDocument.getElementById("searchbar");
|
||||
if (searchbar.hasAttribute("oneoffui")) {
|
||||
let popup = aDocument.getElementById("PopupSearchAutoComplete");
|
||||
if (popup.state != "open")
|
||||
return null;
|
||||
element = aDocument.getAnonymousElementByAttribute(popup,
|
||||
"anonid",
|
||||
"search-settings");
|
||||
} else {
|
||||
element = aDocument.getAnonymousElementByAttribute(searchbar,
|
||||
"anonid",
|
||||
"open-engine-manager");
|
||||
}
|
||||
if (!element || !UITour.isElementVisible(element)) {
|
||||
return null;
|
||||
}
|
||||
return element;
|
||||
},
|
||||
}],
|
||||
["selectedTabIcon", {
|
||||
query: (aDocument) => {
|
||||
let selectedtab = aDocument.defaultView.gBrowser.selectedTab;
|
||||
|
@ -41,7 +41,7 @@ let tests = [
|
||||
"privateWindow",
|
||||
"quit",
|
||||
"search",
|
||||
"searchProvider",
|
||||
"searchIcon",
|
||||
"urlbar",
|
||||
...searchEngineTargets(),
|
||||
...(hasWebIDE ? ["webide"] : [])
|
||||
@ -72,7 +72,7 @@ let tests = [
|
||||
"privateWindow",
|
||||
"quit",
|
||||
"search",
|
||||
"searchProvider",
|
||||
"searchIcon",
|
||||
"urlbar",
|
||||
...searchEngineTargets(),
|
||||
...(hasWebIDE ? ["webide"] : [])
|
||||
@ -92,7 +92,7 @@ let tests = [
|
||||
// Make sure the callback still fires with the other available targets.
|
||||
CustomizableUI.removeWidgetFromArea("search-container");
|
||||
gContentAPI.getConfiguration("availableTargets", (data) => {
|
||||
// Default minus "search" and "searchProvider"
|
||||
// Default minus "search" and "searchProvider" and "searchIcon"
|
||||
ok_targets(data, [
|
||||
"accountStatus",
|
||||
"addons",
|
||||
|
@ -60,7 +60,7 @@ let tests = [
|
||||
|
||||
function test_highlight_panel_click_find(done) {
|
||||
gContentAPI.showHighlight("help");
|
||||
gContentAPI.showInfo("searchProvider", "test title", "test text");
|
||||
gContentAPI.showInfo("searchIcon", "test title", "test text");
|
||||
waitForElementToBeVisible(highlight, function checkPanelIsOpen() {
|
||||
isnot(PanelUI.panel.state, "closed", "Panel should have opened");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user