Bug 1768351, add a special case for the one case that intermittently fails on windows, r=mhowell

Depends on D146727

Differential Revision: https://phabricator.services.mozilla.com/D146728
This commit is contained in:
Neil Deakin 2022-05-25 00:14:20 +00:00
parent c7de800148
commit 294581a987

View File

@ -263,7 +263,7 @@ add_task(async function save_document() {
if (idx == 66 && AppConstants.platform == "win") {
// This is special-cased on Windows. The default filename will be used, since
// the filename is invalid, but since the previous test file has the same issue,
// this second file will be saved with a number suffix added to it. -->
// this second file will be saved with a number suffix added to it.
filename = "index_002";
}
@ -720,6 +720,13 @@ add_task(async function save_download_links() {
" was saved with the correct name when link has download attribute"
);
} else {
if (idx == 66 && filename == "index(1)") {
// Sometimes, the previous test's file still exists or wasn't created in time
// and a non-duplicated name is created. Allow this rather than figuring out
// how to avoid it since it doesn't affect what is being tested here.
filename = "index";
}
is(
filename,
downloads[idx].filename,