summaryrefslogtreecommitdiffstats
path: root/devtools/client/webconsole/test/head.js
diff options
context:
space:
mode:
Diffstat (limited to 'devtools/client/webconsole/test/head.js')
-rw-r--r--devtools/client/webconsole/test/head.js17
1 files changed, 16 insertions, 1 deletions
diff --git a/devtools/client/webconsole/test/head.js b/devtools/client/webconsole/test/head.js
index 519cb78b0..2787933c4 100644
--- a/devtools/client/webconsole/test/head.js
+++ b/devtools/client/webconsole/test/head.js
@@ -12,7 +12,7 @@ Services.scriptloader.loadSubScript("chrome://mochitests/content/browser/devtool
var {Utils: WebConsoleUtils} = require("devtools/client/webconsole/utils");
var {Messages} = require("devtools/client/webconsole/console-output");
const asyncStorage = require("devtools/shared/async-storage");
-const HUDService = require("devtools/client/webconsole/hudservice");
+const {HUDService} = require("devtools/client/webconsole/hudservice");
// Services.prefs.setBoolPref("devtools.debugger.log", true);
@@ -1842,3 +1842,18 @@ function getRenderedSource(root) {
column: location.getAttribute("data-column"),
} : null;
}
+
+function waitForBrowserConsole() {
+ return new Promise(resolve => {
+ Services.obs.addObserver(function observer(subject) {
+ Services.obs.removeObserver(observer, "web-console-created");
+ subject.QueryInterface(Ci.nsISupportsString);
+
+ let hud = HUDService.getBrowserConsole();
+ ok(hud, "browser console is open");
+ is(subject.data, hud.hudId, "notification hudId is correct");
+
+ executeSoon(() => resolve(hud));
+ }, "web-console-created");
+ });
+}