forked from mirrors/gecko-dev
Bug 1875090 - Rename BrowserTestUtils.is_visible() to isVisible() r=Gijs,settings-reviewers,application-update-reviewers,pip-reviewers,credential-management-reviewers,devtools-reviewers,fxview-reviewers,translations-reviewers,sgalich,bytesized,sfoster
Renames all instances of the snake_case identifier to camelCase to match more closely to idiomatic JavaScript and to existing conventions throughout the code base. Differential Revision: https://phabricator.services.mozilla.com/D198826
This commit is contained in:
parent
736a5983b8
commit
2a01092c90
142 changed files with 466 additions and 485 deletions
|
|
@ -59,7 +59,7 @@ add_task(async function test_open_iframe() {
|
|||
let domItem = contextMenu.querySelector("#context-openframeintab");
|
||||
info("Going to click item " + domItem.id);
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(domItem),
|
||||
BrowserTestUtils.isVisible(domItem),
|
||||
"DOM context menu item tab should be visible"
|
||||
);
|
||||
ok(!domItem.disabled, "DOM context menu item tab shouldn't be disabled");
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ async function activateContextAndWaitFor(selector, where) {
|
|||
let domItem = contextMenu.querySelector("#context-" + contextMenuItem);
|
||||
info("Going to click item " + domItem.id);
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(domItem),
|
||||
BrowserTestUtils.isVisible(domItem),
|
||||
"DOM context menu item " + where + " should be visible"
|
||||
);
|
||||
ok(
|
||||
|
|
|
|||
|
|
@ -170,7 +170,7 @@ async function testStripOnShare({
|
|||
let stripOnShare = contextMenu.querySelector("#context-stripOnShareLink");
|
||||
if (prefEnabled) {
|
||||
Assert.ok(
|
||||
BrowserTestUtils.is_visible(stripOnShare),
|
||||
BrowserTestUtils.isVisible(stripOnShare),
|
||||
"Menu item is visible"
|
||||
);
|
||||
// Make sure the stripped link will be copied to the clipboard
|
||||
|
|
@ -179,7 +179,7 @@ async function testStripOnShare({
|
|||
});
|
||||
} else {
|
||||
Assert.ok(
|
||||
!BrowserTestUtils.is_visible(stripOnShare),
|
||||
!BrowserTestUtils.isVisible(stripOnShare),
|
||||
"Menu item is not visible"
|
||||
);
|
||||
contextMenu.hidePopup();
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ add_task(async function test_overlink() {
|
|||
let setAndCheckOverLink = async info => {
|
||||
XULBrowserWindow.setOverLink(overlink);
|
||||
await TestUtils.waitForCondition(
|
||||
() => BrowserTestUtils.is_visible(statuspanel),
|
||||
() => BrowserTestUtils.isVisible(statuspanel),
|
||||
`statuspanel should become visible after setting overlink ${info}`
|
||||
);
|
||||
is(
|
||||
|
|
@ -55,7 +55,7 @@ add_task(async function test_overlink() {
|
|||
},
|
||||
async function () {
|
||||
await TestUtils.waitForCondition(
|
||||
() => !BrowserTestUtils.is_visible(statuspanel),
|
||||
() => !BrowserTestUtils.isVisible(statuspanel),
|
||||
"statuspanel with overlink should hide when entering DOM FS"
|
||||
);
|
||||
await setAndCheckOverLink("while in DOM FS");
|
||||
|
|
@ -70,7 +70,7 @@ add_task(async function test_networkstatus() {
|
|||
XULBrowserWindow.busyUI = true;
|
||||
StatusPanel.update();
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(statuspanel),
|
||||
BrowserTestUtils.isVisible(statuspanel),
|
||||
"statuspanel is visible before entering DOM FS"
|
||||
);
|
||||
is(statuspanelLabel.value, "test1", "statuspanel has expected value");
|
||||
|
|
@ -87,7 +87,7 @@ add_task(async function test_networkstatus() {
|
|||
"network status cleared when entering DOM FS"
|
||||
);
|
||||
ok(
|
||||
!BrowserTestUtils.is_visible(statuspanel),
|
||||
!BrowserTestUtils.isVisible(statuspanel),
|
||||
"statuspanel with network status should should hide when entering DOM FS"
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ async function testContextMenu() {
|
|||
function verifyContextMenu(contextMenu, itemSelectors) {
|
||||
// Ignore hidden nodes
|
||||
let items = Array.from(contextMenu.children).filter(n =>
|
||||
BrowserTestUtils.is_visible(n)
|
||||
BrowserTestUtils.isVisible(n)
|
||||
);
|
||||
let menuAsText = items
|
||||
.map(n => {
|
||||
|
|
|
|||
|
|
@ -232,14 +232,14 @@ add_task(
|
|||
todo(
|
||||
notification &&
|
||||
!notification.dismissed &&
|
||||
BrowserTestUtils.is_visible(PopupNotifications.panel.firstChild),
|
||||
BrowserTestUtils.isVisible(PopupNotifications.panel.firstChild),
|
||||
"Notification should still be open because we clicked during the security delay."
|
||||
);
|
||||
} else {
|
||||
ok(
|
||||
notification &&
|
||||
!notification.dismissed &&
|
||||
BrowserTestUtils.is_visible(PopupNotifications.panel.firstChild),
|
||||
BrowserTestUtils.isVisible(PopupNotifications.panel.firstChild),
|
||||
"Notification should still be open because we clicked during the security delay."
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ async function openPrintPreview() {
|
|||
document.getElementById("cmd_print").doCommand();
|
||||
await BrowserTestUtils.waitForCondition(() => {
|
||||
let preview = document.querySelector(".printPreviewBrowser");
|
||||
return preview && BrowserTestUtils.is_visible(preview);
|
||||
return preview && BrowserTestUtils.isVisible(preview);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -281,7 +281,7 @@ function is_hidden(element) {
|
|||
|
||||
function is_element_visible(element, msg) {
|
||||
isnot(element, null, "Element should not be null, when checking visibility");
|
||||
ok(BrowserTestUtils.is_visible(element), msg || "Element should be visible");
|
||||
ok(BrowserTestUtils.isVisible(element), msg || "Element should be visible");
|
||||
}
|
||||
|
||||
function is_element_hidden(element, msg) {
|
||||
|
|
|
|||
|
|
@ -36,21 +36,21 @@ add_task(async function test() {
|
|||
info("Check page action buttons are visible, the meatball button is not");
|
||||
let addonButton =
|
||||
win.BrowserPageActions.urlbarButtonNodeForActionID(actionId);
|
||||
Assert.ok(BrowserTestUtils.is_visible(addonButton));
|
||||
Assert.ok(BrowserTestUtils.isVisible(addonButton));
|
||||
let starButton =
|
||||
win.BrowserPageActions.urlbarButtonNodeForActionID("bookmark");
|
||||
Assert.ok(BrowserTestUtils.is_visible(starButton));
|
||||
Assert.ok(BrowserTestUtils.isVisible(starButton));
|
||||
let meatballButton = win.document.getElementById("pageActionButton");
|
||||
Assert.ok(!BrowserTestUtils.is_visible(meatballButton));
|
||||
Assert.ok(!BrowserTestUtils.isVisible(meatballButton));
|
||||
|
||||
info(
|
||||
"Shrink the window, check page action buttons are not visible, the meatball menu is visible"
|
||||
);
|
||||
let originalOuterWidth = win.outerWidth;
|
||||
await promiseStableResize(500, win);
|
||||
Assert.ok(!BrowserTestUtils.is_visible(addonButton));
|
||||
Assert.ok(!BrowserTestUtils.is_visible(starButton));
|
||||
Assert.ok(BrowserTestUtils.is_visible(meatballButton));
|
||||
Assert.ok(!BrowserTestUtils.isVisible(addonButton));
|
||||
Assert.ok(!BrowserTestUtils.isVisible(starButton));
|
||||
Assert.ok(BrowserTestUtils.isVisible(meatballButton));
|
||||
|
||||
info(
|
||||
"Remove the extension, check the only page action button is visible, the meatball menu is not visible"
|
||||
|
|
@ -58,8 +58,8 @@ add_task(async function test() {
|
|||
let promiseUninstalled = promiseAddonUninstalled(extension.id);
|
||||
await extension.unload();
|
||||
await promiseUninstalled;
|
||||
Assert.ok(BrowserTestUtils.is_visible(starButton));
|
||||
Assert.ok(!BrowserTestUtils.is_visible(meatballButton));
|
||||
Assert.ok(BrowserTestUtils.isVisible(starButton));
|
||||
Assert.ok(!BrowserTestUtils.isVisible(meatballButton));
|
||||
Assert.deepEqual(
|
||||
win.BrowserPageActions.urlbarButtonNodeForActionID(actionId),
|
||||
null
|
||||
|
|
@ -99,7 +99,7 @@ add_task(async function bookmark() {
|
|||
await promiseStableResize(500, win);
|
||||
|
||||
let meatballButton = win.document.getElementById("pageActionButton");
|
||||
Assert.ok(BrowserTestUtils.is_visible(meatballButton));
|
||||
Assert.ok(BrowserTestUtils.isVisible(meatballButton));
|
||||
|
||||
// Open the panel.
|
||||
await promisePageActionPanelOpen(win);
|
||||
|
|
@ -227,7 +227,7 @@ add_task(async function test_disabledPageAction_hidden_in_protonOverflowMenu() {
|
|||
let pageActionNode =
|
||||
win.BrowserPageActions.panelButtonNodeForActionID(widgetId);
|
||||
ok(
|
||||
pageActionNode && BrowserTestUtils.is_visible(pageActionNode),
|
||||
pageActionNode && BrowserTestUtils.isVisible(pageActionNode),
|
||||
"enabled pageAction should be visible in the urlbar overflow menu"
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ add_task(async function contextMenu_removeExtension_panel() {
|
|||
await promiseAnimationFrame(win);
|
||||
|
||||
let meatballButton = win.document.getElementById("pageActionButton");
|
||||
Assert.ok(BrowserTestUtils.is_visible(meatballButton));
|
||||
Assert.ok(BrowserTestUtils.isVisible(meatballButton));
|
||||
|
||||
// Open the panel.
|
||||
await promisePageActionPanelOpen(win);
|
||||
|
|
@ -256,7 +256,7 @@ add_task(async function contextMenu_removeExtension_disabled_in_panel() {
|
|||
await promiseAnimationFrame(win);
|
||||
|
||||
let meatballButton = win.document.getElementById("pageActionButton");
|
||||
Assert.ok(BrowserTestUtils.is_visible(meatballButton));
|
||||
Assert.ok(BrowserTestUtils.isVisible(meatballButton));
|
||||
|
||||
// Open the panel.
|
||||
await promisePageActionPanelOpen(win);
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ add_task(async function test_CertificateError() {
|
|||
await BrowserTestUtils.waitForEvent(pageInfo, "load");
|
||||
let permissionTab = pageInfo.document.getElementById("permTab");
|
||||
await TestUtils.waitForCondition(
|
||||
() => BrowserTestUtils.is_visible(permissionTab),
|
||||
() => BrowserTestUtils.isVisible(permissionTab),
|
||||
"Permission tab should be visible."
|
||||
);
|
||||
|
||||
|
|
@ -149,7 +149,7 @@ add_task(async function test_NetworkError() {
|
|||
await BrowserTestUtils.waitForEvent(pageInfo, "load");
|
||||
let permissionTab = pageInfo.document.getElementById("permTab");
|
||||
await TestUtils.waitForCondition(
|
||||
() => BrowserTestUtils.is_visible(permissionTab),
|
||||
() => BrowserTestUtils.isVisible(permissionTab),
|
||||
"Permission tab should be visible."
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ add_task(async function test_ShowCertificate() {
|
|||
let pageInfoDoc = pageInfo.document;
|
||||
let securityTab = pageInfoDoc.getElementById("securityTab");
|
||||
await TestUtils.waitForCondition(
|
||||
() => BrowserTestUtils.is_visible(securityTab),
|
||||
() => BrowserTestUtils.isVisible(securityTab),
|
||||
"Security tab should be visible."
|
||||
);
|
||||
|
||||
|
|
@ -37,7 +37,7 @@ add_task(async function test_ShowCertificate() {
|
|||
let loaded = BrowserTestUtils.waitForNewTab(gBrowser, null, true);
|
||||
let viewCertButton = pageInfoDoc.getElementById("security-view-cert");
|
||||
await TestUtils.waitForCondition(
|
||||
() => BrowserTestUtils.is_visible(viewCertButton),
|
||||
() => BrowserTestUtils.isVisible(viewCertButton),
|
||||
"view cert button should be visible."
|
||||
);
|
||||
viewCertButton.click();
|
||||
|
|
@ -80,7 +80,7 @@ add_task(async function test_image() {
|
|||
let securityTab = pageInfoDoc.getElementById("securityTab");
|
||||
|
||||
await TestUtils.waitForCondition(
|
||||
() => BrowserTestUtils.is_visible(securityTab),
|
||||
() => BrowserTestUtils.isVisible(securityTab),
|
||||
"Security tab should be visible."
|
||||
);
|
||||
|
||||
|
|
@ -134,7 +134,7 @@ add_task(async function test_CertificateError() {
|
|||
let securityTab = pageInfoDoc.getElementById("securityTab");
|
||||
|
||||
await TestUtils.waitForCondition(
|
||||
() => BrowserTestUtils.is_visible(securityTab),
|
||||
() => BrowserTestUtils.isVisible(securityTab),
|
||||
"Security tab should be visible."
|
||||
);
|
||||
|
||||
|
|
@ -170,7 +170,7 @@ add_task(async function test_SecurityHTTP() {
|
|||
let pageInfoDoc = pageInfo.document;
|
||||
let securityTab = pageInfoDoc.getElementById("securityTab");
|
||||
await TestUtils.waitForCondition(
|
||||
() => BrowserTestUtils.is_visible(securityTab),
|
||||
() => BrowserTestUtils.isVisible(securityTab),
|
||||
"Security tab should be visible."
|
||||
);
|
||||
|
||||
|
|
@ -206,7 +206,7 @@ add_task(async function test_ValidCert() {
|
|||
let pageInfoDoc = pageInfo.document;
|
||||
let securityTab = pageInfoDoc.getElementById("securityTab");
|
||||
await TestUtils.waitForCondition(
|
||||
() => BrowserTestUtils.is_visible(securityTab),
|
||||
() => BrowserTestUtils.isVisible(securityTab),
|
||||
"Security tab should be visible."
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ function sleep(ms) {
|
|||
|
||||
async function blockedIconShown() {
|
||||
await TestUtils.waitForCondition(() => {
|
||||
return BrowserTestUtils.is_visible(autoplayBlockedIcon());
|
||||
return BrowserTestUtils.isVisible(autoplayBlockedIcon());
|
||||
}, "Blocked icon is shown");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -487,7 +487,7 @@ async function helper3rdPartyStoragePermissionTest(permissionID) {
|
|||
|
||||
testPermListHasEntries(true);
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(storagePermissionAnchor.firstElementChild),
|
||||
BrowserTestUtils.isVisible(storagePermissionAnchor.firstElementChild),
|
||||
"Anchor header is visible"
|
||||
);
|
||||
|
||||
|
|
@ -514,7 +514,7 @@ async function helper3rdPartyStoragePermissionTest(permissionID) {
|
|||
|
||||
testPermListHasEntries(true);
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(storagePermissionAnchor.firstElementChild),
|
||||
BrowserTestUtils.isVisible(storagePermissionAnchor.firstElementChild),
|
||||
"Anchor header is visible"
|
||||
);
|
||||
|
||||
|
|
@ -618,7 +618,7 @@ add_task(async function test3rdPartyBothStoragePermission() {
|
|||
|
||||
testPermListHasEntries(true);
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(storagePermissionAnchor.firstElementChild),
|
||||
BrowserTestUtils.isVisible(storagePermissionAnchor.firstElementChild),
|
||||
"Anchor header is visible"
|
||||
);
|
||||
|
||||
|
|
@ -645,7 +645,7 @@ add_task(async function test3rdPartyBothStoragePermission() {
|
|||
|
||||
testPermListHasEntries(true);
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(storagePermissionAnchor.firstElementChild),
|
||||
BrowserTestUtils.isVisible(storagePermissionAnchor.firstElementChild),
|
||||
"Anchor header is visible"
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -15,14 +15,14 @@ function testPostPrompt(task) {
|
|||
async function (browser) {
|
||||
let icon = document.getElementById("web-notifications-notification-icon");
|
||||
ok(
|
||||
!BrowserTestUtils.is_visible(icon),
|
||||
!BrowserTestUtils.isVisible(icon),
|
||||
"notifications icon is not visible at first"
|
||||
);
|
||||
|
||||
await SpecialPowers.spawn(browser, [], task);
|
||||
|
||||
await TestUtils.waitForCondition(
|
||||
() => BrowserTestUtils.is_visible(icon),
|
||||
() => BrowserTestUtils.isVisible(icon),
|
||||
"notifications icon is visible"
|
||||
);
|
||||
ok(
|
||||
|
|
|
|||
|
|
@ -75,13 +75,13 @@ add_task(async function testPanelInfoMessage() {
|
|||
|
||||
// Check the visibility of the info message.
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(container),
|
||||
BrowserTestUtils.isVisible(container),
|
||||
"The message container should exist."
|
||||
);
|
||||
|
||||
ok(BrowserTestUtils.is_visible(message), "The message should be visible.");
|
||||
ok(BrowserTestUtils.isVisible(message), "The message should be visible.");
|
||||
|
||||
ok(BrowserTestUtils.is_visible(learnMoreLink), "The link should be visible.");
|
||||
ok(BrowserTestUtils.isVisible(learnMoreLink), "The link should be visible.");
|
||||
|
||||
//TODO: Add a check for infomessage telemetry
|
||||
|
||||
|
|
@ -116,7 +116,7 @@ add_task(async function testToggleSwitch() {
|
|||
|
||||
// Check the visibility of the "Site not working?" link.
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(
|
||||
BrowserTestUtils.isVisible(
|
||||
gProtectionsHandler._protectionsPopupTPSwitchBreakageLink
|
||||
),
|
||||
"The 'Site not working?' link should be visible."
|
||||
|
|
@ -229,7 +229,7 @@ add_task(async function testToggleSwitch() {
|
|||
|
||||
// The 'Site Fixed?' link should be shown if TP is off.
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(
|
||||
BrowserTestUtils.isVisible(
|
||||
gProtectionsHandler._protectionsPopupTPSwitchBreakageFixedLink
|
||||
),
|
||||
"The 'Site Fixed?' link should be visible."
|
||||
|
|
@ -407,12 +407,12 @@ add_task(async function testMiniPanel() {
|
|||
for (let item of mainView.childNodes) {
|
||||
if (item.id !== "protections-popup-mainView-panel-header-section") {
|
||||
ok(
|
||||
!BrowserTestUtils.is_visible(item),
|
||||
!BrowserTestUtils.isVisible(item),
|
||||
`The section '${item.id}' is hidden in the toast.`
|
||||
);
|
||||
} else {
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(item),
|
||||
BrowserTestUtils.isVisible(item),
|
||||
"The panel header is displayed as the content of the toast."
|
||||
);
|
||||
}
|
||||
|
|
@ -622,7 +622,7 @@ add_task(async function testNumberOfBlockedTrackers() {
|
|||
|
||||
// Check that the number of blocked trackers is shown.
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(trackerCounterBox),
|
||||
BrowserTestUtils.isVisible(trackerCounterBox),
|
||||
"The blocked tracker counter is shown if there is one blocked tracker."
|
||||
);
|
||||
is(
|
||||
|
|
@ -658,7 +658,7 @@ add_task(async function testNumberOfBlockedTrackers() {
|
|||
|
||||
// Check that the number of blocked trackers is shown.
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(trackerCounterBox),
|
||||
BrowserTestUtils.isVisible(trackerCounterBox),
|
||||
"The blocked tracker counter is shown if there are more than one blocked tracker."
|
||||
);
|
||||
is(
|
||||
|
|
|
|||
|
|
@ -125,21 +125,21 @@ async function testSectionVisibility({
|
|||
testPBM,
|
||||
});
|
||||
is(
|
||||
BrowserTestUtils.is_visible(el.section),
|
||||
BrowserTestUtils.isVisible(el.section),
|
||||
expectVisible,
|
||||
`Cookie banner section should be ${
|
||||
expectVisible ? "visible" : "not visible"
|
||||
}.`
|
||||
);
|
||||
is(
|
||||
BrowserTestUtils.is_visible(el.sectionSeparator),
|
||||
BrowserTestUtils.isVisible(el.sectionSeparator),
|
||||
expectVisible,
|
||||
`Cookie banner section separator should be ${
|
||||
expectVisible ? "visible" : "not visible"
|
||||
}.`
|
||||
);
|
||||
is(
|
||||
BrowserTestUtils.is_visible(el.switch),
|
||||
BrowserTestUtils.isVisible(el.switch),
|
||||
expectVisible,
|
||||
`Cookie banner switch should be ${
|
||||
expectVisible ? "visible" : "not visible"
|
||||
|
|
@ -252,13 +252,13 @@ function assertSwitchAndPrefState({ win, isPBM, expectedSwitchState }) {
|
|||
if (expectedSwitchState == "on") {
|
||||
ok(el.section.dataset.state == "detected", "CBH switch is set to ON");
|
||||
|
||||
ok(BrowserTestUtils.is_visible(el.labelON), "ON label should be visible");
|
||||
ok(BrowserTestUtils.isVisible(el.labelON), "ON label should be visible");
|
||||
ok(
|
||||
!BrowserTestUtils.is_visible(el.labelOFF),
|
||||
!BrowserTestUtils.isVisible(el.labelOFF),
|
||||
"OFF label should not be visible"
|
||||
);
|
||||
ok(
|
||||
!BrowserTestUtils.is_visible(el.labelUNDETECTED),
|
||||
!BrowserTestUtils.isVisible(el.labelUNDETECTED),
|
||||
"UNDETECTED label should not be visible"
|
||||
);
|
||||
|
||||
|
|
@ -271,12 +271,12 @@ function assertSwitchAndPrefState({ win, isPBM, expectedSwitchState }) {
|
|||
ok(el.section.dataset.state == "site-disabled", "CBH switch is set to OFF");
|
||||
|
||||
ok(
|
||||
!BrowserTestUtils.is_visible(el.labelON),
|
||||
!BrowserTestUtils.isVisible(el.labelON),
|
||||
"ON label should not be visible"
|
||||
);
|
||||
ok(BrowserTestUtils.is_visible(el.labelOFF), "OFF label should be visible");
|
||||
ok(BrowserTestUtils.isVisible(el.labelOFF), "OFF label should be visible");
|
||||
ok(
|
||||
!BrowserTestUtils.is_visible(el.labelUNDETECTED),
|
||||
!BrowserTestUtils.isVisible(el.labelUNDETECTED),
|
||||
"UNDETECTED label should not be visible"
|
||||
);
|
||||
|
||||
|
|
@ -289,15 +289,15 @@ function assertSwitchAndPrefState({ win, isPBM, expectedSwitchState }) {
|
|||
ok(el.section.dataset.state == "undetected", "CBH not supported for site");
|
||||
|
||||
ok(
|
||||
!BrowserTestUtils.is_visible(el.labelON),
|
||||
!BrowserTestUtils.isVisible(el.labelON),
|
||||
"ON label should not be visible"
|
||||
);
|
||||
ok(
|
||||
!BrowserTestUtils.is_visible(el.labelOFF),
|
||||
!BrowserTestUtils.isVisible(el.labelOFF),
|
||||
"OFF label should not be visible"
|
||||
);
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(el.labelUNDETECTED),
|
||||
BrowserTestUtils.isVisible(el.labelUNDETECTED),
|
||||
"UNDETECTED label should be visible"
|
||||
);
|
||||
}
|
||||
|
|
@ -360,10 +360,10 @@ async function toggleCookieBannerHandling(enable, win) {
|
|||
await subViewShownPromise;
|
||||
|
||||
if (enable) {
|
||||
ok(BrowserTestUtils.is_visible(enableButton), "Enable button is visible");
|
||||
ok(BrowserTestUtils.isVisible(enableButton), "Enable button is visible");
|
||||
enableButton.click();
|
||||
} else {
|
||||
ok(BrowserTestUtils.is_visible(disableButton), "Disable button is visible");
|
||||
ok(BrowserTestUtils.isVisible(disableButton), "Disable button is visible");
|
||||
disableButton.click();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -70,10 +70,10 @@ async function assertSitesListed(testCase) {
|
|||
|
||||
// Explicitly waiting for the category item becoming visible.
|
||||
await TestUtils.waitForCondition(() => {
|
||||
return BrowserTestUtils.is_visible(categoryItem);
|
||||
return BrowserTestUtils.isVisible(categoryItem);
|
||||
});
|
||||
|
||||
ok(BrowserTestUtils.is_visible(categoryItem), "TP category item is visible");
|
||||
ok(BrowserTestUtils.isVisible(categoryItem), "TP category item is visible");
|
||||
let cookiesView = document.getElementById("protections-popup-cookiesView");
|
||||
let viewShown = BrowserTestUtils.waitForEvent(cookiesView, "ViewShown");
|
||||
categoryItem.click();
|
||||
|
|
@ -91,13 +91,13 @@ async function assertSitesListed(testCase) {
|
|||
);
|
||||
if (listHeaderCount == 1) {
|
||||
ok(
|
||||
!BrowserTestUtils.is_visible(listHeaders[0]),
|
||||
!BrowserTestUtils.isVisible(listHeaders[0]),
|
||||
"Only one header, should be hidden"
|
||||
);
|
||||
} else {
|
||||
for (let header of listHeaders) {
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(header),
|
||||
BrowserTestUtils.isVisible(header),
|
||||
"Multiple list headers - all should be visible."
|
||||
);
|
||||
}
|
||||
|
|
@ -126,7 +126,7 @@ async function assertSitesListed(testCase) {
|
|||
}
|
||||
}
|
||||
ok(trackerTestItem, "Has an item for trackertest.org");
|
||||
ok(BrowserTestUtils.is_visible(trackerTestItem), "List item is visible");
|
||||
ok(BrowserTestUtils.isVisible(trackerTestItem), "List item is visible");
|
||||
}
|
||||
|
||||
if (firstPartyBlocked) {
|
||||
|
|
@ -141,7 +141,7 @@ async function assertSitesListed(testCase) {
|
|||
}
|
||||
ok(notTrackingExampleItem, "Has an item for not-tracking.example.com");
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(notTrackingExampleItem),
|
||||
BrowserTestUtils.isVisible(notTrackingExampleItem),
|
||||
"List item is visible"
|
||||
);
|
||||
}
|
||||
|
|
@ -189,7 +189,7 @@ async function assertSitesListed(testCase) {
|
|||
}
|
||||
}
|
||||
ok(test1ExampleItem, "Has an item for test1.example.org");
|
||||
ok(BrowserTestUtils.is_visible(test1ExampleItem), "List item is visible");
|
||||
ok(BrowserTestUtils.isVisible(test1ExampleItem), "List item is visible");
|
||||
}
|
||||
|
||||
if (trackersBlocked || thirdPartyBlocked || firstPartyBlocked) {
|
||||
|
|
@ -203,7 +203,7 @@ async function assertSitesListed(testCase) {
|
|||
}
|
||||
}
|
||||
ok(trackerTestItem, "List item should exist for http://trackertest.org");
|
||||
ok(BrowserTestUtils.is_visible(trackerTestItem), "List item is visible");
|
||||
ok(BrowserTestUtils.isVisible(trackerTestItem), "List item is visible");
|
||||
}
|
||||
|
||||
viewShown = BrowserTestUtils.waitForEvent(mainView, "ViewShown");
|
||||
|
|
@ -250,7 +250,7 @@ async function assertSitesListed(testCase) {
|
|||
}
|
||||
ok(notTrackingExampleItem, "Has an item for not-tracking.example.com");
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(notTrackingExampleItem),
|
||||
BrowserTestUtils.isVisible(notTrackingExampleItem),
|
||||
"List item is visible"
|
||||
);
|
||||
}
|
||||
|
|
@ -312,10 +312,10 @@ add_task(async function testCookiesSubViewAllowed() {
|
|||
|
||||
// Explicitly waiting for the category item becoming visible.
|
||||
await TestUtils.waitForCondition(() => {
|
||||
return BrowserTestUtils.is_visible(categoryItem);
|
||||
return BrowserTestUtils.isVisible(categoryItem);
|
||||
});
|
||||
|
||||
ok(BrowserTestUtils.is_visible(categoryItem), "TP category item is visible");
|
||||
ok(BrowserTestUtils.isVisible(categoryItem), "TP category item is visible");
|
||||
let cookiesView = document.getElementById("protections-popup-cookiesView");
|
||||
let viewShown = BrowserTestUtils.waitForEvent(cookiesView, "ViewShown");
|
||||
categoryItem.click();
|
||||
|
|
@ -330,7 +330,7 @@ add_task(async function testCookiesSubViewAllowed() {
|
|||
let label = listItem.querySelector(".protections-popup-list-host-label");
|
||||
// eslint-disable-next-line @microsoft/sdl/no-insecure-url
|
||||
is(label.value, "http://trackertest.org", "has an item for trackertest.org");
|
||||
ok(BrowserTestUtils.is_visible(listItem), "list item is visible");
|
||||
ok(BrowserTestUtils.isVisible(listItem), "list item is visible");
|
||||
ok(
|
||||
listItem.classList.contains("allowed"),
|
||||
"indicates whether the cookie was blocked or allowed"
|
||||
|
|
@ -340,7 +340,7 @@ add_task(async function testCookiesSubViewAllowed() {
|
|||
".protections-popup-list-state-label"
|
||||
);
|
||||
ok(stateLabel, "List item has a state label");
|
||||
ok(BrowserTestUtils.is_visible(stateLabel), "State label is visible");
|
||||
ok(BrowserTestUtils.isVisible(stateLabel), "State label is visible");
|
||||
is(
|
||||
stateLabel.getAttribute("data-l10n-id"),
|
||||
"content-blocking-cookies-view-allowed-label",
|
||||
|
|
@ -350,10 +350,7 @@ add_task(async function testCookiesSubViewAllowed() {
|
|||
let button = listItem.querySelector(
|
||||
".permission-popup-permission-remove-button"
|
||||
);
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(button),
|
||||
"Permission remove button is visible"
|
||||
);
|
||||
ok(BrowserTestUtils.isVisible(button), "Permission remove button is visible");
|
||||
button.click();
|
||||
is(
|
||||
Services.perms.testExactPermissionFromPrincipal(principal, "cookie"),
|
||||
|
|
@ -431,10 +428,10 @@ add_task(async function testCookiesSubViewAllowedHeuristic() {
|
|||
|
||||
// Explicitly waiting for the category item becoming visible.
|
||||
await TestUtils.waitForCondition(() => {
|
||||
return BrowserTestUtils.is_visible(categoryItem);
|
||||
return BrowserTestUtils.isVisible(categoryItem);
|
||||
});
|
||||
|
||||
ok(BrowserTestUtils.is_visible(categoryItem), "TP category item is visible");
|
||||
ok(BrowserTestUtils.isVisible(categoryItem), "TP category item is visible");
|
||||
let cookiesView = document.getElementById("protections-popup-cookiesView");
|
||||
let viewShown = BrowserTestUtils.waitForEvent(cookiesView, "ViewShown");
|
||||
categoryItem.click();
|
||||
|
|
@ -449,7 +446,7 @@ add_task(async function testCookiesSubViewAllowedHeuristic() {
|
|||
let label = listItem.querySelector(".protections-popup-list-host-label");
|
||||
// eslint-disable-next-line @microsoft/sdl/no-insecure-url
|
||||
is(label.value, "http://trackertest.org", "has an item for trackertest.org");
|
||||
ok(BrowserTestUtils.is_visible(listItem), "list item is visible");
|
||||
ok(BrowserTestUtils.isVisible(listItem), "list item is visible");
|
||||
ok(
|
||||
listItem.classList.contains("allowed"),
|
||||
"indicates whether the cookie was blocked or allowed"
|
||||
|
|
@ -458,10 +455,7 @@ add_task(async function testCookiesSubViewAllowedHeuristic() {
|
|||
let button = listItem.querySelector(
|
||||
".permission-popup-permission-remove-button"
|
||||
);
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(button),
|
||||
"Permission remove button is visible"
|
||||
);
|
||||
ok(BrowserTestUtils.isVisible(button), "Permission remove button is visible");
|
||||
button.click();
|
||||
is(
|
||||
Services.perms.testExactPermissionFromPrincipal(
|
||||
|
|
@ -504,10 +498,10 @@ add_task(async function testCookiesSubViewBlockedDoublyNested() {
|
|||
|
||||
// Explicitly waiting for the category item becoming visible.
|
||||
await TestUtils.waitForCondition(() => {
|
||||
return BrowserTestUtils.is_visible(categoryItem);
|
||||
return BrowserTestUtils.isVisible(categoryItem);
|
||||
});
|
||||
|
||||
ok(BrowserTestUtils.is_visible(categoryItem), "TP category item is visible");
|
||||
ok(BrowserTestUtils.isVisible(categoryItem), "TP category item is visible");
|
||||
let cookiesView = document.getElementById("protections-popup-cookiesView");
|
||||
let viewShown = BrowserTestUtils.waitForEvent(cookiesView, "ViewShown");
|
||||
categoryItem.click();
|
||||
|
|
@ -522,7 +516,7 @@ add_task(async function testCookiesSubViewBlockedDoublyNested() {
|
|||
let label = listItem.querySelector(".protections-popup-list-host-label");
|
||||
// eslint-disable-next-line @microsoft/sdl/no-insecure-url
|
||||
is(label.value, "http://trackertest.org", "has an item for trackertest.org");
|
||||
ok(BrowserTestUtils.is_visible(listItem), "list item is visible");
|
||||
ok(BrowserTestUtils.isVisible(listItem), "list item is visible");
|
||||
ok(
|
||||
!listItem.classList.contains("allowed"),
|
||||
"indicates whether the cookie was blocked or allowed"
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ async function testIdentityState(hasException) {
|
|||
);
|
||||
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(gProtectionsHandler.iconBox),
|
||||
BrowserTestUtils.isVisible(gProtectionsHandler.iconBox),
|
||||
"icon box is visible regardless the exception"
|
||||
);
|
||||
|
||||
|
|
@ -77,7 +77,7 @@ async function testIdentityState(hasException) {
|
|||
"trackers are detected"
|
||||
);
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(gProtectionsHandler.iconBox),
|
||||
BrowserTestUtils.isVisible(gProtectionsHandler.iconBox),
|
||||
"icon box is visible"
|
||||
);
|
||||
is(
|
||||
|
|
@ -134,10 +134,10 @@ async function testSubview(hasException) {
|
|||
|
||||
// Explicitly waiting for the category item becoming visible.
|
||||
await TestUtils.waitForCondition(() => {
|
||||
return BrowserTestUtils.is_visible(categoryItem);
|
||||
return BrowserTestUtils.isVisible(categoryItem);
|
||||
});
|
||||
|
||||
ok(BrowserTestUtils.is_visible(categoryItem), "TP category item is visible");
|
||||
ok(BrowserTestUtils.isVisible(categoryItem), "TP category item is visible");
|
||||
|
||||
/* eslint-disable mozilla/no-arbitrary-setTimeout */
|
||||
// We have to wait until the ContentBlockingLog gets updated in the content.
|
||||
|
|
@ -162,7 +162,7 @@ async function testSubview(hasException) {
|
|||
let listItems = subview.querySelectorAll(".protections-popup-list-item");
|
||||
is(listItems.length, 1, "We have 1 item in the list");
|
||||
let listItem = listItems[0];
|
||||
ok(BrowserTestUtils.is_visible(listItem), "List item is visible");
|
||||
ok(BrowserTestUtils.isVisible(listItem), "List item is visible");
|
||||
is(
|
||||
listItem.querySelector("label").value,
|
||||
// eslint-disable-next-line @microsoft/sdl/no-insecure-url
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ async function assertSitesListed(blocked) {
|
|||
);
|
||||
|
||||
ok(
|
||||
!BrowserTestUtils.is_visible(categoryItem),
|
||||
!BrowserTestUtils.isVisible(categoryItem),
|
||||
"TP category item is not visible"
|
||||
);
|
||||
BrowserTestUtils.removeTab(tab);
|
||||
|
|
@ -68,10 +68,10 @@ async function assertSitesListed(blocked) {
|
|||
|
||||
// Explicitly waiting for the category item becoming visible.
|
||||
await BrowserTestUtils.waitForMutationCondition(categoryItem, {}, () =>
|
||||
BrowserTestUtils.is_visible(categoryItem)
|
||||
BrowserTestUtils.isVisible(categoryItem)
|
||||
);
|
||||
|
||||
ok(BrowserTestUtils.is_visible(categoryItem), "TP category item is visible");
|
||||
ok(BrowserTestUtils.isVisible(categoryItem), "TP category item is visible");
|
||||
|
||||
// Click the tracker category and wait until the tracker view is shown.
|
||||
let trackersView = document.getElementById("protections-popup-trackersView");
|
||||
|
|
@ -92,7 +92,7 @@ async function assertSitesListed(blocked) {
|
|||
item.querySelector("label").value == "https://email-tracking.example.org"
|
||||
);
|
||||
ok(listItem, "Has an item for email-tracking.example.org");
|
||||
ok(BrowserTestUtils.is_visible(listItem), "List item is visible");
|
||||
ok(BrowserTestUtils.isVisible(listItem), "List item is visible");
|
||||
|
||||
// Back to the popup main view.
|
||||
let mainView = document.getElementById("protections-popup-mainView");
|
||||
|
|
@ -134,13 +134,13 @@ async function assertSitesListed(blocked) {
|
|||
item.querySelector("label").value == "https://email-tracking.example.org"
|
||||
);
|
||||
ok(listItem, "Has an item for email-tracking.example.org");
|
||||
ok(BrowserTestUtils.is_visible(listItem), "List item is visible");
|
||||
ok(BrowserTestUtils.isVisible(listItem), "List item is visible");
|
||||
|
||||
listItem = listItems.find(
|
||||
item => item.querySelector("label").value == "https://itisatracker.org"
|
||||
);
|
||||
ok(listItem, "Has an item for itisatracker.org");
|
||||
ok(BrowserTestUtils.is_visible(listItem), "List item is visible");
|
||||
ok(BrowserTestUtils.isVisible(listItem), "List item is visible");
|
||||
|
||||
BrowserTestUtils.removeTab(tab);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ async function testIdentityState(hasException) {
|
|||
"trackers are detected"
|
||||
);
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(gProtectionsHandler.iconBox),
|
||||
BrowserTestUtils.isVisible(gProtectionsHandler.iconBox),
|
||||
"icon box is visible"
|
||||
);
|
||||
is(
|
||||
|
|
@ -209,10 +209,10 @@ async function testSubview(hasException) {
|
|||
|
||||
// Explicitly waiting for the category item becoming visible.
|
||||
await TestUtils.waitForCondition(() => {
|
||||
return BrowserTestUtils.is_visible(categoryItem);
|
||||
return BrowserTestUtils.isVisible(categoryItem);
|
||||
});
|
||||
|
||||
ok(BrowserTestUtils.is_visible(categoryItem), "TP category item is visible");
|
||||
ok(BrowserTestUtils.isVisible(categoryItem), "TP category item is visible");
|
||||
|
||||
/* eslint-disable mozilla/no-arbitrary-setTimeout */
|
||||
// We have to wait until the ContentBlockingLog gets updated in the content.
|
||||
|
|
@ -237,7 +237,7 @@ async function testSubview(hasException) {
|
|||
let listItems = subview.querySelectorAll(".protections-popup-list-item");
|
||||
is(listItems.length, 1, "We have 1 item in the list");
|
||||
let listItem = listItems[0];
|
||||
ok(BrowserTestUtils.is_visible(listItem), "List item is visible");
|
||||
ok(BrowserTestUtils.isVisible(listItem), "List item is visible");
|
||||
is(
|
||||
listItem.querySelector("label").value,
|
||||
"https://fingerprinting.example.com",
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ add_task(async function doTest() {
|
|||
await openProtectionsPanel();
|
||||
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(
|
||||
BrowserTestUtils.isVisible(
|
||||
gProtectionsHandler._protectionsPopupMilestonesText
|
||||
),
|
||||
"Milestones section should be visible in the panel."
|
||||
|
|
@ -68,7 +68,7 @@ add_task(async function doTest() {
|
|||
await openProtectionsPanel();
|
||||
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(
|
||||
BrowserTestUtils.isVisible(
|
||||
gProtectionsHandler._protectionsPopupMilestonesText
|
||||
),
|
||||
"Milestones section should still be visible in the panel."
|
||||
|
|
@ -88,7 +88,7 @@ add_task(async function doTest() {
|
|||
await openProtectionsPanel();
|
||||
|
||||
ok(
|
||||
!BrowserTestUtils.is_visible(
|
||||
!BrowserTestUtils.isVisible(
|
||||
gProtectionsHandler._protectionsPopupMilestonesText
|
||||
),
|
||||
"Milestones section should no longer be visible in the panel."
|
||||
|
|
|
|||
|
|
@ -74,10 +74,10 @@ add_task(async function testOpenPreferencesFromTrackersSubview() {
|
|||
|
||||
// Explicitly waiting for the category item becoming visible.
|
||||
await TestUtils.waitForCondition(() => {
|
||||
return BrowserTestUtils.is_visible(categoryItem);
|
||||
return BrowserTestUtils.isVisible(categoryItem);
|
||||
});
|
||||
|
||||
ok(BrowserTestUtils.is_visible(categoryItem), "TP category item is visible");
|
||||
ok(BrowserTestUtils.isVisible(categoryItem), "TP category item is visible");
|
||||
let trackersView = document.getElementById("protections-popup-trackersView");
|
||||
let viewShown = BrowserTestUtils.waitForEvent(trackersView, "ViewShown");
|
||||
categoryItem.click();
|
||||
|
|
@ -90,7 +90,7 @@ add_task(async function testOpenPreferencesFromTrackersSubview() {
|
|||
);
|
||||
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(preferencesButton),
|
||||
BrowserTestUtils.isVisible(preferencesButton),
|
||||
"The preferences button is shown."
|
||||
);
|
||||
|
||||
|
|
@ -126,10 +126,10 @@ add_task(async function testOpenPreferencesFromCookiesSubview() {
|
|||
|
||||
// Explicitly waiting for the category item becoming visible.
|
||||
await TestUtils.waitForCondition(() => {
|
||||
return BrowserTestUtils.is_visible(categoryItem);
|
||||
return BrowserTestUtils.isVisible(categoryItem);
|
||||
});
|
||||
|
||||
ok(BrowserTestUtils.is_visible(categoryItem), "TP category item is visible");
|
||||
ok(BrowserTestUtils.isVisible(categoryItem), "TP category item is visible");
|
||||
let cookiesView = document.getElementById("protections-popup-cookiesView");
|
||||
let viewShown = BrowserTestUtils.waitForEvent(cookiesView, "ViewShown");
|
||||
categoryItem.click();
|
||||
|
|
@ -142,7 +142,7 @@ add_task(async function testOpenPreferencesFromCookiesSubview() {
|
|||
);
|
||||
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(preferencesButton),
|
||||
BrowserTestUtils.isVisible(preferencesButton),
|
||||
"The preferences button is shown."
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ function testTrackingPage() {
|
|||
ok(!gProtectionsHandler.hasException, "content shows no exception");
|
||||
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(gProtectionsHandler.iconBox),
|
||||
BrowserTestUtils.isVisible(gProtectionsHandler.iconBox),
|
||||
"icon box is visible"
|
||||
);
|
||||
ok(gProtectionsHandler.iconBox.hasAttribute("active"), "shield is active");
|
||||
|
|
@ -80,7 +80,7 @@ function testTrackingPageUnblocked() {
|
|||
);
|
||||
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(gProtectionsHandler.iconBox),
|
||||
BrowserTestUtils.isVisible(gProtectionsHandler.iconBox),
|
||||
"icon box is visible"
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ add_task(async function testReportBreakageCancel() {
|
|||
"protections-popup-tp-switch-breakage-link"
|
||||
);
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(siteNotWorkingButton),
|
||||
BrowserTestUtils.isVisible(siteNotWorkingButton),
|
||||
"site not working button is visible"
|
||||
);
|
||||
let siteNotWorkingView = document.getElementById(
|
||||
|
|
@ -142,7 +142,7 @@ add_task(async function testReportBreakageSiteException() {
|
|||
"protections-popup-tp-switch-breakage-fixed-link"
|
||||
);
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(siteFixedButton),
|
||||
BrowserTestUtils.isVisible(siteFixedButton),
|
||||
"site fixed button is visible"
|
||||
);
|
||||
let sendReportView = document.getElementById(
|
||||
|
|
@ -263,7 +263,7 @@ async function openAndTestReportBreakage(url, tags, error = false) {
|
|||
"protections-popup-tp-switch-breakage-link"
|
||||
);
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(siteNotWorkingButton),
|
||||
BrowserTestUtils.isVisible(siteNotWorkingButton),
|
||||
"site not working button is visible"
|
||||
);
|
||||
let siteNotWorkingView = document.getElementById(
|
||||
|
|
@ -394,7 +394,7 @@ async function testReportBreakageSubmit(url, tags, error, hasException) {
|
|||
);
|
||||
if (error) {
|
||||
await TestUtils.waitForCondition(() =>
|
||||
BrowserTestUtils.is_visible(errorMessage)
|
||||
BrowserTestUtils.isVisible(errorMessage)
|
||||
);
|
||||
is(
|
||||
comments.value,
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ async function testIdentityState(hasException) {
|
|||
);
|
||||
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(gProtectionsHandler.iconBox),
|
||||
BrowserTestUtils.isVisible(gProtectionsHandler.iconBox),
|
||||
"icon box is visible regardless the exception"
|
||||
);
|
||||
await closeProtectionsPanel();
|
||||
|
|
@ -82,7 +82,7 @@ async function testIdentityState(hasException) {
|
|||
"social trackers are detected"
|
||||
);
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(gProtectionsHandler.iconBox),
|
||||
BrowserTestUtils.isVisible(gProtectionsHandler.iconBox),
|
||||
"icon box is visible"
|
||||
);
|
||||
is(
|
||||
|
|
@ -136,10 +136,10 @@ async function testSubview(hasException) {
|
|||
|
||||
// Explicitly waiting for the category item becoming visible.
|
||||
await TestUtils.waitForCondition(() => {
|
||||
return BrowserTestUtils.is_visible(categoryItem);
|
||||
return BrowserTestUtils.isVisible(categoryItem);
|
||||
});
|
||||
|
||||
ok(BrowserTestUtils.is_visible(categoryItem), "STP category item is visible");
|
||||
ok(BrowserTestUtils.isVisible(categoryItem), "STP category item is visible");
|
||||
ok(
|
||||
categoryItem.classList.contains("blocked"),
|
||||
"STP category item is blocked"
|
||||
|
|
@ -168,7 +168,7 @@ async function testSubview(hasException) {
|
|||
let listItems = subview.querySelectorAll(".protections-popup-list-item");
|
||||
is(listItems.length, 1, "We have 1 item in the list");
|
||||
let listItem = listItems[0];
|
||||
ok(BrowserTestUtils.is_visible(listItem), "List item is visible");
|
||||
ok(BrowserTestUtils.isVisible(listItem), "List item is visible");
|
||||
is(
|
||||
listItem.querySelector("label").value,
|
||||
"https://social-tracking.example.org",
|
||||
|
|
@ -225,7 +225,7 @@ async function testCategoryItem(blockLoads) {
|
|||
!categoryItem.classList.contains("blocked"),
|
||||
"Category not marked as blocked"
|
||||
);
|
||||
ok(!BrowserTestUtils.is_visible(categoryItem), "Item should be hidden");
|
||||
ok(!BrowserTestUtils.isVisible(categoryItem), "Item should be hidden");
|
||||
ok(
|
||||
!gProtectionsHandler._protectionsPopup.hasAttribute("detected"),
|
||||
"trackers are not detected"
|
||||
|
|
@ -239,13 +239,13 @@ async function testCategoryItem(blockLoads) {
|
|||
!categoryItem.classList.contains("blocked"),
|
||||
"Category not marked as blocked"
|
||||
);
|
||||
ok(!BrowserTestUtils.is_visible(categoryItem), "Item should be hidden");
|
||||
ok(!BrowserTestUtils.isVisible(categoryItem), "Item should be hidden");
|
||||
ok(
|
||||
!gProtectionsHandler._protectionsPopup.hasAttribute("detected"),
|
||||
"trackers are not detected"
|
||||
);
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(noTrackersDetectedDesc),
|
||||
BrowserTestUtils.isVisible(noTrackersDetectedDesc),
|
||||
"No Trackers detected should be shown"
|
||||
);
|
||||
|
||||
|
|
@ -269,9 +269,9 @@ async function testCategoryItem(blockLoads) {
|
|||
"Category marked as not found"
|
||||
);
|
||||
// At this point we should still be showing "No Trackers Detected"
|
||||
ok(!BrowserTestUtils.is_visible(categoryItem), "Item should not be visible");
|
||||
ok(!BrowserTestUtils.isVisible(categoryItem), "Item should not be visible");
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(noTrackersDetectedDesc),
|
||||
BrowserTestUtils.isVisible(noTrackersDetectedDesc),
|
||||
"No Trackers detected should be shown"
|
||||
);
|
||||
ok(
|
||||
|
|
@ -292,9 +292,9 @@ async function testCategoryItem(blockLoads) {
|
|||
!categoryItem.classList.contains("notFound"),
|
||||
"Category not marked as not found"
|
||||
);
|
||||
ok(BrowserTestUtils.is_visible(categoryItem), "Item should be visible");
|
||||
ok(BrowserTestUtils.isVisible(categoryItem), "Item should be visible");
|
||||
ok(
|
||||
!BrowserTestUtils.is_visible(noTrackersDetectedDesc),
|
||||
!BrowserTestUtils.isVisible(noTrackersDetectedDesc),
|
||||
"No Trackers detected should be hidden"
|
||||
);
|
||||
ok(
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ async function testBenignPage() {
|
|||
"correct tooltip"
|
||||
);
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(gProtectionsHandler.iconBox),
|
||||
BrowserTestUtils.isVisible(gProtectionsHandler.iconBox),
|
||||
"icon box is visible"
|
||||
);
|
||||
|
||||
|
|
@ -149,7 +149,7 @@ async function testTrackingPage(window) {
|
|||
let isWindowPrivate = PrivateBrowsingUtils.isWindowPrivate(window);
|
||||
let blockedByTP = areTrackersBlocked(isWindowPrivate);
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(gProtectionsHandler.iconBox),
|
||||
BrowserTestUtils.isVisible(gProtectionsHandler.iconBox),
|
||||
"icon box is always visible"
|
||||
);
|
||||
is(
|
||||
|
|
@ -212,7 +212,7 @@ async function testTrackingPageUnblocked(blockedByTP, window) {
|
|||
);
|
||||
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(gProtectionsHandler.iconBox),
|
||||
BrowserTestUtils.isVisible(gProtectionsHandler.iconBox),
|
||||
"icon box is visible"
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ async function assertSubViewState(category, expectedState) {
|
|||
|
||||
if (!expectedStateSorted.length) {
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(
|
||||
BrowserTestUtils.isVisible(
|
||||
document.getElementById(
|
||||
"protections-popup-no-trackers-found-description"
|
||||
)
|
||||
|
|
@ -88,11 +88,11 @@ async function assertSubViewState(category, expectedState) {
|
|||
|
||||
// Explicitly waiting for the category item becoming visible.
|
||||
await TestUtils.waitForCondition(() => {
|
||||
return BrowserTestUtils.is_visible(categoryItem);
|
||||
return BrowserTestUtils.isVisible(categoryItem);
|
||||
});
|
||||
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(categoryItem),
|
||||
BrowserTestUtils.isVisible(categoryItem),
|
||||
`${category} category item is visible`
|
||||
);
|
||||
|
||||
|
|
@ -162,10 +162,7 @@ async function assertSubViewState(category, expectedState) {
|
|||
ok(shimAllowSection, `Category ${category} has shim-allow hint.`);
|
||||
|
||||
if (Object.values(expectedState).some(entry => entry.shimAllow)) {
|
||||
BrowserTestUtils.is_visible(
|
||||
shimAllowSection,
|
||||
"Shim allow hint is visible."
|
||||
);
|
||||
BrowserTestUtils.isVisible(shimAllowSection, "Shim allow hint is visible.");
|
||||
} else {
|
||||
BrowserTestUtils.isHidden(shimAllowSection, "Shim allow hint is hidden.");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ async function testCategoryNotShown(win) {
|
|||
);
|
||||
|
||||
ok(
|
||||
!BrowserTestUtils.is_visible(categoryItem),
|
||||
!BrowserTestUtils.isVisible(categoryItem),
|
||||
"Fingerprinting category item is not visible"
|
||||
);
|
||||
|
||||
|
|
@ -223,11 +223,11 @@ add_task(async function testFingerprintingSubview() {
|
|||
|
||||
// Explicitly waiting for the category item becoming visible.
|
||||
await BrowserTestUtils.waitForMutationCondition(categoryItem, {}, () =>
|
||||
BrowserTestUtils.is_visible(categoryItem)
|
||||
BrowserTestUtils.isVisible(categoryItem)
|
||||
);
|
||||
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(categoryItem),
|
||||
BrowserTestUtils.isVisible(categoryItem),
|
||||
"Fingerprinting category item is visible"
|
||||
);
|
||||
|
||||
|
|
@ -255,7 +255,7 @@ add_task(async function testFingerprintingSubview() {
|
|||
item => item.querySelector("label").value == "https://example.org"
|
||||
);
|
||||
ok(listItem, "Has an item for example.org");
|
||||
ok(BrowserTestUtils.is_visible(listItem), "List item is visible");
|
||||
ok(BrowserTestUtils.isVisible(listItem), "List item is visible");
|
||||
|
||||
// Back to the popup main view.
|
||||
let mainView = win.document.getElementById("protections-popup-mainView");
|
||||
|
|
@ -301,11 +301,11 @@ add_task(async function testFingerprintingSubviewInPBM() {
|
|||
|
||||
// Explicitly waiting for the category item becoming visible.
|
||||
await BrowserTestUtils.waitForMutationCondition(categoryItem, {}, () =>
|
||||
BrowserTestUtils.is_visible(categoryItem)
|
||||
BrowserTestUtils.isVisible(categoryItem)
|
||||
);
|
||||
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(categoryItem),
|
||||
BrowserTestUtils.isVisible(categoryItem),
|
||||
"Fingerprinting category item is visible"
|
||||
);
|
||||
|
||||
|
|
@ -333,7 +333,7 @@ add_task(async function testFingerprintingSubviewInPBM() {
|
|||
item => item.querySelector("label").value == "https://example.org"
|
||||
);
|
||||
ok(listItem, "Has an item for example.org");
|
||||
ok(BrowserTestUtils.is_visible(listItem), "List item is visible");
|
||||
ok(BrowserTestUtils.isVisible(listItem), "List item is visible");
|
||||
|
||||
// Back to the popup main view.
|
||||
let mainView = win.document.getElementById("protections-popup-mainView");
|
||||
|
|
@ -371,7 +371,7 @@ add_task(async function testDynamicallyLoadFingerprinter() {
|
|||
);
|
||||
|
||||
ok(
|
||||
!BrowserTestUtils.is_visible(categoryItem),
|
||||
!BrowserTestUtils.isVisible(categoryItem),
|
||||
"Fingerprinting category item is not visible"
|
||||
);
|
||||
|
||||
|
|
@ -411,7 +411,7 @@ add_task(async function testDynamicallyLoadFingerprinter() {
|
|||
item => item.querySelector("label").value == "https://example.org"
|
||||
);
|
||||
ok(listItem, "Has an item for example.org");
|
||||
ok(BrowserTestUtils.is_visible(listItem), "List item is visible");
|
||||
ok(BrowserTestUtils.isVisible(listItem), "List item is visible");
|
||||
|
||||
// Back to the popup main view.
|
||||
let mainView = win.document.getElementById("protections-popup-mainView");
|
||||
|
|
|
|||
|
|
@ -41,10 +41,10 @@ async function assertSitesListed(blocked) {
|
|||
|
||||
// Explicitly waiting for the category item becoming visible.
|
||||
await TestUtils.waitForCondition(() => {
|
||||
return BrowserTestUtils.is_visible(categoryItem);
|
||||
return BrowserTestUtils.isVisible(categoryItem);
|
||||
});
|
||||
|
||||
ok(BrowserTestUtils.is_visible(categoryItem), "TP category item is visible");
|
||||
ok(BrowserTestUtils.isVisible(categoryItem), "TP category item is visible");
|
||||
let trackersView = document.getElementById("protections-popup-trackersView");
|
||||
let viewShown = BrowserTestUtils.waitForEvent(trackersView, "ViewShown");
|
||||
categoryItem.click();
|
||||
|
|
@ -101,7 +101,7 @@ async function assertSitesListed(blocked) {
|
|||
item => item.querySelector("label").value == "http://trackertest.org"
|
||||
);
|
||||
ok(listItem, "Has an item for trackertest.org");
|
||||
ok(BrowserTestUtils.is_visible(listItem), "List item is visible");
|
||||
ok(BrowserTestUtils.isVisible(listItem), "List item is visible");
|
||||
is(
|
||||
listItem.classList.contains("allowed"),
|
||||
!blocked,
|
||||
|
|
@ -112,7 +112,7 @@ async function assertSitesListed(blocked) {
|
|||
item => item.querySelector("label").value == "https://itisatracker.org"
|
||||
);
|
||||
ok(listItem, "Has an item for itisatracker.org");
|
||||
ok(BrowserTestUtils.is_visible(listItem), "List item is visible");
|
||||
ok(BrowserTestUtils.isVisible(listItem), "List item is visible");
|
||||
is(
|
||||
listItem.classList.contains("allowed"),
|
||||
!blocked,
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ add_task(async function test_https() {
|
|||
"identity-popup-security-decription-custom-root"
|
||||
);
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(customRootWarning),
|
||||
BrowserTestUtils.isVisible(customRootWarning),
|
||||
"custom root warning is visible"
|
||||
);
|
||||
|
||||
|
|
@ -40,7 +40,7 @@ add_task(async function test_https() {
|
|||
"identity-popup-content-verifier-unknown"
|
||||
);
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(subPanelInfo),
|
||||
BrowserTestUtils.isVisible(subPanelInfo),
|
||||
"custom root warning in sub panel is visible"
|
||||
);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ async function testPageInfoNotEncrypted(uri) {
|
|||
let pageInfoDoc = pageInfo.document;
|
||||
let securityTab = pageInfoDoc.getElementById("securityTab");
|
||||
await TestUtils.waitForCondition(
|
||||
() => BrowserTestUtils.is_visible(securityTab),
|
||||
() => BrowserTestUtils.isVisible(securityTab),
|
||||
"Security tab should be visible."
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ add_task(async function test_navBar_button_visibility() {
|
|||
};
|
||||
gSync.updateAllUI(state);
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(button),
|
||||
BrowserTestUtils.isVisible(button),
|
||||
"Check button visibility with STATUS_NOT_CONFIGURED"
|
||||
);
|
||||
|
||||
|
|
@ -52,28 +52,28 @@ add_task(async function test_navBar_button_visibility() {
|
|||
state.status = UIState.STATUS_NOT_VERIFIED;
|
||||
gSync.updateAllUI(state);
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(button),
|
||||
BrowserTestUtils.isVisible(button),
|
||||
"Check button visibility with STATUS_NOT_VERIFIED"
|
||||
);
|
||||
|
||||
state.status = UIState.STATUS_LOGIN_FAILED;
|
||||
gSync.updateAllUI(state);
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(button),
|
||||
BrowserTestUtils.isVisible(button),
|
||||
"Check button visibility with STATUS_LOGIN_FAILED"
|
||||
);
|
||||
|
||||
state.status = UIState.STATUS_SIGNED_IN;
|
||||
gSync.updateAllUI(state);
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(button),
|
||||
BrowserTestUtils.isVisible(button),
|
||||
"Check button visibility with STATUS_SIGNED_IN"
|
||||
);
|
||||
|
||||
state.syncEnabled = false;
|
||||
gSync.updateAllUI(state);
|
||||
is(
|
||||
BrowserTestUtils.is_visible(button),
|
||||
BrowserTestUtils.isVisible(button),
|
||||
true,
|
||||
"Check button visibility when signed in, but sync disabled"
|
||||
);
|
||||
|
|
@ -117,7 +117,7 @@ add_task(async function test_overflow_navBar_button_visibility() {
|
|||
gSync.updateAllUI(state);
|
||||
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(button),
|
||||
BrowserTestUtils.isVisible(button),
|
||||
"Button should still be visable even if user sync not configured"
|
||||
);
|
||||
|
||||
|
|
@ -178,7 +178,7 @@ add_task(async function test_ui_state_signedin() {
|
|||
checkMenuBarItem("sync-syncnowitem");
|
||||
checkPanelHeader();
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(
|
||||
BrowserTestUtils.isVisible(
|
||||
document.getElementById("fxa-menu-header-title")
|
||||
),
|
||||
"expected toolbar to be visible after opening"
|
||||
|
|
@ -675,7 +675,7 @@ add_task(async function test_experiment_ui_state_signedin() {
|
|||
checkMenuBarItem("sync-syncnowitem");
|
||||
checkPanelHeader();
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(
|
||||
BrowserTestUtils.isVisible(
|
||||
document.getElementById("fxa-menu-header-title")
|
||||
),
|
||||
"expected toolbar to be visible after opening"
|
||||
|
|
@ -844,7 +844,7 @@ async function checkFxABadged() {
|
|||
});
|
||||
const badge = button.querySelector("label.feature-callout");
|
||||
ok(badge, "expected feature-callout style badge");
|
||||
ok(BrowserTestUtils.is_visible(badge), "expected the badge to be visible");
|
||||
ok(BrowserTestUtils.isVisible(badge), "expected the badge to be visible");
|
||||
}
|
||||
|
||||
// fxaStatus is one of 'not_configured', 'unverified', 'login-failed', or 'signedin'.
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ async function checkDialog(
|
|||
"Title should fit without overflowing."
|
||||
);
|
||||
|
||||
ok(BrowserTestUtils.is_visible(titleEl), "New title should be shown.");
|
||||
ok(BrowserTestUtils.isVisible(titleEl), "New title should be shown.");
|
||||
ok(
|
||||
BrowserTestUtils.isHidden(doc.getElementById("infoTitle")),
|
||||
"Old title should be hidden."
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ add_task(async function test() {
|
|||
document.getElementById("cmd_print").doCommand();
|
||||
await BrowserTestUtils.waitForCondition(() => {
|
||||
let preview = document.querySelector(".printPreviewBrowser");
|
||||
return preview && BrowserTestUtils.is_visible(preview);
|
||||
return preview && BrowserTestUtils.isVisible(preview);
|
||||
});
|
||||
|
||||
let ppBrowser = document.querySelector(
|
||||
|
|
|
|||
|
|
@ -158,7 +158,7 @@ async function checkOriginText(browser, origin = null) {
|
|||
let dialogDoc = dialog._frame.contentWindow.document;
|
||||
let titleSelector = "#titleText";
|
||||
let infoTitle = dialogDoc.querySelector(titleSelector);
|
||||
ok(BrowserTestUtils.is_visible(infoTitle), "Title text is visible");
|
||||
ok(BrowserTestUtils.isVisible(infoTitle), "Title text is visible");
|
||||
|
||||
info("Check the displayed origin text is correct.");
|
||||
if (origin) {
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ add_task(async function tab_manager_visibility_preference_on() {
|
|||
},
|
||||
async function (browser) {
|
||||
await Assert.ok(
|
||||
BrowserTestUtils.is_visible(
|
||||
BrowserTestUtils.isVisible(
|
||||
newWindow.document.getElementById("alltabs-button")
|
||||
),
|
||||
"tab manage menu is visible when browser.tabs.tabmanager.enabled preference is set to true"
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ add_task(async function test_tab_switch_dismiss() {
|
|||
|
||||
let permsLearnMore = document.getElementById("addon-webext-perm-info");
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(permsLearnMore),
|
||||
BrowserTestUtils.isVisible(permsLearnMore),
|
||||
"Learn more link is shown on Permission popup"
|
||||
);
|
||||
is(
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ add_task(async function () {
|
|||
registerCleanupFunction(() =>
|
||||
document.documentElement.setAttribute("fxastatus", initialFxaStatus)
|
||||
);
|
||||
ok(BrowserTestUtils.is_visible(fxaButton), "FxA button is now visible");
|
||||
ok(BrowserTestUtils.isVisible(fxaButton), "FxA button is now visible");
|
||||
}
|
||||
|
||||
originalWindowWidth = window.outerWidth;
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ add_task(async function () {
|
|||
// Ensure we're showing the preview...
|
||||
await BrowserTestUtils.waitForCondition(() => {
|
||||
let preview = document.querySelector(".printPreviewBrowser");
|
||||
return preview && BrowserTestUtils.is_visible(preview);
|
||||
return preview && BrowserTestUtils.isVisible(preview);
|
||||
});
|
||||
|
||||
ok(true, "Entered print preview mode");
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ add_task(async function empty_message_on_non_empty_bookmarks_toolbar() {
|
|||
let newWin = await BrowserTestUtils.openNewBrowserWindow();
|
||||
let doc = newWin.document;
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(doc.getElementById("PersonalToolbar")),
|
||||
BrowserTestUtils.isVisible(doc.getElementById("PersonalToolbar")),
|
||||
"Personal toolbar should be visible"
|
||||
);
|
||||
ok(
|
||||
|
|
@ -61,10 +61,7 @@ add_task(async function empty_message_after_customization() {
|
|||
let newWin = await BrowserTestUtils.openNewBrowserWindow();
|
||||
let doc = newWin.document;
|
||||
let toolbar = doc.getElementById("PersonalToolbar");
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(toolbar),
|
||||
"Personal toolbar should be visible"
|
||||
);
|
||||
ok(BrowserTestUtils.isVisible(toolbar), "Personal toolbar should be visible");
|
||||
await emptyToolbarMessageVisible(false, newWin);
|
||||
|
||||
// Force a Places view uninit through customization.
|
||||
|
|
@ -72,10 +69,7 @@ add_task(async function empty_message_after_customization() {
|
|||
await resetCustomization();
|
||||
// Show the toolbar again.
|
||||
setToolbarVisibility(toolbar, true, false, false);
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(toolbar),
|
||||
"Personal toolbar should be visible"
|
||||
);
|
||||
ok(BrowserTestUtils.isVisible(toolbar), "Personal toolbar should be visible");
|
||||
// Wait for bookmarks to be visible.
|
||||
let placesItems = doc.getElementById("PlacesToolbarItems");
|
||||
await BrowserTestUtils.waitForMutationCondition(
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ add_task(async function test_hidden_widget_overflow() {
|
|||
let overflowButton = gWin.document.getElementById("nav-bar-overflow-button");
|
||||
|
||||
Assert.ok(
|
||||
!BrowserTestUtils.is_visible(overflowButton),
|
||||
!BrowserTestUtils.isVisible(overflowButton),
|
||||
"Overflow panel button should be hidden."
|
||||
);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -359,7 +359,7 @@ async function testDownloadContextMenu({
|
|||
function verifyContextMenu(contextMenu, itemSelectors) {
|
||||
// Ignore hidden nodes
|
||||
let items = Array.from(contextMenu.children).filter(n =>
|
||||
BrowserTestUtils.is_visible(n)
|
||||
BrowserTestUtils.isVisible(n)
|
||||
);
|
||||
let menuAsText = items
|
||||
.map(n => {
|
||||
|
|
|
|||
|
|
@ -377,7 +377,7 @@ async function verifyContextMenu(contextMenu, expected = {}) {
|
|||
);
|
||||
info("Waiting for the context menu to show up");
|
||||
await TestUtils.waitForCondition(
|
||||
() => BrowserTestUtils.is_visible(contextMenu),
|
||||
() => BrowserTestUtils.isVisible(contextMenu),
|
||||
"The context menu is visible"
|
||||
);
|
||||
await TestUtils.waitForTick();
|
||||
|
|
@ -588,7 +588,7 @@ async function testOpenPDFPreview({
|
|||
await TestUtils.waitForCondition(() => {
|
||||
return (
|
||||
listbox.itemChildren.length == expected.downloadCount &&
|
||||
BrowserTestUtils.is_visible(listbox.itemChildren[0])
|
||||
BrowserTestUtils.isVisible(listbox.itemChildren[0])
|
||||
);
|
||||
});
|
||||
itemTarget = listbox.itemChildren[0];
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ function confirmExtensionPage() {
|
|||
"Extension (Test Extension)",
|
||||
"The correct label should be used"
|
||||
);
|
||||
ok(BrowserTestUtils.is_visible(label), "No label should be visible");
|
||||
ok(BrowserTestUtils.isVisible(label), "No label should be visible");
|
||||
}
|
||||
|
||||
add_task(async function testIdentityIndication() {
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ async function testPermissionPopup({ expectPermissionHidden }) {
|
|||
);
|
||||
} else {
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(permissionsGrantedIcon),
|
||||
BrowserTestUtils.isVisible(permissionsGrantedIcon),
|
||||
"Permission Granted Icon is visible"
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ add_task(async function testPrintPreview() {
|
|||
// Ensure we're showing the preview...
|
||||
await BrowserTestUtils.waitForCondition(() => {
|
||||
let preview = document.querySelector(".printPreviewBrowser");
|
||||
return preview && BrowserTestUtils.is_visible(preview);
|
||||
return preview && BrowserTestUtils.isVisible(preview);
|
||||
});
|
||||
|
||||
gBrowser.getTabDialogBox(gBrowser.selectedBrowser).abortAllDialogs();
|
||||
|
|
|
|||
|
|
@ -317,7 +317,7 @@ add_task(async function testFxViewEntryPointsInPrivateBrowsing() {
|
|||
toolsMenu.openMenu(true);
|
||||
await menuShown;
|
||||
Assert.equal(
|
||||
BrowserTestUtils.is_visible(fxViewMenuItem),
|
||||
BrowserTestUtils.isVisible(fxViewMenuItem),
|
||||
expectedEnabled,
|
||||
`Firefox view menu item is ${expectedEnabled ? "enabled" : "hidden"}`
|
||||
);
|
||||
|
|
@ -334,7 +334,7 @@ add_task(async function testFxViewEntryPointsInPrivateBrowsing() {
|
|||
}
|
||||
// check the tab button
|
||||
Assert.equal(
|
||||
BrowserTestUtils.is_visible(fxViewBtn),
|
||||
BrowserTestUtils.isVisible(fxViewBtn),
|
||||
expectedVisible,
|
||||
`#${fxViewBtn.id} is ${
|
||||
expectedVisible ? "visible" : "hidden"
|
||||
|
|
|
|||
|
|
@ -135,7 +135,7 @@ add_task(async function testNotificationDot() {
|
|||
await initTabSync();
|
||||
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(fxViewBtn),
|
||||
BrowserTestUtils.isVisible(fxViewBtn),
|
||||
"The Firefox View button is showing"
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -135,7 +135,7 @@ function testVisibility(browser, expected) {
|
|||
const elem = document.querySelector(selector);
|
||||
if (shouldBeVisible) {
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(elem),
|
||||
BrowserTestUtils.isVisible(elem),
|
||||
`Expected ${selector} to be visible`
|
||||
);
|
||||
} else {
|
||||
|
|
@ -159,7 +159,7 @@ async function waitForElementVisible(browser, selector, isVisible = true) {
|
|||
},
|
||||
() => {
|
||||
return isVisible
|
||||
? BrowserTestUtils.is_visible(elem)
|
||||
? BrowserTestUtils.isVisible(elem)
|
||||
: BrowserTestUtils.isHidden(elem);
|
||||
}
|
||||
);
|
||||
|
|
@ -178,14 +178,14 @@ async function waitForVisibleSetupStep(browser, expected) {
|
|||
attributeFilter: ["selected-view"],
|
||||
},
|
||||
() => {
|
||||
return BrowserTestUtils.is_visible(nextStepElem);
|
||||
return BrowserTestUtils.isVisible(nextStepElem);
|
||||
}
|
||||
);
|
||||
|
||||
for (let elem of stepElems) {
|
||||
if (elem == nextStepElem) {
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(elem),
|
||||
BrowserTestUtils.isVisible(elem),
|
||||
`Expected ${elem.id || elem.className} to be visible`
|
||||
);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -292,7 +292,7 @@ add_task(async function test_file_migration_error() {
|
|||
|
||||
let errorMessageContainer = shadow.querySelector(".file-import-error");
|
||||
Assert.ok(
|
||||
BrowserTestUtils.is_visible(errorMessageContainer),
|
||||
BrowserTestUtils.isVisible(errorMessageContainer),
|
||||
"Should be showing the error message container"
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -90,12 +90,12 @@ add_task(async function test_permissions() {
|
|||
Assert.ok(BrowserTestUtils.isHidden(importButton), "Import button hidden.");
|
||||
let noPermissionsMessage = shadow.querySelector(".no-permissions-message");
|
||||
Assert.ok(
|
||||
BrowserTestUtils.is_visible(noPermissionsMessage),
|
||||
BrowserTestUtils.isVisible(noPermissionsMessage),
|
||||
"No permissions message shown."
|
||||
);
|
||||
let getPermissionButton = shadow.querySelector("#get-permissions");
|
||||
Assert.ok(
|
||||
BrowserTestUtils.is_visible(getPermissionButton),
|
||||
BrowserTestUtils.isVisible(getPermissionButton),
|
||||
"Get permissions button shown."
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ let OptionItemExists = (elementId, doc = document) => {
|
|||
|
||||
Assert.ok(optionItem, `Context menu contains the menuitem ${elementId}`);
|
||||
Assert.ok(
|
||||
BrowserTestUtils.is_visible(optionItem),
|
||||
BrowserTestUtils.isVisible(optionItem),
|
||||
`Context menu option ${elementId} is visible`
|
||||
);
|
||||
};
|
||||
|
|
@ -64,7 +64,7 @@ let OptionsMatchExpected = (contextMenu, expectedOptionItems) => {
|
|||
let idList = [];
|
||||
for (let elem of contextMenu.children) {
|
||||
if (
|
||||
BrowserTestUtils.is_visible(elem) &&
|
||||
BrowserTestUtils.isVisible(elem) &&
|
||||
elem.localName !== "menuseparator"
|
||||
) {
|
||||
idList.push(elem.id);
|
||||
|
|
|
|||
|
|
@ -187,7 +187,7 @@ add_task(async function openInSameTabWithPrefSet() {
|
|||
await popupPromise;
|
||||
|
||||
let openItem = document.getElementById("placesContext_open");
|
||||
ok(BrowserTestUtils.is_visible(openItem), "Open item should be visible");
|
||||
ok(BrowserTestUtils.isVisible(openItem), "Open item should be visible");
|
||||
|
||||
info("Waiting for page to load");
|
||||
let promise = waitForLoad(gBrowser.selectedBrowser, TEST_PAGES[0]);
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ async function assertTagsVisibility(libraryDocument, expectedVisible) {
|
|||
|
||||
// Check the editor area.
|
||||
const tagInput = libraryDocument.getElementById("editBMPanel_tagsField");
|
||||
Assert.equal(BrowserTestUtils.is_visible(tagInput), expectedVisible);
|
||||
Assert.equal(BrowserTestUtils.isVisible(tagInput), expectedVisible);
|
||||
if (expectedVisible) {
|
||||
Assert.equal(tagInput.value, TAGS_TEXT);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ add_task(async function test_open_sidebar_and_customize() {
|
|||
async function checkTreeIsFunctional() {
|
||||
Assert.ok(SidebarUI.isOpen, "Sidebar is open");
|
||||
Assert.ok(
|
||||
BrowserTestUtils.is_visible(SidebarUI.browser),
|
||||
BrowserTestUtils.isVisible(SidebarUI.browser),
|
||||
"sidebar browser is visible"
|
||||
);
|
||||
Assert.ok(tree.view.result, "View result is defined");
|
||||
|
|
@ -49,7 +49,7 @@ add_task(async function test_open_sidebar_and_customize() {
|
|||
await promiseCustomizeStart();
|
||||
|
||||
Assert.ok(
|
||||
!BrowserTestUtils.is_visible(SidebarUI.browser),
|
||||
!BrowserTestUtils.isVisible(SidebarUI.browser),
|
||||
"sidebar browser is hidden"
|
||||
);
|
||||
Assert.ok(tree.view.result, "View result is defined");
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ async function locateBookmarkAndTestCtrlClick(menupopup) {
|
|||
node => node.label == "Test1"
|
||||
);
|
||||
ok(testMenuitem, "Found test bookmark.");
|
||||
ok(BrowserTestUtils.is_visible(testMenuitem), "Should be visible");
|
||||
ok(BrowserTestUtils.isVisible(testMenuitem), "Should be visible");
|
||||
let promiseTabOpened = BrowserTestUtils.waitForNewTab(gBrowser, null);
|
||||
EventUtils.synthesizeMouseAtCenter(testMenuitem, { accelKey: true });
|
||||
let newTab = await promiseTabOpened;
|
||||
|
|
|
|||
|
|
@ -1565,7 +1565,7 @@ add_task(async function testRFPWarningBanner() {
|
|||
|
||||
// Verify if the banner is hidden at the beginning.
|
||||
ok(
|
||||
!BrowserTestUtils.is_visible(rfpWarningBanner),
|
||||
!BrowserTestUtils.isVisible(rfpWarningBanner),
|
||||
"The RFP warning banner is hidden at the beginning."
|
||||
);
|
||||
|
||||
|
|
@ -1576,7 +1576,7 @@ add_task(async function testRFPWarningBanner() {
|
|||
|
||||
// Verify if the banner is shown.
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(rfpWarningBanner),
|
||||
BrowserTestUtils.isVisible(rfpWarningBanner),
|
||||
"The RFP warning banner is shown."
|
||||
);
|
||||
|
||||
|
|
@ -1590,7 +1590,7 @@ add_task(async function testRFPWarningBanner() {
|
|||
|
||||
// Verify if the banner is shown.
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(rfpWarningBanner),
|
||||
BrowserTestUtils.isVisible(rfpWarningBanner),
|
||||
"The RFP warning banner is shown."
|
||||
);
|
||||
|
||||
|
|
@ -1604,7 +1604,7 @@ add_task(async function testRFPWarningBanner() {
|
|||
|
||||
// Verify if the banner is shown.
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(rfpWarningBanner),
|
||||
BrowserTestUtils.isVisible(rfpWarningBanner),
|
||||
"The RFP warning banner is shown."
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ async function testTCPSection({ dFPIEnabled }) {
|
|||
|
||||
let etpStandardTCPBox = doc.getElementById("etpStandardTCPBox");
|
||||
is(
|
||||
BrowserTestUtils.is_visible(etpStandardTCPBox),
|
||||
BrowserTestUtils.isVisible(etpStandardTCPBox),
|
||||
uiEnabled,
|
||||
`TCP section in standard is ${uiEnabled ? " " : "not "}visible.`
|
||||
);
|
||||
|
|
@ -69,7 +69,7 @@ async function testTCPSection({ dFPIEnabled }) {
|
|||
// If visible, test the TCP section elements.
|
||||
let learnMoreLink = etpStandardTCPBox.querySelector("#tcp-learn-more-link");
|
||||
ok(learnMoreLink, "Should have a learn more link");
|
||||
BrowserTestUtils.is_visible(
|
||||
BrowserTestUtils.isVisible(
|
||||
learnMoreLink,
|
||||
"Learn more link should be visible."
|
||||
);
|
||||
|
|
@ -85,13 +85,13 @@ async function testTCPSection({ dFPIEnabled }) {
|
|||
|
||||
let description = etpStandardTCPBox.querySelector(".tail-with-learn-more");
|
||||
ok(description, "Should have a description element.");
|
||||
BrowserTestUtils.is_visible(description, "Description should be visible.");
|
||||
BrowserTestUtils.isVisible(description, "Description should be visible.");
|
||||
|
||||
let title = etpStandardTCPBox.querySelector(
|
||||
".content-blocking-warning-title"
|
||||
);
|
||||
ok(title, "Should have a title element.");
|
||||
BrowserTestUtils.is_visible(title, "Title should be visible.");
|
||||
BrowserTestUtils.isVisible(title, "Title should be visible.");
|
||||
}
|
||||
|
||||
info("Switch to ETP strict.");
|
||||
|
|
@ -99,7 +99,7 @@ async function testTCPSection({ dFPIEnabled }) {
|
|||
strictRadioOption.click();
|
||||
await categoryPrefChange;
|
||||
ok(
|
||||
!BrowserTestUtils.is_visible(etpStandardTCPBox),
|
||||
!BrowserTestUtils.isVisible(etpStandardTCPBox),
|
||||
"When strict is selected TCP UI is not visible."
|
||||
);
|
||||
|
||||
|
|
@ -108,7 +108,7 @@ async function testTCPSection({ dFPIEnabled }) {
|
|||
customRadioOption.click();
|
||||
await categoryPrefChange;
|
||||
ok(
|
||||
!BrowserTestUtils.is_visible(etpStandardTCPBox),
|
||||
!BrowserTestUtils.isVisible(etpStandardTCPBox),
|
||||
"When custom is selected TCP UI is not visible."
|
||||
);
|
||||
|
||||
|
|
@ -117,7 +117,7 @@ async function testTCPSection({ dFPIEnabled }) {
|
|||
standardRadioOption.click();
|
||||
await categoryPrefChange;
|
||||
is(
|
||||
BrowserTestUtils.is_visible(etpStandardTCPBox),
|
||||
BrowserTestUtils.isVisible(etpStandardTCPBox),
|
||||
uiEnabled,
|
||||
`TCP section in standard is ${uiEnabled ? " " : "not "}visible.`
|
||||
);
|
||||
|
|
|
|||
|
|
@ -348,7 +348,7 @@ add_task(async function test_aboutpreferences_search() {
|
|||
Assert.ok(BrowserTestUtils.isHidden(mobile), "Mobile hidden");
|
||||
Assert.ok(BrowserTestUtils.isHidden(monitor), "Monitor hidden");
|
||||
Assert.ok(BrowserTestUtils.isHidden(vpn), "VPN hidden");
|
||||
Assert.ok(BrowserTestUtils.is_visible(relay), "Relay shown");
|
||||
Assert.ok(BrowserTestUtils.isVisible(relay), "Relay shown");
|
||||
|
||||
BrowserTestUtils.removeTab(tab);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -589,7 +589,7 @@ add_task(async function addSpeakerPermission() {
|
|||
let speakerRow =
|
||||
gBrowser.contentDocument.getElementById("speakerSettingsRow");
|
||||
Assert.equal(
|
||||
BrowserTestUtils.is_visible(speakerRow),
|
||||
BrowserTestUtils.isVisible(speakerRow),
|
||||
enabled,
|
||||
"speakerRow visible"
|
||||
);
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ add_task(async function clickLearnMore() {
|
|||
);
|
||||
for (let link of learnMoreLinks) {
|
||||
Assert.ok(
|
||||
BrowserTestUtils.is_visible(link),
|
||||
BrowserTestUtils.isVisible(link),
|
||||
"Learn-more link is visible: " + link.id
|
||||
);
|
||||
}
|
||||
|
|
@ -127,7 +127,7 @@ function assertPrefUIState(stateByElementID) {
|
|||
let doc = gBrowser.selectedBrowser.contentDocument;
|
||||
let container = doc.getElementById(CONTAINER_ID);
|
||||
let attr;
|
||||
Assert.ok(BrowserTestUtils.is_visible(container), "The container is visible");
|
||||
Assert.ok(BrowserTestUtils.isVisible(container), "The container is visible");
|
||||
for (let [id, state] of Object.entries(stateByElementID)) {
|
||||
let element = doc.getElementById(id);
|
||||
if (element.tagName === "checkbox") {
|
||||
|
|
|
|||
|
|
@ -35,22 +35,22 @@ add_task(async function test_preferences_section() {
|
|||
let showStr = show ? "visible" : "hidden";
|
||||
|
||||
is(
|
||||
BrowserTestUtils.is_visible(section),
|
||||
BrowserTestUtils.isVisible(section),
|
||||
show,
|
||||
`Privacy Segmentation section should be ${showStr}.`
|
||||
);
|
||||
is(
|
||||
BrowserTestUtils.is_visible(sectionHeader),
|
||||
BrowserTestUtils.isVisible(sectionHeader),
|
||||
show,
|
||||
`Privacy Segmentation section header should be ${showStr}.`
|
||||
);
|
||||
is(
|
||||
BrowserTestUtils.is_visible(sectionDescription),
|
||||
BrowserTestUtils.isVisible(sectionDescription),
|
||||
show,
|
||||
`Privacy Segmentation section description should be ${showStr}.`
|
||||
);
|
||||
is(
|
||||
BrowserTestUtils.is_visible(radioGroup),
|
||||
BrowserTestUtils.isVisible(radioGroup),
|
||||
show,
|
||||
`Privacy Segmentation radio group should be ${showStr}.`
|
||||
);
|
||||
|
|
|
|||
|
|
@ -152,7 +152,7 @@ async function doVisibilityTest({
|
|||
let doc = gBrowser.selectedBrowser.contentDocument;
|
||||
let container = doc.getElementById(CONTAINER_ID);
|
||||
Assert.equal(
|
||||
BrowserTestUtils.is_visible(container),
|
||||
BrowserTestUtils.isVisible(container),
|
||||
initialExpectedVisibility,
|
||||
`The container has the expected initial visibility, initialExpectedVisibility=${initialExpectedVisibility}`
|
||||
);
|
||||
|
|
@ -177,7 +177,7 @@ async function doVisibilityTest({
|
|||
|
||||
// Check visibility again.
|
||||
Assert.equal(
|
||||
BrowserTestUtils.is_visible(container),
|
||||
BrowserTestUtils.isVisible(container),
|
||||
newExpectedVisibility,
|
||||
`The container has the expected visibility after setting new scenario, newExpectedVisibility=${newExpectedVisibility}`
|
||||
);
|
||||
|
|
@ -481,7 +481,7 @@ add_task(async function clickLearnMore() {
|
|||
);
|
||||
for (let link of learnMoreLinks) {
|
||||
Assert.ok(
|
||||
BrowserTestUtils.is_visible(link),
|
||||
BrowserTestUtils.isVisible(link),
|
||||
"Learn-more link is visible: " + link.id
|
||||
);
|
||||
}
|
||||
|
|
@ -574,7 +574,7 @@ function assertPrefUIState(stateByElementID) {
|
|||
let doc = gBrowser.selectedBrowser.contentDocument;
|
||||
let container = doc.getElementById(CONTAINER_ID);
|
||||
let attr;
|
||||
Assert.ok(BrowserTestUtils.is_visible(container), "The container is visible");
|
||||
Assert.ok(BrowserTestUtils.isVisible(container), "The container is visible");
|
||||
for (let [id, state] of Object.entries(stateByElementID)) {
|
||||
let element = doc.getElementById(id);
|
||||
if (element.tagName === "checkbox") {
|
||||
|
|
@ -598,13 +598,13 @@ async function assertInfoBox(expectedL10nID) {
|
|||
let doc = gBrowser.selectedBrowser.contentDocument;
|
||||
let infoBox = doc.getElementById(INFO_BOX_ID);
|
||||
await TestUtils.waitForCondition(
|
||||
() => BrowserTestUtils.is_visible(infoBox) == !!expectedL10nID,
|
||||
() => BrowserTestUtils.isVisible(infoBox) == !!expectedL10nID,
|
||||
"Waiting for expected info box visibility: " + !!expectedL10nID
|
||||
);
|
||||
|
||||
let infoIcon = infoBox.querySelector(".info-icon");
|
||||
Assert.equal(
|
||||
BrowserTestUtils.is_visible(infoIcon),
|
||||
BrowserTestUtils.isVisible(infoIcon),
|
||||
!!expectedL10nID,
|
||||
"The info icon is visible iff a description should be shown"
|
||||
);
|
||||
|
|
@ -612,7 +612,7 @@ async function assertInfoBox(expectedL10nID) {
|
|||
let learnMore = infoBox.querySelector("." + LEARN_MORE_CLASS);
|
||||
Assert.ok(learnMore, "Found the info box learn more link");
|
||||
Assert.equal(
|
||||
BrowserTestUtils.is_visible(learnMore),
|
||||
BrowserTestUtils.isVisible(learnMore),
|
||||
!!expectedL10nID,
|
||||
"The info box learn more link is visible iff a description should be shown"
|
||||
);
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ add_task(async function showSearchTermsVisibility_experiment_beforeOpen() {
|
|||
let doc = gBrowser.selectedBrowser.contentDocument;
|
||||
let container = doc.getElementById(CHECKBOX_ID);
|
||||
Assert.ok(
|
||||
BrowserTestUtils.is_visible(container),
|
||||
BrowserTestUtils.isVisible(container),
|
||||
"The option box is visible"
|
||||
);
|
||||
gBrowser.removeCurrentTab();
|
||||
|
|
@ -69,7 +69,7 @@ add_task(async function showSearchTermsVisibility_experiment_afterOpen() {
|
|||
},
|
||||
callback: async () => {
|
||||
Assert.ok(
|
||||
BrowserTestUtils.is_visible(container),
|
||||
BrowserTestUtils.isVisible(container),
|
||||
"The option box is visible"
|
||||
);
|
||||
},
|
||||
|
|
|
|||
|
|
@ -304,7 +304,7 @@ add_task(async function test_single_entry_removal() {
|
|||
|
||||
let removalList = dialogWin.document.getElementById("removalList");
|
||||
is(
|
||||
BrowserTestUtils.is_visible(removalList),
|
||||
BrowserTestUtils.isVisible(removalList),
|
||||
false,
|
||||
"The removal list should be invisible"
|
||||
);
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ async function waitForConfirmPanelShow(win) {
|
|||
}
|
||||
|
||||
// Panel already visible, we can exit early.
|
||||
if (BrowserTestUtils.is_visible(panelview)) {
|
||||
if (BrowserTestUtils.isVisible(panelview)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -149,14 +149,14 @@ function assertPanelVisibility(win, selector, expectVisible) {
|
|||
if (expectVisible) {
|
||||
Assert.ok(panelview, `Panelview element ${selector} should exist.`);
|
||||
Assert.ok(
|
||||
BrowserTestUtils.is_visible(panelview),
|
||||
BrowserTestUtils.isVisible(panelview),
|
||||
`Panelview ${selector} should be visible.`
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
Assert.ok(
|
||||
!panelview || !BrowserTestUtils.is_visible(panelview),
|
||||
!panelview || !BrowserTestUtils.isVisible(panelview),
|
||||
`Panelview ${selector} should be invisible or non-existent.`
|
||||
);
|
||||
}
|
||||
|
|
@ -215,7 +215,7 @@ add_task(async function test_toolbar_button_visibility() {
|
|||
);
|
||||
if (toolbarButtonNormalBrowsing) {
|
||||
Assert.ok(
|
||||
!BrowserTestUtils.is_visible(toolbarButtonNormalBrowsing),
|
||||
!BrowserTestUtils.isVisible(toolbarButtonNormalBrowsing),
|
||||
"Toolbar button is not visible in normal browsing"
|
||||
);
|
||||
}
|
||||
|
|
@ -237,7 +237,7 @@ add_task(async function test_toolbar_button_visibility() {
|
|||
);
|
||||
if (toolbarButtonPrivateBrowsing) {
|
||||
Assert.equal(
|
||||
BrowserTestUtils.is_visible(toolbarButtonPrivateBrowsing),
|
||||
BrowserTestUtils.isVisible(toolbarButtonPrivateBrowsing),
|
||||
isEnabled,
|
||||
"Toolbar button is visible in private browsing if enabled."
|
||||
);
|
||||
|
|
@ -292,7 +292,7 @@ add_task(async function test_panel() {
|
|||
Assert.ok(el, `Panel element ${elSelector} exists.`);
|
||||
if (el) {
|
||||
Assert.ok(
|
||||
BrowserTestUtils.is_visible(el),
|
||||
BrowserTestUtils.isVisible(el),
|
||||
`Panel element ${elSelector} is visible.`
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@ function isMenuItemEnabled(menuItem, itemDesc) {
|
|||
|
||||
function isMenuItemHidden(menuItem, itemDesc) {
|
||||
ok(
|
||||
!menuItem || menuItem.hidden || !BrowserTestUtils.is_visible(menuItem),
|
||||
!menuItem || menuItem.hidden || !BrowserTestUtils.isVisible(menuItem),
|
||||
`${itemDesc} menu item is hidden`
|
||||
);
|
||||
}
|
||||
|
|
@ -174,7 +174,7 @@ class ReportBrokenSiteHelper {
|
|||
|
||||
async #assertClickAndViewChanges(button, view, newView, newFocus) {
|
||||
ok(view.closest("panel").hasAttribute("panelopen"), "Panel is open");
|
||||
ok(BrowserTestUtils.is_visible(button), "Button is visible");
|
||||
ok(BrowserTestUtils.isVisible(button), "Button is visible");
|
||||
ok(!button.disabled, "Button is enabled");
|
||||
const promises = [];
|
||||
if (newView) {
|
||||
|
|
@ -248,7 +248,7 @@ class ReportBrokenSiteHelper {
|
|||
}
|
||||
|
||||
isBackButtonEnabled() {
|
||||
ok(BrowserTestUtils.is_visible(this.backButton), "Back button is visible");
|
||||
ok(BrowserTestUtils.isVisible(this.backButton), "Back button is visible");
|
||||
ok(!this.backButton.disabled, "Back button is enabled");
|
||||
}
|
||||
|
||||
|
|
@ -353,52 +353,52 @@ class ReportBrokenSiteHelper {
|
|||
|
||||
isURLInvalidMessageShown() {
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(this.URLInvalidMessage),
|
||||
BrowserTestUtils.isVisible(this.URLInvalidMessage),
|
||||
"'Please enter a valid URL' message is shown"
|
||||
);
|
||||
}
|
||||
|
||||
isURLInvalidMessageHidden() {
|
||||
ok(
|
||||
!BrowserTestUtils.is_visible(this.URLInvalidMessage),
|
||||
!BrowserTestUtils.isVisible(this.URLInvalidMessage),
|
||||
"'Please enter a valid URL' message is hidden"
|
||||
);
|
||||
}
|
||||
|
||||
isReasonNeededMessageShown() {
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(this.reasonRequiredMessage),
|
||||
BrowserTestUtils.isVisible(this.reasonRequiredMessage),
|
||||
"'Please choose a reason' message is shown"
|
||||
);
|
||||
}
|
||||
|
||||
isReasonNeededMessageHidden() {
|
||||
ok(
|
||||
!BrowserTestUtils.is_visible(this.reasonRequiredMessage),
|
||||
!BrowserTestUtils.isVisible(this.reasonRequiredMessage),
|
||||
"'Please choose a reason' message is hidden"
|
||||
);
|
||||
}
|
||||
|
||||
isSendButtonEnabled() {
|
||||
ok(BrowserTestUtils.is_visible(this.sendButton), "Send button is visible");
|
||||
ok(BrowserTestUtils.isVisible(this.sendButton), "Send button is visible");
|
||||
ok(!this.sendButton.disabled, "Send button is enabled");
|
||||
}
|
||||
|
||||
isSendButtonDisabled() {
|
||||
ok(BrowserTestUtils.is_visible(this.sendButton), "Send button is visible");
|
||||
ok(BrowserTestUtils.isVisible(this.sendButton), "Send button is visible");
|
||||
ok(this.sendButton.disabled, "Send button is disabled");
|
||||
}
|
||||
|
||||
isSendMoreInfoShown() {
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(this.sendMoreInfoLink),
|
||||
BrowserTestUtils.isVisible(this.sendMoreInfoLink),
|
||||
"send more info is shown"
|
||||
);
|
||||
}
|
||||
|
||||
isSendMoreInfoHidden() {
|
||||
ok(
|
||||
!BrowserTestUtils.is_visible(this.sendMoreInfoLink),
|
||||
!BrowserTestUtils.isVisible(this.sendMoreInfoLink),
|
||||
"send more info is hidden"
|
||||
);
|
||||
}
|
||||
|
|
@ -413,45 +413,45 @@ class ReportBrokenSiteHelper {
|
|||
|
||||
isReasonHidden() {
|
||||
ok(
|
||||
!BrowserTestUtils.is_visible(this.reasonInput),
|
||||
!BrowserTestUtils.isVisible(this.reasonInput),
|
||||
"reason drop-down is hidden"
|
||||
);
|
||||
ok(
|
||||
!BrowserTestUtils.is_visible(this.reasonLabelOptional),
|
||||
!BrowserTestUtils.isVisible(this.reasonLabelOptional),
|
||||
"optional reason label is hidden"
|
||||
);
|
||||
ok(
|
||||
!BrowserTestUtils.is_visible(this.reasonLabelRequired),
|
||||
!BrowserTestUtils.isVisible(this.reasonLabelRequired),
|
||||
"required reason label is hidden"
|
||||
);
|
||||
}
|
||||
|
||||
isReasonRequired() {
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(this.reasonInput),
|
||||
BrowserTestUtils.isVisible(this.reasonInput),
|
||||
"reason drop-down is shown"
|
||||
);
|
||||
ok(
|
||||
!BrowserTestUtils.is_visible(this.reasonLabelOptional),
|
||||
!BrowserTestUtils.isVisible(this.reasonLabelOptional),
|
||||
"optional reason label is hidden"
|
||||
);
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(this.reasonLabelRequired),
|
||||
BrowserTestUtils.isVisible(this.reasonLabelRequired),
|
||||
"required reason label is shown"
|
||||
);
|
||||
}
|
||||
|
||||
isReasonOptional() {
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(this.reasonInput),
|
||||
BrowserTestUtils.isVisible(this.reasonInput),
|
||||
"reason drop-down is shown"
|
||||
);
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(this.reasonLabelOptional),
|
||||
BrowserTestUtils.isVisible(this.reasonLabelOptional),
|
||||
"optional reason label is shown"
|
||||
);
|
||||
ok(
|
||||
!BrowserTestUtils.is_visible(this.reasonLabelRequired),
|
||||
!BrowserTestUtils.isVisible(this.reasonLabelRequired),
|
||||
"required reason label is hidden"
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ class ScreenshotsHelper {
|
|||
triggerUIFromToolbar() {
|
||||
let button = this.toolbarButton;
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(button),
|
||||
BrowserTestUtils.isVisible(button),
|
||||
"The screenshot toolbar button is visible"
|
||||
);
|
||||
button.click();
|
||||
|
|
@ -94,14 +94,14 @@ class ScreenshotsHelper {
|
|||
if (!panel) {
|
||||
panel = this.panel;
|
||||
}
|
||||
return panel && BrowserTestUtils.is_visible(panel);
|
||||
return panel && BrowserTestUtils.isVisible(panel);
|
||||
});
|
||||
return panel;
|
||||
}
|
||||
|
||||
async waitForOverlay() {
|
||||
const panel = await this.waitForPanel();
|
||||
ok(BrowserTestUtils.is_visible(panel), "Panel buttons are visible");
|
||||
ok(BrowserTestUtils.isVisible(panel), "Panel buttons are visible");
|
||||
|
||||
await BrowserTestUtils.waitForCondition(async () => {
|
||||
let init = await this.isOverlayInitialized();
|
||||
|
|
@ -424,7 +424,7 @@ class ScreenshotsHelper {
|
|||
assertPanelVisible() {
|
||||
info("assertPanelVisible, panel.hidden:" + this.panel?.hidden);
|
||||
Assert.ok(
|
||||
BrowserTestUtils.is_visible(this.panel),
|
||||
BrowserTestUtils.isVisible(this.panel),
|
||||
"Screenshots panel is visible"
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ add_task(async function test_ads_requested_after_enabled() {
|
|||
.querySelector("shopping-sidebar");
|
||||
Assert.ok(sidebar, "Sidebar should exist");
|
||||
Assert.ok(
|
||||
BrowserTestUtils.is_visible(sidebar),
|
||||
BrowserTestUtils.isVisible(sidebar),
|
||||
"Sidebar should be visible."
|
||||
);
|
||||
info("Waiting for sidebar to update.");
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ add_task(async function test_fakespot_callouts_opted_in_flow() {
|
|||
let pdpBrowserPanel = gBrowser.getPanel(pdpBrowser);
|
||||
let isSidebarVisible = () => {
|
||||
let sidebar = pdpBrowserPanel.querySelector("shopping-sidebar");
|
||||
return sidebar && BrowserTestUtils.is_visible(sidebar);
|
||||
return sidebar && BrowserTestUtils.isVisible(sidebar);
|
||||
};
|
||||
await BrowserTestUtils.waitForMutationCondition(
|
||||
pdpBrowserPanel,
|
||||
|
|
@ -228,7 +228,7 @@ add_task(async function test_fakespot_callouts_not_opted_in_flow() {
|
|||
let pdpBrowserPanel = gBrowser.getPanel(pdpBrowser);
|
||||
let isSidebarVisible = () => {
|
||||
let sidebar = pdpBrowserPanel.querySelector("shopping-sidebar");
|
||||
return sidebar && BrowserTestUtils.is_visible(sidebar);
|
||||
return sidebar && BrowserTestUtils.isVisible(sidebar);
|
||||
};
|
||||
await BrowserTestUtils.waitForMutationCondition(
|
||||
pdpBrowserPanel,
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ add_task(async function test_button_shown() {
|
|||
await BrowserTestUtils.withNewTab(PRODUCT_PAGE, async function (browser) {
|
||||
let shoppingButton = document.getElementById("shopping-sidebar-button");
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(shoppingButton),
|
||||
BrowserTestUtils.isVisible(shoppingButton),
|
||||
"Shopping Button should be visible on a product page"
|
||||
);
|
||||
});
|
||||
|
|
@ -37,7 +37,7 @@ add_task(async function test_button_changes_with_location() {
|
|||
BrowserTestUtils.startLoadingURIString(browser, PRODUCT_PAGE);
|
||||
await BrowserTestUtils.browserLoaded(browser);
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(shoppingButton),
|
||||
BrowserTestUtils.isVisible(shoppingButton),
|
||||
"Shopping Button should be visible on a product page"
|
||||
);
|
||||
BrowserTestUtils.startLoadingURIString(browser, CONTENT_PAGE);
|
||||
|
|
@ -92,7 +92,7 @@ add_task(async function test_button_changes_with_tabswitch() {
|
|||
|
||||
await BrowserTestUtils.switchTab(gBrowser, productTab);
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(shoppingButton),
|
||||
BrowserTestUtils.isVisible(shoppingButton),
|
||||
"Shopping Button should be visible on a product page"
|
||||
);
|
||||
|
||||
|
|
@ -131,7 +131,7 @@ add_task(async function test_button_toggles_sidebars() {
|
|||
);
|
||||
|
||||
sidebar = browserPanel.querySelector("shopping-sidebar");
|
||||
ok(BrowserTestUtils.is_visible(sidebar), "Shopping sidebar should be open");
|
||||
ok(BrowserTestUtils.isVisible(sidebar), "Shopping sidebar should be open");
|
||||
|
||||
// close
|
||||
shoppingButton.click();
|
||||
|
|
@ -189,12 +189,12 @@ add_task(async function test_button_toggles_all_windows() {
|
|||
);
|
||||
sidebarA = browserPanelA.querySelector("shopping-sidebar");
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(sidebarA),
|
||||
BrowserTestUtils.isVisible(sidebarA),
|
||||
"Shopping sidebar should be open in current window"
|
||||
);
|
||||
sidebarB = browserPanelB.querySelector("shopping-sidebar");
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(sidebarB),
|
||||
BrowserTestUtils.isVisible(sidebarB),
|
||||
"Shopping sidebar should be open in new window"
|
||||
);
|
||||
|
||||
|
|
@ -276,7 +276,7 @@ add_task(async function test_button_deals_with_tabswitches() {
|
|||
await shoppingButtonVisiblePromise;
|
||||
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(shoppingButton),
|
||||
BrowserTestUtils.isVisible(shoppingButton),
|
||||
"The shopping button is now visible"
|
||||
);
|
||||
|
||||
|
|
@ -289,7 +289,7 @@ add_task(async function test_button_deals_with_tabswitches() {
|
|||
);
|
||||
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(shoppingButton),
|
||||
BrowserTestUtils.isVisible(shoppingButton),
|
||||
"The shopping button is still visible after opening background product tab"
|
||||
);
|
||||
|
||||
|
|
@ -302,7 +302,7 @@ add_task(async function test_button_deals_with_tabswitches() {
|
|||
await shoppingButtonVisiblePromise;
|
||||
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(shoppingButton),
|
||||
BrowserTestUtils.isVisible(shoppingButton),
|
||||
"The shopping button is still visible"
|
||||
);
|
||||
|
||||
|
|
@ -346,7 +346,7 @@ add_task(async function test_button_deals_with_tabswitches_post_optout() {
|
|||
await shoppingButtonVisiblePromise;
|
||||
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(shoppingButton),
|
||||
BrowserTestUtils.isVisible(shoppingButton),
|
||||
"The shopping button is now visible"
|
||||
);
|
||||
|
||||
|
|
@ -359,7 +359,7 @@ add_task(async function test_button_deals_with_tabswitches_post_optout() {
|
|||
);
|
||||
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(shoppingButton),
|
||||
BrowserTestUtils.isVisible(shoppingButton),
|
||||
"The shopping button is still visible after opening background product tab"
|
||||
);
|
||||
|
||||
|
|
@ -372,7 +372,7 @@ add_task(async function test_button_deals_with_tabswitches_post_optout() {
|
|||
await shoppingButtonVisiblePromise;
|
||||
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(shoppingButton),
|
||||
BrowserTestUtils.isVisible(shoppingButton),
|
||||
"The shopping button is still visible"
|
||||
);
|
||||
|
||||
|
|
@ -385,7 +385,7 @@ add_task(async function test_button_deals_with_tabswitches_post_optout() {
|
|||
});
|
||||
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(shoppingButton),
|
||||
BrowserTestUtils.isVisible(shoppingButton),
|
||||
"The shopping button is still visible after opting out."
|
||||
);
|
||||
Assert.equal(
|
||||
|
|
@ -411,7 +411,7 @@ add_task(async function test_button_deals_with_tabswitches_post_optout() {
|
|||
// Switch to non-product tab.
|
||||
await BrowserTestUtils.switchTab(gBrowser, newProductTab);
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(shoppingButton),
|
||||
BrowserTestUtils.isVisible(shoppingButton),
|
||||
"The shopping button is still visible on a different product tab after opting out."
|
||||
);
|
||||
Assert.equal(
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ add_task(async function test_shopping_sidebar_displayed() {
|
|||
await sidebar.complete;
|
||||
|
||||
Assert.ok(
|
||||
BrowserTestUtils.is_visible(sidebar),
|
||||
BrowserTestUtils.isVisible(sidebar),
|
||||
"Sidebar should be visible."
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ add_task(async function tipIsSecondResult() {
|
|||
await TestUtils.waitForCondition(() => {
|
||||
return (
|
||||
gURLBar.view.oneOffSearchButtons.buttons.firstElementChild &&
|
||||
BrowserTestUtils.is_visible(
|
||||
BrowserTestUtils.isVisible(
|
||||
gURLBar.view.oneOffSearchButtons.buttons.firstElementChild
|
||||
)
|
||||
);
|
||||
|
|
|
|||
|
|
@ -489,10 +489,7 @@ function checkIntervention({
|
|||
|
||||
let menuButton = element._buttons.get("menu");
|
||||
Assert.ok(menuButton, "Menu button exists");
|
||||
Assert.ok(
|
||||
BrowserTestUtils.is_visible(menuButton),
|
||||
"Menu button is visible"
|
||||
);
|
||||
Assert.ok(BrowserTestUtils.isVisible(menuButton), "Menu button is visible");
|
||||
|
||||
let values = await Promise.all([awaitCallback(), pickTip()]);
|
||||
Assert.ok(true, "Refresh dialog opened");
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ add_task(async function viewUpdateAppendHidden() {
|
|||
`Result at index ${i} is a search result`
|
||||
);
|
||||
Assert.ok(
|
||||
BrowserTestUtils.is_visible(row),
|
||||
BrowserTestUtils.isVisible(row),
|
||||
`Search result at index ${i} is visible`
|
||||
);
|
||||
Assert.equal(
|
||||
|
|
@ -160,7 +160,7 @@ add_task(async function viewUpdateAppendHidden() {
|
|||
`Result at index ${i} is a URL result`
|
||||
);
|
||||
Assert.ok(
|
||||
!BrowserTestUtils.is_visible(row),
|
||||
!BrowserTestUtils.isVisible(row),
|
||||
`URL result at index ${i} is hidden`
|
||||
);
|
||||
Assert.ok(
|
||||
|
|
|
|||
|
|
@ -487,7 +487,7 @@ async function doSuggestedIndexTest({ search1, search2, duringUpdate }) {
|
|||
|
||||
// visible
|
||||
Assert.equal(
|
||||
BrowserTestUtils.is_visible(row),
|
||||
BrowserTestUtils.isVisible(row),
|
||||
!rowState.hidden,
|
||||
`Visible at index ${rowIndex} during update`
|
||||
);
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ add_task(async function dontTemporarilyShowAboutHome() {
|
|||
await loadPromise;
|
||||
|
||||
let homeButton = win.document.getElementById("home-button");
|
||||
ok(BrowserTestUtils.is_visible(homeButton), "home-button is visible");
|
||||
ok(BrowserTestUtils.isVisible(homeButton), "home-button is visible");
|
||||
|
||||
let changeListener;
|
||||
let locationChangePromise = new Promise(resolve => {
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ add_task(async function context_none() {
|
|||
info("The separator and the add engine item should not be present.");
|
||||
let elt = popup.parentNode.getMenuItem("add-engine-separator");
|
||||
Assert.ok(!!elt);
|
||||
Assert.ok(!BrowserTestUtils.is_visible(elt));
|
||||
Assert.ok(!BrowserTestUtils.isVisible(elt));
|
||||
Assert.ok(!popup.parentNode.getMenuItem("add-engine-menu"));
|
||||
Assert.ok(!popup.parentNode.getMenuItem("add-engine-0"));
|
||||
});
|
||||
|
|
@ -33,13 +33,13 @@ add_task(async function context_one() {
|
|||
await UrlbarTestUtils.withContextMenu(window, async popup => {
|
||||
info("The separator and the add engine item should be present.");
|
||||
let elt = popup.parentNode.getMenuItem("add-engine-separator");
|
||||
Assert.ok(BrowserTestUtils.is_visible(elt));
|
||||
Assert.ok(BrowserTestUtils.isVisible(elt));
|
||||
|
||||
Assert.ok(!popup.parentNode.getMenuItem("add-engine-menu"));
|
||||
Assert.ok(!popup.parentNode.getMenuItem("add-engine-1"));
|
||||
|
||||
elt = popup.parentNode.getMenuItem("add-engine-0");
|
||||
Assert.ok(BrowserTestUtils.is_visible(elt));
|
||||
Assert.ok(BrowserTestUtils.isVisible(elt));
|
||||
await document.l10n.translateElements([elt]);
|
||||
Assert.ok(elt.label.includes("add_search_engine_0"));
|
||||
Assert.ok(elt.hasAttribute("image"));
|
||||
|
|
@ -58,7 +58,7 @@ add_task(async function context_one() {
|
|||
await UrlbarTestUtils.withContextMenu(window, popup => {
|
||||
info("The separator and the add engine item should not be present.");
|
||||
let elt = popup.parentNode.getMenuItem("add-engine-separator");
|
||||
Assert.ok(!BrowserTestUtils.is_visible(elt));
|
||||
Assert.ok(!BrowserTestUtils.isVisible(elt));
|
||||
Assert.ok(!popup.parentNode.getMenuItem("add-engine-menu"));
|
||||
Assert.ok(!popup.parentNode.getMenuItem("add-engine-0"));
|
||||
});
|
||||
|
|
@ -70,13 +70,13 @@ add_task(async function context_one() {
|
|||
await UrlbarTestUtils.withContextMenu(window, async popup => {
|
||||
info("The separator and the add engine item should be present again.");
|
||||
let elt = popup.parentNode.getMenuItem("add-engine-separator");
|
||||
Assert.ok(BrowserTestUtils.is_visible(elt));
|
||||
Assert.ok(BrowserTestUtils.isVisible(elt));
|
||||
|
||||
Assert.ok(!popup.parentNode.getMenuItem("add-engine-menu"));
|
||||
Assert.ok(!popup.parentNode.getMenuItem("add-engine-1"));
|
||||
|
||||
elt = popup.parentNode.getMenuItem("add-engine-0");
|
||||
Assert.ok(BrowserTestUtils.is_visible(elt));
|
||||
Assert.ok(BrowserTestUtils.isVisible(elt));
|
||||
await document.l10n.translateElements([elt]);
|
||||
Assert.ok(elt.label.includes("add_search_engine_0"));
|
||||
});
|
||||
|
|
@ -98,7 +98,7 @@ add_task(async function context_invalid() {
|
|||
Assert.ok(!popup.parentNode.getMenuItem("add-engine-1"));
|
||||
|
||||
let elt = popup.parentNode.getMenuItem("add-engine-0");
|
||||
Assert.ok(BrowserTestUtils.is_visible(elt));
|
||||
Assert.ok(BrowserTestUtils.isVisible(elt));
|
||||
await document.l10n.translateElements([elt]);
|
||||
Assert.ok(elt.label.includes("add_search_engine_404"));
|
||||
Assert.equal(
|
||||
|
|
@ -134,13 +134,13 @@ add_task(async function context_same_name() {
|
|||
await UrlbarTestUtils.withContextMenu(window, async popup => {
|
||||
info("The separator and the add engine item should be present.");
|
||||
let elt = popup.parentNode.getMenuItem("add-engine-separator");
|
||||
Assert.ok(BrowserTestUtils.is_visible(elt));
|
||||
Assert.ok(BrowserTestUtils.isVisible(elt));
|
||||
|
||||
Assert.ok(!popup.parentNode.getMenuItem("add-engine-menu"));
|
||||
Assert.ok(!popup.parentNode.getMenuItem("add-engine-1"));
|
||||
|
||||
elt = popup.parentNode.getMenuItem("add-engine-0");
|
||||
Assert.ok(BrowserTestUtils.is_visible(elt));
|
||||
Assert.ok(BrowserTestUtils.isVisible(elt));
|
||||
await document.l10n.translateElements([elt]);
|
||||
Assert.ok(elt.label.includes("add_search_engine_0"));
|
||||
});
|
||||
|
|
@ -154,16 +154,16 @@ add_task(async function context_two() {
|
|||
await UrlbarTestUtils.withContextMenu(window, async popup => {
|
||||
info("The separator and the add engine item should be present.");
|
||||
let elt = popup.parentNode.getMenuItem("add-engine-separator");
|
||||
Assert.ok(BrowserTestUtils.is_visible(elt));
|
||||
Assert.ok(BrowserTestUtils.isVisible(elt));
|
||||
|
||||
Assert.ok(!popup.parentNode.getMenuItem("add-engine-menu"));
|
||||
|
||||
elt = popup.parentNode.getMenuItem("add-engine-0");
|
||||
Assert.ok(BrowserTestUtils.is_visible(elt));
|
||||
Assert.ok(BrowserTestUtils.isVisible(elt));
|
||||
await document.l10n.translateElements([elt]);
|
||||
Assert.ok(elt.label.includes("add_search_engine_0"));
|
||||
elt = popup.parentNode.getMenuItem("add-engine-1");
|
||||
Assert.ok(BrowserTestUtils.is_visible(elt));
|
||||
Assert.ok(BrowserTestUtils.isVisible(elt));
|
||||
await document.l10n.translateElements([elt]);
|
||||
Assert.ok(elt.label.includes("add_search_engine_1"));
|
||||
});
|
||||
|
|
@ -177,11 +177,11 @@ add_task(async function context_many() {
|
|||
await UrlbarTestUtils.withContextMenu(window, async popup => {
|
||||
info("The separator and the add engine menu should be present.");
|
||||
let separator = popup.parentNode.getMenuItem("add-engine-separator");
|
||||
Assert.ok(BrowserTestUtils.is_visible(separator));
|
||||
Assert.ok(BrowserTestUtils.isVisible(separator));
|
||||
|
||||
info("Engines should appear in sub menu");
|
||||
let menu = popup.parentNode.getMenuItem("add-engine-menu");
|
||||
Assert.ok(BrowserTestUtils.is_visible(menu));
|
||||
Assert.ok(BrowserTestUtils.isVisible(menu));
|
||||
Assert.ok(
|
||||
!menu.nextElementSibling
|
||||
?.getAttribute("anonid")
|
||||
|
|
@ -200,7 +200,7 @@ add_task(async function context_many() {
|
|||
for (let i = 0; i < 4; ++i) {
|
||||
let elt = popup.parentNode.getMenuItem(`add-engine-${i}`);
|
||||
Assert.equal(elt.parentNode, menu.menupopup);
|
||||
Assert.ok(BrowserTestUtils.is_visible(elt));
|
||||
Assert.ok(BrowserTestUtils.isVisible(elt));
|
||||
}
|
||||
|
||||
info("Click on the first engine to install it");
|
||||
|
|
@ -221,7 +221,7 @@ add_task(async function context_many() {
|
|||
for (let i = 0; i < 3; ++i) {
|
||||
let elt = popup.parentNode.getMenuItem(`add-engine-${i}`);
|
||||
Assert.equal(elt.parentNode, popup);
|
||||
Assert.ok(BrowserTestUtils.is_visible(elt));
|
||||
Assert.ok(BrowserTestUtils.isVisible(elt));
|
||||
await document.l10n.translateElements([elt]);
|
||||
Assert.ok(elt.label.includes(`add_search_engine_${i + 1}`));
|
||||
}
|
||||
|
|
@ -234,11 +234,11 @@ add_task(async function context_many() {
|
|||
await UrlbarTestUtils.withContextMenu(window, async popup => {
|
||||
info("The separator and the add engine menu should be present.");
|
||||
let separator = popup.parentNode.getMenuItem("add-engine-separator");
|
||||
Assert.ok(BrowserTestUtils.is_visible(separator));
|
||||
Assert.ok(BrowserTestUtils.isVisible(separator));
|
||||
|
||||
info("Engines should appear in sub menu");
|
||||
let menu = popup.parentNode.getMenuItem("add-engine-menu");
|
||||
Assert.ok(BrowserTestUtils.is_visible(menu));
|
||||
Assert.ok(BrowserTestUtils.isVisible(menu));
|
||||
Assert.ok(
|
||||
!menu.nextElementSibling
|
||||
?.getAttribute("anonid")
|
||||
|
|
@ -259,7 +259,7 @@ add_task(async function context_many() {
|
|||
false
|
||||
)
|
||||
) {
|
||||
Assert.ok(BrowserTestUtils.is_visible(elt));
|
||||
Assert.ok(BrowserTestUtils.isVisible(elt));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
@ -273,13 +273,13 @@ add_task(async function context_after_customize() {
|
|||
await UrlbarTestUtils.withContextMenu(window, async popup => {
|
||||
info("The separator and the add engine item should be present.");
|
||||
let elt = popup.parentNode.getMenuItem("add-engine-separator");
|
||||
Assert.ok(BrowserTestUtils.is_visible(elt));
|
||||
Assert.ok(BrowserTestUtils.isVisible(elt));
|
||||
|
||||
Assert.ok(!popup.parentNode.getMenuItem("add-engine-menu"));
|
||||
Assert.ok(!popup.parentNode.getMenuItem("add-engine-1"));
|
||||
|
||||
elt = popup.parentNode.getMenuItem("add-engine-0");
|
||||
Assert.ok(BrowserTestUtils.is_visible(elt));
|
||||
Assert.ok(BrowserTestUtils.isVisible(elt));
|
||||
await document.l10n.translateElements([elt]);
|
||||
Assert.ok(elt.label.includes("add_search_engine_0"));
|
||||
});
|
||||
|
|
@ -297,13 +297,13 @@ add_task(async function context_after_customize() {
|
|||
await UrlbarTestUtils.withContextMenu(window, async popup => {
|
||||
info("The separator and the add engine item should be present.");
|
||||
let elt = popup.parentNode.getMenuItem("add-engine-separator");
|
||||
Assert.ok(BrowserTestUtils.is_visible(elt));
|
||||
Assert.ok(BrowserTestUtils.isVisible(elt));
|
||||
|
||||
Assert.ok(!popup.parentNode.getMenuItem("add-engine-menu"));
|
||||
Assert.ok(!popup.parentNode.getMenuItem("add-engine-1"));
|
||||
|
||||
elt = popup.parentNode.getMenuItem("add-engine-0");
|
||||
Assert.ok(BrowserTestUtils.is_visible(elt));
|
||||
Assert.ok(BrowserTestUtils.isVisible(elt));
|
||||
await document.l10n.translateElements([elt]);
|
||||
Assert.ok(elt.label.includes("add_search_engine_0"));
|
||||
});
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ add_task(async function testSwitchToTabTextDisplay() {
|
|||
|
||||
// Checks to see if "Extension:" text in URL bar is visible
|
||||
const extensionText = document.getElementById("urlbar-label-extension");
|
||||
Assert.ok(BrowserTestUtils.is_visible(extensionText));
|
||||
Assert.ok(BrowserTestUtils.isVisible(extensionText));
|
||||
Assert.equal(extensionText.value, "Extension:");
|
||||
|
||||
// Check to see if all other labels are hidden
|
||||
|
|
|
|||
|
|
@ -225,7 +225,7 @@ add_task(async function editedView() {
|
|||
)
|
||||
);
|
||||
Assert.ok(
|
||||
!BrowserTestUtils.is_visible(heuristicResult.element.action),
|
||||
!BrowserTestUtils.isVisible(heuristicResult.element.action),
|
||||
"The heuristic action should not be visible"
|
||||
);
|
||||
}
|
||||
|
|
@ -236,7 +236,7 @@ add_task(async function editedView() {
|
|||
EventUtils.synthesizeKey("KEY_ArrowDown");
|
||||
assertState(-1, i, typedValue);
|
||||
Assert.equal(
|
||||
BrowserTestUtils.is_visible(heuristicResult.element.action),
|
||||
BrowserTestUtils.isVisible(heuristicResult.element.action),
|
||||
!oneOffSearchButtons.selectedButton.classList.contains(
|
||||
"search-setting-button"
|
||||
),
|
||||
|
|
@ -248,7 +248,7 @@ add_task(async function editedView() {
|
|||
EventUtils.synthesizeKey("KEY_ArrowDown");
|
||||
assertState(0, -1, typedValue);
|
||||
Assert.ok(
|
||||
BrowserTestUtils.is_visible(heuristicResult.element.action),
|
||||
BrowserTestUtils.isVisible(heuristicResult.element.action),
|
||||
"The heuristic action should be visible"
|
||||
);
|
||||
|
||||
|
|
@ -258,7 +258,7 @@ add_task(async function editedView() {
|
|||
EventUtils.synthesizeKey("KEY_ArrowUp");
|
||||
assertState(-1, i, typedValue);
|
||||
Assert.equal(
|
||||
BrowserTestUtils.is_visible(heuristicResult.element.action),
|
||||
BrowserTestUtils.isVisible(heuristicResult.element.action),
|
||||
!oneOffSearchButtons.selectedButton.classList.contains(
|
||||
"search-setting-button"
|
||||
),
|
||||
|
|
@ -277,7 +277,7 @@ add_task(async function editedView() {
|
|||
)
|
||||
);
|
||||
Assert.ok(
|
||||
!BrowserTestUtils.is_visible(heuristicResult.element.action),
|
||||
!BrowserTestUtils.isVisible(heuristicResult.element.action),
|
||||
"The heuristic action should not be visible"
|
||||
);
|
||||
}
|
||||
|
|
@ -286,7 +286,7 @@ add_task(async function editedView() {
|
|||
EventUtils.synthesizeKey("KEY_ArrowUp");
|
||||
assertState(0, -1, typedValue);
|
||||
Assert.ok(
|
||||
BrowserTestUtils.is_visible(heuristicResult.element.action),
|
||||
BrowserTestUtils.isVisible(heuristicResult.element.action),
|
||||
"The heuristic action should be visible"
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -99,12 +99,12 @@ async function heuristicIsNotRestyled(expectedType, resultDetails) {
|
|||
}
|
||||
|
||||
Assert.equal(
|
||||
BrowserTestUtils.is_visible(resultDetails.element.separator),
|
||||
BrowserTestUtils.isVisible(resultDetails.element.separator),
|
||||
!!actionText,
|
||||
"The title separator is " + (actionText ? "visible" : "hidden")
|
||||
);
|
||||
Assert.equal(
|
||||
BrowserTestUtils.is_visible(resultDetails.element.action),
|
||||
BrowserTestUtils.isVisible(resultDetails.element.action),
|
||||
!!actionText,
|
||||
"The action text is " + (actionText ? "visible" : "hidden")
|
||||
);
|
||||
|
|
@ -177,11 +177,11 @@ async function heuristicIsRestyled(
|
|||
);
|
||||
|
||||
Assert.ok(
|
||||
BrowserTestUtils.is_visible(resultDetails.element.separator),
|
||||
BrowserTestUtils.isVisible(resultDetails.element.separator),
|
||||
"The restyled result's title separator should be visible"
|
||||
);
|
||||
Assert.ok(
|
||||
BrowserTestUtils.is_visible(resultDetails.element.action),
|
||||
BrowserTestUtils.isVisible(resultDetails.element.action),
|
||||
"The restyled result's action text should be visible"
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@ add_task(async function test_returnAfterSuggestion() {
|
|||
|
||||
let heuristicResult = await UrlbarTestUtils.getDetailsOfResultAt(window, 0);
|
||||
Assert.ok(
|
||||
!BrowserTestUtils.is_visible(heuristicResult.element.action),
|
||||
!BrowserTestUtils.isVisible(heuristicResult.element.action),
|
||||
"The heuristic action should not be visible"
|
||||
);
|
||||
|
||||
|
|
@ -222,7 +222,7 @@ add_task(async function test_selectOneOffThenSuggestion() {
|
|||
|
||||
let heuristicResult = await UrlbarTestUtils.getDetailsOfResultAt(window, 0);
|
||||
Assert.ok(
|
||||
BrowserTestUtils.is_visible(heuristicResult.element.action),
|
||||
BrowserTestUtils.isVisible(heuristicResult.element.action),
|
||||
"The heuristic action should be visible because the result is selected"
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -221,7 +221,7 @@ async function assertResult(expected) {
|
|||
|
||||
if (gURLBar.value) {
|
||||
Assert.ok(gURLBar.hasAttribute("usertyping"));
|
||||
Assert.ok(BrowserTestUtils.is_visible(gURLBar.goButton));
|
||||
Assert.ok(BrowserTestUtils.isVisible(gURLBar.goButton));
|
||||
} else {
|
||||
Assert.ok(!gURLBar.hasAttribute("usertyping"));
|
||||
Assert.ok(BrowserTestUtils.isHidden(gURLBar.goButton));
|
||||
|
|
|
|||
|
|
@ -166,7 +166,7 @@ add_task(async function keyboardSelection_lastResult() {
|
|||
await TestUtils.waitForCondition(() => {
|
||||
return (
|
||||
gURLBar.view.oneOffSearchButtons.buttons.firstElementChild &&
|
||||
BrowserTestUtils.is_visible(
|
||||
BrowserTestUtils.isVisible(
|
||||
gURLBar.view.oneOffSearchButtons.buttons.firstElementChild
|
||||
)
|
||||
);
|
||||
|
|
|
|||
|
|
@ -21,24 +21,24 @@ add_task(async function test() {
|
|||
value: "test",
|
||||
});
|
||||
const indicator = document.getElementById("urlbar-search-mode-indicator");
|
||||
Assert.ok(!BrowserTestUtils.is_visible(indicator));
|
||||
Assert.ok(!BrowserTestUtils.isVisible(indicator));
|
||||
const indicatorCloseButton = document.getElementById(
|
||||
"urlbar-search-mode-indicator-close"
|
||||
);
|
||||
Assert.ok(!BrowserTestUtils.is_visible(indicatorCloseButton));
|
||||
Assert.ok(!BrowserTestUtils.isVisible(indicatorCloseButton));
|
||||
const labelBox = document.getElementById("urlbar-label-box");
|
||||
Assert.ok(!BrowserTestUtils.is_visible(labelBox));
|
||||
Assert.ok(!BrowserTestUtils.isVisible(labelBox));
|
||||
|
||||
await UrlbarTestUtils.enterSearchMode(window);
|
||||
Assert.ok(BrowserTestUtils.is_visible(indicator));
|
||||
Assert.ok(BrowserTestUtils.is_visible(indicatorCloseButton));
|
||||
Assert.ok(!BrowserTestUtils.is_visible(labelBox));
|
||||
Assert.ok(BrowserTestUtils.isVisible(indicator));
|
||||
Assert.ok(BrowserTestUtils.isVisible(indicatorCloseButton));
|
||||
Assert.ok(!BrowserTestUtils.isVisible(labelBox));
|
||||
|
||||
info("Blur the urlbar");
|
||||
gURLBar.blur();
|
||||
Assert.ok(BrowserTestUtils.is_visible(indicator));
|
||||
Assert.ok(BrowserTestUtils.is_visible(indicatorCloseButton));
|
||||
Assert.ok(!BrowserTestUtils.is_visible(labelBox));
|
||||
Assert.ok(BrowserTestUtils.isVisible(indicator));
|
||||
Assert.ok(BrowserTestUtils.isVisible(indicatorCloseButton));
|
||||
Assert.ok(!BrowserTestUtils.isVisible(labelBox));
|
||||
Assert.notEqual(
|
||||
document.activeElement,
|
||||
gURLBar.inputField,
|
||||
|
|
@ -53,9 +53,9 @@ add_task(async function test() {
|
|||
AccessibilityUtils.setEnv({ mustHaveAccessibleRule: false });
|
||||
EventUtils.synthesizeMouseAtCenter(indicator, {});
|
||||
AccessibilityUtils.resetEnv();
|
||||
Assert.ok(BrowserTestUtils.is_visible(indicator));
|
||||
Assert.ok(BrowserTestUtils.is_visible(indicatorCloseButton));
|
||||
Assert.ok(!BrowserTestUtils.is_visible(labelBox));
|
||||
Assert.ok(BrowserTestUtils.isVisible(indicator));
|
||||
Assert.ok(BrowserTestUtils.isVisible(indicatorCloseButton));
|
||||
Assert.ok(!BrowserTestUtils.isVisible(labelBox));
|
||||
Assert.equal(
|
||||
document.activeElement,
|
||||
gURLBar.inputField,
|
||||
|
|
@ -64,9 +64,9 @@ add_task(async function test() {
|
|||
|
||||
info("Leave search mode clicking on the close button");
|
||||
await UrlbarTestUtils.exitSearchMode(window, { clickClose: true });
|
||||
Assert.ok(!BrowserTestUtils.is_visible(indicator));
|
||||
Assert.ok(!BrowserTestUtils.is_visible(indicatorCloseButton));
|
||||
Assert.ok(!BrowserTestUtils.is_visible(labelBox));
|
||||
Assert.ok(!BrowserTestUtils.isVisible(indicator));
|
||||
Assert.ok(!BrowserTestUtils.isVisible(indicatorCloseButton));
|
||||
Assert.ok(!BrowserTestUtils.isVisible(labelBox));
|
||||
});
|
||||
|
||||
await BrowserTestUtils.withNewTab("about:robots", async browser => {
|
||||
|
|
@ -75,20 +75,20 @@ add_task(async function test() {
|
|||
value: "test",
|
||||
});
|
||||
const indicator = document.getElementById("urlbar-search-mode-indicator");
|
||||
Assert.ok(!BrowserTestUtils.is_visible(indicator));
|
||||
Assert.ok(!BrowserTestUtils.isVisible(indicator));
|
||||
const indicatorCloseButton = document.getElementById(
|
||||
"urlbar-search-mode-indicator-close"
|
||||
);
|
||||
Assert.ok(!BrowserTestUtils.is_visible(indicatorCloseButton));
|
||||
Assert.ok(!BrowserTestUtils.isVisible(indicatorCloseButton));
|
||||
|
||||
await UrlbarTestUtils.enterSearchMode(window);
|
||||
Assert.ok(BrowserTestUtils.is_visible(indicator));
|
||||
Assert.ok(BrowserTestUtils.is_visible(indicatorCloseButton));
|
||||
Assert.ok(BrowserTestUtils.isVisible(indicator));
|
||||
Assert.ok(BrowserTestUtils.isVisible(indicatorCloseButton));
|
||||
|
||||
info("Blur the urlbar");
|
||||
gURLBar.blur();
|
||||
Assert.ok(BrowserTestUtils.is_visible(indicator));
|
||||
Assert.ok(BrowserTestUtils.is_visible(indicatorCloseButton));
|
||||
Assert.ok(BrowserTestUtils.isVisible(indicator));
|
||||
Assert.ok(BrowserTestUtils.isVisible(indicatorCloseButton));
|
||||
Assert.notEqual(
|
||||
document.activeElement,
|
||||
gURLBar.inputField,
|
||||
|
|
@ -100,7 +100,7 @@ add_task(async function test() {
|
|||
clickClose: true,
|
||||
waitForSearch: false,
|
||||
});
|
||||
Assert.ok(!BrowserTestUtils.is_visible(indicator));
|
||||
Assert.ok(!BrowserTestUtils.is_visible(indicatorCloseButton));
|
||||
Assert.ok(!BrowserTestUtils.isVisible(indicator));
|
||||
Assert.ok(!BrowserTestUtils.isVisible(indicatorCloseButton));
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ add_task(async function localOneOff() {
|
|||
"A local one-off button should be selected"
|
||||
);
|
||||
Assert.ok(
|
||||
BrowserTestUtils.is_visible(result.element.action),
|
||||
BrowserTestUtils.isVisible(result.element.action),
|
||||
"The heuristic action should be visible"
|
||||
);
|
||||
let [actionHistory, actionBookmarks] = await document.l10n.formatValues([
|
||||
|
|
@ -85,7 +85,7 @@ add_task(async function localOneOff() {
|
|||
);
|
||||
result = await UrlbarTestUtils.getDetailsOfResultAt(window, 0);
|
||||
Assert.ok(
|
||||
BrowserTestUtils.is_visible(result.element.action),
|
||||
BrowserTestUtils.isVisible(result.element.action),
|
||||
"The heuristic action should be visible"
|
||||
);
|
||||
Assert.ok(
|
||||
|
|
@ -187,7 +187,7 @@ add_task(async function localOneOff_withVisit() {
|
|||
"The history one-off button should be selected"
|
||||
);
|
||||
Assert.ok(
|
||||
BrowserTestUtils.is_visible(result.element.action),
|
||||
BrowserTestUtils.isVisible(result.element.action),
|
||||
"The heuristic action should be visible"
|
||||
);
|
||||
Assert.equal(
|
||||
|
|
@ -216,7 +216,7 @@ add_task(async function localOneOff_withVisit() {
|
|||
"The tabs one-off button should be selected"
|
||||
);
|
||||
Assert.ok(
|
||||
BrowserTestUtils.is_visible(result.element.action),
|
||||
BrowserTestUtils.isVisible(result.element.action),
|
||||
"The heuristic action should be visible"
|
||||
);
|
||||
Assert.equal(
|
||||
|
|
@ -239,7 +239,7 @@ add_task(async function localOneOff_withVisit() {
|
|||
"The bookmarks one-off button should be selected"
|
||||
);
|
||||
Assert.ok(
|
||||
BrowserTestUtils.is_visible(result.element.action),
|
||||
BrowserTestUtils.isVisible(result.element.action),
|
||||
"The heuristic action should be visible"
|
||||
);
|
||||
Assert.equal(
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ add_task(async function searchBookmarksFromBooksmarksMenu() {
|
|||
// Click on 'Search Bookmarks'
|
||||
let searchBookmarksButton = document.getElementById("BMB_searchBookmarks");
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(
|
||||
BrowserTestUtils.isVisible(
|
||||
searchBookmarksButton,
|
||||
"'Search Bookmarks Button' is visible."
|
||||
)
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ add_task(async function searchHistoryFromHistoryPanel() {
|
|||
// Click on 'Search Bookmarks'
|
||||
let searchHistoryButton = document.getElementById("appMenuSearchHistory");
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(
|
||||
BrowserTestUtils.isVisible(
|
||||
searchHistoryButton,
|
||||
"'Search History Button' is visible."
|
||||
)
|
||||
|
|
@ -72,7 +72,7 @@ add_task(async function searchHistoryFromAppMenuHistoryButton() {
|
|||
// Click on 'Search Bookmarks'
|
||||
let searchHistoryButton = document.getElementById("appMenuSearchHistory");
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(
|
||||
BrowserTestUtils.isVisible(
|
||||
searchHistoryButton,
|
||||
"'Search History Button' is visible."
|
||||
)
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ add_task(async function viewContainsStaleRows() {
|
|||
// But there should be maxResults visible rows in the view.
|
||||
let items = Array.from(
|
||||
UrlbarTestUtils.getResultsContainer(window).children
|
||||
).filter(r => BrowserTestUtils.is_visible(r));
|
||||
).filter(r => BrowserTestUtils.isVisible(r));
|
||||
Assert.equal(items.length, maxResults);
|
||||
|
||||
// Arrow down through all the results. After arrowing down from the last "xx"
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ async function do_test_shortcuts(activateTask) {
|
|||
);
|
||||
|
||||
for (let button of addEngineButtons) {
|
||||
Assert.ok(BrowserTestUtils.is_visible(button));
|
||||
Assert.ok(BrowserTestUtils.isVisible(button));
|
||||
Assert.ok(button.hasAttribute("image"));
|
||||
await document.l10n.translateElements([button]);
|
||||
Assert.ok(
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@ async function testMenuItemDisabled(url, prefEnabled, selection) {
|
|||
}
|
||||
let menuitem = await promiseContextualMenuitem("strip-on-share");
|
||||
Assert.ok(
|
||||
!BrowserTestUtils.is_visible(menuitem),
|
||||
!BrowserTestUtils.isVisible(menuitem),
|
||||
"Menu item is not visible"
|
||||
);
|
||||
let hidePromise = BrowserTestUtils.waitForEvent(
|
||||
|
|
@ -181,7 +181,7 @@ async function testMenuItemEnabled({
|
|||
gURLBar.select();
|
||||
}
|
||||
let menuitem = await promiseContextualMenuitem("strip-on-share");
|
||||
Assert.ok(BrowserTestUtils.is_visible(menuitem), "Menu item is visible");
|
||||
Assert.ok(BrowserTestUtils.isVisible(menuitem), "Menu item is visible");
|
||||
let hidePromise = BrowserTestUtils.waitForEvent(
|
||||
menuitem.parentElement,
|
||||
"popuphidden"
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ async function testStripOnShare(validUrl, strippedUrl) {
|
|||
gURLBar.focus();
|
||||
gURLBar.select();
|
||||
let menuitem = await promiseContextualMenuitem("strip-on-share");
|
||||
Assert.ok(BrowserTestUtils.is_visible(menuitem), "Menu item is visible");
|
||||
Assert.ok(BrowserTestUtils.isVisible(menuitem), "Menu item is visible");
|
||||
let hidePromise = BrowserTestUtils.waitForEvent(
|
||||
menuitem.parentElement,
|
||||
"popuphidden"
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ add_task(async function test_switchtab_override() {
|
|||
const allLabels = document.getElementById("urlbar-label-box").children;
|
||||
for (let label of allLabels) {
|
||||
if (label.id == "urlbar-label-switchtab") {
|
||||
Assert.ok(BrowserTestUtils.is_visible(label));
|
||||
Assert.ok(BrowserTestUtils.isVisible(label));
|
||||
} else {
|
||||
Assert.ok(BrowserTestUtils.isHidden(label));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ add_task(async function test_with_oneoff_button() {
|
|||
const switchTabLabel = document.getElementById("urlbar-label-switchtab");
|
||||
await BrowserTestUtils.waitForCondition(
|
||||
() =>
|
||||
BrowserTestUtils.is_visible(searchModeTitle) &&
|
||||
BrowserTestUtils.isVisible(searchModeTitle) &&
|
||||
searchModeTitle.textContent === "Tabs",
|
||||
"Waiting until the search mode title will be visible"
|
||||
);
|
||||
|
|
@ -113,7 +113,7 @@ add_task(async function test_with_keytype() {
|
|||
"Waiting until the search mode title will be hidden"
|
||||
);
|
||||
await BrowserTestUtils.waitForCondition(
|
||||
() => BrowserTestUtils.is_visible(switchTabLabel),
|
||||
() => BrowserTestUtils.isVisible(switchTabLabel),
|
||||
"Waiting until the switch tab label will be visible"
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -409,7 +409,7 @@ add_task(async function onboard() {
|
|||
"The correct description was set."
|
||||
);
|
||||
Assert.ok(
|
||||
BrowserTestUtils.is_visible(
|
||||
BrowserTestUtils.isVisible(
|
||||
onboardingDetails.element.row.querySelector(".urlbarView-title-separator")
|
||||
),
|
||||
"The title separator should be visible."
|
||||
|
|
|
|||
|
|
@ -561,7 +561,7 @@ async function waitForElements(selectors) {
|
|||
let elements;
|
||||
await BrowserTestUtils.waitForCondition(() => {
|
||||
elements = selectors.map(s => document.querySelector(s));
|
||||
return elements.every(e => e && BrowserTestUtils.is_visible(e));
|
||||
return elements.every(e => e && BrowserTestUtils.isVisible(e));
|
||||
}, "Waiting for elements to become visible: " + JSON.stringify(selectors));
|
||||
return elements;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ add_task(async function basic() {
|
|||
const bottom = row.querySelector(".urlbarView-row-body-bottom");
|
||||
Assert.equal(bottom.textContent, "Recommended");
|
||||
Assert.ok(
|
||||
BrowserTestUtils.is_visible(
|
||||
BrowserTestUtils.isVisible(
|
||||
row.querySelector(".urlbarView-title-separator")
|
||||
),
|
||||
"The title separator should be visible"
|
||||
|
|
|
|||
|
|
@ -908,7 +908,7 @@ async function doLayoutTest(variation) {
|
|||
|
||||
if (variation.introductionSection) {
|
||||
info("Check the section visibility");
|
||||
Assert.ok(BrowserTestUtils.is_visible(introductionSection));
|
||||
Assert.ok(BrowserTestUtils.isVisible(introductionSection));
|
||||
Assert.ok(BrowserTestUtils.isHidden(mainSection));
|
||||
|
||||
info("Check the introduction section");
|
||||
|
|
@ -919,12 +919,12 @@ async function doLayoutTest(variation) {
|
|||
await BrowserTestUtils.waitForCondition(
|
||||
() =>
|
||||
BrowserTestUtils.isHidden(introductionSection) &&
|
||||
BrowserTestUtils.is_visible(mainSection)
|
||||
BrowserTestUtils.isVisible(mainSection)
|
||||
);
|
||||
} else {
|
||||
info("Check the section visibility");
|
||||
Assert.ok(BrowserTestUtils.isHidden(introductionSection));
|
||||
Assert.ok(BrowserTestUtils.is_visible(mainSection));
|
||||
Assert.ok(BrowserTestUtils.isVisible(mainSection));
|
||||
}
|
||||
|
||||
info("Check the main section");
|
||||
|
|
@ -1000,7 +1000,7 @@ function assertLogo(sectionElement, expectedLogoType) {
|
|||
}
|
||||
|
||||
const logo = sectionElement.querySelector(".logo");
|
||||
Assert.ok(BrowserTestUtils.is_visible(logo));
|
||||
Assert.ok(BrowserTestUtils.isVisible(logo));
|
||||
const logoImage =
|
||||
sectionElement.ownerGlobal.getComputedStyle(logo).backgroundImage;
|
||||
Assert.equal(logoImage, expectedLogoImage);
|
||||
|
|
@ -1017,7 +1017,7 @@ function assertVisibility(sectionElement, expectedVisibility) {
|
|||
for (const [selector, visibility] of Object.entries(expectedVisibility)) {
|
||||
const element = sectionElement.querySelector(selector);
|
||||
if (visibility) {
|
||||
Assert.ok(BrowserTestUtils.is_visible(element));
|
||||
Assert.ok(BrowserTestUtils.isVisible(element));
|
||||
} else {
|
||||
if (!element) {
|
||||
Assert.ok(true);
|
||||
|
|
@ -1045,7 +1045,7 @@ async function onboardingClose(variation) {
|
|||
callback: async (win, userAction, maybeShowPromise) => {
|
||||
info("Check the status of the close button");
|
||||
const closeButton = win.document.getElementById("onboardingClose");
|
||||
Assert.ok(BrowserTestUtils.is_visible(closeButton));
|
||||
Assert.ok(BrowserTestUtils.isVisible(closeButton));
|
||||
Assert.equal(closeButton.getAttribute("title"), "Close");
|
||||
|
||||
info("Commit the close button");
|
||||
|
|
@ -1083,7 +1083,7 @@ async function onboardingNext(variation) {
|
|||
callback: async (win, userAction, maybeShowPromise) => {
|
||||
info("Check the status of the next button");
|
||||
const nextButton = win.document.getElementById("onboardingNext");
|
||||
Assert.ok(BrowserTestUtils.is_visible(nextButton));
|
||||
Assert.ok(BrowserTestUtils.isVisible(nextButton));
|
||||
|
||||
info("Commit the next button");
|
||||
userAction(nextButton);
|
||||
|
|
@ -1095,7 +1095,7 @@ async function onboardingNext(variation) {
|
|||
await BrowserTestUtils.waitForCondition(
|
||||
() =>
|
||||
BrowserTestUtils.isHidden(introductionSection) &&
|
||||
BrowserTestUtils.is_visible(mainSection),
|
||||
BrowserTestUtils.isVisible(mainSection),
|
||||
"Wait for the transition"
|
||||
);
|
||||
|
||||
|
|
@ -1223,7 +1223,7 @@ async function onboardingSkipLink(variation, skipIntroduction) {
|
|||
callback: async (win, userAction, maybeShowPromise) => {
|
||||
info("Check the status of the skip link");
|
||||
const skipLink = win.document.getElementById("onboardingSkipLink");
|
||||
Assert.ok(BrowserTestUtils.is_visible(skipLink));
|
||||
Assert.ok(BrowserTestUtils.isVisible(skipLink));
|
||||
|
||||
info("Commit the skip link");
|
||||
const tabCount = gBrowser.tabs.length;
|
||||
|
|
@ -1288,7 +1288,7 @@ async function doLearnMoreTest(variation, skipIntroduction, target, telemetry) {
|
|||
callback: async (win, userAction, maybeShowPromise) => {
|
||||
info("Check the status of the learn more link");
|
||||
const learnMoreLink = win.document.getElementById(target);
|
||||
Assert.ok(BrowserTestUtils.is_visible(learnMoreLink));
|
||||
Assert.ok(BrowserTestUtils.isVisible(learnMoreLink));
|
||||
|
||||
info("Commit the learn more link");
|
||||
const loadPromise = BrowserTestUtils.waitForNewTab(
|
||||
|
|
@ -1530,7 +1530,7 @@ async function showOnboardingDialog({ skipIntroduction } = {}) {
|
|||
await BrowserTestUtils.waitForCondition(
|
||||
() =>
|
||||
BrowserTestUtils.isHidden(introductionSection) &&
|
||||
BrowserTestUtils.is_visible(mainSection)
|
||||
BrowserTestUtils.isVisible(mainSection)
|
||||
);
|
||||
|
||||
return { win, maybeShowPromise };
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ add_task(async function dom() {
|
|||
let { row } = details.element;
|
||||
|
||||
Assert.ok(
|
||||
BrowserTestUtils.is_visible(
|
||||
BrowserTestUtils.isVisible(
|
||||
row.querySelector(".urlbarView-title-separator")
|
||||
),
|
||||
"The title separator should be visible"
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue