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:
Ian Moody 2017-09-21 23:23:20 +01:00
Родитель 1692c5b691
Коммит a2e6a32930
5 изменённых файлов: 5 добавлений и 5 удалений

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

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