Bug 906839 - test fixes. r=markh

This commit is contained in:
Shane Caraveo 2013-10-31 10:59:36 +11:00
parent 545175ac54
commit 3204bb6a45

View File

@ -113,15 +113,17 @@ var tests = {
port.postMessage({topic: "test-flyout-open"});
break;
case "got-flyout-visibility":
if (e.data.result != "shown")
return;
let iframe = panel.firstChild;
iframe.contentDocument.addEventListener("SocialTest-DoneCloseSelf", function _doneHandler() {
iframe.contentDocument.removeEventListener("SocialTest-DoneCloseSelf", _doneHandler, false);
port.close();
is(panel.state, "closed", "flyout should have closed itself");
Services.prefs.setBoolPref(ALLOW_SCRIPTS_TO_CLOSE_PREF, oldAllowScriptsToClose);
next();
}, false);
is(panel.state, "open", "flyout should be open");
port.close(); // so we don't get the -visibility message as it hides...
SocialFlyout.dispatchPanelEvent("socialTest-CloseSelf");
break;
}