зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1644907 - Fix intermittent failure due to not passing the appropriate window to syntehsize methods. r=adw
Also cleans up some test boilerplate: 1. avoid waitForFocus passing in urlbar tests 2. avoid useless window.gSomething 3. avoid useless UrlbarTestUtils imports Differential Revision: https://phabricator.services.mozilla.com/D80082
This commit is contained in:
Родитель
afbfabf2f0
Коммит
34eac0d840
|
@ -25,6 +25,16 @@ XPCOMUtils.defineLazyModuleGetters(this, {
|
|||
});
|
||||
|
||||
var UrlbarTestUtils = {
|
||||
/**
|
||||
* Running this init allows helpers to access test scope helpers, like Assert
|
||||
* and SimpleTest. Note this initialization is not enforced, thus helpers
|
||||
* should always check _testScope and provide a fallback path.
|
||||
* @param {object} scope The global scope where tests are being run.
|
||||
*/
|
||||
init(scope) {
|
||||
this._testScope = scope;
|
||||
},
|
||||
|
||||
/**
|
||||
* Waits to a search to be complete.
|
||||
* @param {object} win The window containing the urlbar
|
||||
|
@ -55,7 +65,11 @@ var UrlbarTestUtils = {
|
|||
selectionStart = -1,
|
||||
selectionEnd = -1,
|
||||
} = {}) {
|
||||
await new Promise(resolve => waitForFocus(resolve, window));
|
||||
if (this._testScope) {
|
||||
await this._testScope.SimpleTest.promiseFocus(window);
|
||||
} else {
|
||||
await new Promise(resolve => waitForFocus(resolve, window));
|
||||
}
|
||||
window.gURLBar.inputField.focus();
|
||||
// Using the value setter in some cases may trim and fetch unexpected
|
||||
// results, then pick an alternate path.
|
||||
|
@ -282,6 +296,9 @@ var UrlbarTestUtils = {
|
|||
if (win.gURLBar.view.isOpen) {
|
||||
return;
|
||||
}
|
||||
if (this._testScope) {
|
||||
this._testScope.info("Awaiting for the urlbar panel to open");
|
||||
}
|
||||
await new Promise(resolve => {
|
||||
win.gURLBar.controller.addQueryListener({
|
||||
onViewOpen() {
|
||||
|
@ -308,6 +325,9 @@ var UrlbarTestUtils = {
|
|||
if (!win.gURLBar.view.isOpen) {
|
||||
return;
|
||||
}
|
||||
if (this._testScope) {
|
||||
this._testScope.info("Awaiting for the urlbar panel to close");
|
||||
}
|
||||
await new Promise(resolve => {
|
||||
win.gURLBar.controller.addQueryListener({
|
||||
onViewClose() {
|
||||
|
|
|
@ -94,7 +94,7 @@ add_task(async function multipleInterventionsInOneEngagement() {
|
|||
);
|
||||
|
||||
// Blur the urlbar so that the engagement is ended.
|
||||
await UrlbarTestUtils.promisePopupClose(window, () => window.gURLBar.blur());
|
||||
await UrlbarTestUtils.promisePopupClose(window, () => gURLBar.blur());
|
||||
|
||||
const scalars = TelemetryTestUtils.getProcessScalars("parent", true, true);
|
||||
// We should only record one impression for the Refresh tip. Although it was
|
||||
|
@ -120,7 +120,7 @@ add_task(async function tipsAreEnglishOnly() {
|
|||
result.payload.type,
|
||||
UrlbarProviderInterventions.TIP_TYPE.REFRESH
|
||||
);
|
||||
await UrlbarTestUtils.promisePopupClose(window, () => window.gURLBar.blur());
|
||||
await UrlbarTestUtils.promisePopupClose(window, () => gURLBar.blur());
|
||||
|
||||
// We will need to fetch new engines when we switch locales.
|
||||
let searchReinit = SearchTestUtils.promiseSearchNotification(
|
||||
|
@ -148,7 +148,7 @@ add_task(async function tipsAreEnglishOnly() {
|
|||
|
||||
// Interventions should no longer work in the new locale.
|
||||
await awaitNoTip(SEARCH_STRINGS.CLEAR, window);
|
||||
await UrlbarTestUtils.promisePopupClose(window, () => window.gURLBar.blur());
|
||||
await UrlbarTestUtils.promisePopupClose(window, () => gURLBar.blur());
|
||||
});
|
||||
|
||||
/**
|
||||
|
|
|
@ -69,7 +69,6 @@ add_task(async function mouse_insideTipButNotOnButtons() {
|
|||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
value: "test",
|
||||
window,
|
||||
waitForFocus,
|
||||
fireInputEvent: true,
|
||||
});
|
||||
let row = await UrlbarTestUtils.waitForAutocompleteResultAt(window, 0);
|
||||
|
@ -155,7 +154,6 @@ async function doTest({ click, buttonUrl = undefined, helpUrl = undefined }) {
|
|||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
value: "test",
|
||||
window,
|
||||
waitForFocus,
|
||||
fireInputEvent: true,
|
||||
});
|
||||
let row = await UrlbarTestUtils.waitForAutocompleteResultAt(window, 0);
|
||||
|
|
|
@ -16,7 +16,6 @@ XPCOMUtils.defineLazyModuleGetters(this, {
|
|||
ProfileAge: "resource://gre/modules/ProfileAge.jsm",
|
||||
UrlbarPrefs: "resource:///modules/UrlbarPrefs.jsm",
|
||||
UrlbarProviderSearchTips: "resource:///modules/UrlbarProviderSearchTips.jsm",
|
||||
UrlbarTestUtils: "resource://testing-common/UrlbarTestUtils.jsm",
|
||||
});
|
||||
|
||||
// These should match the same consts in UrlbarProviderSearchTips.jsm.
|
||||
|
|
|
@ -15,7 +15,6 @@ XPCOMUtils.defineLazyModuleGetters(this, {
|
|||
ProfileAge: "resource://gre/modules/ProfileAge.jsm",
|
||||
UrlbarPrefs: "resource:///modules/UrlbarPrefs.jsm",
|
||||
UrlbarProviderSearchTips: "resource:///modules/UrlbarProviderSearchTips.jsm",
|
||||
UrlbarTestUtils: "resource://testing-common/UrlbarTestUtils.jsm",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyServiceGetter(
|
||||
|
|
|
@ -35,7 +35,6 @@ add_task(async function tipIsSecondResult() {
|
|||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
value: "test",
|
||||
window,
|
||||
waitForFocus,
|
||||
});
|
||||
|
||||
Assert.equal(
|
||||
|
@ -144,7 +143,6 @@ add_task(async function tipIsOnlyResult() {
|
|||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
value: "test",
|
||||
window,
|
||||
waitForFocus,
|
||||
});
|
||||
|
||||
Assert.equal(
|
||||
|
@ -229,7 +227,6 @@ add_task(async function tipHasNoHelpButton() {
|
|||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
value: "test",
|
||||
window,
|
||||
waitForFocus,
|
||||
});
|
||||
|
||||
Assert.equal(
|
||||
|
|
|
@ -21,11 +21,25 @@ XPCOMUtils.defineLazyModuleGetters(this, {
|
|||
"resource:///modules/UrlbarProviderInterventions.jsm",
|
||||
UrlbarProvidersManager: "resource:///modules/UrlbarProvidersManager.jsm",
|
||||
UrlbarResult: "resource:///modules/UrlbarResult.jsm",
|
||||
UrlbarTestUtils: "resource://testing-common/UrlbarTestUtils.jsm",
|
||||
SearchTestUtils: "resource://testing-common/SearchTestUtils.jsm",
|
||||
TelemetryTestUtils: "resource://testing-common/TelemetryTestUtils.jsm",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(this, "UrlbarTestUtils", () => {
|
||||
const { UrlbarTestUtils: module } = ChromeUtils.import(
|
||||
"resource://testing-common/UrlbarTestUtils.jsm"
|
||||
);
|
||||
module.init(this);
|
||||
return module;
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(this, "SearchTestUtils", () => {
|
||||
const { SearchTestUtils: module } = ChromeUtils.import(
|
||||
"resource://testing-common/SearchTestUtils.jsm"
|
||||
);
|
||||
module.init(Assert, registerCleanupFunction);
|
||||
return module;
|
||||
});
|
||||
|
||||
// For each intervention type, a search string that trigger the intervention.
|
||||
const SEARCH_STRINGS = {
|
||||
CLEAR: "firefox history",
|
||||
|
|
|
@ -40,7 +40,6 @@ add_task(async function setup() {
|
|||
async function testSearch(win, expectedName, expectedBaseUrl) {
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window: win,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "open a search",
|
||||
});
|
||||
let result = await UrlbarTestUtils.getDetailsOfResultAt(win, 0);
|
||||
|
|
|
@ -44,7 +44,6 @@ add_task(async function() {
|
|||
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "moz",
|
||||
});
|
||||
Assert.equal(
|
||||
|
@ -55,7 +54,6 @@ add_task(async function() {
|
|||
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "moz open a search",
|
||||
});
|
||||
let result = await UrlbarTestUtils.getDetailsOfResultAt(window, 0);
|
||||
|
|
|
@ -13,7 +13,6 @@ async function test_autocomplete(data) {
|
|||
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus,
|
||||
value: typed,
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
|
|
@ -11,7 +11,6 @@ async function test_autocomplete(data) {
|
|||
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: typed,
|
||||
});
|
||||
Assert.equal(gURLBar.value, autofilled, "autofilled value is as expected");
|
||||
|
|
|
@ -55,7 +55,6 @@ add_task(async function successfulAutofill() {
|
|||
add_task(async function firstResultNotAutofill() {
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus,
|
||||
value: "foo",
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
@ -77,7 +76,6 @@ add_task(async function caretNotAtEndOfSearchString() {
|
|||
// of the new search string.
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus,
|
||||
value: "exam",
|
||||
selectionStart: "exa".length,
|
||||
selectionEnd: "exa".length,
|
||||
|
@ -105,7 +103,6 @@ add_task(async function selectionNotEmpty() {
|
|||
// string, but make the selection non-empty.
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus,
|
||||
value: "exam",
|
||||
selectionStart: "exa".length,
|
||||
selectionEnd: "exam".length,
|
||||
|
@ -131,7 +128,6 @@ add_task(async function successfulAutofillAfterSettingPlaceholder() {
|
|||
// Now do another search.
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus,
|
||||
value: "exam",
|
||||
selectionStart: "exam".length,
|
||||
selectionEnd: "exam".length,
|
||||
|
@ -158,7 +154,6 @@ add_task(async function successfulAutofillPlaceholderSelected() {
|
|||
// new search string.
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus,
|
||||
value: "exam",
|
||||
selectionStart: "exam".length,
|
||||
selectionEnd: "example.com/".length,
|
||||
|
@ -177,7 +172,6 @@ add_task(async function successfulAutofillPlaceholderSelected() {
|
|||
async function doInitialAutofillSearch() {
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus,
|
||||
value: "ex",
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
@ -197,7 +191,6 @@ async function cleanUp() {
|
|||
// here, although that's not really necessary.
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus,
|
||||
value: "reset last search string",
|
||||
});
|
||||
await UrlbarTestUtils.promisePopupClose(window, () => {
|
||||
|
|
|
@ -16,7 +16,6 @@ add_task(async function test() {
|
|||
// Search for "e". It should autofill to example.com/.
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus,
|
||||
value: "e",
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
|
|
@ -24,7 +24,6 @@ add_task(async function origin() {
|
|||
// initial value.
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "ex",
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
@ -58,7 +57,6 @@ add_task(async function tokenAlias() {
|
|||
// initial value.
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "@__ex",
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
@ -83,7 +81,6 @@ add_task(async function noMatch1() {
|
|||
// initial value.
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "ex",
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
@ -106,7 +103,6 @@ add_task(async function noMatch1() {
|
|||
// won't happen. It's not important for this test to check that.
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "ex",
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
@ -135,7 +131,6 @@ add_task(async function noMatch2() {
|
|||
// initial value.
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "moz",
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
@ -200,7 +195,6 @@ add_task(async function clear_placeholder_for_keyword_or_alias() {
|
|||
// initial value.
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "e",
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
|
|
@ -24,7 +24,6 @@ add_task(async function origin() {
|
|||
]);
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "ExA",
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
@ -51,7 +50,6 @@ add_task(async function originPort() {
|
|||
]);
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "ExA",
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
@ -78,7 +76,6 @@ add_task(async function originScheme() {
|
|||
]);
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "http://ExA",
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
@ -105,7 +102,6 @@ add_task(async function originPortScheme() {
|
|||
]);
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "http://ExA",
|
||||
fireInputEvents: true,
|
||||
});
|
||||
|
@ -133,7 +129,6 @@ add_task(async function url() {
|
|||
]);
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "ExAmple.com/f",
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
@ -161,7 +156,6 @@ add_task(async function urlPort() {
|
|||
]);
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "ExAmple.com:8888/f",
|
||||
fireInputEvents: true,
|
||||
});
|
||||
|
@ -192,7 +186,6 @@ add_task(async function tokenAlias() {
|
|||
});
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "@ExA",
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
@ -218,7 +211,6 @@ add_task(async function backspaceNoAutofill() {
|
|||
]);
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "ExA",
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
|
|
@ -14,7 +14,6 @@ add_task(async function test() {
|
|||
// Search for "ex". It should autofill to example.com/.
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus,
|
||||
value: "ex",
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
|
|
@ -20,7 +20,7 @@ async function checkOpensOnFocus(win = window) {
|
|||
|
||||
// Focus with the mouse.
|
||||
await UrlbarTestUtils.promisePopupOpen(win, () => {
|
||||
EventUtils.synthesizeMouseAtCenter(win.gURLBar.inputField, {});
|
||||
EventUtils.synthesizeMouseAtCenter(win.gURLBar.inputField, {}, win);
|
||||
});
|
||||
await UrlbarTestUtils.promisePopupClose(win, () => {
|
||||
win.gURLBar.blur();
|
||||
|
@ -56,7 +56,7 @@ add_task(async function newtabAndHome() {
|
|||
async browser => {
|
||||
// We don't wait for load, but we must ensure to be on the expected url.
|
||||
await TestUtils.waitForCondition(
|
||||
() => window.gBrowser.currentURI.spec == url,
|
||||
() => gBrowser.currentURI.spec == url,
|
||||
"Ensure we're on the expected page"
|
||||
);
|
||||
await checkOpensOnFocus();
|
||||
|
|
|
@ -54,7 +54,6 @@ add_task(async function switchToTab() {
|
|||
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "% robots",
|
||||
});
|
||||
let result = await UrlbarTestUtils.getDetailsOfResultAt(window, 1);
|
||||
|
@ -92,7 +91,6 @@ add_task(async function searchSuggestions() {
|
|||
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "foo",
|
||||
});
|
||||
let length = await UrlbarTestUtils.getResultCount(window);
|
||||
|
|
|
@ -74,7 +74,6 @@ add_task(async function() {
|
|||
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "example.com/autocomplete",
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
|
|
@ -14,7 +14,6 @@ add_task(async function test_windowSwitch() {
|
|||
);
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "www.mozilla.org",
|
||||
});
|
||||
await UrlbarTestUtils.waitForAutocompleteResultAt(window, 0);
|
||||
|
|
|
@ -24,7 +24,6 @@ add_task(async function() {
|
|||
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "http://example.com",
|
||||
});
|
||||
|
||||
|
|
|
@ -30,7 +30,6 @@ add_task(
|
|||
taskWithNewTab(async function test_keyword() {
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "keyword bear",
|
||||
});
|
||||
gURLBar.focus();
|
||||
|
@ -49,7 +48,6 @@ add_task(
|
|||
taskWithNewTab(async function test_sametext() {
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "example.com",
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
@ -76,7 +74,6 @@ add_task(
|
|||
taskWithNewTab(async function test_after_empty_search() {
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "",
|
||||
});
|
||||
gURLBar.focus();
|
||||
|
@ -145,7 +142,6 @@ add_task(
|
|||
// the user removed text from the end.
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "",
|
||||
});
|
||||
await UrlbarTestUtils.promisePopupClose(window);
|
||||
|
|
|
@ -23,7 +23,6 @@ add_task(async function() {
|
|||
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "bug1060642",
|
||||
});
|
||||
let result = await UrlbarTestUtils.getDetailsOfResultAt(window, 1);
|
||||
|
|
|
@ -50,7 +50,6 @@ add_task(async function() {
|
|||
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "example.com/autocomplete",
|
||||
});
|
||||
await UrlbarTestUtils.waitForAutocompleteResultAt(window, maxResults - 1);
|
||||
|
|
|
@ -113,7 +113,6 @@ add_task(async function() {
|
|||
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: testcase.input,
|
||||
});
|
||||
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
add_task(async function() {
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "This is a generic sentence",
|
||||
});
|
||||
await UrlbarTestUtils.promisePopupClose(window);
|
||||
|
|
|
@ -52,7 +52,6 @@ add_task(async function actionURILosslessDecode() {
|
|||
let url = "http://" + urlNoScheme;
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: url,
|
||||
});
|
||||
|
||||
|
@ -90,7 +89,6 @@ add_task(async function test_resultsDisplayDecoded() {
|
|||
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "example",
|
||||
});
|
||||
|
||||
|
@ -105,7 +103,6 @@ add_task(async function test_resultsDisplayDecoded() {
|
|||
async function checkInput(inputStr) {
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: inputStr,
|
||||
});
|
||||
|
||||
|
|
|
@ -37,7 +37,6 @@ function sendDelete() {
|
|||
async function testDelete() {
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "bug1105244",
|
||||
});
|
||||
|
||||
|
|
|
@ -29,7 +29,6 @@ async function runTest() {
|
|||
// Do an initial search for "x".
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "x",
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
@ -76,7 +75,7 @@ async function deleteInput() {
|
|||
EventUtils.synthesizeKey("KEY_Backspace");
|
||||
}
|
||||
Assert.ok(
|
||||
window.gURLBar.view.isOpen,
|
||||
gURLBar.view.isOpen,
|
||||
"View should remain open when deleting all input text"
|
||||
);
|
||||
let queryContext = await UrlbarTestUtils.promiseSearchComplete(window);
|
||||
|
|
|
@ -28,7 +28,6 @@ add_task(async function testSwitchToTabTextDisplay() {
|
|||
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus,
|
||||
value: "omniboxtest ",
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
|
|
@ -30,7 +30,6 @@ add_task(async function test() {
|
|||
});
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: str,
|
||||
});
|
||||
EventUtils.synthesizeKey("KEY_Enter");
|
||||
|
|
|
@ -40,7 +40,6 @@ add_task(async function url() {
|
|||
add_task(async function userTyping() {
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "foo",
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
@ -59,7 +58,6 @@ add_task(async function userTyping() {
|
|||
add_task(async function empty() {
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "",
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
|
|
@ -18,7 +18,6 @@ add_task(async function setup() {
|
|||
add_task(async function test_escape() {
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus,
|
||||
value: "invalid",
|
||||
});
|
||||
// Look for our result.
|
||||
|
@ -51,7 +50,6 @@ add_task(async function test_escape() {
|
|||
add_task(async function test_edit_url() {
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus,
|
||||
value: "invalid",
|
||||
});
|
||||
// Look for our result.
|
||||
|
|
|
@ -69,7 +69,6 @@ add_task(async function() {
|
|||
let promise = promiseLoadURL();
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus,
|
||||
value,
|
||||
});
|
||||
EventUtils.synthesizeKey("KEY_Enter");
|
||||
|
|
|
@ -54,7 +54,6 @@ add_task(async function slowHeuristicSelected() {
|
|||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
value: "test",
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
});
|
||||
|
||||
// The first result should be the heuristic and it should be selected.
|
||||
|
@ -127,7 +126,6 @@ add_task(async function oneOffRemainsSelected() {
|
|||
let searchPromise = UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
value: "test",
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
});
|
||||
|
||||
// When the view opens, press the up arrow key to select the one-off search
|
||||
|
@ -157,8 +155,8 @@ add_task(async function oneOffRemainsSelected() {
|
|||
|
||||
// The one-off settings button should be selected.
|
||||
Assert.equal(
|
||||
window.gURLBar.view.oneOffSearchButtons.selectedButton,
|
||||
window.gURLBar.view.oneOffSearchButtons.settingsButtonCompact
|
||||
gURLBar.view.oneOffSearchButtons.selectedButton,
|
||||
gURLBar.view.oneOffSearchButtons.settingsButtonCompact
|
||||
);
|
||||
|
||||
await UrlbarTestUtils.promisePopupClose(window);
|
||||
|
|
|
@ -16,7 +16,6 @@ async function bumpScore(uri, searchString, counts, useMouseClick = false) {
|
|||
for (let i = 0; i < counts.picks; ++i) {
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: searchString,
|
||||
});
|
||||
let promise = BrowserTestUtils.waitForDocLoadAndStopIt(
|
||||
|
@ -67,7 +66,6 @@ add_task(async function test_adaptive_with_search_terms() {
|
|||
await bumpScore(url2, "site", { visits: 3, picks: 3 });
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "si",
|
||||
});
|
||||
let result = await UrlbarTestUtils.getDetailsOfResultAt(window, 1);
|
||||
|
@ -83,7 +81,6 @@ add_task(async function test_adaptive_with_search_terms() {
|
|||
await bumpScore(url2, "si", { visits: 3, picks: 3 });
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "si",
|
||||
});
|
||||
result = await UrlbarTestUtils.getDetailsOfResultAt(window, 1);
|
||||
|
@ -97,7 +94,6 @@ add_task(async function test_adaptive_with_search_terms() {
|
|||
await bumpScore(url2, "si", { visits: 3, picks: 1 });
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "si",
|
||||
});
|
||||
result = await UrlbarTestUtils.getDetailsOfResultAt(window, 1);
|
||||
|
@ -111,7 +107,6 @@ add_task(async function test_adaptive_with_search_terms() {
|
|||
await bumpScore(url2, "si", { visits: 3, picks: 3 });
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "si",
|
||||
});
|
||||
result = await UrlbarTestUtils.getDetailsOfResultAt(window, 1);
|
||||
|
@ -125,7 +120,6 @@ add_task(async function test_adaptive_with_search_terms() {
|
|||
await bumpScore(url2, "site", { visits: 3, picks: 1 });
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "si",
|
||||
});
|
||||
result = await UrlbarTestUtils.getDetailsOfResultAt(window, 1);
|
||||
|
@ -139,7 +133,6 @@ add_task(async function test_adaptive_with_search_terms() {
|
|||
await bumpScore(url2, "site", { visits: 3, picks: 3 });
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "si",
|
||||
});
|
||||
result = await UrlbarTestUtils.getDetailsOfResultAt(window, 1);
|
||||
|
@ -159,7 +152,6 @@ add_task(async function test_adaptive_with_decay() {
|
|||
await bumpScore(url2, "si", { visits: 3, picks: 3 });
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "si",
|
||||
});
|
||||
let result = await UrlbarTestUtils.getDetailsOfResultAt(window, 1);
|
||||
|
@ -174,7 +166,6 @@ add_task(async function test_adaptive_with_decay() {
|
|||
await bumpScore(url1, "si", { visits: 3, picks: 3 });
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "si",
|
||||
});
|
||||
result = await UrlbarTestUtils.getDetailsOfResultAt(window, 1);
|
||||
|
@ -194,7 +185,6 @@ add_task(async function test_adaptive_limited() {
|
|||
await bumpScore(url2, "si", { visits: 3, picks: 3 });
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "si",
|
||||
});
|
||||
let result = await UrlbarTestUtils.getDetailsOfResultAt(window, 1);
|
||||
|
@ -209,7 +199,6 @@ add_task(async function test_adaptive_limited() {
|
|||
await bumpScore(url1, "si", { visits: 3, picks: 3 });
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "si",
|
||||
});
|
||||
result = await UrlbarTestUtils.getDetailsOfResultAt(window, 1);
|
||||
|
@ -246,7 +235,6 @@ add_task(async function test_adaptive_limited() {
|
|||
let expectedBookmarkIndex = Math.floor(n / 4) + 2;
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "site",
|
||||
});
|
||||
let result = await UrlbarTestUtils.getDetailsOfResultAt(
|
||||
|
@ -293,7 +281,6 @@ add_task(async function test_adaptive_behaviors() {
|
|||
});
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "site",
|
||||
});
|
||||
let result = await UrlbarTestUtils.getDetailsOfResultAt(window, 1);
|
||||
|
@ -322,7 +309,6 @@ add_task(async function test_adaptive_mouse() {
|
|||
await bumpScore(url2, "site", { visits: 3, picks: 1 }, true);
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "si",
|
||||
});
|
||||
let result = await UrlbarTestUtils.getDetailsOfResultAt(window, 1);
|
||||
|
@ -336,7 +322,6 @@ add_task(async function test_adaptive_mouse() {
|
|||
await bumpScore(url2, "site", { visits: 3, picks: 3 }, true);
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "si",
|
||||
});
|
||||
result = await UrlbarTestUtils.getDetailsOfResultAt(window, 1);
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
async function promise_first_result(inputText) {
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: inputText,
|
||||
});
|
||||
|
||||
|
|
|
@ -33,7 +33,6 @@ add_task(async function setup() {
|
|||
info("Search keyword, then press enter");
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "bm",
|
||||
});
|
||||
let result = await UrlbarTestUtils.getDetailsOfResultAt(window, 0);
|
||||
|
@ -45,7 +44,6 @@ add_task(async function setup() {
|
|||
info("Search keyword with searchstring, then press enter");
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "bm a",
|
||||
});
|
||||
let result = await UrlbarTestUtils.getDetailsOfResultAt(window, 0);
|
||||
|
@ -56,7 +54,6 @@ add_task(async function setup() {
|
|||
async function() {
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "bm",
|
||||
});
|
||||
let result = await UrlbarTestUtils.getDetailsOfResultAt(window, 0);
|
||||
|
@ -69,7 +66,6 @@ add_task(async function setup() {
|
|||
info("Search keyword with searchstring, then click");
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "bm a",
|
||||
});
|
||||
let result = await UrlbarTestUtils.getDetailsOfResultAt(window, 0);
|
||||
|
|
|
@ -37,7 +37,6 @@ add_task(async function() {
|
|||
value => {
|
||||
return UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus,
|
||||
value,
|
||||
});
|
||||
},
|
||||
|
|
|
@ -37,7 +37,6 @@ add_task(async function() {
|
|||
value => {
|
||||
return UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus,
|
||||
value,
|
||||
});
|
||||
},
|
||||
|
|
|
@ -25,7 +25,6 @@ add_task(async function() {
|
|||
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "keyword search",
|
||||
});
|
||||
let result = await UrlbarTestUtils.getDetailsOfResultAt(window, 0);
|
||||
|
|
|
@ -44,7 +44,6 @@ add_task(async function() {
|
|||
);
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "keyword a",
|
||||
});
|
||||
await UrlbarTestUtils.waitForAutocompleteResultAt(window, 1);
|
||||
|
|
|
@ -15,7 +15,6 @@ add_task(async function() {
|
|||
);
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "m",
|
||||
});
|
||||
assertOpen();
|
||||
|
@ -27,7 +26,6 @@ add_task(async function() {
|
|||
);
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "m",
|
||||
});
|
||||
assertOpen();
|
||||
|
|
|
@ -44,7 +44,6 @@ add_task(async function() {
|
|||
let typedValue = "browser_urlbarOneOffs";
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: typedValue,
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
@ -137,7 +136,6 @@ add_task(async function searchWith() {
|
|||
let typedValue = "foo";
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: typedValue,
|
||||
});
|
||||
let result = await UrlbarTestUtils.getDetailsOfResultAt(window, 0);
|
||||
|
@ -179,7 +177,6 @@ add_task(async function oneOffClick() {
|
|||
let typedValue = "foo.bar";
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: typedValue,
|
||||
});
|
||||
await UrlbarTestUtils.getDetailsOfResultAt(window, 0);
|
||||
|
@ -207,7 +204,6 @@ add_task(async function oneOffReturn() {
|
|||
let typedValue = "foo.bar";
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: typedValue,
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
@ -244,7 +240,6 @@ add_task(async function hiddenOneOffs() {
|
|||
let typedValue = "foo";
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: typedValue,
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
@ -266,7 +261,6 @@ add_task(async function hiddenWhenUsingSearchAlias() {
|
|||
let typedValue = "@example";
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: typedValue,
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
@ -281,7 +275,6 @@ add_task(async function hiddenWhenUsingSearchAlias() {
|
|||
typedValue = "not an engine alias";
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: typedValue,
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
|
|
@ -65,7 +65,6 @@ async function searchInTab(checkFn) {
|
|||
await BrowserTestUtils.withNewTab({ gBrowser }, async testBrowser => {
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "foo",
|
||||
});
|
||||
|
||||
|
@ -152,7 +151,6 @@ add_task(async function switchDefaultEngine() {
|
|||
await BrowserTestUtils.withNewTab({ gBrowser }, async () => {
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "foo",
|
||||
});
|
||||
|
||||
|
|
|
@ -62,7 +62,6 @@ async function withSuggestionOnce(useFormHistory, testFn) {
|
|||
window,
|
||||
value,
|
||||
fireInputEvent: true,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
});
|
||||
let index = await UrlbarTestUtils.promiseSuggestionsPresent(window);
|
||||
await assertState({
|
||||
|
@ -237,7 +236,6 @@ add_task(async function overridden_engine_not_reused() {
|
|||
let typedValue = "foo";
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: typedValue,
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
@ -272,7 +270,6 @@ add_task(async function overridden_engine_not_reused() {
|
|||
await UrlbarTestUtils.promisePopupClose(window);
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: typedValue,
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
|
|
@ -39,7 +39,6 @@ async function selectSettings(activateFn) {
|
|||
async browser => {
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "example.com",
|
||||
});
|
||||
await UrlbarTestUtils.waitForAutocompleteResultAt(
|
||||
|
|
|
@ -60,7 +60,6 @@ add_task(async function test_with_input_and_results() {
|
|||
// Test paste and go When there's some input and the results pane is open.
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "foo",
|
||||
});
|
||||
const url = "http://example.com/";
|
||||
|
|
|
@ -38,7 +38,6 @@ add_task(async function test() {
|
|||
info("Search for the decoded string.");
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: decoded,
|
||||
});
|
||||
Assert.equal(
|
||||
|
@ -52,7 +51,6 @@ add_task(async function test() {
|
|||
info("Search for the encoded string.");
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: encodeURIComponent(decoded),
|
||||
});
|
||||
Assert.equal(
|
||||
|
|
|
@ -31,7 +31,6 @@ add_task(async function() {
|
|||
info("Search in urlbar");
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window: win,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: urlbarTestValue,
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
|
|
@ -79,7 +79,6 @@ add_task(async function test_remotetab_opens() {
|
|||
async function() {
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "Test Remote",
|
||||
});
|
||||
|
||||
|
|
|
@ -21,7 +21,6 @@ add_task(async function test_remove_history() {
|
|||
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "from_urlbar",
|
||||
});
|
||||
|
||||
|
@ -85,7 +84,6 @@ add_task(async function test_remove_form_history() {
|
|||
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "foo",
|
||||
});
|
||||
|
||||
|
@ -154,7 +152,6 @@ add_task(async function test_remove_bookmark_doesnt() {
|
|||
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "from_urlbar",
|
||||
});
|
||||
let result = await UrlbarTestUtils.getDetailsOfResultAt(window, 1);
|
||||
|
|
|
@ -14,7 +14,6 @@ add_task(async function test() {
|
|||
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "",
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
|
|
@ -58,7 +58,6 @@ add_task(async function oneTip() {
|
|||
let context = await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
value: "test",
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
});
|
||||
|
||||
checkResults(context.results, expectedResults);
|
||||
|
@ -105,7 +104,6 @@ add_task(async function threeTips() {
|
|||
let context = await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
value: "test",
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
});
|
||||
|
||||
checkResults(context.results, expectedResults);
|
||||
|
@ -147,7 +145,6 @@ add_task(async function oneTip_nonRestricting() {
|
|||
let context = await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
value: "test",
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
});
|
||||
|
||||
checkResults(context.results, expectedResults);
|
||||
|
@ -203,7 +200,6 @@ add_task(async function threeTips_nonRestricting() {
|
|||
let context = await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
value: "test",
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
});
|
||||
|
||||
checkResults(context.results, expectedResults);
|
||||
|
|
|
@ -105,7 +105,6 @@ async function test_window(win) {
|
|||
let autofill = url == "http://example.com/";
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window: win,
|
||||
waitForFocus,
|
||||
value: autofill ? "ex" : "foo",
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
@ -147,7 +146,6 @@ add_task(async function test_tabSwitch() {
|
|||
let win = await BrowserTestUtils.openNewBrowserWindow();
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window: win,
|
||||
waitForFocus,
|
||||
value: "ex",
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
@ -179,7 +177,6 @@ add_task(async function test_tabSwitch() {
|
|||
let tab2 = await BrowserTestUtils.openNewForegroundTab(win.gBrowser);
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window: win,
|
||||
waitForFocus,
|
||||
value: "ex",
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
@ -202,7 +199,6 @@ add_task(async function test_tabSwitch() {
|
|||
tab2 = await BrowserTestUtils.openNewForegroundTab(win.gBrowser);
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window: win,
|
||||
waitForFocus,
|
||||
value: "xam",
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
@ -226,7 +222,6 @@ add_task(async function test_tabSwitch() {
|
|||
info("autofill in tab2, switch to tab1, then back to tab2 with the mouse");
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window: win,
|
||||
waitForFocus,
|
||||
value: "e",
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
@ -367,7 +362,6 @@ add_task(async function test_pageproxystate_valid() {
|
|||
info("Search for a full url and confirm it with Enter");
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window: win,
|
||||
waitForFocus,
|
||||
value: "about:robots",
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
@ -415,7 +409,6 @@ add_task(async function test_clicks_after_autofill() {
|
|||
info("autofill in tab2, switch to tab1, then back to tab2 with the mouse");
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window: win,
|
||||
waitForFocus,
|
||||
value: "e",
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
|
|
@ -9,7 +9,6 @@ add_task(async function() {
|
|||
async function() {
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus,
|
||||
value: "a",
|
||||
});
|
||||
|
||||
|
|
|
@ -57,7 +57,6 @@ async function runURLBarSearchTest({
|
|||
value => {
|
||||
return UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window: aWindow,
|
||||
waitForFocus,
|
||||
value,
|
||||
});
|
||||
},
|
||||
|
|
|
@ -39,7 +39,6 @@ add_task(async function clickSuggestion() {
|
|||
gURLBar.focus();
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "foo",
|
||||
});
|
||||
let [idx, suggestion, engineName] = await getFirstSuggestion();
|
||||
|
@ -80,7 +79,6 @@ async function testPressEnterOnSuggestion(
|
|||
gURLBar.focus();
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "foo",
|
||||
});
|
||||
let [idx, suggestion, engineName] = await getFirstSuggestion();
|
||||
|
@ -141,7 +139,6 @@ add_task(async function copySuggestionText() {
|
|||
gURLBar.focus();
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "foo",
|
||||
});
|
||||
let [idx, suggestion] = await getFirstSuggestion();
|
||||
|
@ -170,7 +167,6 @@ add_task(async function typeMaxChars() {
|
|||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
value,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
});
|
||||
|
||||
// Suggestions should be fetched since we allow them when typing, and the
|
||||
|
@ -268,7 +264,6 @@ add_task(async function heuristicAddsFormHistory() {
|
|||
gURLBar.focus();
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "foo",
|
||||
});
|
||||
|
||||
|
|
|
@ -46,7 +46,6 @@ add_task(async function heuristicResultMouse() {
|
|||
gURLBar.focus();
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "heuristicResult",
|
||||
});
|
||||
let result = await UrlbarTestUtils.getDetailsOfResultAt(window, 0);
|
||||
|
@ -70,7 +69,6 @@ add_task(async function heuristicResultKeyboard() {
|
|||
gURLBar.focus();
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "heuristicResult",
|
||||
});
|
||||
let result = await UrlbarTestUtils.getDetailsOfResultAt(window, 0);
|
||||
|
@ -93,7 +91,6 @@ add_task(async function searchSuggestionMouse() {
|
|||
gURLBar.focus();
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "searchSuggestion",
|
||||
});
|
||||
let idx = await getFirstSuggestionIndex();
|
||||
|
@ -116,7 +113,6 @@ add_task(async function searchSuggestionKeyboard() {
|
|||
gURLBar.focus();
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "searchSuggestion",
|
||||
});
|
||||
let idx = await getFirstSuggestionIndex();
|
||||
|
@ -139,7 +135,6 @@ add_task(async function formHistoryMouse() {
|
|||
gURLBar.focus();
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "foo",
|
||||
});
|
||||
let index = await getFirstSuggestionIndex();
|
||||
|
@ -166,7 +161,6 @@ add_task(async function formHistoryKeyboard() {
|
|||
gURLBar.focus();
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "foo",
|
||||
});
|
||||
let index = await getFirstSuggestionIndex();
|
||||
|
|
|
@ -54,7 +54,6 @@ add_task(async function viewContainsStaleRows() {
|
|||
// view due to the heuristic result, but that's not important.)
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "x",
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
@ -185,7 +184,6 @@ add_task(async function staleReplacedWithFresh() {
|
|||
// Search for "tes" and wait for the search to finish.
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "tes",
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
|
|
@ -21,7 +21,6 @@ add_task(async function init() {
|
|||
add_task(async function downKey() {
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "exam",
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
@ -50,7 +49,6 @@ add_task(async function downKey() {
|
|||
add_task(async function upKey() {
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "exam",
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
@ -82,7 +80,6 @@ add_task(async function upKey() {
|
|||
add_task(async function pageDownKey() {
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "exam",
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
@ -110,7 +107,6 @@ add_task(async function pageDownKey() {
|
|||
add_task(async function pageUpKey() {
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "exam",
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
@ -138,7 +134,6 @@ add_task(async function pageUpKey() {
|
|||
add_task(async function pageDownKeyShowsView() {
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "exam",
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
@ -152,7 +147,6 @@ add_task(async function pageDownKeyShowsView() {
|
|||
add_task(async function pageUpKeyShowsView() {
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "exam",
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
|
|
@ -101,7 +101,6 @@ add_task(async function test_nonsearch() {
|
|||
);
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus,
|
||||
value: "exa",
|
||||
});
|
||||
await AssertNoPrivateResult(window);
|
||||
|
@ -113,7 +112,6 @@ add_task(async function test_search() {
|
|||
);
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus,
|
||||
value: "unique198273982173",
|
||||
});
|
||||
await AssertPrivateResult(window, await Services.search.getDefault(), false);
|
||||
|
@ -128,7 +126,6 @@ add_task(async function test_search_disabled_suggestions() {
|
|||
});
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus,
|
||||
value: "unique198273982173",
|
||||
});
|
||||
await AssertPrivateResult(window, await Services.search.getDefault(), false);
|
||||
|
@ -141,7 +138,6 @@ add_task(async function test_oneoff_selected_keyboard() {
|
|||
);
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus,
|
||||
value: "unique198273982173",
|
||||
});
|
||||
await AssertPrivateResult(window, await Services.search.getDefault(), false);
|
||||
|
@ -171,7 +167,6 @@ add_task(async function test_oneoff_selected_mouse() {
|
|||
);
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus,
|
||||
value: "unique198273982173",
|
||||
});
|
||||
await AssertPrivateResult(window, await Services.search.getDefault(), false);
|
||||
|
@ -209,7 +204,6 @@ add_task(async function test_search_private_engine() {
|
|||
await Services.search.setDefaultPrivate(engine);
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus,
|
||||
value: "unique198273982173",
|
||||
});
|
||||
await AssertPrivateResult(window, engine, true);
|
||||
|
@ -224,7 +218,6 @@ add_task(async function test_privateWindow() {
|
|||
});
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window: privateWin,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "unique198273982173",
|
||||
});
|
||||
await AssertNoPrivateResult(privateWin);
|
||||
|
@ -241,7 +234,6 @@ add_task(async function test_permanentPB() {
|
|||
let win = await BrowserTestUtils.openNewBrowserWindow();
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window: win,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "unique198273982173",
|
||||
});
|
||||
await AssertNoPrivateResult(win);
|
||||
|
@ -255,7 +247,6 @@ add_task(async function test_openPBWindow() {
|
|||
);
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus,
|
||||
value: "unique198273982173",
|
||||
});
|
||||
await AssertPrivateResult(
|
||||
|
@ -286,7 +277,6 @@ add_task(async function test_oneoff_selected_with_private_engine_mouse() {
|
|||
);
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus,
|
||||
value: "unique198273982173",
|
||||
});
|
||||
await AssertPrivateResult(
|
||||
|
@ -325,7 +315,6 @@ add_task(async function test_oneoff_selected_with_private_engine_keyboard() {
|
|||
);
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus,
|
||||
value: "unique198273982173",
|
||||
});
|
||||
await AssertPrivateResult(
|
||||
|
@ -362,14 +351,12 @@ add_task(async function test_alias() {
|
|||
);
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus,
|
||||
value: "alias",
|
||||
});
|
||||
await AssertNoPrivateResult(window);
|
||||
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus,
|
||||
value: "alias something",
|
||||
});
|
||||
await AssertNoPrivateResult(window);
|
||||
|
@ -381,21 +368,18 @@ add_task(async function test_restrict() {
|
|||
);
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus,
|
||||
value: UrlbarTokenizer.RESTRICT.SEARCH,
|
||||
});
|
||||
await AssertNoPrivateResult(window);
|
||||
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus,
|
||||
value: UrlbarTokenizer.RESTRICT.SEARCH + " ",
|
||||
});
|
||||
await AssertNoPrivateResult(window);
|
||||
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus,
|
||||
value: " " + UrlbarTokenizer.RESTRICT.SEARCH,
|
||||
});
|
||||
await AssertNoPrivateResult(window);
|
||||
|
@ -408,7 +392,6 @@ add_task(async function test_restrict_search() {
|
|||
let engine = await Services.search.getDefaultPrivate();
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus,
|
||||
value: UrlbarTokenizer.RESTRICT.SEARCH + "test",
|
||||
});
|
||||
let result = await AssertPrivateResult(window, engine, true);
|
||||
|
@ -416,7 +399,6 @@ add_task(async function test_restrict_search() {
|
|||
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus,
|
||||
value: "test" + UrlbarTokenizer.RESTRICT.SEARCH,
|
||||
});
|
||||
result = await AssertPrivateResult(window, engine, true);
|
||||
|
|
|
@ -64,7 +64,6 @@ add_task(async function search_test() {
|
|||
info("Searching for 'foo'");
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "foo",
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
@ -99,7 +98,6 @@ add_task(async function popup_mousedown_test() {
|
|||
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: searchString,
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
@ -140,7 +138,6 @@ add_task(async function test_autofill() {
|
|||
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: searchString,
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
@ -171,7 +168,6 @@ add_task(async function test_autofill_privateContext() {
|
|||
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window: privateWin,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: searchString,
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
@ -192,7 +188,6 @@ add_task(async function test_no_heuristic_result() {
|
|||
info(`Searching for the empty string`);
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "",
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
|
|
@ -187,7 +187,6 @@ add_task(
|
|||
info(`Searching for '${searchString}'`);
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: searchString,
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
|
|
@ -43,7 +43,6 @@ add_task(async function() {
|
|||
async function typeAndSubmitAndStop(url) {
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: url,
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
|
|
@ -50,7 +50,6 @@ add_task(async function mainTest() {
|
|||
// and the two suggestions.
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "amp",
|
||||
});
|
||||
await TestUtils.waitForCondition(() => {
|
||||
|
|
|
@ -41,7 +41,6 @@ add_task(async function suggestedIndex() {
|
|||
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "foo",
|
||||
});
|
||||
|
||||
|
@ -93,7 +92,6 @@ add_task(async function suggestedIndex_append() {
|
|||
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "bar",
|
||||
});
|
||||
|
||||
|
|
|
@ -32,7 +32,6 @@ add_task(async function() {
|
|||
// Now open the popup.
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus,
|
||||
value: "",
|
||||
});
|
||||
// Check that the popup closes when we switch tab.
|
||||
|
|
|
@ -18,7 +18,6 @@ add_task(async function test_switchTab_currentTab() {
|
|||
async () => {
|
||||
let context = await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "robot",
|
||||
});
|
||||
Assert.ok(
|
||||
|
|
|
@ -20,7 +20,6 @@ add_task(async function test_switchtab_decodeuri() {
|
|||
info("Wait for autocomplete");
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "dummy_page",
|
||||
});
|
||||
|
||||
|
|
|
@ -29,7 +29,6 @@ add_task(async function test_switchtab_override() {
|
|||
info("Wait for autocomplete");
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "dummy_page",
|
||||
});
|
||||
|
||||
|
|
|
@ -43,7 +43,6 @@ add_task(async function test_switchToTab_closes() {
|
|||
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus,
|
||||
value: "dummy",
|
||||
});
|
||||
|
||||
|
|
|
@ -32,7 +32,6 @@ add_task(async function test_switchToTab_url() {
|
|||
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus,
|
||||
value: TEST_URL,
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
|
|
@ -20,7 +20,6 @@ add_task(async function tabWithSearchString() {
|
|||
info("Tab with a search string");
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "exam",
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
@ -28,7 +27,6 @@ add_task(async function tabWithSearchString() {
|
|||
info("Reverse Tab with a search string");
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "exam",
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
@ -39,7 +37,6 @@ add_task(async function tabNoSearchString() {
|
|||
info("Tab without a search string");
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "",
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
@ -47,7 +44,6 @@ add_task(async function tabNoSearchString() {
|
|||
info("Reverse Tab without a search string");
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "",
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
@ -58,7 +54,6 @@ add_task(async function tabAfterBlur() {
|
|||
info("Tab after closing the view");
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "exam",
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
@ -108,7 +103,6 @@ add_task(async function tabRetainedResultMouseFocus() {
|
|||
info("Tab after retained results with mouse focus");
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "exam",
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
@ -124,7 +118,6 @@ add_task(async function tabRetainedResultsKeyboardFocus() {
|
|||
info("Tab after retained results with keyboard focus");
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "exam",
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
@ -140,7 +133,6 @@ add_task(async function tabRetainedResults() {
|
|||
info("Tab with a search string after mouse focus.");
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "exam",
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
|
|
@ -182,7 +182,6 @@ async function checkAutocompleteResults(expected) {
|
|||
info("Searching open pages.");
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: RESTRICT_TOKEN_OPENPAGE,
|
||||
});
|
||||
|
||||
|
|
|
@ -86,7 +86,6 @@ async function runTest(aSourceWindow, aDestWindow, aExpectSwitch, aCallback) {
|
|||
let searchString = TEST_URL;
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window: aDestWindow,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: searchString,
|
||||
});
|
||||
|
||||
|
|
|
@ -19,7 +19,6 @@ add_task(async function() {
|
|||
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "textruns",
|
||||
});
|
||||
let result = await UrlbarTestUtils.getDetailsOfResultAt(window, 1);
|
||||
|
|
|
@ -322,7 +322,6 @@ add_task(async function enterAutofillsAlias() {
|
|||
for (let value of [ALIAS.substring(0, ALIAS.length - 1), ALIAS]) {
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus,
|
||||
value,
|
||||
selectionStart: value.length,
|
||||
selectionEnd: value.length,
|
||||
|
@ -356,7 +355,6 @@ async function doSimpleTest(revertBetweenSteps) {
|
|||
// "@tes" -- not an alias, no highlight
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: ALIAS.substr(0, ALIAS.length - 1),
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
@ -371,7 +369,6 @@ async function doSimpleTest(revertBetweenSteps) {
|
|||
// "@test" -- alias, highlight
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: ALIAS,
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
@ -386,7 +383,6 @@ async function doSimpleTest(revertBetweenSteps) {
|
|||
// "@test foo" -- alias, highlight
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: ALIAS + " foo",
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
@ -401,7 +397,6 @@ async function doSimpleTest(revertBetweenSteps) {
|
|||
// "@test" -- alias, highlight
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: ALIAS,
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
@ -416,7 +411,6 @@ async function doSimpleTest(revertBetweenSteps) {
|
|||
// "@tes" -- not an alias, no highlight
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: ALIAS.substr(0, ALIAS.length - 1),
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
@ -485,7 +479,6 @@ function assertHighlighted(highlighted, expectedAlias) {
|
|||
add_task(async function hiddenEngine() {
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "@",
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
@ -513,7 +506,6 @@ add_task(async function hiddenEngine() {
|
|||
defaultEngine.hidden = true;
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "@",
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
@ -544,7 +536,6 @@ add_task(async function hiddenEngine() {
|
|||
add_task(async function hiddenEngine() {
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "@",
|
||||
fireInptuEvent: true,
|
||||
});
|
||||
|
@ -572,7 +563,6 @@ add_task(async function hiddenEngine() {
|
|||
defaultEngine.hidden = true;
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "@",
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
|
|
@ -45,7 +45,7 @@ async function checkDoesNotOpenOnFocus(win = window) {
|
|||
win.gURLBar.blur();
|
||||
|
||||
// Focus with the mouse.
|
||||
EventUtils.synthesizeMouseAtCenter(win.gURLBar.inputField, {});
|
||||
EventUtils.synthesizeMouseAtCenter(win.gURLBar.inputField, {}, win);
|
||||
// Because the panel opening may not be immediate, we must wait a bit.
|
||||
// eslint-disable-next-line mozilla/no-arbitrary-setTimeout
|
||||
await new Promise(resolve => setTimeout(resolve, 500));
|
||||
|
@ -421,7 +421,6 @@ add_task(async function topSitesDisabled() {
|
|||
// gets cleared.
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window: privateWin,
|
||||
waitForFocus,
|
||||
value: "example",
|
||||
});
|
||||
privateWin.gURLBar.select();
|
||||
|
|
|
@ -23,7 +23,6 @@ add_task(async function test_autofill() {
|
|||
let typed = "ex";
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus,
|
||||
value: typed,
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
@ -43,7 +42,6 @@ add_task(async function test_complete_selection() {
|
|||
let typed = "ex";
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus,
|
||||
value: typed,
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
|
|
@ -42,7 +42,6 @@ add_task(async function urlToTip() {
|
|||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
value: "test",
|
||||
window,
|
||||
waitForFocus,
|
||||
});
|
||||
|
||||
// The result at index 1 should be the http://example.com/test visit.
|
||||
|
@ -145,7 +144,6 @@ add_task(async function tipToURL() {
|
|||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
value: "test",
|
||||
window,
|
||||
waitForFocus,
|
||||
});
|
||||
|
||||
// The result at index 1 should be the tip from our provider.
|
||||
|
|
|
@ -36,7 +36,6 @@ const tests = [
|
|||
let promise = BrowserTestUtils.browserLoaded(win.gBrowser.selectedBrowser);
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window: win,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "x",
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
@ -63,7 +62,6 @@ const tests = [
|
|||
let promise = BrowserTestUtils.browserLoaded(win.gBrowser.selectedBrowser);
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window: win,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "multi word query ",
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
@ -117,7 +115,6 @@ const tests = [
|
|||
let promise = BrowserTestUtils.browserLoaded(win.gBrowser.selectedBrowser);
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window: win,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "moz",
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
@ -145,7 +142,6 @@ const tests = [
|
|||
let promise = BrowserTestUtils.browserLoaded(win.gBrowser.selectedBrowser);
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window: win,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "moz",
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
@ -198,7 +194,6 @@ const tests = [
|
|||
let promise = BrowserTestUtils.browserLoaded(win.gBrowser.selectedBrowser);
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window: win,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "kw test",
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
@ -276,7 +271,6 @@ const tests = [
|
|||
let promise = BrowserTestUtils.browserLoaded(win.gBrowser.selectedBrowser);
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window: win,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "example",
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
@ -308,7 +302,6 @@ const tests = [
|
|||
);
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window: win,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "exa",
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
@ -339,7 +332,6 @@ const tests = [
|
|||
let promise = BrowserTestUtils.browserLoaded(win.gBrowser.selectedBrowser);
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window: win,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "exa",
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
@ -369,7 +361,6 @@ const tests = [
|
|||
let promise = BrowserTestUtils.browserLoaded(win.gBrowser.selectedBrowser);
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window: win,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "exa",
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
@ -399,7 +390,6 @@ const tests = [
|
|||
let promise = BrowserTestUtils.browserLoaded(win.gBrowser.selectedBrowser);
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window: win,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "foo",
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
@ -433,7 +423,6 @@ const tests = [
|
|||
let promise = BrowserTestUtils.browserLoaded(win.gBrowser.selectedBrowser);
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window: win,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "foo",
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
@ -462,7 +451,6 @@ const tests = [
|
|||
win.gURLBar.select();
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window: win,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "@",
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
@ -737,7 +725,6 @@ const tests = [
|
|||
info("Reopen the view: type, blur, focus, confirm.");
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window: win,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "search",
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
@ -785,7 +772,6 @@ const tests = [
|
|||
let promise = BrowserTestUtils.browserLoaded(win.gBrowser.selectedBrowser);
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window: win,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "x",
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
@ -810,7 +796,6 @@ const tests = [
|
|||
info("Reopen the view: type, blur, focus, backspace, type, confirm.");
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window: win,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "search",
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
@ -859,7 +844,6 @@ const tests = [
|
|||
info("Reopen the view: type, blur, focus, type (overwrite), confirm.");
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window: win,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "search",
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
@ -908,7 +892,6 @@ const tests = [
|
|||
let promise = BrowserTestUtils.browserLoaded(win.gBrowser.selectedBrowser);
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window: win,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "x",
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
@ -1026,7 +1009,6 @@ const noEventTests = [
|
|||
let promise = BrowserTestUtils.browserLoaded(browser);
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window: win,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "x",
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
@ -1046,7 +1028,6 @@ const noEventTests = [
|
|||
let promise = BrowserTestUtils.browserLoaded(browser);
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window: win,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "x",
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
|
|
@ -6,10 +6,6 @@
|
|||
const exampleSearch = "f oo bar";
|
||||
const exampleUrl = "https://example.com/1";
|
||||
|
||||
const { UrlbarTestUtils } = ChromeUtils.import(
|
||||
"resource://testing-common/UrlbarTestUtils.jsm"
|
||||
);
|
||||
|
||||
function click(target) {
|
||||
let promise = BrowserTestUtils.waitForEvent(target, "click");
|
||||
EventUtils.synthesizeMouseAtCenter(target, {}, target.ownerGlobal);
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
add_task(async function() {
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "foo",
|
||||
});
|
||||
Assert.ok(
|
||||
|
@ -31,7 +30,6 @@ add_task(async function() {
|
|||
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: "foo",
|
||||
});
|
||||
Assert.ok(
|
||||
|
|
|
@ -28,7 +28,6 @@ async function testResult(input, expected) {
|
|||
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus: SimpleTest.waitForFocus,
|
||||
value: input.query,
|
||||
});
|
||||
|
||||
|
|
|
@ -73,7 +73,6 @@ add_task(async function test_tab_switch_result() {
|
|||
await BrowserTestUtils.withNewTab({ gBrowser }, async () => {
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus,
|
||||
value: "about:mozilla",
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
@ -96,7 +95,6 @@ add_task(async function test_search_result() {
|
|||
await BrowserTestUtils.withNewTab({ gBrowser }, async () => {
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus,
|
||||
value: "foo",
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
@ -140,7 +138,6 @@ add_task(async function test_url_result() {
|
|||
await BrowserTestUtils.withNewTab({ gBrowser }, async () => {
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus,
|
||||
value: "example",
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
@ -168,7 +165,6 @@ add_task(async function test_keyword_result() {
|
|||
await BrowserTestUtils.withNewTab({ gBrowser }, async () => {
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus,
|
||||
value: "get ",
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
@ -184,7 +180,6 @@ add_task(async function test_keyword_result() {
|
|||
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus,
|
||||
value: "get test",
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
@ -225,7 +220,6 @@ add_task(async function test_omnibox_result() {
|
|||
await BrowserTestUtils.withNewTab({ gBrowser }, async () => {
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus,
|
||||
value: "omniboxtest ",
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
@ -306,7 +300,6 @@ add_task(async function test_remote_tab_result() {
|
|||
await BrowserTestUtils.withNewTab({ gBrowser }, async () => {
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
waitForFocus,
|
||||
value: "example",
|
||||
fireInputEvent: true,
|
||||
});
|
||||
|
|
|
@ -9,11 +9,9 @@ XPCOMUtils.defineLazyModuleGetters(this, {
|
|||
PlacesUtils: "resource://gre/modules/PlacesUtils.jsm",
|
||||
PlacesTestUtils: "resource://testing-common/PlacesTestUtils.jsm",
|
||||
Preferences: "resource://gre/modules/Preferences.jsm",
|
||||
SearchTestUtils: "resource://testing-common/SearchTestUtils.jsm",
|
||||
UrlbarProvider: "resource:///modules/UrlbarUtils.jsm",
|
||||
UrlbarProvidersManager: "resource:///modules/UrlbarProvidersManager.jsm",
|
||||
UrlbarResult: "resource:///modules/UrlbarResult.jsm",
|
||||
UrlbarTestUtils: "resource://testing-common/UrlbarTestUtils.jsm",
|
||||
UrlbarTokenizer: "resource:///modules/UrlbarTokenizer.jsm",
|
||||
UrlbarUtils: "resource:///modules/UrlbarUtils.jsm",
|
||||
});
|
||||
|
@ -32,7 +30,21 @@ XPCOMUtils.defineLazyServiceGetter(
|
|||
"nsIClipboardHelper"
|
||||
);
|
||||
|
||||
SearchTestUtils.init(Assert, registerCleanupFunction);
|
||||
XPCOMUtils.defineLazyGetter(this, "UrlbarTestUtils", () => {
|
||||
const { UrlbarTestUtils: module } = ChromeUtils.import(
|
||||
"resource://testing-common/UrlbarTestUtils.jsm"
|
||||
);
|
||||
module.init(this);
|
||||
return module;
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(this, "SearchTestUtils", () => {
|
||||
const { SearchTestUtils: module } = ChromeUtils.import(
|
||||
"resource://testing-common/SearchTestUtils.jsm"
|
||||
);
|
||||
module.init(Assert, registerCleanupFunction);
|
||||
return module;
|
||||
});
|
||||
|
||||
/**
|
||||
* Initializes an HTTP Server, and runs a task with it.
|
||||
|
|
|
@ -109,7 +109,7 @@ add_task(async function test() {
|
|||
const histograms = snapshotHistograms();
|
||||
|
||||
await UrlbarTestUtils.promisePopupOpen(window, () => {
|
||||
EventUtils.synthesizeMouseAtCenter(window.gURLBar.inputField, {});
|
||||
EventUtils.synthesizeMouseAtCenter(gURLBar.inputField, {});
|
||||
});
|
||||
|
||||
await UrlbarTestUtils.promiseSearchComplete(window);
|
||||
|
@ -141,7 +141,7 @@ add_task(async function test() {
|
|||
URLBAR_SELECTED_RESULT_METHODS.arrowEnterSelection
|
||||
);
|
||||
await UrlbarTestUtils.promisePopupClose(window, () => {
|
||||
window.gURLBar.blur();
|
||||
gURLBar.blur();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Загрузка…
Ссылка в новой задаче