зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1735368 - fix browser_auto_close_window.js so it passes with download improvements enabled and when asking for all downloads, r=sfoster
Differential Revision: https://phabricator.services.mozilla.com/D128628
This commit is contained in:
Родитель
4d70548526
Коммит
0931eaffcf
|
@ -53,6 +53,23 @@ add_task(async function setup() {
|
|||
HELPERAPP_DIALOG_CONTRACT_ID,
|
||||
mockHelperAppService
|
||||
);
|
||||
|
||||
// Ensure we always prompt for these downloads.
|
||||
const HandlerService = Cc[
|
||||
"@mozilla.org/uriloader/handler-service;1"
|
||||
].getService(Ci.nsIHandlerService);
|
||||
|
||||
const MIMEService = Cc["@mozilla.org/mime;1"].getService(Ci.nsIMIMEService);
|
||||
const mimeInfo = MIMEService.getFromTypeAndExtension(
|
||||
"application/octet-stream",
|
||||
"bin"
|
||||
);
|
||||
mimeInfo.alwaysAskBeforeHandling = true;
|
||||
HandlerService.store(mimeInfo);
|
||||
|
||||
SimpleTest.registerCleanupFunction(() => {
|
||||
HandlerService.remove(mimeInfo);
|
||||
});
|
||||
});
|
||||
|
||||
add_task(async function simple_navigation() {
|
||||
|
|
Загрузка…
Ссылка в новой задаче