Backed out 2 changesets (bug 1530334, bug 1533060) for bc failures on browser_urlbar_empty_search.js . CLOSED TREE
authorNarcis Beleuzu <nbeleuzu@mozilla.com>
Fri, 08 Mar 2019 19:01:33 +0200
changeset 521053 7520d595404d3be1a0649f745d738f0a4d0c0521
parent 521052 d3d719ba069153ae29a99f60ec537133345c7ff0
child 521054 13115d00f301e54ba7fb2a38a92a81d5b22f6da3
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1530334, 1533060
milestone67.0a1
backs out8d02942b98f56c2ed93a153c644a8d4a0930d791
bff0dee7c2efaddffd9eea04f380995306fefb63
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out 2 changesets (bug 1530334, bug 1533060) for bc failures on browser_urlbar_empty_search.js . CLOSED TREE Backed out changeset 8d02942b98f5 (bug 1533060) Backed out changeset bff0dee7c2ef (bug 1530334)
browser/components/urlbar/tests/UrlbarTestUtils.jsm
browser/components/urlbar/tests/browser/browser_urlbarOneOffs_searchSuggestions.js
browser/components/urlbar/tests/browser/searchSuggestionEngine2.xml
toolkit/components/extensions/test/browser/browser_ext_themes_autocomplete_popup.js
--- a/browser/components/urlbar/tests/UrlbarTestUtils.jsm
+++ b/browser/components/urlbar/tests/UrlbarTestUtils.jsm
@@ -141,28 +141,16 @@ var UrlbarTestUtils = {
    * @returns {number} the number of results.
    */
   getResultCount(win) {
     let urlbar = getUrlbarAbstraction(win);
     return urlbar.getResultCount();
   },
 
   /**
-   * Returns the results panel object associated with the window.
-   * @note generally tests should use getDetailsOfResultAt rather than
-   * accessing panel elements directly.
-   * @param {object} win The window containing the urlbar
-   * @returns {object} the results panel object.
-   */
-  getPanel(win) {
-    let urlbar = getUrlbarAbstraction(win);
-    return urlbar.panel;
-  },
-
-  /**
    * Ensures at least one search suggestion is present.
    * @param {object} win The window containing the urlbar
    * @returns {boolean} whether at least one search suggestion is present.
    */
   promiseSuggestionsPresent(win) {
     let urlbar = getUrlbarAbstraction(win);
     return urlbar.promiseSearchSuggestions();
   },
@@ -408,24 +396,16 @@ class UrlbarAbstraction {
       let actions = element.getElementsByClassName("urlbarView-action");
       let typeIcon = element.querySelector(".urlbarView-type-icon");
       let typeIconStyle = this.window.getComputedStyle(typeIcon);
       details.displayed = {
         title: element.getElementsByClassName("urlbarView-title")[0].textContent,
         action: actions.length > 0 ? actions[0].textContent : null,
         typeIcon: typeIconStyle["background-image"],
       };
-      let actionElement = element.getElementsByClassName("urlbarView-action")[0];
-      let urlElement = element.getElementsByClassName("urlbarView-url")[0];
-      details.element = {
-        action: actionElement,
-        row: element,
-        separator: urlElement || actionElement,
-        url: urlElement,
-      };
       if (details.type == UrlbarUtils.RESULT_TYPE.SEARCH) {
         details.searchParams = {
           engine: context.results[index].payload.engine,
           keyword: context.results[index].payload.keyword,
           query: context.results[index].payload.query,
           suggestion: context.results[index].payload.suggestion,
         };
       }
@@ -442,22 +422,16 @@ class UrlbarAbstraction {
       details.tags = style.includes("tag") ?
         [...element.getElementsByClassName("ac-tags")].map(e => e.textContent) : [];
       let typeIconStyle = this.window.getComputedStyle(element._typeIcon);
       details.displayed = {
         title: element._titleText.textContent,
         action: action ? element._actionText.textContent : "",
         typeIcon: typeIconStyle.listStyleImage,
       };
-      details.element = {
-        action: element._actionText,
-        row: element,
-        separator: element._separator,
-        url: element._urlText,
-      };
       if (details.type == UrlbarUtils.RESULT_TYPE.SEARCH) {
         details.searchParams = {
           engine: action.params.engineName,
           keyword: action.params.alias,
           query: action.params.input,
           suggestion: action.params.searchSuggestion,
         };
       }
--- a/browser/components/urlbar/tests/browser/browser_urlbarOneOffs_searchSuggestions.js
+++ b/browser/components/urlbar/tests/browser/browser_urlbarOneOffs_searchSuggestions.js
@@ -1,161 +1,93 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-"use strict";
-
-/**
- * Tests various actions relating to search suggestions and the one-off buttons.
- */
-
 const TEST_ENGINE_BASENAME = "searchSuggestionEngine.xml";
-const TEST_ENGINE2_BASENAME = "searchSuggestionEngine2.xml";
-
-const serverInfo = {
-  scheme: "http",
-  host: "localhost",
-  port: 20709, // Must be identical to what is in searchSuggestionEngine2.xml
-};
 
 add_task(async function init() {
   await PlacesUtils.history.clear();
   await SpecialPowers.pushPrefEnv({
     set: [["browser.urlbar.oneOffSearches", true],
           ["browser.urlbar.suggest.searches", true]],
   });
   let engine = await SearchTestUtils.promiseNewSearchEngine(
     getRootDirectory(gTestPath) + TEST_ENGINE_BASENAME);
-  let engine2 = await SearchTestUtils.promiseNewSearchEngine(
-    getRootDirectory(gTestPath) + TEST_ENGINE2_BASENAME);
   let oldDefaultEngine = await Services.search.getDefault();
-  await Services.search.moveEngine(engine2, 0);
   await Services.search.moveEngine(engine, 0);
   await Services.search.setDefault(engine);
   registerCleanupFunction(async function() {
     await Services.search.setDefault(oldDefaultEngine);
 
     await PlacesUtils.history.clear();
     // Make sure the popup is closed for the next test.
     await UrlbarTestUtils.promisePopupClose(window);
   });
 });
 
-async function withSecondSuggestion(testFn) {
-  await BrowserTestUtils.withNewTab(gBrowser, async () => {
-    let typedValue = "foo";
-    await promiseAutocompleteResultPopup(typedValue, window, true);
-    await promiseSuggestionsPresent();
-    assertState(0, -1, typedValue);
-
-    // Down to select the first search suggestion.
-    EventUtils.synthesizeKey("KEY_ArrowDown");
-    assertState(1, -1, "foofoo");
-
-    // Down to select the next search suggestion.
-    EventUtils.synthesizeKey("KEY_ArrowDown");
-    assertState(2, -1, "foobar");
-
-    await withHttpServer(serverInfo, () => {
-      return testFn();
-    });
-  });
-  await PlacesUtils.history.clear();
-}
-
 // Presses the Return key when a one-off is selected after selecting a search
 // suggestion.
-add_task(async function test_returnAfterSuggestion() {
-  await withSecondSuggestion(async () => {
-    // Alt+Down to select the first one-off.
-    EventUtils.synthesizeKey("KEY_ArrowDown", {altKey: true});
-    assertState(2, 0, "foobar");
+add_task(async function oneOffReturnAfterSuggestion() {
+  let tab = await BrowserTestUtils.openNewForegroundTab(gBrowser);
 
-    let resultsPromise =
-      BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser, false,
-                                     `http://mochi.test:8888/?terms=foobar`);
-    EventUtils.synthesizeKey("KEY_Enter");
-    await resultsPromise;
-  });
-});
+  let typedValue = "foo";
+  await promiseAutocompleteResultPopup(typedValue, window, true);
+  await promiseSuggestionsPresent();
+  assertState(0, -1, typedValue);
+
+  // Down to select the first search suggestion.
+  EventUtils.synthesizeKey("KEY_ArrowDown");
+  assertState(1, -1, "foofoo");
 
-// Presses the Return key when a non-default one-off is selected after selecting
-// a search suggestion.
-add_task(async function test_returnAfterSuggestion_nonDefault() {
-  await withSecondSuggestion(async () => {
-    // Alt+Down twice to select the second one-off.
-    EventUtils.synthesizeKey("KEY_ArrowDown", {altKey: true});
-    EventUtils.synthesizeKey("KEY_ArrowDown", {altKey: true});
-    assertState(2, 1, "foobar");
+  // Down to select the next search suggestion.
+  EventUtils.synthesizeKey("KEY_ArrowDown");
+  assertState(2, -1, "foobar");
+
+  // Alt+Down to select the first one-off.
+  EventUtils.synthesizeKey("KEY_ArrowDown", {altKey: true});
+  assertState(2, 0, "foobar");
 
-    let resultsPromise =
-      BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser, false,
-                                     `http://localhost:20709/?terms=foobar`);
-    EventUtils.synthesizeKey("KEY_Enter");
-    await resultsPromise;
-  });
+  let resultsPromise =
+    BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser, false,
+                                   `http://mochi.test:8888/?terms=foobar`);
+  EventUtils.synthesizeKey("KEY_Enter");
+  await resultsPromise;
+
+  await PlacesUtils.history.clear();
+  BrowserTestUtils.removeTab(tab);
 });
 
 // Clicks a one-off engine after selecting a search suggestion.
-add_task(async function test_clickAfterSuggestion() {
-  await withSecondSuggestion(async () => {
-    let oneOffs = UrlbarTestUtils.getOneOffSearchButtons(window).getSelectableButtons(true);
-    let resultsPromise =
-      BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser, false,
-                                     `http://mochi.test:8888/?terms=foobar`);
-    EventUtils.synthesizeMouseAtCenter(oneOffs[0], {});
-    await resultsPromise;
-  });
-});
+add_task(async function oneOffClickAfterSuggestion() {
+  let tab = await BrowserTestUtils.openNewForegroundTab(gBrowser);
 
-// Clicks a non-default one-off engine after selecting a search suggestion.
-add_task(async function test_clickAfterSuggestion_nonDefault() {
-  await withSecondSuggestion(async () => {
-    let oneOffs = UrlbarTestUtils.getOneOffSearchButtons(window).getSelectableButtons(true);
-    let resultsPromise =
-      BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser, false,
-                                     `http://localhost:20709/?terms=foobar`);
-    EventUtils.synthesizeMouseAtCenter(oneOffs[1], {});
-    await resultsPromise;
-  });
-});
+  let typedValue = "foo";
+  await promiseAutocompleteResultPopup(typedValue, window, true);
+  await promiseSuggestionsPresent();
+  assertState(0, -1, typedValue);
+
+  // Down to select the first search suggestion.
+  EventUtils.synthesizeKey("KEY_ArrowDown");
+  assertState(1, -1, "foofoo");
 
-// Selects a non-default one-off engine and then selects a search suggestion.
-add_task(async function test_selectOneOffThenSuggestion() {
-  if (!UrlbarPrefs.get("quantumbar")) {
-    // The legacy address bar doesn't work correctly for this scenario.
-    return;
-  }
-  await BrowserTestUtils.withNewTab(gBrowser, async () => {
-    let typedValue = "foo";
-    await promiseAutocompleteResultPopup(typedValue, window, true);
-    await promiseSuggestionsPresent();
-    assertState(0, -1, typedValue);
+  // Down to select the next search suggestion.
+  EventUtils.synthesizeKey("KEY_ArrowDown");
+  assertState(2, -1, "foobar");
 
-    // Select a non-default one-off engine.
-    EventUtils.synthesizeKey("KEY_ArrowDown", {altKey: true});
-    EventUtils.synthesizeKey("KEY_ArrowDown", {altKey: true});
-    assertState(0, 1, "foo");
+  let oneOffs = UrlbarTestUtils.getOneOffSearchButtons(window).getSelectableButtons(true);
+  let resultsPromise =
+    BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser, false,
+                                   `http://mochi.test:8888/?terms=foobar`);
+  EventUtils.synthesizeMouseAtCenter(oneOffs[0], {});
+  await resultsPromise;
 
-    // Now click the second suggestion.
-    await withHttpServer(serverInfo, async () => {
-      let result = await UrlbarTestUtils.getDetailsOfResultAt(window, 2);
-
-      let resultsPromise =
-        BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser, false,
-                                       `http://localhost:20709/?terms=foobar`);
-      EventUtils.synthesizeMouseAtCenter(result.element.row, {});
-      await resultsPromise;
-    });
-  });
+  await PlacesUtils.history.clear();
+  BrowserTestUtils.removeTab(tab);
 });
 
 add_task(async function overridden_engine_not_reused() {
   info("An overridden search suggestion item should not be reused by a search with another engine");
-  await BrowserTestUtils.withNewTab(gBrowser, async () => {
+  let tab = await BrowserTestUtils.openNewForegroundTab(gBrowser);
     let typedValue = "foo";
     await promiseAutocompleteResultPopup(typedValue, window, true);
     await promiseSuggestionsPresent();
     // Down to select the first search suggestion.
     EventUtils.synthesizeKey("KEY_ArrowDown");
     assertState(1, -1, "foofoo");
     // ALT+Down to select the second search engine.
     EventUtils.synthesizeKey("KEY_ArrowDown", {altKey: true});
@@ -166,17 +98,17 @@ add_task(async function overridden_engin
     let label = result.displayed.action;
     // Run again the query, check the label has been replaced.
     await UrlbarTestUtils.promisePopupClose(window);
     await promiseAutocompleteResultPopup(typedValue, window, true);
     await promiseSuggestionsPresent();
     assertState(0, -1, "foo");
     result = await UrlbarTestUtils.getDetailsOfResultAt(window, 1);
     Assert.notEqual(result.displayed.action, label, "The label should have been updated");
-  });
+    BrowserTestUtils.removeTab(tab);
 });
 
 function assertState(result, oneOff, textValue = undefined) {
   Assert.equal(UrlbarTestUtils.getSelectedIndex(window), result,
     "Expected result should be selected");
   Assert.equal(UrlbarTestUtils.getOneOffSearchButtons(window).selectedButtonIndex,
     oneOff, "Expected one-off should be selected");
   if (textValue !== undefined) {
--- a/browser/components/urlbar/tests/browser/searchSuggestionEngine2.xml
+++ b/browser/components/urlbar/tests/browser/searchSuggestionEngine2.xml
@@ -1,13 +1,13 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!-- Any copyright is dedicated to the Public Domain.
    - http://creativecommons.org/publicdomain/zero/1.0/ -->
 
 <SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/">
-<ShortName>browser_searchSuggestionEngine2 searchSuggestionEngine2.xml</ShortName>
+<ShortName>browser_searchSuggestionEngine searchSuggestionEngine.xml</ShortName>
 <!-- Redirect the actual search request to the test-server because of proxy restriction -->
 <Url type="application/x-suggestions+json" method="GET" template="http://mochi.test:8888/browser/browser/components/urlbar/tests/browser/searchSuggestionEngine.sjs?{searchTerms}"/>
 <!-- Redirect speculative connect to a local http server we run for this test -->
 <Url type="text/html" method="GET" template="http://localhost:20709/" rel="searchform">
   <Param name="terms" value="{searchTerms}"/>
 </Url>
 </SearchPlugin>
--- a/toolkit/components/extensions/test/browser/browser_ext_themes_autocomplete_popup.js
+++ b/toolkit/components/extensions/test/browser/browser_ext_themes_autocomplete_popup.js
@@ -14,19 +14,52 @@ const POPUP_ACTION_COLOR_DARK = "#008f8a
 const POPUP_URL_COLOR_BRIGHT = "#45a1ff";
 const POPUP_ACTION_COLOR_BRIGHT = "#30e60b";
 
 const SEARCH_TERM = "urlbar-reflows-" + Date.now();
 const ONEOFF_URLBAR_PREF = "browser.urlbar.oneOffSearches";
 
 XPCOMUtils.defineLazyModuleGetters(this, {
   PlacesTestUtils: "resource://testing-common/PlacesTestUtils.jsm",
-  UrlbarTestUtils: "resource://testing-common/UrlbarTestUtils.jsm",
 });
 
+function promisePopupShown(popup) {
+  return new Promise(resolve => {
+    if (popup.state == "open") {
+      resolve();
+    } else {
+      popup.addEventListener("popupshown", function(event) {
+        resolve();
+      }, {once: true});
+    }
+  });
+}
+
+async function promiseAutocompleteResultPopup(inputText) {
+  gURLBar.focus();
+  gURLBar.value = inputText;
+  gURLBar.controller.startSearch(inputText);
+  await promisePopupShown(gURLBar.popup);
+  await BrowserTestUtils.waitForCondition(() => {
+    return gURLBar.controller.searchStatus >=
+      Ci.nsIAutoCompleteController.STATUS_COMPLETE_NO_MATCH;
+  });
+}
+
+async function waitForAutocompleteResultAt(index) {
+  let searchString = gURLBar.controller.searchString;
+  await BrowserTestUtils.waitForCondition(
+    () => gURLBar.popup.richlistbox.itemChildren.length > index &&
+          gURLBar.popup.richlistbox.itemChildren[index].getAttribute("ac-text") == searchString,
+    `Waiting for the autocomplete result for "${searchString}" at [${index}] to appear`);
+  // Ensure the addition is complete, for proper mouse events on the entries.
+  await new Promise(resolve => window.requestIdleCallback(resolve, {timeout: 1000}));
+  return gURLBar.popup.richlistbox.itemChildren[index];
+}
+
 add_task(async function setup() {
   await PlacesUtils.history.clear();
   const NUM_VISITS = 10;
   let visits = [];
 
   for (let i = 0; i < NUM_VISITS; ++i) {
     visits.push({
       uri: `http://example.com/urlbar-reflows-${i}`,
@@ -37,18 +70,16 @@ add_task(async function setup() {
   await PlacesTestUtils.addVisits(visits);
 
   registerCleanupFunction(async function() {
     await PlacesUtils.history.clear();
   });
 });
 
 add_task(async function test_popup_url() {
-  const quantumbar = UrlbarPrefs.get("quantumbar");
-
   // Load extension with brighttext not set
   let extension = ExtensionTestUtils.loadExtension({
     manifest: {
       "theme": {
         "images": {
           "theme_frame": "image1.png",
         },
         "colors": {
@@ -80,60 +111,57 @@ add_task(async function test_popup_url()
 
   let visits = [];
 
   for (let i = 0; i < maxResults; i++) {
     visits.push({uri: makeURI("http://example.com/autocomplete/?" + i)});
   }
 
   await PlacesTestUtils.addVisits(visits);
-  await UrlbarTestUtils.promiseAutocompleteResultPopup(window,
-                                                       "example.com/autocomplete",
-                                                       waitForFocus);
-  await UrlbarTestUtils.waitForAutocompleteResultAt(window, maxResults - 1);
+  await promiseAutocompleteResultPopup("example.com/autocomplete");
+  await waitForAutocompleteResultAt(maxResults - 1);
 
-  Assert.equal(UrlbarTestUtils.getResultCount(window), maxResults,
-               "Should get maxResults=" + maxResults + " results");
+  let popup = gURLBar.popup;
+  let results = popup.richlistbox.itemChildren;
+  is(results.length, maxResults,
+     "Should get maxResults=" + maxResults + " results");
 
-  let popup = UrlbarTestUtils.getPanel(window);
   let popupCS = window.getComputedStyle(popup);
 
   Assert.equal(popupCS.backgroundColor,
                `rgb(${hexToRGB(POPUP_COLOR).join(", ")})`,
                `Popup background color should be set to ${POPUP_COLOR}`);
 
   testBorderColor(popup, POPUP_BORDER_COLOR);
 
   Assert.equal(popupCS.color,
                `rgb(${hexToRGB(POPUP_TEXT_COLOR_DARK).join(", ")})`,
                `Popup color should be set to ${POPUP_TEXT_COLOR_DARK}`);
 
   // Set the selected attribute to true to test the highlight popup properties
-  UrlbarTestUtils.setSelectedIndex(window, 1);
-  let actionResult = await UrlbarTestUtils.getDetailsOfResultAt(window, 0);
-  let urlResult = await UrlbarTestUtils.getDetailsOfResultAt(window, 1);
-  let resultCS = window.getComputedStyle(urlResult.element.row);
+  results[1].setAttribute("selected", "true");
+  let resultCS = window.getComputedStyle(results[1]);
 
   Assert.equal(resultCS.backgroundColor,
                `rgb(${hexToRGB(POPUP_SELECTED_COLOR).join(", ")})`,
                `Popup highlight background color should be set to ${POPUP_SELECTED_COLOR}`);
 
   Assert.equal(resultCS.color,
                `rgb(${hexToRGB(POPUP_SELECTED_TEXT_COLOR).join(", ")})`,
                `Popup highlight color should be set to ${POPUP_SELECTED_TEXT_COLOR}`);
 
-  // Now set the index to somewhere not on the first two, so that we can test both
-  // url and action text colors.
-  UrlbarTestUtils.setSelectedIndex(window, 2);
+  results[1].removeAttribute("selected");
 
-  Assert.equal(window.getComputedStyle(urlResult.element.url).color,
+  let urlText = results[1]._urlText;
+  Assert.equal(window.getComputedStyle(urlText).color,
                `rgb(${hexToRGB(POPUP_URL_COLOR_DARK).join(", ")})`,
                `Urlbar popup url color should be set to ${POPUP_URL_COLOR_DARK}`);
 
-  Assert.equal(window.getComputedStyle(actionResult.element.action).color,
+  let actionText = results[1]._actionText;
+  Assert.equal(window.getComputedStyle(actionText).color,
                `rgb(${hexToRGB(POPUP_ACTION_COLOR_DARK).join(", ")})`,
                `Urlbar popup action color should be set to ${POPUP_ACTION_COLOR_DARK}`);
 
   let root = document.documentElement;
   Assert.equal(root.getAttribute("lwt-popup-brighttext"),
                "",
                "brighttext should not be set!");
   Assert.equal(root.getAttribute("lwt-popup-darktext"),
@@ -170,27 +198,30 @@ add_task(async function test_popup_url()
 
   await extension.startup();
 
   popupCS = window.getComputedStyle(popup);
   Assert.equal(popupCS.color,
                `rgb(${hexToRGB(POPUP_TEXT_COLOR_BRIGHT).join(", ")})`,
                `Popup color should be set to ${POPUP_TEXT_COLOR_BRIGHT}`);
 
-  Assert.equal(window.getComputedStyle(urlResult.element.url).color,
+  urlText = results[1]._urlText;
+  Assert.equal(window.getComputedStyle(urlText).color,
                `rgb(${hexToRGB(POPUP_URL_COLOR_BRIGHT).join(", ")})`,
                `Urlbar popup url color should be set to ${POPUP_URL_COLOR_BRIGHT}`);
 
-  Assert.equal(window.getComputedStyle(actionResult.element.action).color,
+  actionText = results[1]._actionText;
+  Assert.equal(window.getComputedStyle(actionText).color,
                `rgb(${hexToRGB(POPUP_ACTION_COLOR_BRIGHT).join(", ")})`,
                `Urlbar popup action color should be set to ${POPUP_ACTION_COLOR_BRIGHT}`);
 
   // Since brighttext is enabled, the seperator color should be
   // POPUP_TEXT_COLOR_BRIGHT with added alpha.
-  Assert.equal(window.getComputedStyle(urlResult.element.separator, quantumbar ? ":before" : null).color,
+  let separator = results[1]._separator;
+  Assert.equal(window.getComputedStyle(separator).color,
                `rgba(${hexToRGB(POPUP_TEXT_COLOR_BRIGHT).join(", ")}, 0.5)`,
                `Urlbar popup separator color should be set to ${POPUP_TEXT_COLOR_BRIGHT} with alpha`);
 
   Assert.equal(root.getAttribute("lwt-popup-brighttext"),
                "true",
                "brighttext should be set to true!");
   Assert.equal(root.getAttribute("lwt-popup-darktext"),
                "",
@@ -209,12 +240,13 @@ add_task(async function test_popup_url()
 
   // Calculate what GrayText should be. May differ between platforms.
   let span = document.createXULElement("span");
   span.style.color = "GrayText";
   document.documentElement.appendChild(span);
   let GRAY_TEXT = window.getComputedStyle(span).color;
   span.remove();
 
-  Assert.equal(window.getComputedStyle(urlResult.element.separator, quantumbar ? ":before" : null).color,
+  separator = results[1]._separator;
+  Assert.equal(window.getComputedStyle(separator).color,
                GRAY_TEXT,
                `Urlbar popup separator color should be set to ${GRAY_TEXT}`);
 });