Bug 1578584 - Follow-up test fix: Quantumbar WebExt API: Add onResultPicked event.

Increase the extension notification timeout to prevent intermittent test failures. Like this existing test does: https://searchfox.org/mozilla-central/rev/f43ae7e1c43a4a940b658381157a6ea6c5a185c1/browser/components/extensions/test/xpcshell/test_ext_urlbar.js#43

Differential Revision: https://phabricator.services.mozilla.com/D47199

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Drew Willcoxon 2019-09-26 02:47:29 +00:00
Родитель 35231e20c2
Коммит ec9c941983
1 изменённых файлов: 11 добавлений и 0 удалений

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

@ -1,6 +1,7 @@
"use strict";
XPCOMUtils.defineLazyModuleGetters(this, {
UrlbarProviderExtension: "resource:///modules/UrlbarProviderExtension.jsm",
UrlbarTestUtils: "resource://testing-common/UrlbarTestUtils.jsm",
});
@ -46,6 +47,16 @@ async function loadExtension(options = {}) {
return ext;
}
add_task(async function setUp() {
// Set the notification timeout to a really high value to avoid intermittent
// failures due to the mock extensions not responding in time.
let originalTimeout = UrlbarProviderExtension.notificationTimeout;
UrlbarProviderExtension.notificationTimeout = 5000;
registerCleanupFunction(() => {
UrlbarProviderExtension.notificationTimeout = originalTimeout;
});
});
// Loads an extension without a main button URL and presses enter on the main
// button.
add_task(async function testOnResultPicked_mainButton_noURL_enter() {