mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-01 08:42:13 +00:00
Bug 1870166 [wpt PR 43680] - vt: Fix bug in document-element-detatched-crash.html[sic], a=testonly
Automatic update from web-platform-tests vt: Fix bug in document-element-detatched-crash.html[sic] This test performs actions after load but, per [1], crash tests will end when the load event is reached. This CL adds 'test-wait' to ensure the test code is run before the test terminates. Note, the class is removed before the element since the test harness apparently won't finish on element removal. This should be ok since the test harness apparently has some asynchronicity in finishing the test. Additionally, the test name has a typo (detatched --> detached) so PS1 renames the test. Diff from PS1 to see the test changes. [1] https://web-platform-tests.org/writing-tests/crashtest.html Bug: 1413903 Change-Id: I62854956c862788934ef5d7a6da602b2d446f2e2 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5122833 Reviewed-by: Vladimir Levin <vmpstr@chromium.org> Commit-Queue: David Bokan <bokan@chromium.org> Cr-Commit-Position: refs/heads/main@{#1238094} -- wpt-commits: 1683fae2736da237ef600745a4aea47891bdadfc wpt-pr: 43680
This commit is contained in:
parent
9fc1a8a71a
commit
7e586f757c
@ -1,4 +1,5 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
|
<html class="test-wait">
|
||||||
<title>View transitions: documentElement.remove</title>
|
<title>View transitions: documentElement.remove</title>
|
||||||
<link rel="help" href="https://github.com/WICG/view-transitions">
|
<link rel="help" href="https://github.com/WICG/view-transitions">
|
||||||
<link rel="author" href="mailto:vmpstr@chromium.org">
|
<link rel="author" href="mailto:vmpstr@chromium.org">
|
||||||
@ -10,12 +11,15 @@ html {
|
|||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
async function runTest() {
|
function runTest() {
|
||||||
document.startViewTransition(() => {
|
document.startViewTransition(() => {
|
||||||
requestAnimationFrame(() => document.documentElement.remove());
|
requestAnimationFrame(() => {
|
||||||
})
|
const html = document.documentElement;
|
||||||
|
html.remove();
|
||||||
|
html.classList.remove('test-wait');
|
||||||
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
onload = () => requestAnimationFrame(runTest);
|
onload = () => requestAnimationFrame(runTest);
|
||||||
</script>
|
</script>
|
||||||
|
</html>
|
||||||
|
Loading…
Reference in New Issue
Block a user