B2G/gecko/browser/components/sessionstore/test/browser_590268.js
// left to right, so we're going to start with the rightmost tab.
left to right, so we're going to start with the rightmost tab.
left to right so we ' re going to start with the rightmost tab .
function onFirstSSTabRestoring() {
    info("onFirstSSTabRestoring...");
    for (let i = gBrowser.tabs.length - 1; i >= 0; i--) {
      let tab = gBrowser.tabs[i];
      let actualUniq = ss.getTabValue(tab, "uniq");
      let expectedUniq = state.windows[0].tabs[i].extData["uniq"];
      if (wasLoaded[actualUniq]) {
        info("tab " + i + ": already restored");
        continue;
      }
      is(actualUniq, expectedUniq, "tab " + i + ": extData was correct");
      uniq2[actualUniq] = r();
      ss.setTabValue(tab, "uniq2", uniq2[actualUniq]);
      try {
        ss.deleteTabValue(tab, "baz");
      }
      catch (e) {
        ok(false, "no error calling deleteTabValue - " + e);
      }
      uniq2Count++;
    }
  }
function onFirstSSTabRestoring ( ) { info ( "onFirstSSTabRestoring..." ) ; for ( let i = gBrowser . tabs . length - 1 ; i >= 0 ; i -- ) { let tab = gBrowser . tabs [ i ] ; let actualUniq = ss . getTabValue ( tab , "uniq" ) ; let expectedUniq = state . windows [ 0 ] . tabs [ i ] . extData [ "uniq" ] ; if ( wasLoaded [ actualUniq ] ) { info ( "tab " + i + ": already restored" ) ; continue ; } is ( actualUniq , expectedUniq , "tab " + i + ": extData was correct" ) ; uniq2 [ actualUniq ] = r ( ) ; ss . setTabValue ( tab , "uniq2" , uniq2 [ actualUniq ] ) ; try { ss . deleteTabValue ( tab , "baz" ) ; } catch ( e ) { ok ( false , "no error calling deleteTabValue - " + e ) ; } uniq2Count ++ ; } }
left to right, so we're going to start with the rightmost tab.
left to right so we ' re going to start with the rightmost tab .
// Now we're going to set a piece of data back on the tab so it can be read // to test setting a value "early". // Delete the value we have for "baz". This tests that deleteTabValue // will delete "early access" values (c.f. bug 617175). If this doesn't throw // then the test is successful. // This will be used in the final comparison to make sure we checked the // same number as we set.