diff --git a/browser/base/content/test/performance/browser_urlbar_keyed_search.js b/browser/base/content/test/performance/browser_urlbar_keyed_search.js index 3712d64da426..ba40132ebf99 100644 --- a/browser/base/content/test/performance/browser_urlbar_keyed_search.js +++ b/browser/base/content/test/performance/browser_urlbar_keyed_search.js @@ -14,20 +14,6 @@ /* These reflows happen only the first time the panel opens. */ const EXPECTED_REFLOWS_FIRST_OPEN = [ - // This is the this.panel.openPopup() call in UrlbarView._openPanel. See bug - // 1359989, which was filed against the legacy awesomebar but applies here too - // because it seems to be caused by platform code. - { - stack: [ - "_openPanel@resource:///modules/UrlbarView.jsm", - "onQueryResults@resource:///modules/UrlbarView.jsm", - "_notify@resource:///modules/UrlbarController.jsm", - "receiveResults@resource:///modules/UrlbarController.jsm", - "notifyResults@resource:///modules/UrlbarProvidersManager.jsm", - "add@resource:///modules/UrlbarProvidersManager.jsm", - "onSearchResult@resource:///modules/UrlbarProviderUnifiedComplete.jsm", - ], - }, { stack: [ "__rebuild@chrome://browser/content/search/search-one-offs.js", @@ -46,6 +32,15 @@ const EXPECTED_REFLOWS_FIRST_OPEN = [ */ ], }, + // This is the this.panel.openPopup() call in UrlbarView._openPanel. See bug + // 1359989, which was filed against the legacy awesomebar but applies here too + // because it seems to be caused by platform code. + { + stack: [ + "_openPanel@resource:///modules/UrlbarView.jsm", + "onQueryResults@resource:///modules/UrlbarView.jsm", + ], + }, ]; add_task(async function quantumbar() { diff --git a/browser/base/content/test/performance/browser_urlbar_search.js b/browser/base/content/test/performance/browser_urlbar_search.js index fcdb1e4f9827..f7a86ab7b003 100644 --- a/browser/base/content/test/performance/browser_urlbar_search.js +++ b/browser/base/content/test/performance/browser_urlbar_search.js @@ -14,17 +14,6 @@ /* These reflows happen only the first time the panel opens. */ const EXPECTED_REFLOWS_FIRST_OPEN = [ - { - stack: [ - "_openPanel@resource:///modules/UrlbarView.jsm", - "onQueryResults@resource:///modules/UrlbarView.jsm", - "_notify@resource:///modules/UrlbarController.jsm", - "receiveResults@resource:///modules/UrlbarController.jsm", - "notifyResults@resource:///modules/UrlbarProvidersManager.jsm", - "add@resource:///modules/UrlbarProvidersManager.jsm", - "onSearchResult@resource:///modules/UrlbarProviderUnifiedComplete.jsm", - ], - }, { stack: [ "__rebuild@chrome://browser/content/search/search-one-offs.js", @@ -43,6 +32,15 @@ const EXPECTED_REFLOWS_FIRST_OPEN = [ */ ], }, + // This is the this.panel.openPopup() call in UrlbarView._openPanel. See bug + // 1359989, which was filed against the legacy awesomebar but applies here too + // because it seems to be caused by platform code. + { + stack: [ + "_openPanel@resource:///modules/UrlbarView.jsm", + "onQueryResults@resource:///modules/UrlbarView.jsm", + ], + }, ]; /* These reflows happen every time the panel opens. */ @@ -54,11 +52,6 @@ const EXPECTED_REFLOWS_SECOND_OPEN = [ stack: [ "_openPanel@resource:///modules/UrlbarView.jsm", "onQueryResults@resource:///modules/UrlbarView.jsm", - "_notify@resource:///modules/UrlbarController.jsm", - "receiveResults@resource:///modules/UrlbarController.jsm", - "notifyResults@resource:///modules/UrlbarProvidersManager.jsm", - "add@resource:///modules/UrlbarProvidersManager.jsm", - "onSearchResult@resource:///modules/UrlbarProviderUnifiedComplete.jsm", ], }, ]; diff --git a/browser/base/content/test/performance/head.js b/browser/base/content/test/performance/head.js index fd39a644c8cc..d0153b414748 100644 --- a/browser/base/content/test/performance/head.js +++ b/browser/base/content/test/performance/head.js @@ -693,6 +693,24 @@ async function runUrlbarTest(useAwesomebar, fn(); }, ms); }; + } else { + let popup = URLBar.view; + let oldOnQueryResults = popup.onQueryResults.bind(popup); + let oldOnQueryFinished = popup.onQueryFinished.bind(popup); + + // We need to invalidate the frame tree outside of the normal + // mechanism since invalidations and result additions to the + // URL bar occur without firing JS events (which is how we + // normally know to dirty the frame tree). + popup.onQueryResults = (context) => { + dirtyFrame(win); + oldOnQueryResults(context); + }; + + popup.onQueryFinished = (context) => { + dirtyFrame(win); + oldOnQueryFinished(context); + }; } let waitExtra = async () => {