Backed out changeset 756dc51160cf (bug 1044600) CLOSED TREE
This commit is contained in:
@@ -37,12 +37,6 @@ let gSubDialog = {
|
|||||||
// Wait for the stylesheets injected during DOMContentLoaded to load before showing the dialog
|
// Wait for the stylesheets injected during DOMContentLoaded to load before showing the dialog
|
||||||
// otherwise there is a flicker of the stylesheet applying.
|
// otherwise there is a flicker of the stylesheet applying.
|
||||||
this._frame.addEventListener("load", this._onLoad.bind(this));
|
this._frame.addEventListener("load", this._onLoad.bind(this));
|
||||||
|
|
||||||
chromeBrowser.addEventListener("unload", function(aEvent) {
|
|
||||||
if (aEvent.target.location.href != "about:blank") {
|
|
||||||
this.close();
|
|
||||||
}
|
|
||||||
}.bind(this), true);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
uninit: function() {
|
uninit: function() {
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ let gTests = [{
|
|||||||
dialog.document.documentElement.cancelDialog();
|
dialog.document.documentElement.cancelDialog();
|
||||||
|
|
||||||
let closingEvent = yield closingPromise;
|
let closingEvent = yield closingPromise;
|
||||||
ise(closingEvent.detail.button, "cancel", "closing event should indicate button was 'cancel'");
|
ise(closingEvent.detail.button, "cancel", "closing event should indicate button was 'accept'");
|
||||||
|
|
||||||
yield deferredClose.promise;
|
yield deferredClose.promise;
|
||||||
ise(rv.acceptCount, 0, "return value should NOT have been updated");
|
ise(rv.acceptCount, 0, "return value should NOT have been updated");
|
||||||
@@ -118,22 +118,6 @@ let gTests = [{
|
|||||||
ise(rv.acceptCount, 0, "return value should NOT have been updated");
|
ise(rv.acceptCount, 0, "return value should NOT have been updated");
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
desc: "Check that 'back' navigation will close the dialog",
|
|
||||||
run: function* () {
|
|
||||||
let rv = { acceptCount: 0 };
|
|
||||||
let deferredClose = Promise.defer();
|
|
||||||
let dialogPromise = openAndLoadSubDialog(gDialogURL, null, rv,
|
|
||||||
(aEvent) => dialogClosingCallback(deferredClose, aEvent));
|
|
||||||
let dialog = yield dialogPromise;
|
|
||||||
|
|
||||||
info("cancelling the dialog");
|
|
||||||
content.gSubDialog._frame.goBack();
|
|
||||||
|
|
||||||
yield deferredClose.promise;
|
|
||||||
ise(rv.acceptCount, 0, "return value should NOT have been updated");
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
desc: "Hitting escape in the dialog",
|
desc: "Hitting escape in the dialog",
|
||||||
run: function* () {
|
run: function* () {
|
||||||
|
|||||||
Reference in New Issue
Block a user