haikuwebkit/LayoutTests/animations/transition-and-animation-1....

56 lines
1.6 KiB
HTML
Raw Permalink Normal View History

<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Transition/Animation Test #1</title>
<style type="text/css" media="screen">
#box {
position: absolute;
left: 0;
top: 100px;
height: 100px;
width: 100px;
background-color: blue;
animation-duration: 0.5s;
animation-timing-function: linear;
animation-name: "anim";
transition-property: transform;
transition-duration: 10s;
}
@-webkit-keyframes "anim" {
from { transform: translateX(200px); }
to { transform: translateX(300px); }
}
</style>
<script src="../resources/ui-helper.js"></script>
<script src="resources/animation-test-helpers.js"></script>
<script type="text/javascript">
if (window.testRunner)
testRunner.dumpAsText();
2008-12-10 Pierre-Olivier Latour <pol@apple.com> Reviewed by Darin Adler. Rewrote animations/animation-test-helpers.js to take advantage of the pauseAnimationAtTimeOnElementWithId() API when available in DRT. Updated all animations tests that check for values of animated CSS properties to use these new helper functions. https://bugs.webkit.org/show_bug.cgi?id=22796 * animations/animation-test-helpers.js: (isCloseEnough): (checkExpectedValue): (endTest): (startTest): (runAnimationTest): * animations/big-rotation-expected.txt: * animations/big-rotation.html: * animations/change-keyframes-expected.txt: * animations/change-keyframes-name-expected.txt: * animations/change-keyframes-name.html: * animations/change-keyframes.html: * animations/change-one-anim-expected.txt: * animations/change-one-anim.html: * animations/generic-from-to-expected.txt: * animations/generic-from-to.html: * animations/import-expected.txt: * animations/import.html: * animations/keyframe-timing-functions-expected.txt: * animations/keyframe-timing-functions.html: * animations/keyframes-comma-separated-expected.txt: * animations/keyframes-comma-separated.html: * animations/keyframes-expected.txt: * animations/keyframes-from-missing.html: * animations/keyframes-out-of-order-expected.txt: * animations/keyframes-out-of-order.html: * animations/keyframes-to-missing.html: * animations/keyframes.html: * animations/lineheight-animation-expected.txt: * animations/lineheight-animation.html: * animations/matrix-anim-expected.txt: * animations/matrix-anim.html: * animations/multiple-animations-expected.txt: * animations/multiple-animations.html: * animations/multiple-keyframes-expected.txt: * animations/multiple-keyframes.html: * animations/transition-and-animation-1-expected.txt: * animations/transition-and-animation-1.html: * animations/transition-and-animation-2-expected.txt: * animations/transition-and-animation-2.html: * animations/width-using-ems-expected.txt: * animations/width-using-ems.html: * platform/win/Skipped: Canonical link: https://commits.webkit.org/31391@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39187 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2008-12-11 00:48:35 +00:00
const expectedValues = [
// [animation-name, time, element-id, property, expected-value, tolerance]
[null, 0.55, "box", "transform", "none", null],
2008-12-10 Pierre-Olivier Latour <pol@apple.com> Reviewed by Darin Adler. Rewrote animations/animation-test-helpers.js to take advantage of the pauseAnimationAtTimeOnElementWithId() API when available in DRT. Updated all animations tests that check for values of animated CSS properties to use these new helper functions. https://bugs.webkit.org/show_bug.cgi?id=22796 * animations/animation-test-helpers.js: (isCloseEnough): (checkExpectedValue): (endTest): (startTest): (runAnimationTest): * animations/big-rotation-expected.txt: * animations/big-rotation.html: * animations/change-keyframes-expected.txt: * animations/change-keyframes-name-expected.txt: * animations/change-keyframes-name.html: * animations/change-keyframes.html: * animations/change-one-anim-expected.txt: * animations/change-one-anim.html: * animations/generic-from-to-expected.txt: * animations/generic-from-to.html: * animations/import-expected.txt: * animations/import.html: * animations/keyframe-timing-functions-expected.txt: * animations/keyframe-timing-functions.html: * animations/keyframes-comma-separated-expected.txt: * animations/keyframes-comma-separated.html: * animations/keyframes-expected.txt: * animations/keyframes-from-missing.html: * animations/keyframes-out-of-order-expected.txt: * animations/keyframes-out-of-order.html: * animations/keyframes-to-missing.html: * animations/keyframes.html: * animations/lineheight-animation-expected.txt: * animations/lineheight-animation.html: * animations/matrix-anim-expected.txt: * animations/matrix-anim.html: * animations/multiple-animations-expected.txt: * animations/multiple-animations.html: * animations/multiple-keyframes-expected.txt: * animations/multiple-keyframes.html: * animations/transition-and-animation-1-expected.txt: * animations/transition-and-animation-1.html: * animations/transition-and-animation-2-expected.txt: * animations/transition-and-animation-2.html: * animations/width-using-ems-expected.txt: * animations/width-using-ems.html: * platform/win/Skipped: Canonical link: https://commits.webkit.org/31391@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39187 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2008-12-11 00:48:35 +00:00
];
window.addEventListener("DOMContentLoaded", async event => {
await UIHelper.waitForEvent(document.getElementById("box"), "animationend");
await UIHelper.animationFrame();
checkExpectedValue(expectedValues, 0);
endTest();
});
</script>
</head>
<body>
This test has a transition and animation on the same property (-webkit-transform). But the transition is never triggered,
so nothing should be moving when the animation finishes.
<div id="box">
</div>
<div id="result">
</div>
</body>
</html>