Skip to content

Commit

Permalink
Bug 1724319 - Fix toolkit downloads component tests for when new down…
Browse files Browse the repository at this point in the history
…load changes are enabled. r=mtigley

Differential Revision: https://phabricator.services.mozilla.com/D125901
  • Loading branch information
Molly Howell committed Sep 20, 2021
1 parent 8313bf8 commit 92fc13d
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion toolkit/components/downloads/test/unit/common_test_Download.js
Expand Up @@ -2681,7 +2681,15 @@ add_task(async function test_launchWhenSucceeded_deleteTempFileOnExit() {
"@mozilla.org/uriloader/external-helper-app-service;1"
].getService(Ci.nsIObserver);
expire.observe(null, "profile-before-change", null);
Assert.equal(false, await OS.File.exists(autoDeleteTargetPathTwo));
// Whether the temp file should have been deleted or not depends on the value
// of the improvements pref; if the pref is true, then the file should still
// exist following the simulated shutdown.
Assert.equal(
Services.prefs.getBoolPref(
"browser.download.improvements_to_download_panel"
),
await OS.File.exists(autoDeleteTargetPathTwo)
);
Assert.ok(await OS.File.exists(noAutoDeleteTargetPath));
});

Expand Down

0 comments on commit 92fc13d

Please sign in to comment.