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
30
devtools/client/webconsole/test/browser_console_restore.js
Normal file
30
devtools/client/webconsole/test/browser_console_restore.js
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
|
||||
/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
// Check that the browser console gets session state is set correctly, and that
|
||||
// it re-opens when restore is requested.
|
||||
|
||||
"use strict";
|
||||
|
||||
add_task(function* () {
|
||||
is(HUDService.getBrowserConsoleSessionState(), false, "Session state false by default");
|
||||
HUDService.storeBrowserConsoleSessionState();
|
||||
is(HUDService.getBrowserConsoleSessionState(), false,
|
||||
"Session state still not true even after setting (since Browser Console is closed)");
|
||||
|
||||
yield HUDService.toggleBrowserConsole();
|
||||
HUDService.storeBrowserConsoleSessionState();
|
||||
is(HUDService.getBrowserConsoleSessionState(), true,
|
||||
"Session state true (since Browser Console is opened)");
|
||||
|
||||
info("Closing the browser console and waiting for the session restore to reopen it")
|
||||
yield HUDService.toggleBrowserConsole();
|
||||
|
||||
let opened = waitForBrowserConsole();
|
||||
HUDService.restoreBrowserConsoleSession();
|
||||
|
||||
info("Waiting for the console to open after session restore")
|
||||
yield opened;
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue