summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/docs/writing-tests/crashtest.md
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 17:32:43 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 17:32:43 +0000
commit6bf0a5cb5034a7e684dcc3500e841785237ce2dd (patch)
treea68f146d7fa01f0134297619fbe7e33db084e0aa /testing/web-platform/tests/docs/writing-tests/crashtest.md
parentInitial commit. (diff)
downloadthunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.tar.xz
thunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.zip
Adding upstream version 1:115.7.0.upstream/1%115.7.0upstream
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.md29
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(..)`).