summaryrefslogtreecommitdiffstats
path: root/browser/base/content/test/popups/head.js
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--browser/base/content/test/popups/head.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/browser/base/content/test/popups/head.js b/browser/base/content/test/popups/head.js
new file mode 100644
index 0000000000..47e43e904c
--- /dev/null
+++ b/browser/base/content/test/popups/head.js
@@ -0,0 +1,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`);
+}