зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1395367 - Update devtools tests to handle toolbox.showFrameMenu being async. r=ochameau
MozReview-Commit-ID: BSnpdRwWKla --HG-- extra : rebase_source : 584ee502ba8e8b4e9746e521c07895f3d7540abe
This commit is contained in:
Родитель
1692c5b691
Коммит
a2e6a32930
|
@ -115,7 +115,7 @@ add_task(function* testWebExtensionsToolboxSwitchToPopup() {
|
|||
|
||||
dump(`Clicking the frame list button\n`);
|
||||
let btn = toolbox.doc.getElementById("command-button-frames");
|
||||
let frameMenu = toolbox.showFramesMenu({target: btn});
|
||||
let frameMenu = await toolbox.showFramesMenu({target: btn});
|
||||
dump(`Clicked the frame list button\n`);
|
||||
|
||||
await frameMenu.once("open");
|
||||
|
|
|
@ -50,7 +50,7 @@ add_task(function* () {
|
|||
// Open frame menu and wait till it's available on the screen.
|
||||
// Also check 'open' attribute on the command button.
|
||||
ok(!btn.classList.contains("checked"), "The checked class must not be present");
|
||||
let menu = toolbox.showFramesMenu({target: btn});
|
||||
let menu = yield toolbox.showFramesMenu({target: btn});
|
||||
yield once(menu, "open");
|
||||
|
||||
ok(btn.classList.contains("checked"), "The checked class must be set");
|
||||
|
|
|
@ -44,7 +44,7 @@ add_task(function* () {
|
|||
function* switchToFrameContext(frameIndex, toolbox, inspector) {
|
||||
// Open frame menu and wait till it's available on the screen.
|
||||
let btn = toolbox.doc.getElementById("command-button-frames");
|
||||
let menu = toolbox.showFramesMenu({target: btn});
|
||||
let menu = yield toolbox.showFramesMenu({target: btn});
|
||||
yield once(menu, "open");
|
||||
|
||||
info("Select the iframe in the frame list.");
|
||||
|
|
|
@ -29,7 +29,7 @@ add_task(function* () {
|
|||
ok(!btn.firstChild, "The frame list button doesn't have any children");
|
||||
|
||||
// Open frame menu and wait till it's available on the screen.
|
||||
let menu = toolbox.showFramesMenu({target: btn});
|
||||
let menu = yield toolbox.showFramesMenu({target: btn});
|
||||
yield once(menu, "open");
|
||||
|
||||
// Verify that the menu is popuplated.
|
||||
|
|
|
@ -22,7 +22,7 @@ add_task(function* () {
|
|||
ok(!btn.firstChild, "The frame list button has no children");
|
||||
|
||||
// Open frame menu and wait till it's available on the screen.
|
||||
let menu = toolbox.showFramesMenu({target: btn});
|
||||
let menu = yield toolbox.showFramesMenu({target: btn});
|
||||
yield once(menu, "open");
|
||||
|
||||
let frames = menu.items;
|
||||
|
|
Загрузка…
Ссылка в новой задаче