зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
fc22619eca
Коммит
58a53db2e7
|
@ -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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче