Bug 575485 - Refactor commonDialog code into a sharable JSM (Part 4, test fixes). r=gavin, a=beltzner

This commit is contained in:
Justin Dolske 2010-10-27 14:16:17 -07:00
Родитель 838d9325a9
Коммит bdbd761905
2 изменённых файлов: 5 добавлений и 5 удалений

Просмотреть файл

@ -165,7 +165,7 @@ var Harness = {
}
}
else if (window.document.location.href == PROMPT_URL) {
var promptType = window.gArgs.getProperty("promptType");
var promptType = window.args.promptType;
switch (promptType) {
case "alert":
case "alertCheck":

Просмотреть файл

@ -127,15 +127,16 @@ var Harness = {
}
}
else if (window.document.location.href == PROMPT_URL) {
switch (window.gCommonDialogParam.GetInt(3)) {
case 0: if (window.opener.document.location.href == ADDONS_URL) {
switch (window.args.promptType) {
default:
if (window.opener.document.location.href == ADDONS_URL) {
// A prompt opened by the add-ons manager is liable to be an
// xpinstall error, just close it, we'll see the error in
// onInstallEnded anyway.
window.document.documentElement.acceptDialog();
}
break;
case 2: if (window.gCommonDialogParam.GetInt(4) != 1) {
case "promptUserAndPass":
// This is a login dialog, hopefully an authentication prompt
// for the xpi.
if (this.authenticationCallback) {
@ -152,7 +153,6 @@ var Harness = {
else {
window.document.documentElement.cancelDialog();
}
}
break;
}
}