Bug 1681421 - Read the label property instead of textContent to exclude hidden text. r=mstange

Differential Revision: https://phabricator.services.mozilla.com/D102613
This commit is contained in:
Jared Wein 2021-01-21 16:10:45 +00:00
Родитель d49e0ac8bf
Коммит d6647f3b6e
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -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;
}