From ec9c941983637825bdbaaaa4f25407ec844955f3 Mon Sep 17 00:00:00 2001 From: Drew Willcoxon Date: Thu, 26 Sep 2019 02:47:29 +0000 Subject: [PATCH] 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 --- .../extensions/test/browser/browser_ext_urlbar.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/browser/components/extensions/test/browser/browser_ext_urlbar.js b/browser/components/extensions/test/browser/browser_ext_urlbar.js index b798551cd9c2..56d2e73a86d1 100644 --- a/browser/components/extensions/test/browser/browser_ext_urlbar.js +++ b/browser/components/extensions/test/browser/browser_ext_urlbar.js @@ -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() {