OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <style> | 3 <style> |
4 #box { | 4 #box { |
5 position: absolute; | 5 position: absolute; |
6 left: 100px; | 6 left: 100px; |
7 top: 100px; | 7 top: 100px; |
8 height: 100px; | 8 height: 100px; |
9 width: 100px; | 9 width: 100px; |
10 background-color: red; | 10 background-color: red; |
(...skipping 16 matching lines...) Expand all Loading... |
27 <script src="resources/animation-test-helpers.js" type="text/javascript" chars
et="utf-8"></script> | 27 <script src="resources/animation-test-helpers.js" type="text/javascript" chars
et="utf-8"></script> |
28 <script type="text/javascript" charset="utf-8"> | 28 <script type="text/javascript" charset="utf-8"> |
29 // This test was flaky because it would start before the images were loaded. | 29 // This test was flaky because it would start before the images were loaded. |
30 var imagesLoaded = 0; | 30 var imagesLoaded = 0; |
31 function imageLoaded() { | 31 function imageLoaded() { |
32 ++imagesLoaded; | 32 ++imagesLoaded; |
33 if (imagesLoaded == 2) { | 33 if (imagesLoaded == 2) { |
34 const expectedValues = [ | 34 const expectedValues = [ |
35 // [time, element-id, property, expected-value, tolerance] | 35 // [time, element-id, property, expected-value, tolerance] |
36 [2.25, "box", "webkitMaskImage", 0.25, 0.05], | 36 [2.25, "box", "webkitMaskImage", 0.25, 0.05], |
37 [2.25, ["box", "static:boxStatic"], "webkitMaskImage", 0.25, 0.05] | 37 [2.25, ["box", "boxStatic"], "webkitMaskImage", 0.25, 0.05] |
38 ]; | 38 ]; |
39 | 39 |
40 var doPixelTest = true; | 40 var doPixelTest = true; |
41 var disablePauseAPI = false; | 41 var disablePauseAPI = false; |
42 var startTestImmediately = true; | 42 var startTestImmediately = true; |
43 runAnimationTest(expectedValues, null, undefined, disablePauseAPI, doPixel
Test, startTestImmediately); | 43 runAnimationTest(expectedValues, null, undefined, disablePauseAPI, doPixel
Test, startTestImmediately); |
44 } | 44 } |
45 } | 45 } |
46 </script> | 46 </script> |
47 </head> | 47 </head> |
48 <body> | 48 <body> |
49 <img id="box" src="resources/green-100.png" onLoad="imageLoaded()";/> | 49 <img id="box" src="resources/green-100.png" onLoad="imageLoaded()";/> |
50 <img id="boxStatic" src="resources/stripes-100.png" onLoad="imageLoaded();"/> | 50 <img id="boxStatic" src="resources/stripes-100.png" onLoad="imageLoaded();"/> |
51 <div id="result"></div> | 51 <div id="result"></div> |
52 </body> | 52 </body> |
53 </html> | 53 </html> |
OLD | NEW |