Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
1 /* Any copyright is dedicated to the Public Domain.
2 http://creativecommons.org/publicdomain/zero/1.0/ */
4 function test() {
5 waitForExplicitFinish();
7 window.addEventListener("SSWindowStateBusy", function onBusy() {
8 window.removeEventListener("SSWindowStateBusy", onBusy, false);
10 let state = JSON.parse(ss.getWindowState(window));
11 ok(state.windows[0].busy, "window is busy");
13 window.addEventListener("SSWindowStateReady", function onReady() {
14 window.removeEventListener("SSWindowStateReady", onReady, false);
16 let state = JSON.parse(ss.getWindowState(window));
17 ok(!state.windows[0].busy, "window is not busy");
19 executeSoon(() => {
20 gBrowser.removeTab(gBrowser.tabs[1]);
21 finish();
22 });
23 }, false);
24 }, false);
26 // create a new tab
27 let tab = gBrowser.addTab("about:mozilla");
28 let browser = tab.linkedBrowser;
30 // close and restore it
31 browser.addEventListener("load", function onLoad() {
32 browser.removeEventListener("load", onLoad, true);
33 gBrowser.removeTab(tab);
34 ss.undoCloseTab(window, 0);
35 }, true);
36 }