This repository was archived by the owner on Apr 12, 2024. It is now read-only.
Commit 17b139f
committed
feat(*): implement more granular pending task tracking
Previously, all pending async tasks (tracked via `$browser`) are treated
the same. I.e. things like `$$testability.whenStable()` and
`ngMock#$timeout.verifyNoPendingTasks()` take all tasks into account.
Yet, in some cases we might be interested in specific tasks only. For
example, if one wants to verify there are no pending `$timeout`s, they
don't care if there are other pending tasks, such as `$http` requests.
Similarly, one might want to get notified when all `$http` requests have
completed and does not care about pending promises.
This commit adds support for more granular task tracking, by enabling
callers to specify the type of task that is being added/removed from the
queue and enabling listeners to be triggered when specific types of
tasks are completed (even if there are more pending tasks of different
types).
The change is backwards compatible. I.e. calling the affected methods
with no explicit task-type, behaves the same as before.
Related to #14336.1 parent 10973c3 commit 17b139f
File tree
13 files changed
+579
-194
lines changed- src
- ngMock
- ngRoute
- ng
- test
- ngMock
- ngRoute
- ng
13 files changed
+579
-194
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
26 | 29 | | |
27 | 30 | | |
28 | 31 | | |
29 | 32 | | |
30 | 33 | | |
31 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
32 | 37 | | |
33 | 38 | | |
34 | 39 | | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | 40 | | |
39 | 41 | | |
40 | | - | |
| 42 | + | |
41 | 43 | | |
42 | 44 | | |
43 | | - | |
44 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
45 | 49 | | |
46 | | - | |
| 50 | + | |
| 51 | + | |
47 | 52 | | |
48 | | - | |
| 53 | + | |
49 | 54 | | |
50 | | - | |
51 | | - | |
52 | | - | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
53 | 66 | | |
54 | | - | |
| 67 | + | |
55 | 68 | | |
56 | 69 | | |
57 | 70 | | |
| |||
60 | 73 | | |
61 | 74 | | |
62 | 75 | | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
63 | 105 | | |
64 | 106 | | |
65 | 107 | | |
| |||
68 | 110 | | |
69 | 111 | | |
70 | 112 | | |
71 | | - | |
| 113 | + | |
| 114 | + | |
72 | 115 | | |
73 | | - | |
74 | | - | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
75 | 119 | | |
76 | 120 | | |
77 | | - | |
| 121 | + | |
78 | 122 | | |
79 | 123 | | |
80 | 124 | | |
| |||
307 | 351 | | |
308 | 352 | | |
309 | 353 | | |
310 | | - | |
| 354 | + | |
| 355 | + | |
311 | 356 | | |
312 | 357 | | |
313 | 358 | | |
| |||
318 | 363 | | |
319 | 364 | | |
320 | 365 | | |
321 | | - | |
| 366 | + | |
322 | 367 | | |
323 | | - | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
324 | 373 | | |
325 | 374 | | |
326 | | - | |
327 | | - | |
328 | | - | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
329 | 379 | | |
330 | 380 | | |
331 | 381 | | |
| |||
341 | 391 | | |
342 | 392 | | |
343 | 393 | | |
344 | | - | |
| 394 | + | |
| 395 | + | |
345 | 396 | | |
346 | 397 | | |
347 | | - | |
| 398 | + | |
348 | 399 | | |
349 | 400 | | |
350 | 401 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1054 | 1054 | | |
1055 | 1055 | | |
1056 | 1056 | | |
1057 | | - | |
| 1057 | + | |
1058 | 1058 | | |
1059 | 1059 | | |
1060 | 1060 | | |
| |||
1092 | 1092 | | |
1093 | 1093 | | |
1094 | 1094 | | |
1095 | | - | |
| 1095 | + | |
1096 | 1096 | | |
1097 | 1097 | | |
1098 | 1098 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1122 | 1122 | | |
1123 | 1123 | | |
1124 | 1124 | | |
1125 | | - | |
| 1125 | + | |
1126 | 1126 | | |
1127 | 1127 | | |
1128 | 1128 | | |
| |||
1493 | 1493 | | |
1494 | 1494 | | |
1495 | 1495 | | |
1496 | | - | |
| 1496 | + | |
1497 | 1497 | | |
1498 | 1498 | | |
1499 | 1499 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
107 | | - | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
108 | 116 | | |
109 | 117 | | |
110 | 118 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
| 66 | + | |
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| |||
0 commit comments