mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-05 15:28:39 +09:00
DevTools - Browser Console - restore sessions
https://github.com/MoonchildProductions/moebius/pull/112
This commit is contained in:
parent
173d356acd
commit
63ba51f58e
17 changed files with 135 additions and 46 deletions
|
|
@ -22,7 +22,7 @@ const TEST_IMAGE = "http://example.com/browser/devtools/client/webconsole/" +
|
|||
add_task(function* () {
|
||||
yield loadTab(TEST_URI);
|
||||
|
||||
let opened = waitForConsole();
|
||||
let opened = waitForBrowserConsole();
|
||||
|
||||
let hud = HUDService.getBrowserConsole();
|
||||
ok(!hud, "browser console is not open");
|
||||
|
|
@ -141,20 +141,3 @@ function consoleOpened(hud) {
|
|||
],
|
||||
});
|
||||
}
|
||||
|
||||
function waitForConsole() {
|
||||
let deferred = promise.defer();
|
||||
|
||||
Services.obs.addObserver(function observer(aSubject) {
|
||||
Services.obs.removeObserver(observer, "web-console-created");
|
||||
aSubject.QueryInterface(Ci.nsISupportsString);
|
||||
|
||||
let hud = HUDService.getBrowserConsole();
|
||||
ok(hud, "browser console is open");
|
||||
is(aSubject.data, hud.hudId, "notification hudId is correct");
|
||||
|
||||
executeSoon(() => deferred.resolve(hud));
|
||||
}, "web-console-created", false);
|
||||
|
||||
return deferred.promise;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue