Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE html> | |
| 2 <style> | |
| 3 /* restrict to just the play button, so the slider doesn't mismatch */ | |
| 4 audio { | |
| 5 width: 40px; | |
| 6 height: 40px; | |
| 7 } | |
| 8 </style> | |
| 9 <script src="../resources/run-after-layout-and-paint.js"></script> | |
| 10 <script src=media-file.js></script> | |
| 11 <script> | |
| 12 | |
| 13 testRunner.waitUntilDone(); | |
| 14 | |
| 15 function test() { | |
| 16 | |
| 17 var audios = document.querySelectorAll("audio"); | |
| 18 var src = findMediaFile("audio", "content/empty"); | |
| 19 | |
| 20 runAfterLayoutAndPaint(function() { | |
| 21 for(var i=0; i<3 ;i++) | |
|
philipj_slow
2015/10/30 10:55:37
Needs more space ("for (var i = 0; i < 3; i++)") a
liberato (no reviews please)
2015/10/30 15:09:07
with two elements, i just unrolled.
| |
| 22 window.internals.setMediaElementNetworkState(audios[i], 0); | |
| 23 | |
| 24 // These will cause the play buttons to become enabled, and should | |
| 25 // also cause a repaint. | |
| 26 for(var i=1; i<3 ;i++) | |
| 27 window.internals.setMediaElementNetworkState(audios[i], 2); | |
| 28 | |
| 29 // This will cause the play button to go back to its original state. | |
| 30 window.internals.setMediaElementNetworkState(audios[2], 0); | |
|
philipj_slow
2015/10/30 10:55:37
Given that audio 0 and 1 end up in the same state,
liberato (no reviews please)
2015/10/30 15:09:07
Done.
| |
| 31 | |
| 32 testRunner.notifyDone(); | |
| 33 }); | |
| 34 | |
| 35 } | |
| 36 </script> | |
| 37 | |
| 38 <body onload="test()"> | |
|
philipj_slow
2015/10/30 10:55:37
If you like you can omit the <body> and just put t
liberato (no reviews please)
2015/10/30 15:09:07
Done.
| |
| 39 <audio id="audio1" controls></audio> | |
|
philipj_slow
2015/10/30 10:55:37
The IDs are unused.
liberato (no reviews please)
2015/10/30 15:09:07
Done.
| |
| 40 <audio id="audio2" controls></audio> | |
| 41 <audio id="audio3" controls></audio> | |
| 42 <p>Test that network state transitions paint audio controls properly.</p> | |
| 43 </body> | |
| 44 | |
| OLD | NEW |