gecko-dev/browser/base/content/test/urlbar/browser_urlbar_searchsettings.js
Zack Herrick 84361e7e85 Bug 1335907 - Reorganize the preferences based on feedback from user research. r=mconley
The FX_PREFERENCES_CATEGORY_OPENED probe must be extended to version 59 to support the fallback "forked" preference implementation (in-content-old).

The switchToAdvancedSubPane within utilityOverlay's openPreferences must also remain until the fallback has been removed (bug 1349689).

Patch co-authored by Zack Herrick <herrickz@msu.edu> and Ziyan Long <lzylong@gmail.com>.

MozReview-Commit-ID: 1sx0Wj15yM7

--HG--
extra : rebase_source : 0266027fb3023d4cb155533193d6809d799de1e4
2017-03-29 11:52:08 -04:00

30 lines
984 B
JavaScript

/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
add_task(function*() {
let button = document.getElementById("urlbar-search-settings");
if (!button) {
ok("Skipping test");
return;
}
yield BrowserTestUtils.withNewTab({ gBrowser, url: "about:blank" }, function* () {
let popupopened = BrowserTestUtils.waitForEvent(gURLBar.popup, "popupshown");
gURLBar.focus();
EventUtils.synthesizeKey("a", {});
yield popupopened;
// Since the current tab is blank the preferences pane will load there
let loaded = BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser);
let popupclosed = BrowserTestUtils.waitForEvent(gURLBar.popup, "popuphidden");
EventUtils.synthesizeMouseAtCenter(button, {});
yield loaded;
yield popupclosed;
is(gBrowser.selectedBrowser.currentURI.spec, "about:preferences#general",
"Should have loaded the right page");
});
});