Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <html> | |
|
philipj_slow
2015/10/28 15:14:01
https://www.chromium.org/blink/coding-style/layout
liberato (no reviews please)
2015/10/29 16:10:25
Done.
| |
| 2 <head> | |
| 3 <script src="../resources/run-after-layout-and-paint.js"></script> | |
| 4 <script> | |
| 5 | |
| 6 testRunner.waitUntilDone(); | |
| 7 | |
| 8 function test() { | |
| 9 | |
| 10 var video1 = document.getElementById("video1"); | |
|
philipj_slow
2015/10/28 15:14:02
You might also use document.querySelectorAll("vide
liberato (no reviews please)
2015/10/29 16:10:25
Done.
| |
| 11 var video2 = document.getElementById("video2"); | |
| 12 var video3 = document.getElementById("video3"); | |
| 13 | |
| 14 runAfterLayoutAndPaint(function() { | |
| 15 window.internals.setMediaElementNetworkState(video1, 0); | |
| 16 window.internals.setMediaElementNetworkState(video2, 0); | |
| 17 window.internals.setMediaElementNetworkState(video3, 0); | |
| 18 | |
| 19 // These will cause the play buttons to become enabled, and should | |
| 20 // also cause a repaint. | |
| 21 window.internals.setMediaElementNetworkState(video2, 2); | |
| 22 window.internals.setMediaElementNetworkState(video3, 2); | |
| 23 | |
| 24 // This will cause the play button to go back to its original state. | |
| 25 window.internals.setMediaElementNetworkState(video3, 0); | |
| 26 | |
| 27 testRunner.notifyDone(); | |
| 28 }); | |
| 29 } | |
| 30 </script> | |
| 31 </head> | |
| 32 | |
| 33 <body onload="test()"> | |
| 34 <video id="video1" controls></video> | |
| 35 <video id="video2" controls></video> | |
| 36 <video id="video3" controls></video> | |
| 37 <p>Test that network state transitions paint video controls properly.</p> | |
|
philipj_slow
2015/10/28 15:14:01
Is it not possible to write a reliable test using
liberato (no reviews please)
2015/10/29 16:10:25
not that i could find. it seems to be an actual r
| |
| 38 </body> | |
| 39 | |
| 40 </html> | |
| OLD | NEW |