зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1622247 Replace BrowserTestUtils.waitForCondition with TestUtils.waitForCondition in browser_page_action_menu.js r=prathiksha
Differential Revision: https://phabricator.services.mozilla.com/D66863 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
f5441db092
Коммит
3b7b201601
|
@ -163,14 +163,14 @@ add_task(async function pinTabFromURLBar() {
|
|||
// Click the Pin Tab button.
|
||||
let pinTabButton = document.getElementById("pageAction-urlbar-pinTab");
|
||||
EventUtils.synthesizeMouseAtCenter(pinTabButton, {});
|
||||
await BrowserTestUtils.waitForCondition(
|
||||
await TestUtils.waitForCondition(
|
||||
() => gBrowser.selectedTab.pinned,
|
||||
"Tab was pinned"
|
||||
);
|
||||
|
||||
// Click the Unpin Tab button
|
||||
EventUtils.synthesizeMouseAtCenter(pinTabButton, {});
|
||||
await BrowserTestUtils.waitForCondition(
|
||||
await TestUtils.waitForCondition(
|
||||
() => !gBrowser.selectedTab.pinned,
|
||||
"Tab was unpinned"
|
||||
);
|
||||
|
@ -976,7 +976,7 @@ add_task(async function sendToDevice_inUrlbar() {
|
|||
|
||||
// For good measure, wait until it's visible.
|
||||
let dwu = window.windowUtils;
|
||||
await BrowserTestUtils.waitForCondition(() => {
|
||||
await TestUtils.waitForCondition(() => {
|
||||
let bounds = dwu.getBoundsWithoutFlushing(deviceMenuItem);
|
||||
return bounds.height > 0 && bounds.width > 0;
|
||||
}, "Waiting for first device menu item to appear");
|
||||
|
@ -1037,7 +1037,7 @@ add_task(async function contextMenu() {
|
|||
// The action should be removed from the urlbar. In this case, the bookmark
|
||||
// star, the node in the urlbar should be hidden.
|
||||
let starButtonBox = document.getElementById("star-button-box");
|
||||
await BrowserTestUtils.waitForCondition(() => {
|
||||
await TestUtils.waitForCondition(() => {
|
||||
return starButtonBox.hidden;
|
||||
}, "Waiting for star button to become hidden");
|
||||
|
||||
|
@ -1063,7 +1063,7 @@ add_task(async function contextMenu() {
|
|||
await contextMenuPromise;
|
||||
|
||||
// The action should be added to the urlbar.
|
||||
await BrowserTestUtils.waitForCondition(() => {
|
||||
await TestUtils.waitForCondition(() => {
|
||||
return !starButtonBox.hidden;
|
||||
}, "Waiting for star button to become unhidden");
|
||||
|
||||
|
@ -1088,7 +1088,7 @@ add_task(async function contextMenu() {
|
|||
await contextMenuPromise;
|
||||
|
||||
// The action should be removed from the urlbar.
|
||||
await BrowserTestUtils.waitForCondition(() => {
|
||||
await TestUtils.waitForCondition(() => {
|
||||
return starButtonBox.hidden;
|
||||
}, "Waiting for star button to become hidden");
|
||||
|
||||
|
@ -1112,7 +1112,7 @@ add_task(async function contextMenu() {
|
|||
contextMenuPromise = promisePanelHidden("pageActionContextMenu");
|
||||
EventUtils.synthesizeMouseAtCenter(menuItems[0], {});
|
||||
await contextMenuPromise;
|
||||
await BrowserTestUtils.waitForCondition(() => {
|
||||
await TestUtils.waitForCondition(() => {
|
||||
return !starButtonBox.hidden;
|
||||
}, "Waiting for star button to become unhidden");
|
||||
});
|
||||
|
|
Загрузка…
Ссылка в новой задаче