mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 779754. Fix intermittent test_destinationURI_annotation.xul by cleaning up possible leftover files before starting the test. r=mconley
This commit is contained in:
parent
04d4c426d1
commit
46f72e2365
@ -119,6 +119,15 @@ function init() {
|
||||
// of the panel in the browser's window.
|
||||
Services.prefs.setBoolPref("browser.download.useToolkitUI", true);
|
||||
|
||||
// Check if the file we're trying to download already exists in the destination
|
||||
// folder, and if so, remove it first to ensure that the test works properly.
|
||||
let fileToDownload = dm.userDownloadsDirectory.clone();
|
||||
fileToDownload.append(FILE_NAME);
|
||||
if (fileToDownload.exists()) {
|
||||
fileToDownload.remove(false);
|
||||
info("File to download had to be removed as it already existed.");
|
||||
}
|
||||
|
||||
ww.registerNotification(windowObserver);
|
||||
PlacesUtils.annotations.addObserver(annoObserver, false);
|
||||
dm.addListener(downloadListener);
|
||||
|
Loading…
Reference in New Issue
Block a user