Commit 8b3feba
Andreu Botella
Change
`Tests.prototype.all_done` used to treat the presence of at least one
test as a necessary condition for all tests to be done. This would be
false in cases where an exception is thrown inside the `setup` function,
but the code path that runs in that case doesn't use the `all_done()`
function.
However, if an exception is thrown inside the `setup` function in a
worker test, `tests.all_done()` is called in that code path, which
results in the completion message from the worker being ignored. This
change fixes this by changing the condition to require the presence of
either tests or remote contexts.
For service worker tests, however, that is not enough, since service
worker registration is asynchronous. This change lets the
`fetch_tests_from_worker` function take a promise or an async function
that returns the worker, and it guarantees that the test won't be
considered complete until the promise is resolved. The HTML boilerplate
for service worker tests is also changed in turn.
Closes #29777.Tests.prototype.all_done to require either tests or pending remotes1 parent 5998702 commit 8b3feba
File tree
3 files changed
+32
-16
lines changed- resources
- tools
- serve
- wptserve/tests/functional/docroot
3 files changed
+32
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2942 | 2942 | | |
2943 | 2943 | | |
2944 | 2944 | | |
2945 | | - | |
| 2945 | + | |
| 2946 | + | |
2946 | 2947 | | |
2947 | 2948 | | |
2948 | 2949 | | |
| |||
3168 | 3169 | | |
3169 | 3170 | | |
3170 | 3171 | | |
3171 | | - | |
| 3172 | + | |
3172 | 3173 | | |
3173 | 3174 | | |
3174 | 3175 | | |
3175 | 3176 | | |
3176 | | - | |
3177 | | - | |
3178 | | - | |
| 3177 | + | |
| 3178 | + | |
| 3179 | + | |
| 3180 | + | |
| 3181 | + | |
| 3182 | + | |
| 3183 | + | |
| 3184 | + | |
| 3185 | + | |
| 3186 | + | |
| 3187 | + | |
| 3188 | + | |
| 3189 | + | |
| 3190 | + | |
| 3191 | + | |
| 3192 | + | |
| 3193 | + | |
| 3194 | + | |
3179 | 3195 | | |
3180 | 3196 | | |
3181 | | - | |
3182 | | - | |
| 3197 | + | |
| 3198 | + | |
3183 | 3199 | | |
3184 | 3200 | | |
3185 | 3201 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
311 | 311 | | |
312 | 312 | | |
313 | 313 | | |
314 | | - | |
| 314 | + | |
315 | 315 | | |
316 | 316 | | |
317 | 317 | | |
318 | 318 | | |
319 | | - | |
320 | | - | |
| 319 | + | |
| 320 | + | |
321 | 321 | | |
322 | 322 | | |
323 | 323 | | |
| |||
333 | 333 | | |
334 | 334 | | |
335 | 335 | | |
336 | | - | |
| 336 | + | |
337 | 337 | | |
338 | 338 | | |
339 | 339 | | |
340 | 340 | | |
341 | 341 | | |
342 | 342 | | |
343 | 343 | | |
344 | | - | |
345 | | - | |
| 344 | + | |
| 345 | + | |
346 | 346 | | |
347 | 347 | | |
348 | 348 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | | - | |
| 13 | + | |
| 14 | + | |
15 | 15 | | |
0 commit comments