commit | 2a023b35ecade9e3370800b430818c75af1819cb | [log] [tgz] |
---|---|---|
author | Dominic Farolino <dom@chromium.org> | Fri Feb 23 03:50:25 2024 |
committer | Blink WPT Bot <blink-w3c-test-autoroller@chromium.org> | Fri Feb 23 04:08:33 2024 |
tree | 018d297405348fd8370f7c47a21e1e4e107494e9 | |
parent | b4d3a4ecdd4dbbc8ed1fe3993ba1f510075c6247 [diff] |
DOM: Add iframe insertion & removal steps WPTs To help resolve https://github.com/whatwg/dom/issues/808, we need WPTs asserting exactly when (DOM-observing) script can and cannot be invoked during the insertion and removing steps for iframes and script elements. The tests in this CL assert the current spec behavior of: Iframe: - Insertion: - Synchronously fire the `load` event in the iframe document - Removal: - No script is run in between multiple iframe removals. Script cannot observe the state of the DOM in between multiple synchronous removals because, i.e., no `unload` events are fired in this case per HTML [1]. Script: - Insertion: - Synchronously execute <script> elements upon insertion, even in between the insertions of individual <script> elements that are added "atomically" by a single DocumentFragment insertion. Note that Chromium and Gecko fail this test. In the DocumentFragment case, both of these browsers insert all <scripts> into the DOM before executing any of them. This means that once the scripts start executing, they can all observe each other's participation in the DOM tree. At the moment, there is ongoing discussion [2] about the possibility of changing the DOM/HTML Standard's model to more-closely match what Gecko and Chromium do with "atomic" DOM insertion (i.e., running script as a side effect very explicitly after all DOM node insertion is done). [1]: https://html.spec.whatwg.org/C#the-iframe-element:html-element-removing-steps [2]: https://github.com/whatwg/dom/issues/808#issuecomment-1918711297 R=masonf@chromium.org Bug: 40150299 Change-Id: Iff959bbb0d32d772ae7162d5d9e54a5817959086 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5251828 Reviewed-by: Mason Freed <masonf@chromium.org> Commit-Queue: Dominic Farolino <dom@chromium.org> Cr-Commit-Position: refs/heads/main@{#1264406}
The web-platform-tests Project is a cross-browser test suite for the Web-platform stack. Writing tests in a way that allows them to be run in all browsers gives browser projects confidence that they are shipping software that is compatible with other implementations, and that later implementations will be compatible with their implementations. This in turn gives Web authors/developers confidence that they can actually rely on the Web platform to deliver on the promise of working across browsers and devices without needing extra layers of abstraction to paper over the gaps left by specification editors and implementors.
The most important sources of information and activity are:
wpt:matrix.org
matrix channel; includes participants located around the world, but busiest during the European working day.If you'd like clarification about anything, don't hesitate to ask in the chat room or on the mailing list.
Clone or otherwise get https://github.com/web-platform-tests/wpt.
Note: because of the frequent creation and deletion of branches in this repo, it is recommended to “prune” stale branches when fetching updates, i.e. use git pull --prune
(or git fetch -p && git merge
).
See the documentation website and in particular the system setup for running tests locally.
The wpt
command provides a frontend to a variety of tools for working with and running web-platform-tests. Some of the most useful commands are:
wpt serve
- For starting the wpt http serverwpt run
- For running tests in a browserwpt lint
- For running the lint against all testswpt manifest
- For updating or generating a MANIFEST.json
test manifestwpt install
- For installing the latest release of a browser or webdriver server on the local machine.wpt serve-wave
- For starting the wpt http server and the WAVE test runner. For more details on how to use the WAVE test runner see the documentation.On Windows wpt
commands must be prefixed with python
or the path to the python binary (if python
is not in your %PATH%
).
python wpt [command]
Alternatively, you may also use Bash on Ubuntu on Windows in the Windows 10 Anniversary Update build, then access your windows partition from there to launch wpt
commands.
Please make sure git and your text editor do not automatically convert line endings, as it will cause lint errors. For git, please set git config core.autocrlf false
in your working tree.
The master branch is automatically synced to wpt.live and w3c-test.org.
Save the Web, Write Some Tests!
Absolutely everyone is welcome to contribute to test development. No test is too small or too simple, especially if it corresponds to something for which you've noted an interoperability bug in a browser.
The way to contribute is just as usual:
git checkout -b topic
../wpt lint
as described above.If you spot an issue with a test and are not comfortable providing a pull request per above to fix it, please file a new issue. Thank you!