mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-20 16:55:40 +00:00
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:
parent
35231e20c2
commit
ec9c941983
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user