зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1539979 - Fix browser_toolbox_toolbar_overflow.js when running in content frame r=nchevobbe
Depends on D40991 This test had some suspicious calls to async methods without await. Properly waiting on them avoids frequent intermittents when running in a content frame. Differential Revision: https://phabricator.services.mozilla.com/D40992 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
8415e17411
Коммит
8365fb1ac2
|
@ -17,7 +17,7 @@ add_task(async function() {
|
|||
Toolbox.HostType.BOTTOM
|
||||
);
|
||||
|
||||
const hostWindow = toolbox.win.parent;
|
||||
const hostWindow = toolbox.topWindow;
|
||||
const originalWidth = hostWindow.outerWidth;
|
||||
const originalHeight = hostWindow.outerHeight;
|
||||
|
||||
|
@ -27,10 +27,11 @@ add_task(async function() {
|
|||
let onResize = once(hostWindow, "resize");
|
||||
hostWindow.resizeTo(1350, 300);
|
||||
await onResize;
|
||||
waitUntil(() => {
|
||||
// Wait for all buttons are displayed.
|
||||
|
||||
info("Wait for all buttons to be displayed");
|
||||
await waitUntil(() => {
|
||||
return (
|
||||
toolbox.panelDefinitions.length !==
|
||||
toolbox.panelDefinitions.length ===
|
||||
toolbox.doc.querySelectorAll(".devtools-tab").length
|
||||
);
|
||||
});
|
||||
|
@ -42,7 +43,7 @@ add_task(async function() {
|
|||
onResize = once(hostWindow, "resize");
|
||||
hostWindow.resizeTo(800, 300);
|
||||
await onResize;
|
||||
waitUntil(() => !toolbox.doc.querySelector(".tools-chevron-menu"));
|
||||
await waitUntil(() => !toolbox.doc.querySelector(".tools-chevron-menu"));
|
||||
|
||||
info("Wait until the chevron menu button is available");
|
||||
await waitUntil(() => toolbox.doc.querySelector(".tools-chevron-menu"));
|
||||
|
|
Загрузка…
Ссылка в новой задаче