Bug 679590 - Intermittent failure in browser_607016.js | sanity check that tab doesn't have extData. r=dietrich

This commit is contained in:
Paul O’Shannessy 2011-10-25 10:22:03 +02:00
parent fbbe49a533
commit 4841795637

View File

@ -84,16 +84,18 @@ function test() {
let curState = JSON.parse(ss.getBrowserState()); let curState = JSON.parse(ss.getBrowserState());
for (let i = 0; i < curState.windows[0].tabs.length; i++) { for (let i = 0; i < curState.windows[0].tabs.length; i++) {
if (state.windows[0].tabs[i].extData) { let tabState = state.windows[0].tabs[i];
is(curState.windows[0].tabs[i].extData["uniq"], let tabCurState = curState.windows[0].tabs[i];
state.windows[0].tabs[i].extData["uniq"], if (tabState.extData) {
is(tabCurState.extData["uniq"], tabState.extData["uniq"],
"sanity check that tab has correct extData"); "sanity check that tab has correct extData");
} }
else { else {
ok(!("extData" in curState.windows[0].tabs[i]), // We aren't expecting there to be any data on extData, but panorama
"sanity check that tab doesn't have extData"); // may be setting something, so we need to make sure that if we do have
//XXXzpao output the tab state to help debug bug 679590 // data, we just don't have anything for "uniq".
info("tabState: " + JSON.stringify(curState.windows[0].tabs[i])); ok(!("extData" in tabCurState) || !("uniq" in tabCurState.extData),
"sanity check that tab doesn't have extData or extData doesn't have 'uniq'");
} }
} }