Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
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 }