blob: b317ab81bcc054bab609694efae3a533043bb181 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
add_task(async function thumbnails_bg_no_duplicates() {
let url = "http://example.com/1";
ok(!thumbnailExists(url), "Thumbnail file should not already exist.");
let firstCapture = bgCapture(url, {
onDone: doneUrl => {
is(doneUrl, url, "called back with correct url");
ok(thumbnailExists(url), "Thumbnail file should now exist.");
removeThumbnail(url);
},
});
let secondCapture = bgCapture(url, {
onDone: doneUrl => {
is(doneUrl, url, "called back with correct url");
ok(!thumbnailExists(url), "Thumbnail file should still be deleted.");
},
});
await Promise.all([firstCapture, secondCapture]);
});
|