diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:22:09 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:22:09 +0000 |
commit | 43a97878ce14b72f0981164f87f2e35e14151312 (patch) | |
tree | 620249daf56c0258faa40cbdcf9cfba06de2a846 /testing/web-platform/tests/docs/writing-tests/crashtest.md | |
parent | Initial commit. (diff) | |
download | firefox-upstream.tar.xz firefox-upstream.zip |
Adding upstream version 110.0.1.upstream/110.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/docs/writing-tests/crashtest.md')
-rw-r--r-- | testing/web-platform/tests/docs/writing-tests/crashtest.md | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/testing/web-platform/tests/docs/writing-tests/crashtest.md b/testing/web-platform/tests/docs/writing-tests/crashtest.md new file mode 100644 index 0000000000..0166bdeb75 --- /dev/null +++ b/testing/web-platform/tests/docs/writing-tests/crashtest.md @@ -0,0 +1,29 @@ +# crashtest tests + +Crash tests are used to ensure that a document can be loaded without +crashing or experiencing other low-level issues that may be checked by +implementation-specific tooling (e.g. leaks, asserts, or sanitizer +failures). + +Crashtests are identified by the string `-crash` in the filename immediately +before the extension, or by being in a directory called `crashtests`. Examples: + +- `css/css-foo/bar-crash.html` is a crash test +- `css/css-foo/crashtests/bar.html` is a crash test +- `css/css-foo/bar-crash-001.html` is **not** a crash test + +The simplest crashtest is a single HTML file with any content. The +test passes if the load event is reached, and the browser finishes +painting, without terminating. + +In some cases crashtests may need to perform work after the initial page load. +In this case the test may specify a `class=test-wait` attribute on the root +element. The test will not complete until that attribute is removed from the +root. At the time when the test would otherwise have ended a `TestRendered` +event is emitted; test authors can use this event to perform modifications that +are guaranteed not to be batched with the initial paint. This matches the +behaviour of [reftests](reftests). + +Note that crash tests **do not** need to include `testharness.js` or use any of +the [testharness API](testharness-api.md) (e.g. they do not need to declare a +`test(..)`). |