Title: [251009] trunk/LayoutTests
Revision
251009
Author
commit-qu...@webkit.org
Date
2019-10-11 08:20:53 -0700 (Fri, 11 Oct 2019)

Log Message

Layout Test media/W3C/audio/events/event_progress.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=181966

Patch by Peng Liu <peng.l...@apple.com> on 2019-10-11
Reviewed by Eric Carlson.

It is possible that video/audio elements fire "progress" event again
when the event handler is still processing the previous "progress" event.
We need to ignore all the events except the first one to make sure
the test cases generate consistent output.

In addition, this patch fixes some errors in JS file names and function parameters.

* http/tests/resources/js-test-pre.js:
(isSuccessfullyParsed):
* media/W3C/audio/events/event_order_loadstart_progress.html:
* media/W3C/audio/events/event_progress.html:
* media/W3C/audio/events/event_progress_manual.html:
* media/W3C/video/events/event_order_loadstart_progress.html:
* media/W3C/video/events/event_progress.html:
* media/W3C/video/events/event_progress_manual.html:
* media/W3C/w3cwrapper.js:
* platform/ios/TestExpectations:
* platform/mac/TestExpectations:
* resources/js-test-pre.js:
(isSuccessfullyParsed):

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (251008 => 251009)


--- trunk/LayoutTests/ChangeLog	2019-10-11 14:30:20 UTC (rev 251008)
+++ trunk/LayoutTests/ChangeLog	2019-10-11 15:20:53 UTC (rev 251009)
@@ -1,3 +1,31 @@
+2019-10-11  Peng Liu  <peng.l...@apple.com>
+
+        Layout Test media/W3C/audio/events/event_progress.html is flaky
+        https://bugs.webkit.org/show_bug.cgi?id=181966
+
+        Reviewed by Eric Carlson.
+
+        It is possible that video/audio elements fire "progress" event again
+        when the event handler is still processing the previous "progress" event.
+        We need to ignore all the events except the first one to make sure
+        the test cases generate consistent output.
+
+        In addition, this patch fixes some errors in JS file names and function parameters.
+
+        * http/tests/resources/js-test-pre.js:
+        (isSuccessfullyParsed):
+        * media/W3C/audio/events/event_order_loadstart_progress.html:
+        * media/W3C/audio/events/event_progress.html:
+        * media/W3C/audio/events/event_progress_manual.html:
+        * media/W3C/video/events/event_order_loadstart_progress.html:
+        * media/W3C/video/events/event_progress.html:
+        * media/W3C/video/events/event_progress_manual.html:
+        * media/W3C/w3cwrapper.js:
+        * platform/ios/TestExpectations:
+        * platform/mac/TestExpectations:
+        * resources/js-test-pre.js:
+        (isSuccessfullyParsed):
+
 2019-10-11  Bjorn Melinder  <bjo...@spotify.com>
 
         OfflineAudioContext does not validate allocation of destination buffer

Modified: trunk/LayoutTests/media/W3C/audio/events/event_order_loadstart_progress.html (251008 => 251009)


--- trunk/LayoutTests/media/W3C/audio/events/event_order_loadstart_progress.html	2019-10-11 14:30:20 UTC (rev 251008)
+++ trunk/LayoutTests/media/W3C/audio/events/event_order_loadstart_progress.html	2019-10-11 15:20:53 UTC (rev 251009)
@@ -3,7 +3,6 @@
  <head>
   <title>video events - loadstart, then progress</title>
   <script src=""
-  <script src=""
  </head>
  <body>
   <p><a href="" reference</a></p>
@@ -17,7 +16,12 @@
 a.addEventListener("loadstart", function() {
   found_loadstart = true;
 });
+
+var firstProgressEvent = true;
 a.addEventListener("progress", function() {
+  if (!firstProgressEvent) return;
+  firstProgressEvent = false;
+
   t.step(function() {
    assert_true(found_loadstart);
   });
@@ -24,7 +28,7 @@
   t.done();
   a.pause();
 });
-a.src = "" + "?" + new Date() + Math.random();
+a.src = ""
   </script>
  </body>
 </html>

Modified: trunk/LayoutTests/media/W3C/audio/events/event_progress.html (251008 => 251009)


--- trunk/LayoutTests/media/W3C/audio/events/event_progress.html	2019-10-11 14:30:20 UTC (rev 251008)
+++ trunk/LayoutTests/media/W3C/audio/events/event_progress.html	2019-10-11 15:20:53 UTC (rev 251009)
@@ -3,7 +3,6 @@
  <head>
   <title>video events - progress</title>
   <script src=""
-  <script src=""
  </head>
  <body>
   <p><a href="" reference</a></p>
@@ -13,7 +12,11 @@
   <script>
 var t = async_test("setting src attribute on autoplay video should trigger progress event", {timeout:30000});
 var a = document.getElementById("a");
+var firstProgressEvent = true;
+
 a.addEventListener("progress", function() {
+  if (!firstProgressEvent) return;
+  firstProgressEvent = false;
   t.step(function() {
    assert_true(true);
   });
@@ -20,7 +23,7 @@
   t.done();
   a.pause();
 });
-a.src = "" + "?" + new Date() + Math.random();
+a.src = ""
   </script>
  </body>
 </html>

Modified: trunk/LayoutTests/media/W3C/audio/events/event_progress_manual.html (251008 => 251009)


--- trunk/LayoutTests/media/W3C/audio/events/event_progress_manual.html	2019-10-11 14:30:20 UTC (rev 251008)
+++ trunk/LayoutTests/media/W3C/audio/events/event_progress_manual.html	2019-10-11 15:20:53 UTC (rev 251009)
@@ -3,7 +3,6 @@
  <head>
   <title>video events - progress</title>
   <script src=""
-  <script src=""
  </head>
  <body>
   <p><a href="" reference</a></p>
@@ -13,13 +12,18 @@
   <script>
 var t = async_test("setting src attribute on non-autoplay video should trigger progress event", {timeout:30000});
 var a = document.getElementById("a");
+
+var firstProgressEvent = true;
 a.addEventListener("progress", function() {
+  if (!firstProgressEvent) return;
+  firstProgressEvent = false;
+
   t.step(function() {
    assert_true(true);
   });
   t.done();
 });
-a.src = "" + "?" + new Date() + Math.random();
+a.src = ""
   </script>
  </body>
 </html>

Modified: trunk/LayoutTests/media/W3C/video/events/event_order_loadstart_progress.html (251008 => 251009)


--- trunk/LayoutTests/media/W3C/video/events/event_order_loadstart_progress.html	2019-10-11 14:30:20 UTC (rev 251008)
+++ trunk/LayoutTests/media/W3C/video/events/event_order_loadstart_progress.html	2019-10-11 15:20:53 UTC (rev 251009)
@@ -16,7 +16,11 @@
 v.addEventListener("loadstart", function() {
   found_loadstart = true;
 });
+
+var firstProgressEvent = true;
 v.addEventListener("progress", function() {
+  if (!firstProgressEvent) return;
+  firstProgressEvent = false;
   t.step(function() {
    assert_true(found_loadstart);
   });
@@ -23,7 +27,7 @@
   t.done();
   v.pause();
 });
-v.src = "" + "?" + new Date() + Math.random();
+v.src = ""
   </script>
  </body>
 </html>

Modified: trunk/LayoutTests/media/W3C/video/events/event_progress.html (251008 => 251009)


--- trunk/LayoutTests/media/W3C/video/events/event_progress.html	2019-10-11 14:30:20 UTC (rev 251008)
+++ trunk/LayoutTests/media/W3C/video/events/event_progress.html	2019-10-11 15:20:53 UTC (rev 251009)
@@ -12,7 +12,12 @@
   <script>
 var t = async_test("setting src attribute on autoplay video should trigger progress event", {timeout:30000});
 var v = document.getElementById("v");
+
+var firstProgressEvent = true;
 v.addEventListener("progress", function() {
+  if (!firstProgressEvent) return;
+  firstProgressEvent = false;
+
   t.step(function() {
    assert_true(true);
   });
@@ -19,7 +24,7 @@
   t.done();
   v.pause();
 });
-v.src = "" + "?" + new Date() + Math.random();
+v.src = ""
   </script>
  </body>
 </html>

Modified: trunk/LayoutTests/media/W3C/video/events/event_progress_manual.html (251008 => 251009)


--- trunk/LayoutTests/media/W3C/video/events/event_progress_manual.html	2019-10-11 14:30:20 UTC (rev 251008)
+++ trunk/LayoutTests/media/W3C/video/events/event_progress_manual.html	2019-10-11 15:20:53 UTC (rev 251009)
@@ -12,13 +12,18 @@
   <script>
 var t = async_test("setting src attribute on non-autoplay video should trigger progress event", {timeout:30000});
 var v = document.getElementById("v");
+
+var firstProgressEvent = true;
 v.addEventListener("progress", function() {
+  if (!firstProgressEvent) return;
+  firstProgressEvent = false;
+
   t.step(function() {
    assert_true(true);
   });
   t.done();
 });
-v.src = "" + "?" + new Date() + Math.random();
+v.src = ""
   </script>
  </body>
 </html>

Modified: trunk/LayoutTests/media/W3C/w3cwrapper.js (251008 => 251009)


--- trunk/LayoutTests/media/W3C/w3cwrapper.js	2019-10-11 14:30:20 UTC (rev 251008)
+++ trunk/LayoutTests/media/W3C/w3cwrapper.js	2019-10-11 15:20:53 UTC (rev 251009)
@@ -53,7 +53,6 @@
 
 document.write("<p id=description></p><div id=console></div>");
 document.write("<scr" + "ipt src=''></" + "script>");
-document.write("<scr" + "ipt src=''></" + "script>");
 
 assert_equals = function(a, b) { shouldBe('"' + a + '"', '"' + b + '"'); }
 assert_true = function(a) { shouldBeTrue("" + a); }

Modified: trunk/LayoutTests/platform/ios/TestExpectations (251008 => 251009)


--- trunk/LayoutTests/platform/ios/TestExpectations	2019-10-11 14:30:20 UTC (rev 251008)
+++ trunk/LayoutTests/platform/ios/TestExpectations	2019-10-11 15:20:53 UTC (rev 251009)
@@ -3225,8 +3225,6 @@
 
 webkit.org/b/197473 imported/w3c/web-platform-tests/resource-timing/resource-timing-level1.sub.html [ Pass Failure ]
 
-webkit.org/b/175678 media/W3C/video/events/event_progress.html [ Pass Failure ]
-
 # These tests depend on the implementation of "modern compatibility mode" in WebKitAdditions.
 platform/ipad/fast/css/webkit-overflow-scrolling-parsing-modern-compatibility-mode.html [ Skip ]
 

Modified: trunk/LayoutTests/platform/mac/TestExpectations (251008 => 251009)


--- trunk/LayoutTests/platform/mac/TestExpectations	2019-10-11 14:30:20 UTC (rev 251008)
+++ trunk/LayoutTests/platform/mac/TestExpectations	2019-10-11 15:20:53 UTC (rev 251009)
@@ -1622,9 +1622,6 @@
 webkit.org/b/181565 imported/w3c/web-platform-tests/media-source/mediasource-config-change-mp4-v-bitrate.html [ Pass Failure ]
 webkit.org/b/181565 imported/w3c/web-platform-tests/media-source/mediasource-config-change-mp4-v-framesize.html [ Pass Failure ]
 
-webkit.org/b/181966 [ Debug ] media/W3C/audio/events/event_progress.html [ Pass Failure ]
-webkit.org/b/181966 media/W3C/video/events/event_order_loadstart_progress.html [ Pass Failure ]
-
 webkit.org/b/181969 fast/events/message-port.html [ Skip ]
 
 webkit.org/b/181831 [ HighSierra+ ] fast/forms/searchfield-heights.html [ Pass Failure ]
@@ -1815,8 +1812,6 @@
 
 webkit.org/b/196517 imported/w3c/web-platform-tests/mst-content-hint/MediaStreamTrack-contentHint.html [ Skip ]
 
-webkit.org/b/177663 media/W3C/video/events/event_progress_manual.html [ Pass Failure ]
-
 # Skip iOS-specific Pointer Events WPT tests.
 imported/w3c/web-platform-tests/pointerevents/pointerevent_change-touch-action-onpointerdown_touch.html [ Skip ]
 imported/w3c/web-platform-tests/pointerevents/pointerevent_pointercancel_touch.html [ Skip ]
@@ -1885,8 +1880,6 @@
 
 webkit.org/b/136627 [ Mojave+ ] media/track/track-cue-rendering-vertical.html [ Failure ]
 
-webkit.org/b/175678 media/W3C/video/events/event_progress.html [ Pass Failure ]
-
 # <rdar://problem/46000736>
 [ Mojave+ ] webgl/2.0.0/conformance/extensions/angle-instanced-arrays.html [ Failure ]
 [ Mojave+ ] webgl/2.0.0/conformance2/extensions/promoted-extensions-in-shaders.html [ Failure ]
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to