Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 | 2 |
| 3 <html> | 3 <html> |
| 4 <head> | 4 <head> |
| 5 <style> | 5 <style> |
| 6 #container { | 6 #container { |
| 7 position: relative; | 7 position: relative; |
| 8 width: 400px; | 8 width: 400px; |
| 9 height: 100px; | 9 height: 100px; |
| 10 border: 1px solid black; | 10 border: 1px solid black; |
| (...skipping 11 matching lines...) Expand all Loading... | |
| 22 <script> | 22 <script> |
| 23 if (window.testRunner) { | 23 if (window.testRunner) { |
| 24 testRunner.dumpAsText(); | 24 testRunner.dumpAsText(); |
| 25 testRunner.waitUntilDone(); | 25 testRunner.waitUntilDone(); |
| 26 } | 26 } |
| 27 | 27 |
| 28 function startTransition() | 28 function startTransition() |
| 29 { | 29 { |
| 30 var box = document.getElementById('box'); | 30 var box = document.getElementById('box'); |
| 31 box.style.left = '300px'; | 31 box.style.left = '300px'; |
| 32 box.style.opacity = 0.5; | |
| 33 window.setTimeout(function() { | 32 window.setTimeout(function() { |
|
dstockwell
2013/12/16 09:54:08
Do we need the setTimeout?
Can this be something
Eric Willigers
2013/12/16 23:26:50
We didn't need the first setTimeout for interrupti
dstockwell
2013/12/17 00:15:31
Yeah, what I had is clearly wrong. Since we don't
| |
| 34 box.style.left = '0px'; | 33 box.style.left = '0px'; |
| 35 | 34 |
| 36 window.setTimeout(function() { | 35 window.setTimeout(function() { |
| 37 var boxPos = parseInt(window.getComputedStyle(box).left); | 36 var boxPos = parseInt(window.getComputedStyle(box).left); |
| 38 document.getElementById('result').innerHTML = (boxPos < 200) ? "PASS" : "FAIL"; | 37 document.getElementById('result').innerHTML = (boxPos < 50) ? "PASS" : "FAIL"; |
| 39 if (window.testRunner) | 38 if (window.testRunner) |
| 40 testRunner.notifyDone(); | 39 testRunner.notifyDone(); |
| 41 }, 250); | 40 }, 250); |
| 42 }, 500); | 41 }, 1); |
| 43 } | 42 } |
| 44 window.addEventListener('load', startTransition, false) | 43 window.addEventListener('load', startTransition, false) |
| 45 </script> | 44 </script> |
| 46 </head> | 45 </head> |
| 47 <body> | 46 <body> |
| 48 | 47 |
| 49 <p>Box should start moving left after left style is reset after 500ms</p> | 48 <p>Box should stay left as style is reset after 1ms</p> |
| 50 <div id="container"> | 49 <div id="container"> |
| 51 <div id="box"> | 50 <div id="box"> |
| 52 </div> | 51 </div> |
| 53 </div> | 52 </div> |
| 54 <div id="result"> | 53 <div id="result"> |
| 55 </div> | 54 </div> |
| 56 </body> | 55 </body> |
| 57 </html> | 56 </html> |
| OLD | NEW |