summaryrefslogtreecommitdiffstats
path: root/devtools/client/webconsole/test/head.js
diff options
context:
space:
mode:
authorjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-03-01 07:17:50 +0100
committerjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-03-01 07:17:50 +0100
commite59c00a5c59aefe2a408eb78509ef3afaf3658f8 (patch)
tree40b8c8bd311ff17abb81edd6f24bb6ad3ce9b9b8 /devtools/client/webconsole/test/head.js
parentabf60058584772437a317fbc27ea32cbda4a07cb (diff)
downloadUXP-e59c00a5c59aefe2a408eb78509ef3afaf3658f8.tar
UXP-e59c00a5c59aefe2a408eb78509ef3afaf3658f8.tar.gz
UXP-e59c00a5c59aefe2a408eb78509ef3afaf3658f8.tar.lz
UXP-e59c00a5c59aefe2a408eb78509ef3afaf3658f8.tar.xz
UXP-e59c00a5c59aefe2a408eb78509ef3afaf3658f8.zip
DevTools - Browser Console - restore sessions
https://github.com/MoonchildProductions/moebius/pull/112
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");
+ });
+}