browser/components/sessionstore/test/browser_514751.js

changeset 0
6474c204b198
equal deleted inserted replaced
-1:000000000000 0:3e561343ab42
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4
5 function test() {
6 /** Test for Bug 514751 (Wallpaper) **/
7
8 waitForExplicitFinish();
9
10 let state = {
11 windows: [{
12 tabs: [{
13 entries: [
14 { url: "http://www.mozilla.org/projects/minefield/", title: "Minefield Start Page" },
15 {}
16 ]
17 }]
18 }]
19 };
20
21 var theWin = openDialog(location, "", "chrome,all,dialog=no");
22 theWin.addEventListener("load", function () {
23 theWin.removeEventListener("load", arguments.callee, false);
24
25 executeSoon(function () {
26 var gotError = false;
27 try {
28 ss.setWindowState(theWin, JSON.stringify(state), true);
29 } catch (e) {
30 if (/NS_ERROR_MALFORMED_URI/.test(e))
31 gotError = true;
32 }
33 ok(!gotError, "Didn't get a malformed URI error.");
34 theWin.close();
35 finish();
36 });
37 }, false);
38 }
39

mercurial