| 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 <style type="text/css" media="screen"> | 6 <style type="text/css" media="screen"> |
| 7 #box { | 7 #box { |
| 8 display: inline-block; | 8 display: inline-block; |
| 9 width: 100px; | 9 width: 100px; |
| 10 height: 100px; | 10 height: 100px; |
| 11 margin: 10px; | 11 margin: 10px; |
| 12 background-color: blue; | 12 background-color: blue; |
| 13 opacity: 0; | 13 opacity: 0; |
| 14 -webkit-transition: opacity 1s linear; | 14 -webkit-transition: opacity 1s linear; |
| 15 } | 15 } |
| 16 | 16 |
| 17 #box.faded { | 17 #box.faded { |
| 18 opacity: 1; | 18 opacity: 1; |
| 19 } | 19 } |
| 20 </style> | 20 </style> |
| 21 | 21 |
| 22 <script src="../resources/transition-test-helpers.js" type="text/javascript"
charset="utf-8"></script> | 22 <script src="../../animations/resources/animation-test-helpers.js" type="tex
t/javascript" charset="utf-8"></script> |
| 23 <script type="text/javascript" charset="utf-8"> | 23 <script type="text/javascript" charset="utf-8"> |
| 24 | 24 |
| 25 const expectedValues = [ | 25 const expectedValues = [ |
| 26 // [time, element-id, property, expected-value, tolerance] | 26 // [time, element-id, property, expected-value, tolerance] |
| 27 [0.5, 'box', 'opacity', 0.5, 0.1], | 27 [0.5, 'box', 'opacity', 0.5, 0.1], |
| 28 ]; | 28 ]; |
| 29 | 29 |
| 30 function setupTest() | 30 function setupTest() |
| 31 { | 31 { |
| 32 document.getElementById('box').className = 'faded'; | 32 document.getElementById('box').className = 'faded'; |
| 33 } | 33 } |
| 34 | 34 |
| 35 runTransitionTest(expectedValues, setupTest, usePauseAPI); | 35 runTransitionTest(expectedValues, setupTest, usePauseAPI); |
| 36 </script> | 36 </script> |
| 37 </head> | 37 </head> |
| 38 <body> | 38 <body> |
| 39 <div id="box"></div> | 39 <div id="box"></div> |
| 40 <div id="result"></div> | 40 <div id="result"></div> |
| 41 </body> | 41 </body> |
| 42 </html> | 42 </html> |
| OLD | NEW |