4 if (window.testRunner) {
5 testRunner.dumpAsText();
6 testRunner.waitUntilDone();
9 function animationEnded() {
10 var result = document.getElementById("result");
11 var square = document.getElementById('square');
12 var opacity = document.defaultView.getComputedStyle(square, null).getPropertyValue('opacity');
15 result.innerHTML = "PASS - Test working";
17 result.innerHTML = "FAIL - A opacity value must be 0.5";
21 testRunner.notifyDone();
34 background-color: blue;
36 -webkit-animation-name: pop;
37 -webkit-animation-duration: 1s;
38 -webkit-animation-fill-mode: forwards;
40 @-webkit-keyframes pop {
41 0% { -webkit-transform: scale(0.05); opacity: 0; }
42 33% { -webkit-transform: scale(1.00); opacity: 1; }
43 66% { -webkit-transform: scale(1.66); opacity: 1; }
44 100% { -webkit-transform: scale(0.95); opacity: 0.5; }
50 <div id="square" onwebkitanimationend="animationEnded();"></div>
51 <div id="result"></div>