зеркало из https://github.com/mozilla/gecko-dev.git
Bug 575485 - Refactor commonDialog code into a sharable JSM (Part 4, test fixes). r=gavin, a=beltzner
This commit is contained in:
Родитель
838d9325a9
Коммит
bdbd761905
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче