Commit dc53ad7
committed
Fix slow
This test was often reported as slow (>1000ms) when running the whole test
suite. Measuring timing showed that most of the delay was in the first
`URL.createObjectURL` call. The issue did not reproduce when running only the
`downloadFile` tests. If changing the order in which different file types are
tested, the slowness still only occurred on the first call, so isn't related to
a particular file type. https://issues.chromium.org/issues/40269900 notes that
this call involves a synchronous IPC call between renderer and browser process,
so the issue may just be that the browser process is busier when the full suite
runs.
As `createObjectURL` has a simple signature, I think we can get away with
just stubbing it.downloadFile test by stubbing URL.createObjectURL
1 parent 07c5bc8 commit dc53ad7
File tree
1 file changed
+13
-7
lines changed1 file changed
+13
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
22 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
23 | 32 | | |
24 | 33 | | |
25 | 34 | | |
26 | | - | |
| 35 | + | |
27 | 36 | | |
28 | 37 | | |
29 | 38 | | |
| |||
32 | 41 | | |
33 | 42 | | |
34 | 43 | | |
| 44 | + | |
35 | 45 | | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
| 46 | + | |
41 | 47 | | |
42 | 48 | | |
43 | 49 | | |
| |||
0 commit comments