Skip to content

Commit

Permalink
Bug 1768351, add a special case for the one case that intermittently …
Browse files Browse the repository at this point in the history
…fails on windows, r=mhowell

Depends on D146727

Differential Revision: https://phabricator.services.mozilla.com/D146728
  • Loading branch information
EnnDeakin2 committed May 25, 2022
1 parent 63c60a6 commit 56590a9
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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";
}

Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 56590a9

Please sign in to comment.