From d6647f3b6e6651e839b2dc49a9a41553deb1d933 Mon Sep 17 00:00:00 2001 From: Jared Wein Date: Thu, 21 Jan 2021 16:10:45 +0000 Subject: [PATCH] Bug 1681421 - Read the label property instead of textContent to exclude hidden text. r=mstange Differential Revision: https://phabricator.services.mozilla.com/D102613 --- devtools/client/performance-new/test/browser/head.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/devtools/client/performance-new/test/browser/head.js b/devtools/client/performance-new/test/browser/head.js index 580f8abde5f2..ab0715367fa5 100644 --- a/devtools/client/performance-new/test/browser/head.js +++ b/devtools/client/performance-new/test/browser/head.js @@ -350,7 +350,7 @@ async function checkTabLoadedProfile({ info("Attempting to see if the selected tab can receive a profile."); return waitUntil(() => { - switch (gBrowser.selectedTab.textContent) { + switch (gBrowser.selectedTab.label) { case initialTitle: logPeriodically(`> Waiting for the profile to be received.`); return false; @@ -393,7 +393,7 @@ async function waitForTabUrl({ info(`Waiting for the selected tab to have the url "${expectedUrl}".`); return waitUntil(() => { - switch (gBrowser.selectedTab.textContent) { + switch (gBrowser.selectedTab.label) { case initialTitle: case successTitle: if (gBrowser.currentURI.spec === expectedUrl) { @@ -426,7 +426,7 @@ async function waitForTabTitle(title) { info(`Waiting for the selected tab to have the title "${title}".`); return waitUntil(() => { - if (gBrowser.selectedTab.textContent === title) { + if (gBrowser.selectedTab.label === title) { ok(true, `The selected tab has the title ${title}`); return true; }