зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset de24b08ddc37 (bug 1539757) for causing browser_hidden_document_autofill.js, browser_httpauth.js, test_bug_627616.html to permafail CLOSED TREE
--HG-- extra : histedit_source : 12f30c6ab7c094c787618b62090e221815ff8439
This commit is contained in:
Родитель
615006146b
Коммит
73e7b60fc2
|
@ -8369,8 +8369,6 @@ TabModalPromptBox.prototype = {
|
|||
if (prompts.length) {
|
||||
let prompt = prompts[prompts.length - 1];
|
||||
prompt.element.hidden = false;
|
||||
// Because we were hidden before, this won't have been possible, so do it now:
|
||||
prompt.ensureXBLBindingAttached();
|
||||
prompt.Dialog.setDefaultFocus();
|
||||
} else {
|
||||
browser.removeAttribute("tabmodalPromptShowing");
|
||||
|
|
|
@ -8,21 +8,20 @@
|
|||
* the oldest one.
|
||||
*/
|
||||
add_task(async function() {
|
||||
const PROMPTCOUNT = 9;
|
||||
const PROMPTCOUNT = 5;
|
||||
|
||||
let contentScript = function(MAX_PROMPT) {
|
||||
var i = MAX_PROMPT;
|
||||
let fns = ["alert", "prompt", "confirm"];
|
||||
let contentScript = function() {
|
||||
var i = 5; // contentScript has no access to PROMPTCOUNT.
|
||||
window.addEventListener("message", function() {
|
||||
i--;
|
||||
if (i) {
|
||||
window.postMessage("ping", "*");
|
||||
}
|
||||
window[fns[i % 3]](fns[i % 3] + " countdown #" + i);
|
||||
alert("Alert countdown #" + i);
|
||||
});
|
||||
window.postMessage("ping", "*");
|
||||
};
|
||||
let url = "data:text/html,<script>(" + encodeURIComponent(contentScript.toSource()) + ")(" + PROMPTCOUNT + ");</script>";
|
||||
let url = "data:text/html,<script>(" + encodeURIComponent(contentScript.toSource()) + ")();</script>";
|
||||
|
||||
let promptsOpenedPromise = new Promise(function(resolve) {
|
||||
let unopenedPromptCount = PROMPTCOUNT;
|
||||
|
@ -49,8 +48,7 @@ add_task(async function() {
|
|||
let i = 0;
|
||||
for (let promptElement of promptElements) {
|
||||
let prompt = tab.linkedBrowser.tabModalPromptBox.prompts.get(promptElement);
|
||||
let expectedType = ["alert", "prompt", "confirm"][i % 3];
|
||||
is(prompt.Dialog.args.text, expectedType + " countdown #" + i, "The #" + i + " alert should be labelled as such.");
|
||||
is(prompt.Dialog.args.text, "Alert countdown #" + i, "The #" + i + " alert should be labelled as such.");
|
||||
if (i !== promptElementsCount) {
|
||||
is(prompt.element.hidden, true, "This prompt should be hidden.");
|
||||
i++;
|
||||
|
|
|
@ -80,7 +80,6 @@ var RemotePrompt = {
|
|||
// there's other stuff in nsWindowWatcher::OpenWindowInternal
|
||||
// that we might need to do here as well.
|
||||
} catch (ex) {
|
||||
Cu.reportError(ex);
|
||||
onPromptClose(true);
|
||||
}
|
||||
},
|
||||
|
|
|
@ -162,16 +162,14 @@ CommonDialog.prototype = {
|
|||
else
|
||||
button.setAttribute("default", "true");
|
||||
|
||||
if (!this.ui.promptContainer.hidden) {
|
||||
// For tab prompts, we will need to ensure its content bindings are attached.
|
||||
if (!xulDialog) {
|
||||
this.ui.prompt.ensureXBLBindingAttached();
|
||||
}
|
||||
|
||||
// Set default focus / selection.
|
||||
this.setDefaultFocus(true);
|
||||
// For tab prompts, we will need to ensure its content bindings are attached.
|
||||
if (!xulDialog) {
|
||||
this.ui.prompt.ensureXBLBindingAttached();
|
||||
}
|
||||
|
||||
// Set default focus / selection.
|
||||
this.setDefaultFocus(true);
|
||||
|
||||
if (this.args.enableDelay) {
|
||||
this.delayHelper = new EnableDelayHelper({
|
||||
disableDialog: () => this.setButtonsEnabledState(false),
|
||||
|
@ -261,9 +259,9 @@ CommonDialog.prototype = {
|
|||
else
|
||||
this.ui.password1Textbox.focus();
|
||||
} else if (isInitialLoad) {
|
||||
this.ui.loginTextbox.select();
|
||||
this.ui.loginTextbox.select();
|
||||
} else {
|
||||
this.ui.loginTextbox.focus();
|
||||
this.ui.loginTextbox.focus();
|
||||
}
|
||||
},
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче