mirror of
https://github.com/servo/servo.git
synced 2025-06-26 01:54:33 +01:00
111 lines
No EOL
5.4 KiB
HTML
111 lines
No EOL
5.4 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<title>CSS3 Animations: To verify if " animationiteration " event occurs at the end of each iteration of an animation for which animation-iteration-count is greater than one.</title>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
<meta http-equiv="Content-Style-Type" content="text/css" />
|
|
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
|
<link rel="author" title="Nokia Inc." href="http://www.nokia.com/" />
|
|
<link rel="help" href="http://www.w3.org/TR/css3-animations/#animation-name-property" />
|
|
<link rel="help" href="http://www.w3.org/TR/css3-animations/#animation-duration-property" />
|
|
<link rel="help" href="http://www.w3.org/TR/css3-animations/#animation-iteration-count-property" />
|
|
<link rel="help" href="http://www.w3.org/TR/css3-animations/#animation-events" />
|
|
<meta name="flags" content="animated" />
|
|
<meta name="assert" content="To verify if " animationiteration " event occurs at the end of each iteration of an animation for which animation-iteration-count is greater than one." />
|
|
<style type="text/css" media="screen">
|
|
/* <![CDATA[ */
|
|
@-webkit-keyframes sample {
|
|
from {
|
|
left: 150px;
|
|
}
|
|
to {
|
|
left: 0px;
|
|
}
|
|
|
|
}
|
|
|
|
@-moz-keyframes sample {
|
|
from {
|
|
left: 150px;
|
|
}
|
|
to {
|
|
left: 0px;
|
|
}
|
|
|
|
}
|
|
|
|
@keyframes sample {
|
|
from {
|
|
left: 150px;
|
|
}
|
|
to {
|
|
left: 0px;
|
|
}
|
|
}
|
|
.abc {
|
|
background-color: blue;
|
|
/*Added extra style information --- BEGIN modification*/
|
|
color: Yellow;
|
|
font-weight: bolder;
|
|
font-size: xx-large;
|
|
text-align: center;
|
|
vertical-align: middle;
|
|
/*Added extra style information --- END modification*/
|
|
width: 100px;
|
|
height: 100px;
|
|
padding: 0.2em 1em;
|
|
margin: 1em;
|
|
position: relative;
|
|
|
|
-webkit-animation-name: sample;
|
|
-webkit-animation-duration: 10s;
|
|
-webkit-animation-iteration-count: 2;
|
|
|
|
-moz-animation-name: sample;
|
|
-moz-animation-duration: 10s;
|
|
-moz-animation-iteration-count: 2;
|
|
|
|
animation-name: sample;
|
|
animation-duration: 10s;
|
|
animation-iteration-count: 2;
|
|
}
|
|
/* ]]> */
|
|
</style>
|
|
<script type="text/javascript">
|
|
/* <![CDATA[ */
|
|
var box_var;
|
|
function init()
|
|
{
|
|
getvalues();
|
|
}
|
|
function getvalues()
|
|
{
|
|
box_var = document.getElementById("box" );
|
|
box_var.addEventListener("webkitAnimationIteration" , start_f, true);
|
|
box_var.addEventListener("animationiteration" , start_f, true);
|
|
}
|
|
function start_f()
|
|
{
|
|
/*This line of code has been commented to avoid automated result evaluation.
|
|
//document.getElementById(" result" ).innerHTML = "TRUE";
|
|
*/
|
|
box_var.innerHTML = "2";
|
|
}
|
|
/* ]]> */
|
|
</script>
|
|
</head>
|
|
<body onload="init()">
|
|
<p id="testdetails">
|
|
<p>
|
|
Assertion: To verify if " animationiteration " event occurs at the end of each iteration of an animation for which animation-iteration-count is greater than one.
|
|
</p>
|
|
<ul>
|
|
<li>PASS if the box moves from Right to Left for a period of 10 seconds. It should contain a digit 1 for first animation. Content of box changes to 2 during second animation. Also the animation should stop after 2 cycles. </li>
|
|
<li>FAIL if the output is not as expected. </li>
|
|
</ul>
|
|
</p>
|
|
<div class="abc" id="box">
|
|
1
|
|
</div>
|
|
</body>
|
|
</html> |