-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix some view transitions crashtests (#45924)
They are currently written as reftests with reftest-wait and friends, convert them to use test-wait.
- Loading branch information
Showing
2 changed files
with
11 additions
and
16 deletions.
There are no files selected for viewing
14 changes: 6 additions & 8 deletions
14
css/css-view-transitions/iframe-transition-destroyed-document-crash.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,25 @@ | ||
<!DOCTYPE html> | ||
<html class=reftest-wait> | ||
<html class=test-wait> | ||
<title>View transitions: crash test</title> | ||
<link rel="help" href="https://www.w3.org/TR/css-view-transitions-1/"> | ||
<link rel="author" href="mailto:[email protected]"> | ||
<script src="/common/reftest-wait.js"></script> | ||
<html> | ||
<head> | ||
<script> | ||
function eventhandler1() { | ||
var var00106 = htmlvar00011.contentDocument; | ||
var var00228 = var00106.startViewTransition(); | ||
var iframeDoc = iframe.contentDocument; | ||
var viewTransition = iframeDoc.startViewTransition(); | ||
requestAnimationFrame(() => { | ||
requestAnimationFrame(() => { | ||
requestAnimationFrame(takeScreenshot); | ||
requestAnimationFrame(() => document.documentElement.classList.remove("test-wait")); | ||
}) | ||
}); | ||
} | ||
|
||
</script> | ||
</head> | ||
<body> | ||
<iframe id="htmlvar00011" onunload="eventhandler3()" border="0" srcdoc="A#:^;<gV<>8" style=":{,J" referrerpolicy="unsafe-url" background="!xp>" nohref="nohref" nonce="nonce" inputEncoding="s" offsetX="0.3538512271910753">:+j&;&-^>.7xf\jZ1,xb</iframe> | ||
<style id="htmlvar00014" nonce="nonce" media="screen and (min-width:0px)" onerror="eventhandler1()" onload="eventhandler1()" dir="N5!" updateRangeEnd="0" abbr="4IvGMN[Wxd" symbols="=d##y#)DA4V8ya}KO.cv" frameBorder="^b*]&:|#lB:" search="N">ynFXo*</style> | ||
<iframe id="iframe" onunload="eventhandler3()" border="0" srcdoc="A#:^;<gV<>8" style=":{,J" referrerpolicy="unsafe-url" background="!xp>" nohref="nohref" nonce="nonce" inputEncoding="s" offsetX="0.3538512271910753">:+j&;&-^>.7xf\jZ1,xb</iframe> | ||
<style nonce="nonce" media="screen and (min-width:0px)" onerror="eventhandler1()" onload="eventhandler1()" dir="N5!" updateRangeEnd="0" abbr="4IvGMN[Wxd" symbols="=d##y#)DA4V8ya}KO.cv" frameBorder="^b*]&:|#lB:" search="N">ynFXo*</style> | ||
</body> | ||
</html> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
<!DOCTYPE html> | ||
<html class=reftest-wait> | ||
<html class=test-wait> | ||
<title>View transitions: entry animation from root display none</title> | ||
<link rel="help" href="https://drafts.csswg.org/css-view-transitions-1/"> | ||
<link rel="author" href="mailto:[email protected]"> | ||
|
||
<script src="/common/reftest-wait.js"></script> | ||
<style> | ||
.hidden { | ||
display: none; | ||
|
@@ -15,16 +14,14 @@ | |
</style> | ||
|
||
<script> | ||
failIfNot(document.startViewTransition, "Missing document.startViewTransition"); | ||
|
||
async function runTest() { | ||
transition = document.startViewTransition(); | ||
transition.ready.then( | ||
transition.ready.then(() => { | ||
requestAnimationFrame(() => { | ||
document.documentElement.classList.toggle("hidden"); | ||
})); | ||
transition.finished.then(takeScreenshot); | ||
}); | ||
}); | ||
transition.finished.then(() => document.documentElement.classList.remove("test-wait")); | ||
} | ||
onload = () => requestAnimationFrame(() => requestAnimationFrame(runTest)); | ||
</script> | ||
|