Automatic update from web-platform-tests De-flake moving-between-documents WPTs The moving-between-documents tests were flakily timing out with: "TypeError: Failed to execute 'appendChild' on 'Node': parameter 1 is not of type 'Node'." This occurred because the helper script's createDocument resolved the promise as soon as it received the "fox" message from the iframe. However, the "fox" message is sent from the iframe's <head> before the <body> (which contains the <streaming-element>) is parsed. If the iframe parser yielded, the parent would query for <streaming-element> before it was parsed, returning null and causing appendChild to fail. This CL fixes the issue by using a MutationObserver in the helper's createDocument function. If inlineOrExternal indicates that a <streaming-element> is expected, we wait for it to be added to the DOM before resolving the promise. Fixed: 523277473, 522214584, 523168886, 523251891, 523126244, 523121069, 523114956, 522599272, 523301970 Change-Id: Ibf610fa6a84a1c12508feb40863248120cc71a57 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7934311 Commit-Queue: Joey Arhar <jarhar@chromium.org> Reviewed-by: Helmut Januschka <helmut@januschka.com> Reviewed-by: Joey Arhar <jarhar@chromium.org> Cr-Commit-Position: refs/heads/main@{#1646873} -- wpt-commits: 9b2b429304ed446135e76f2fc855b6dbbbaf2fa2 wpt-pr: 60644
The tests in this directory are for script elements moved between documents.
Use
$ tools/generate.py
to generate test HTML files (except for tests in subdirectories).
Background: