|
38 | 38 | // Globals set by streamed scripts, deleted after each test so a later test |
39 | 39 | // can't pass on values left by an earlier one. |
40 | 40 | function delete_script_globals() { |
41 | | - for (const name of ["ids_at_script", "ids_at_rest", "abort_promise", "write_promise", "close_promise"]) { |
| 41 | + for (const name of [ |
| 42 | + "ids_at_script", |
| 43 | + "ids_at_rest", |
| 44 | + "abort_promise", |
| 45 | + "write_promise", |
| 46 | + "close_promise", |
| 47 | + "resolve_abort", |
| 48 | + "reaction_log", |
| 49 | + "rest_parsed", |
| 50 | + "close_settled", |
| 51 | + "close_settled_at_rest", |
| 52 | + ]) { |
42 | 53 | delete window[name]; |
43 | 54 | } |
44 | 55 | } |
|
385 | 396 | await after_task(t); |
386 | 397 | assert_array_equals(window.events, ["slow"]); |
387 | 398 | assert_equals(connections, 2, "foster-parented formatting element connectedCallback ran"); |
388 | | - const comments = Array.from(target.querySelector("#patched").childNodes) |
389 | | - .filter((n) => n.nodeType === Node.COMMENT_NODE) |
390 | | - .map((n) => n.data); |
391 | | - assert_array_equals(comments, ['?start name="m"', "?end"], |
| 399 | + const markers = Array.from(target.querySelector("#patched").childNodes) |
| 400 | + .filter((n) => n.nodeType === Node.PROCESSING_INSTRUCTION_NODE) |
| 401 | + .map((n) => `${n.target}:${n.data}`); |
| 402 | + assert_array_equals(markers, ['start:name="m"', "end:"], |
392 | 403 | "</template> must not remove patch markers after abort in table text"); |
| 404 | + assert_equals(target.querySelector("#patched").textContent, "Old"); |
393 | 405 | await failOnTimeout(abortPromise); |
394 | 406 | await promise_rejects_exactly(t, "aborted-in-table-text", writer.closed); |
395 | 407 | }, `${method}: abort() from a foster-parented custom element reaction in table text prevents reprocessing </template>`); |
|
0 commit comments