michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: function test() { michael@0: /** Test for Bug 514751 (Wallpaper) **/ michael@0: michael@0: waitForExplicitFinish(); michael@0: michael@0: let state = { michael@0: windows: [{ michael@0: tabs: [{ michael@0: entries: [ michael@0: { url: "http://www.mozilla.org/projects/minefield/", title: "Minefield Start Page" }, michael@0: {} michael@0: ] michael@0: }] michael@0: }] michael@0: }; michael@0: michael@0: var theWin = openDialog(location, "", "chrome,all,dialog=no"); michael@0: theWin.addEventListener("load", function () { michael@0: theWin.removeEventListener("load", arguments.callee, false); michael@0: michael@0: executeSoon(function () { michael@0: var gotError = false; michael@0: try { michael@0: ss.setWindowState(theWin, JSON.stringify(state), true); michael@0: } catch (e) { michael@0: if (/NS_ERROR_MALFORMED_URI/.test(e)) michael@0: gotError = true; michael@0: } michael@0: ok(!gotError, "Didn't get a malformed URI error."); michael@0: theWin.close(); michael@0: finish(); michael@0: }); michael@0: }, false); michael@0: } michael@0: