Title: [126395] trunk/LayoutTests
Revision
126395
Author
[email protected]
Date
2012-08-22 23:29:36 -0700 (Wed, 22 Aug 2012)

Log Message

[GTK] media/video-duration-known-after-eos.html and media/media-element-play-after-eos.html are flaky
https://bugs.webkit.org/show_bug.cgi?id=83790

Reviewed by Eric Seidel.

Refactor the tests to wait the loadedmetadata event before
starting playback and attempting any access to the duration
attribute. This is an attempt to eliminate flakyness of the tests.

* media/media-element-play-after-eos-expected.txt:
* media/media-element-play-after-eos.html:
* media/video-duration-known-after-eos.html:
* platform/gtk/TestExpectations:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (126394 => 126395)


--- trunk/LayoutTests/ChangeLog	2012-08-23 06:10:48 UTC (rev 126394)
+++ trunk/LayoutTests/ChangeLog	2012-08-23 06:29:36 UTC (rev 126395)
@@ -1,3 +1,19 @@
+2012-08-23  Philippe Normand  <[email protected]>
+
+        [GTK] media/video-duration-known-after-eos.html and media/media-element-play-after-eos.html are flaky
+        https://bugs.webkit.org/show_bug.cgi?id=83790
+
+        Reviewed by Eric Seidel.
+
+        Refactor the tests to wait the loadedmetadata event before
+        starting playback and attempting any access to the duration
+        attribute. This is an attempt to eliminate flakyness of the tests.
+
+        * media/media-element-play-after-eos-expected.txt:
+        * media/media-element-play-after-eos.html:
+        * media/video-duration-known-after-eos.html:
+        * platform/gtk/TestExpectations:
+
 2012-08-22  Hajime Morrita  <[email protected]>
 
         Unreviewed Chromium gardeing.

Modified: trunk/LayoutTests/media/media-element-play-after-eos-expected.txt (126394 => 126395)


--- trunk/LayoutTests/media/media-element-play-after-eos-expected.txt	2012-08-23 06:10:48 UTC (rev 126394)
+++ trunk/LayoutTests/media/media-element-play-after-eos-expected.txt	2012-08-23 06:29:36 UTC (rev 126395)
@@ -1,5 +1,6 @@
 This tests ensure that media element emits the 'playing' event every time it starts playing after eos. It also ensure that 'pause' and 'ended' events are sent when media playback ends.
 
+EVENT(loadedmetadata)
 RUN(mediaElement.play())
 EVENT(playing)
 EVENT(pause)

Modified: trunk/LayoutTests/media/media-element-play-after-eos.html (126394 => 126395)


--- trunk/LayoutTests/media/media-element-play-after-eos.html	2012-08-23 06:10:48 UTC (rev 126394)
+++ trunk/LayoutTests/media/media-element-play-after-eos.html	2012-08-23 06:29:36 UTC (rev 126395)
@@ -9,10 +9,15 @@
 
             function start()
             {
+                mediaElement.src = "" 'content/silence');
+                waitForEvent("loadedmetadata", mediaLoadedMetadata);
+            }
+
+            function mediaLoadedMetadata()
+            {
                 waitForEvent("playing", mediaPlaying);
                 waitForEvent("pause", mediaPause);
                 waitForEvent("ended", mediaEnded);
-                mediaElement.src = "" 'content/silence');
                 run("mediaElement.play()");
             }
 

Modified: trunk/LayoutTests/media/video-duration-known-after-eos.html (126394 => 126395)


--- trunk/LayoutTests/media/video-duration-known-after-eos.html	2012-08-23 06:10:48 UTC (rev 126394)
+++ trunk/LayoutTests/media/video-duration-known-after-eos.html	2012-08-23 06:29:36 UTC (rev 126395)
@@ -19,24 +19,28 @@
                 run("video.currentTime = video.duration - 0.2");
             }
 
+            function loadedmetadata()
+            {
+                video.addEventListener("ended", ended);
+                video.addEventListener("playing", playing);
+
+                run("video.play()");
+            }
+
             function start()
             {
                 findMediaElement();
 
-                video.addEventListener("ended", ended);
-                video.addEventListener("playing", playing);
-
+                video.addEventListener("loadedmetadata", loadedmetadata);
                 video.src = "" "content/test");
                 consoleWrite("");
-                run("video.play()");
             }
 
         </script>
     </head>
-    <body>
+    <body _onload_="start()">
         <video controls autobuffer></video>
         <p>Tests that duration is known after playback ended.</p>
-        <script>start()</script>
     </body>
 </html>
 

Modified: trunk/LayoutTests/platform/gtk/TestExpectations (126394 => 126395)


--- trunk/LayoutTests/platform/gtk/TestExpectations	2012-08-23 06:10:48 UTC (rev 126394)
+++ trunk/LayoutTests/platform/gtk/TestExpectations	2012-08-23 06:29:36 UTC (rev 126395)
@@ -524,8 +524,6 @@
 
 BUGWK80158 : plugins/netscape-plugin-page-cache-works.html = PASS TEXT
 
-BUGWK83790 : media/video-duration-known-after-eos.html = PASS TEXT
-BUGWK83790 : media/media-element-play-after-eos.html = PASS TEXT
 BUGWK83704 : media/event-attributes.html = PASS TEXT
 BUGWK89811 : media/media-blocked-by-beforeload.html = PASS TEXT
 BUGWK84856 : media/media-controller-playback.html = PASS TEXT
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to