OLD | NEW |
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" | 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" |
2 "http://www.w3.org/TR/html4/loose.dtd"> | 2 "http://www.w3.org/TR/html4/loose.dtd"> |
3 | 3 |
4 <html lang="en"> | 4 <html lang="en"> |
5 <head> | 5 <head> |
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | 6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
7 <title>Test end values with fill modes after animation is removed</title> | 7 <title>Test end values with fill modes after animation is removed</title> |
8 <style type="text/css" media="screen"> | 8 <style type="text/css" media="screen"> |
9 .box { | 9 .box { |
10 position: relative; | 10 position: relative; |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 // since we're just giving style a chance to
resolve | 60 // since we're just giving style a chance to
resolve |
61 } | 61 } |
62 }; | 62 }; |
63 | 63 |
64 function endTest() { | 64 function endTest() { |
65 | 65 |
66 var result = ""; | 66 var result = ""; |
67 for (var i=0; i < expectedEndValues.length; i++) { | 67 for (var i=0; i < expectedEndValues.length; i++) { |
68 var el = document.getElementById(expectedEndValues[i].id); | 68 var el = document.getElementById(expectedEndValues[i].id); |
69 var expectedValue = expectedEndValues[i].value; | 69 var expectedValue = expectedEndValues[i].value; |
70 var realValue = window.getComputedStyle(el).getPropertyCSSValue("lef
t").getFloatValue(CSSPrimitiveValue.CSS_NUMBER); | 70 var realValue = parseFloat(window.getComputedStyle(el).left); |
71 if (Math.abs(expectedValue - realValue) < 5) { | 71 if (Math.abs(expectedValue - realValue) < 5) { |
72 result += "PASS"; | 72 result += "PASS"; |
73 } else { | 73 } else { |
74 result += "FAIL"; | 74 result += "FAIL"; |
75 } | 75 } |
76 result += " - id: " + expectedEndValues[i].id + " expected: " + expe
ctedValue + " actual: " + realValue + "<br>"; | 76 result += " - id: " + expectedEndValues[i].id + " expected: " + expe
ctedValue + " actual: " + realValue + "<br>"; |
77 } | 77 } |
78 document.getElementById('result').innerHTML = result; | 78 document.getElementById('result').innerHTML = result; |
79 | 79 |
80 if (window.testRunner) | 80 if (window.testRunner) |
(...skipping 20 matching lines...) Expand all Loading... |
101 <div id="c" class="box"> | 101 <div id="c" class="box"> |
102 Forwards | 102 Forwards |
103 </div> | 103 </div> |
104 <div id="d" class="box"> | 104 <div id="d" class="box"> |
105 Both | 105 Both |
106 </div> | 106 </div> |
107 <div id="result"> | 107 <div id="result"> |
108 </div> | 108 </div> |
109 </body> | 109 </body> |
110 </html> | 110 </html> |
OLD | NEW |