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();