browser/components/sessionstore/test/browser_514751.js

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     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/. */
     5 function test() {
     6   /** Test for Bug 514751 (Wallpaper) **/
     8   waitForExplicitFinish();
    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   };
    21   var theWin = openDialog(location, "", "chrome,all,dialog=no");
    22   theWin.addEventListener("load", function () {
    23     theWin.removeEventListener("load", arguments.callee, false);
    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 }

mercurial