Title: [213348] trunk/LayoutTests
Revision
213348
Author
commit-qu...@webkit.org
Date
2017-03-02 20:47:31 -0800 (Thu, 02 Mar 2017)

Log Message

[ios-simulator Debug WK2] LayoutTest media/modern-media-controls/fullscreen-support/fullscreen-support-enabled.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=168668
<rdar://problem/30823677>

Patch by Antoine Quint <grao...@apple.com> on 2017-03-02
Reviewed by Simon Fraser.

This test would sometime fail for the first assertion because we may need more than just metadata
to determine that we can be in a state where the fullscreen button becomes enabled (see the logic
in FullscreenSupport). So we now use an asynchronous assertion to determine we've enabled the
fullscreen button and then force it to error to disable it.

* media/modern-media-controls/fullscreen-support/fullscreen-support-enabled-expected.txt:
* media/modern-media-controls/fullscreen-support/fullscreen-support-enabled.html:
* platform/ios-simulator/TestExpectations:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (213347 => 213348)


--- trunk/LayoutTests/ChangeLog	2017-03-03 04:31:04 UTC (rev 213347)
+++ trunk/LayoutTests/ChangeLog	2017-03-03 04:47:31 UTC (rev 213348)
@@ -1,5 +1,22 @@
 2017-03-02  Antoine Quint  <grao...@apple.com>
 
+        [ios-simulator Debug WK2] LayoutTest media/modern-media-controls/fullscreen-support/fullscreen-support-enabled.html is a flaky failure
+        https://bugs.webkit.org/show_bug.cgi?id=168668
+        <rdar://problem/30823677>
+
+        Reviewed by Simon Fraser.
+
+        This test would sometime fail for the first assertion because we may need more than just metadata
+        to determine that we can be in a state where the fullscreen button becomes enabled (see the logic
+        in FullscreenSupport). So we now use an asynchronous assertion to determine we've enabled the
+        fullscreen button and then force it to error to disable it.
+
+        * media/modern-media-controls/fullscreen-support/fullscreen-support-enabled-expected.txt:
+        * media/modern-media-controls/fullscreen-support/fullscreen-support-enabled.html:
+        * platform/ios-simulator/TestExpectations:
+
+2017-03-02  Antoine Quint  <grao...@apple.com>
+
         [iOS Release WK2] LayoutTest media/modern-media-controls/media-controller/media-controller-ios-do-not-hide-controls-when-tapping-button.html is a flaky timeout
         https://bugs.webkit.org/show_bug.cgi?id=168343
         <rdar://problem/30823389>

Modified: trunk/LayoutTests/media/modern-media-controls/fullscreen-support/fullscreen-support-enabled-expected.txt (213347 => 213348)


--- trunk/LayoutTests/media/modern-media-controls/fullscreen-support/fullscreen-support-enabled-expected.txt	2017-03-03 04:31:04 UTC (rev 213347)
+++ trunk/LayoutTests/media/modern-media-controls/fullscreen-support/fullscreen-support-enabled-expected.txt	2017-03-03 04:47:31 UTC (rev 213348)
@@ -3,7 +3,10 @@
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-PASS mediaController.controls.fullscreenButton.enabled is true
+Once media loads and we have tracks in the video, the fullscreen button should become enabled
+PASS mediaController.controls.fullscreenButton.enabled became true
+
+We now set the media source to be the empty string to force an error, which should disable the fullscreen button
 PASS mediaController.controls.fullscreenButton.enabled is false
 
 PASS successfullyParsed is true

Modified: trunk/LayoutTests/media/modern-media-controls/fullscreen-support/fullscreen-support-enabled.html (213347 => 213348)


--- trunk/LayoutTests/media/modern-media-controls/fullscreen-support/fullscreen-support-enabled.html	2017-03-03 04:31:04 UTC (rev 213347)
+++ trunk/LayoutTests/media/modern-media-controls/fullscreen-support/fullscreen-support-enabled.html	2017-03-03 04:47:31 UTC (rev 213348)
@@ -27,19 +27,20 @@
 const media = document.querySelector("video");
 const mediaController = createControls(container, media, null);
 
-media.addEventListener("loadedmetadata", () => {
-    shouldBeTrue("mediaController.controls.fullscreenButton.enabled");
+debug("Once media loads and we have tracks in the video, the fullscreen button should become enabled");
+shouldBecomeEqual("mediaController.controls.fullscreenButton.enabled", "true", () => {
+    media.addEventListener("error", () => {
+        shouldBeFalse("mediaController.controls.fullscreenButton.enabled");
+        debug("");
+        container.remove();
+        media.remove();
+        finishJSTest();
+    });
+    debug("");
+    debug("We now set the media source to be the empty string to force an error, which should disable the fullscreen button");
     media.src = ""
 });
 
-media.addEventListener("error", () => {
-    shouldBeFalse("mediaController.controls.fullscreenButton.enabled");
-    debug("");
-    container.remove();
-    media.remove();
-    finishJSTest();
-});
-
 </script>
 <script src=""
 </body>

Modified: trunk/LayoutTests/platform/ios-simulator/TestExpectations (213347 => 213348)


--- trunk/LayoutTests/platform/ios-simulator/TestExpectations	2017-03-03 04:31:04 UTC (rev 213347)
+++ trunk/LayoutTests/platform/ios-simulator/TestExpectations	2017-03-03 04:47:31 UTC (rev 213348)
@@ -2848,8 +2848,6 @@
 media/modern-media-controls/media-controller/media-controller-tight-padding.html [ Skip ]
 media/modern-media-controls/media-controller/media-controller-toggle-compact-mode.html [ Skip ]
 
-webkit.org/b/168668 media/modern-media-controls/fullscreen-support/fullscreen-support-enabled.html [ Pass Failure ]
-
 # Form validation popover does not obey minimum font size setting on iOS but Dynamic Type instead.
 fast/forms/validation-message-minimum-font-size.html [ Skip ]
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to