Chromium Code Reviews| Index: LayoutTests/http/tests/media/video-buffering-repaints-controls.html |
| diff --git a/LayoutTests/http/tests/media/video-buffering-repaints-controls.html b/LayoutTests/http/tests/media/video-buffering-repaints-controls.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..c4f79efa28f3e214bd35d231754784f97bc4a9b9 |
| --- /dev/null |
| +++ b/LayoutTests/http/tests/media/video-buffering-repaints-controls.html |
| @@ -0,0 +1,32 @@ |
| +<html> |
| + <head> |
| + <script> |
| + var painted = false; |
| + function start() { |
| + if (window.layoutTestController) |
| + layoutTestController.waitUntilDone(); |
| + |
| + var video = document.getElementsByTagName('video')[0]; |
| + |
| + video.addEventListener('progress', function(event) { |
| + // Each progress event should correlate to a repaint. Check |
| + // by watching for a repaint between progress events. |
| + if (painted) { |
| + layoutTestController.notifyDone(); |
| + } else { |
| + layoutTestController.display(); |
| + painted = true; |
| + } |
| + }, false); |
| + |
| + // Don't actually play since we're testing via an image diff. |
| + video.src = 'http://127.0.0.1:8000/media/video-throttled-load.cgi?&name=resources/test.ogv&throttle=20&type=video/ogg' |
|
scherkus (not reviewing)
2011/11/28 22:21:19
take a look at other http/tests/media tests where
DaleCurtis
2011/11/28 23:49:40
Ah, I saw that, but misunderstood what it was doin
|
| + } |
| + </script> |
| + </head> |
| + |
| + <body onload="start();"> |
| + <p>Test that media controls repaint correctly during paused states when new data is buffered.</p> |
|
scherkus (not reviewing)
2011/11/28 22:21:19
maybe: s/during paused states/while paused/ ?
DaleCurtis
2011/11/28 23:49:40
I said paused states instead of paused because I w
|
| + <video controls preload></video><br/> |
| + </body> |
| +</html> |