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 // Test Summary:
5 // 1. call ss.setWindowState with a broken state
6 // 1a. ensure that it doesn't throw.
8 function test() {
9 waitForExplicitFinish();
11 let brokenState = {
12 windows: [
13 { tabs: [{ entries: [{ url: "about:mozilla" }] }] }
14 ],
15 selectedWindow: 2
16 };
17 let brokenStateString = JSON.stringify(brokenState);
19 let gotError = false;
20 try {
21 ss.setWindowState(window, brokenStateString, true);
22 }
23 catch (ex) {
24 gotError = true;
25 info(ex);
26 }
28 ok(!gotError, "ss.setWindowState did not throw an error");
30 // Make sure that we reset the state. Use a full state just in case things get crazy.
31 let blankState = { windows: [{ tabs: [{ entries: [{ url: "about:blank" }] }]}]};
32 waitForBrowserState(blankState, finish);
33 }