Bug 1050638 - fix nits which got missed out in initial commit

This commit is contained in:
Gijs Kruitbosch 2014-10-10 08:44:21 +01:00
parent cefd9f3267
commit 228c7daf21
2 changed files with 5 additions and 5 deletions

View File

@ -1957,8 +1957,8 @@
aTab._pendingPermitUnload = true; aTab._pendingPermitUnload = true;
let permitUnload = ds.contentViewer.permitUnload(); let permitUnload = ds.contentViewer.permitUnload();
delete aTab._pendingPermitUnload; delete aTab._pendingPermitUnload;
// If we were closed during the unload, we return false now so // If we were closed during onbeforeunload, we return false now
// we don't (try to) close the same tab again. Of course, we // so we don't (try to) close the same tab again. Of course, we
// also stop if the unload was cancelled by the user: // also stop if the unload was cancelled by the user:
if (aTab.closing || !permitUnload) { if (aTab.closing || !permitUnload) {
// NB: deliberately keep the _closedDuringPermitUnload set to // NB: deliberately keep the _closedDuringPermitUnload set to

View File

@ -1,4 +1,4 @@
"use strict" "use strict";
const TEST_PAGE = "http://mochi.test:8888/browser/browser/base/content/test/general/file_double_close_tab.html"; const TEST_PAGE = "http://mochi.test:8888/browser/browser/base/content/test/general/file_double_close_tab.html";
let testTab; let testTab;
@ -43,9 +43,9 @@ add_task(function*() {
// everything gets messed up and the promise's .then callbacks never get // everything gets messed up and the promise's .then callbacks never get
// called, despite resolve() being called just fine. // called, despite resolve() being called just fine.
let dialogNode = yield new Promise(resolveOuter => { let dialogNode = yield new Promise(resolveOuter => {
waitForDialog(function(dialogNode) { waitForDialog(dialogNode => {
waitForDialogDestroyed(dialogNode, () => { waitForDialogDestroyed(dialogNode, () => {
let doCompletion = () => setTimeout(resolveOuter, 10); let doCompletion = () => setTimeout(resolveOuter, 0);
info("Now checking if dialog is destroyed"); info("Now checking if dialog is destroyed");
ok(!dialogNode.parentNode, "onbeforeunload dialog should be gone."); ok(!dialogNode.parentNode, "onbeforeunload dialog should be gone.");
if (dialogNode.parentNode) { if (dialogNode.parentNode) {