browser/components/sessionstore/test/browser_579879.js

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/browser/components/sessionstore/test/browser_579879.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,21 @@
     1.4 +function test() {
     1.5 +  waitForExplicitFinish();
     1.6 +
     1.7 +  var tab1 = gBrowser.addTab("data:text/plain;charset=utf-8,foo");
     1.8 +  gBrowser.pinTab(tab1);
     1.9 +
    1.10 +  whenBrowserLoaded(tab1.linkedBrowser, function() {
    1.11 +    var tab2 = gBrowser.addTab();
    1.12 +    gBrowser.pinTab(tab2);
    1.13 +
    1.14 +    is(Array.indexOf(gBrowser.tabs, tab1), 0, "pinned tab 1 is at the first position");
    1.15 +    gBrowser.removeTab(tab1);
    1.16 +    tab1 = undoCloseTab();
    1.17 +    ok(tab1.pinned, "pinned tab 1 has been restored as a pinned tab");
    1.18 +    is(Array.indexOf(gBrowser.tabs, tab1), 0, "pinned tab 1 has been restored to the first position");
    1.19 +
    1.20 +    gBrowser.removeTab(tab1);
    1.21 +    gBrowser.removeTab(tab2);
    1.22 +    finish();
    1.23 +  });
    1.24 +}

mercurial