| OLD | NEW |
| 1 <!doctype html> | 1 <!doctype html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <title>Test simple fill mode on transform</title> | 4 <title>Test simple fill mode on transform</title> |
| 5 <style> | 5 <style> |
| 6 .box { | 6 .box { |
| 7 position: relative; | 7 position: relative; |
| 8 left: 10px; | 8 left: 10px; |
| 9 top: 10px; | 9 top: 10px; |
| 10 height: 100px; | 10 height: 100px; |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 function animationEnded(event) { | 51 function animationEnded(event) { |
| 52 if (++animsFinished == numAnims) { | 52 if (++animsFinished == numAnims) { |
| 53 setTimeout(endTest, 0); // This call to setTimeout should be ok in t
he test environment | 53 setTimeout(endTest, 0); // This call to setTimeout should be ok in t
he test environment |
| 54 // since we're just giving style a chance to
resolve. | 54 // since we're just giving style a chance to
resolve. |
| 55 } | 55 } |
| 56 }; | 56 }; |
| 57 | 57 |
| 58 function endTest() { | 58 function endTest() { |
| 59 | 59 |
| 60 for (var i = 0; i < expectedValues.length; i++) { | 60 for (var i = 0; i < expectedValues.length; i++) { |
| 61 var realValue = getPropertyValue("webkitTransform.4", expectedValues
[i].id); | 61 var realValue = getPropertyValue("transform", expectedValues[i].id); |
| 62 var expectedValue = expectedValues[i].end; | 62 var expectedValue = expectedValues[i].end; |
| 63 if (comparePropertyValue("webkitTransform.4", realValue, expectedVal
ue, allowance)) | 63 if (comparePropertyValue(realValue, expectedValue, allowance, 4)) |
| 64 result += "PASS"; | 64 result += "PASS"; |
| 65 else | 65 else |
| 66 result += "FAIL"; | 66 result += "FAIL"; |
| 67 result += " - end of animation - id: " + expectedValues[i].id + " ex
pected: " + expectedValue + " actual: " + realValue + "<br>"; | 67 result += " - end of animation - id: " + expectedValues[i].id + " ex
pected: " + expectedValue + " actual: " + realValue + "<br>"; |
| 68 } | 68 } |
| 69 document.getElementById('result').innerHTML = result; | 69 document.getElementById('result').innerHTML = result; |
| 70 | 70 |
| 71 if (window.testRunner) | 71 if (window.testRunner) |
| 72 testRunner.notifyDone(); | 72 testRunner.notifyDone(); |
| 73 } | 73 } |
| 74 | 74 |
| 75 window.onload = function () { | 75 window.onload = function () { |
| 76 for (var i = 0; i < expectedValues.length; i++) { | 76 for (var i = 0; i < expectedValues.length; i++) { |
| 77 var realValue = getPropertyValue("webkitTransform.4", expectedValues[i
].id); | 77 var realValue = getPropertyValue("transform", expectedValues[i].id); |
| 78 var expectedValue = expectedValues[i].start; | 78 var expectedValue = expectedValues[i].start; |
| 79 if (comparePropertyValue("webkitTransform.4", realValue, expectedValue
, allowance)) | 79 if (comparePropertyValue(realValue, expectedValue, allowance, 4)) |
| 80 result += "PASS"; | 80 result += "PASS"; |
| 81 else | 81 else |
| 82 result += "FAIL"; | 82 result += "FAIL"; |
| 83 result += " - start of animation - id: " + expectedValues[i].id + " ex
pected: " + expectedValue + " actual: " + realValue + "<br>"; | 83 result += " - start of animation - id: " + expectedValues[i].id + " ex
pected: " + expectedValue + " actual: " + realValue + "<br>"; |
| 84 } | 84 } |
| 85 document.addEventListener("webkitAnimationEnd", animationEnded, false); | 85 document.addEventListener("webkitAnimationEnd", animationEnded, false); |
| 86 }; | 86 }; |
| 87 | 87 |
| 88 </script> | 88 </script> |
| 89 </head> | 89 </head> |
| 90 <body> | 90 <body> |
| 91 This test performs an animation of the transform property with different | 91 This test performs an animation of the transform property with different |
| 92 fill modes. It animates over 0.1 second with a 0.1 second delay. | 92 fill modes. It animates over 0.1 second with a 0.1 second delay. |
| 93 It takes snapshots at document load and the end of the animations. | 93 It takes snapshots at document load and the end of the animations. |
| 94 <div id="a" class="box"> | 94 <div id="a" class="box"> |
| 95 Both Iterate - Reverse | 95 Both Iterate - Reverse |
| 96 </div> | 96 </div> |
| 97 <div id="b" class="box"> | 97 <div id="b" class="box"> |
| 98 Both Iterate - Alternate Reverse | 98 Both Iterate - Alternate Reverse |
| 99 </div> | 99 </div> |
| 100 <div id="result"> | 100 <div id="result"> |
| 101 </div> | 101 </div> |
| 102 </body> | 102 </body> |
| 103 </html> | 103 </html> |
| OLD | NEW |