diff options
author | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-03-01 07:17:50 +0100 |
---|---|---|
committer | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-03-01 07:17:50 +0100 |
commit | e59c00a5c59aefe2a408eb78509ef3afaf3658f8 (patch) | |
tree | 40b8c8bd311ff17abb81edd6f24bb6ad3ce9b9b8 /devtools/client/webconsole/test/browser_console_restore.js | |
parent | abf60058584772437a317fbc27ea32cbda4a07cb (diff) | |
download | UXP-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/browser_console_restore.js')
-rw-r--r-- | devtools/client/webconsole/test/browser_console_restore.js | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/devtools/client/webconsole/test/browser_console_restore.js b/devtools/client/webconsole/test/browser_console_restore.js new file mode 100644 index 000000000..fb08d9c70 --- /dev/null +++ b/devtools/client/webconsole/test/browser_console_restore.js @@ -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; +}); |