diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
commit | 26a029d407be480d791972afb5975cf62c9360a6 (patch) | |
tree | f435a8308119effd964b339f76abb83a57c29483 /testing/web-platform/tests/docs/writing-tests/crashtest.md | |
parent | Initial commit. (diff) | |
download | firefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz firefox-26a029d407be480d791972afb5975cf62c9360a6.zip |
Adding upstream version 124.0.1.upstream/124.0.1
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(..)`). |