зеркало из https://github.com/mozilla/gecko-dev.git
Backed out 2 changesets (bug 1429213) for mochitest browser chrome failures at browser_show_dialog.js on a CLOSED TREE
Backed out changeset 3f419c7dcf2a (bug 1429213) Backed out changeset 752ad36df388 (bug 1429213)
This commit is contained in:
Родитель
9d881a9758
Коммит
e8d8680af8
|
@ -5965,7 +5965,6 @@ pref("dom.timeout.max_consecutive_callbacks_ms", 4);
|
|||
// Use this preference to house "Payment Request API" during development
|
||||
pref("dom.payments.request.enabled", false);
|
||||
pref("dom.payments.loglevel", "Warn");
|
||||
pref("dom.payments.unknownTimeoutMS", 5000);
|
||||
|
||||
#ifdef FUZZING
|
||||
pref("fuzzing.enabled", false);
|
||||
|
|
|
@ -411,12 +411,6 @@ var paymentDialogWrapper = {
|
|||
});
|
||||
paymentSrv.respondPayment(showResponse);
|
||||
this.sendMessageToContent("responseSent");
|
||||
|
||||
// If the merchant has not called response.complete() within unknownTimeoutMS
|
||||
// then we will close the dialog, treating it the same as if the merchant
|
||||
// passed "unknown" to response.complete().
|
||||
const timeoutMS = Services.prefs.getIntPref("dom.payments.unknownTimeoutMS");
|
||||
window.unknownTimeoutId = window.setTimeout(window.close, timeoutMS);
|
||||
},
|
||||
|
||||
async onChangeShippingAddress({shippingAddressGUID}) {
|
||||
|
|
|
@ -69,10 +69,6 @@ PaymentUIService.prototype = {
|
|||
|
||||
completePayment(requestId) {
|
||||
this.log.debug("completePayment:", requestId);
|
||||
let dialog = this.findDialog(requestId);
|
||||
if (dialog && dialog.unknownTimeoutId) {
|
||||
dialog.clearTimeout(dialog.unknownTimeoutId);
|
||||
}
|
||||
let closed = this.closeDialog(requestId);
|
||||
let responseCode = closed ?
|
||||
Ci.nsIPaymentActionResponse.COMPLETE_SUCCEEDED :
|
||||
|
|
|
@ -157,7 +157,6 @@ class PaymentDialog extends PaymentStateSubscriberMixin(HTMLElement) {
|
|||
case "processing":
|
||||
case "success":
|
||||
case "fail":
|
||||
case "unknown":
|
||||
break;
|
||||
default:
|
||||
throw new Error("Invalid completionState");
|
||||
|
|
|
@ -33,7 +33,6 @@
|
|||
<button id="setStateProcessing">Processing</button>
|
||||
<button id="setStateSuccess">Success</button>
|
||||
<button id="setStateFail">Fail</button>
|
||||
<button id="setStateUnknown">Unknown</button>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -305,12 +305,6 @@ let buttonActions = {
|
|||
completionState: "fail",
|
||||
});
|
||||
},
|
||||
|
||||
setStateUnknown() {
|
||||
requestStore.setState({
|
||||
completionState: "unknown",
|
||||
});
|
||||
},
|
||||
};
|
||||
|
||||
window.addEventListener("click", function onButtonClick(evt) {
|
||||
|
|
|
@ -83,7 +83,6 @@ payment-dialog > footer {
|
|||
}
|
||||
|
||||
payment-dialog[changes-prevented][completion-state="fail"] #pay,
|
||||
payment-dialog[changes-prevented][completion-state="unknown"] #pay,
|
||||
payment-dialog[changes-prevented][completion-state="processing"] #pay,
|
||||
payment-dialog[changes-prevented][completion-state="success"] #pay {
|
||||
/* Show the pay button above #disabled-overlay */
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
<!ENTITY processingPaymentButton.label "Processing">
|
||||
<!ENTITY successPaymentButton.label "Done">
|
||||
<!ENTITY failPaymentButton.label "Fail">
|
||||
<!ENTITY unknownPaymentButton.label "Unknown">
|
||||
<!ENTITY orderDetailsLabel "Order Details">
|
||||
<!ENTITY orderTotalLabel "Total">
|
||||
]>
|
||||
|
@ -92,7 +91,6 @@
|
|||
data-initial-label="&approvePaymentButton.label;"
|
||||
data-processing-label="&processingPaymentButton.label;"
|
||||
data-fail-label="&failPaymentButton.label;"
|
||||
data-unknown-label="&unknownPaymentButton.label;"
|
||||
data-success-label="&successPaymentButton.label;"></button>
|
||||
</footer>
|
||||
</section>
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
head = head.js
|
||||
prefs =
|
||||
dom.payments.request.enabled=true
|
||||
dom.payments.unknownTimeoutMS=0
|
||||
skip-if = !e10s # Bug 1365964 - Payment Request isn't implemented for non-e10s
|
||||
support-files =
|
||||
blank_page.html
|
||||
|
|
|
@ -161,48 +161,3 @@ add_task(async function test_show_completePayment() {
|
|||
await BrowserTestUtils.waitForCondition(() => win.closed, "dialog should be closed");
|
||||
});
|
||||
});
|
||||
|
||||
add_task(async function test_complete_called_dialog_closed() {
|
||||
await BrowserTestUtils.withNewTab({
|
||||
gBrowser,
|
||||
url: BLANK_PAGE_URL,
|
||||
}, async browser => {
|
||||
let {win, frame} =
|
||||
await setupPaymentDialog(browser, {
|
||||
methodData,
|
||||
details,
|
||||
merchantTaskFn: PTU.ContentTasks.createAndShowRequest,
|
||||
}
|
||||
);
|
||||
|
||||
info("clicking pay");
|
||||
spawnPaymentDialogTask(frame, PTU.DialogContentTasks.completePayment);
|
||||
|
||||
// Add a handler to complete the payment above.
|
||||
info("acknowledging the completion from the merchant page");
|
||||
await ContentTask.spawn(browser, {}, PTU.ContentTasks.addCompletionHandler);
|
||||
|
||||
await BrowserTestUtils.waitForCondition(() => win.closed, "dialog should be closed");
|
||||
});
|
||||
});
|
||||
|
||||
add_task(async function test_complete_not_called_dialog_autoclosed() {
|
||||
await BrowserTestUtils.withNewTab({
|
||||
gBrowser,
|
||||
url: BLANK_PAGE_URL,
|
||||
}, async browser => {
|
||||
let {win, frame} =
|
||||
await setupPaymentDialog(browser, {
|
||||
methodData,
|
||||
details,
|
||||
merchantTaskFn: PTU.ContentTasks.createAndShowRequest,
|
||||
}
|
||||
);
|
||||
|
||||
info("clicking pay");
|
||||
spawnPaymentDialogTask(frame, PTU.DialogContentTasks.completePayment);
|
||||
|
||||
// Not calling response.complete() should cause the dialog to timeout and autoclose.
|
||||
await BrowserTestUtils.waitForCondition(() => win.closed, "dialog should be closed");
|
||||
});
|
||||
});
|
||||
|
|
|
@ -40,7 +40,6 @@ let completionStates = [
|
|||
["processing", "Processing"],
|
||||
["success", "Done"],
|
||||
["fail", "Fail"],
|
||||
["unknown", "Unknown"],
|
||||
];
|
||||
|
||||
/* test that:
|
||||
|
|
Загрузка…
Ссылка в новой задаче