2011-02-23 Anna Cavender <annacc@chromium.org>
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 23 Feb 2011 08:27:39 +0000 (08:27 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 23 Feb 2011 08:27:39 +0000 (08:27 +0000)
        Reviewed by Mihai Parparita.

        Avoid flakiness due to async drawing of control glyphs by acting on "canplaythrough" instead of "playing".
        https://bugs.webkit.org/show_bug.cgi?id=54640

        * media/video-display-toggle.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@79415 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/media/video-display-toggle.html

index 3d052fc..0cf346e 100644 (file)
@@ -1,3 +1,12 @@
+2011-02-23  Anna Cavender  <annacc@chromium.org>
+
+        Reviewed by Mihai Parparita.
+
+        Avoid flakiness due to async drawing of control glyphs by acting on "canplaythrough" instead of "playing".
+        https://bugs.webkit.org/show_bug.cgi?id=54640
+
+        * media/video-display-toggle.html:
+
 2011-02-22  Csaba OsztrogonĂ¡c  <ossy@webkit.org>
 
         Unreviewed.
index 289b216..2a995d6 100644 (file)
@@ -7,11 +7,10 @@
                 var video = document.getElementById('vid');
                 if (video.style.display == "none") {
                     video.style.display = "inline-block";
-                    if (window.layoutTestController)
-                        layoutTestController.notifyDone();
+                    video.addEventListener("seeked", done);
+                    video.currentTime = 0; // so the snapshot always has the same frame
                 } else
                     video.style.display = "none";
-                document.body.offsetLeft;
             }
             function test()
             {
                     layoutTestController.waitUntilDone();
                 setSrcById('vid', findMediaFile('video', 'content/test'));
                 var video = document.getElementById('vid');
+                video.addEventListener("canplaythrough", test2);
                 video.load();
-                video.play();
-                video.addEventListener("playing", test2);
             }
             function test2()
             {
                 toggleDisplay();
                 toggleDisplay();
             }
+            function done()
+            {
+                if (window.layoutTestController)
+                    layoutTestController.notifyDone();
+            }
         </script>
     </head>
     <body onload="test()">