fune/browser/base/content/test/popups/head.js
Mike Conley ea70cbeec9 Bug 1576917 - Port PopupBlocker to JSWindowActors to make it Fission-compatible. r=NeilDeakin
This patch was started by Alex Vamvounis <a.vamvounis@gmail.com> and finished by
Mike Conley <mconley@mozilla.com>

Differential Revision: https://phabricator.services.mozilla.com/D53075

--HG--
extra : moz-landing-system : lando
2020-01-22 21:24:19 +00:00

12 lines
453 B
JavaScript

/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
async function waitForBlockedPopups(numberOfPopups) {
let menupopup = document.getElementById("blockedPopupOptions");
await BrowserTestUtils.waitForCondition(() => {
let popups = menupopup.querySelectorAll("[popupReportIndex]");
return popups.length == numberOfPopups;
}, `Waiting for ${numberOfPopups} popups`);
}