summaryrefslogtreecommitdiffstats
path: root/browser/base/content/test/popups/head.js
blob: 47e43e904c315e5be16b24ab8e193c447d045a36 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
/* 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`);
}