Make Crashtests with test-wait wait (#33344)

* Make Crashtests with test-wait wait

Signed-off-by: Taym <haddadi.taym@gmail.com>

* use Atom::from instead of the atom macro

Signed-off-by: Taym <haddadi.taym@gmail.com>

* Update test result expectations

Signed-off-by: Taym <haddadi.taym@gmail.com>

---------

Signed-off-by: Taym <haddadi.taym@gmail.com>
This commit is contained in:
Taym Haddadi 2024-09-10 17:19:18 +02:00 committed by GitHub
parent 9d3d009895
commit 1b27a911af
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
19 changed files with 48 additions and 3 deletions

View file

@ -2018,9 +2018,11 @@ impl Window {
if self.prepare_for_screenshot && for_display {
// Checks if the html element has reftest-wait attribute present.
// See http://testthewebforward.org/docs/reftests.html
// and https://web-platform-tests.org/writing-tests/crashtest.html
let html_element = document.GetDocumentElement();
let reftest_wait = html_element.map_or(false, |elem| {
elem.has_class(&atom!("reftest-wait"), CaseSensitivity::CaseSensitive)
elem.has_class(&atom!("reftest-wait"), CaseSensitivity::CaseSensitive) ||
elem.has_class(&Atom::from("test-wait"), CaseSensitivity::CaseSensitive)
});
let has_sent_idle_message = self.has_sent_idle_message.get();

View file

@ -0,0 +1,2 @@
[opacity-and-transform-animation-crash.html]
expected: TIMEOUT

View file

@ -0,0 +1,2 @@
[replace-keyframes-animating-filter-001.html]
expected: TIMEOUT

View file

@ -1,2 +1,2 @@
[scope-shadow-sharing.html]
expected: FAIL
expected: TIMEOUT

View file

@ -0,0 +1,2 @@
[flex-basis-content-crash.html]
expected: TIMEOUT

View file

@ -0,0 +1,2 @@
[column-count-crash.https.html]
expected: TIMEOUT

View file

@ -0,0 +1,2 @@
[overflow-hidden-smooth-scroll-crash.html]
expected: TIMEOUT

View file

@ -0,0 +1,2 @@
[feimage-circular-reference-foreign-object-crash.html]
expected: TIMEOUT

View file

@ -0,0 +1,2 @@
[feimage-reference-foreign-object-crash.html]
expected: TIMEOUT

View file

@ -0,0 +1,2 @@
[abort-signal-any-crash.html]
expected: TIMEOUT

View file

@ -0,0 +1,2 @@
[stringification-crash.html]
expected: TIMEOUT

View file

@ -0,0 +1,2 @@
[content-visibility-crash.html]
expected: TIMEOUT

View file

@ -1,2 +1,2 @@
[svg-filter-lh-rlh.html]
expected: FAIL
expected: TIMEOUT

View file

@ -0,0 +1,2 @@
[fieldset-middleclick.html]
expected: TIMEOUT

View file

@ -0,0 +1,2 @@
[showmodal-shadow-sibling-frame-crash.html]
expected: TIMEOUT

View file

@ -0,0 +1,2 @@
[multiple-observers-with-mutation-crash.html]
expected: TIMEOUT

View file

@ -0,0 +1,2 @@
[selection-modify-line-boundary-around-empty-details.html]
expected: TIMEOUT

View file

@ -8,6 +8,13 @@
null,
{}
]
],
"test-wait-crash.html": [
"2419da6af0c278a17b9ff974d4418f9e386ef3e0",
[
null,
{}
]
]
}
},

View file

@ -0,0 +1,8 @@
<!DOCTYPE html>
<html class="test-wait">
<meta charset="utf-8">
<meta name="assert" content="The test should not crash.">
<script>
fetch('/common/slow.py?delay=5000').then(() => document.documentElement.classList.remove("test-wait"));
</script>