- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 3.3k
 
Closed
Labels
A-testingE-less-complexStraightforward. Recommended for a new contributor.Straightforward. Recommended for a new contributor.
Description
From https://web-platform-tests.org/writing-tests/crashtest.html:
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](https://web-platform-tests.org/writing-tests/reftests.html).
Servo only checks for reftest-wait right now, so any crashtest that relies on test-wait exits very quickly:
servo/components/script/dom/window.rs
Lines 2019 to 2023 in ebed921
| // Checks if the html element has reftest-wait attribute present. | |
| // See http://testthewebforward.org/docs/reftests.html | |
| let html_element = document.GetDocumentElement(); | |
| let reftest_wait = html_element.map_or(false, |elem| { | |
| elem.has_class(&atom!("reftest-wait"), CaseSensitivity::CaseSensitive) | 
Metadata
Metadata
Assignees
Labels
A-testingE-less-complexStraightforward. Recommended for a new contributor.Straightforward. Recommended for a new contributor.