From cc926849886176e21a2bd1850887764b0b5002eb Mon Sep 17 00:00:00 2001 From: Neil Deakin Date: Wed, 24 Nov 2021 20:13:20 +0000 Subject: [PATCH] Bug 1742823, handle pdf in this test when improvements pref is either on or off, r=mtigley Differential Revision: https://phabricator.services.mozilla.com/D132044 --- .../tests/mochitest/browser_extension_correction.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/uriloader/exthandler/tests/mochitest/browser_extension_correction.js b/uriloader/exthandler/tests/mochitest/browser_extension_correction.js index f98fd140bb0f..3b0248b227ae 100644 --- a/uriloader/exthandler/tests/mochitest/browser_extension_correction.js +++ b/uriloader/exthandler/tests/mochitest/browser_extension_correction.js @@ -63,7 +63,7 @@ async function checkDownloadWithExtensionState( // PDF should load using the internal viewer without downloading it. let waitForLoad; - if (type == "application/pdf") { + if (!shouldExpectDialog && type == "application/pdf") { waitForLoad = BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser); } @@ -101,7 +101,7 @@ async function checkDownloadWithExtensionState( dialog.acceptDialog(); } - if (type == "application/pdf") { + if (!shouldExpectDialog && type == "application/pdf") { is( gURLBar.inputField.value, "data:application/pdf,hello",