Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(348)

Unified Diff: LayoutTests/http/tests/media/video-buffering-repaints-controls.html

Issue 8496044: Repaint video controls when buffering during pause. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Added layout test. Fixed nits. Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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>

Powered by Google App Engine
This is Rietveld 408576698