Title: [213240] trunk/LayoutTests
Revision
213240
Author
[email protected]
Date
2017-03-01 13:55:51 -0800 (Wed, 01 Mar 2017)

Log Message

[mac-wk1 debug] LayoutTest media/modern-media-controls/tracks-panel/tracks-panel-hide-click-outside.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=165290
<rdar://problem/30787749>

Patch by Antoine Quint <[email protected]> on 2017-03-01
Reviewed by Jon Lee.

We now rely on actual DOM state to ensure that the tracks panel is shown and hidden. While
I couldn't reproduce the flakiness, this should be a more robust approach.

* media/modern-media-controls/tracks-panel/tracks-panel-hide-click-outside-expected.txt:
* media/modern-media-controls/tracks-panel/tracks-panel-hide-click-outside.html:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (213239 => 213240)


--- trunk/LayoutTests/ChangeLog	2017-03-01 21:10:45 UTC (rev 213239)
+++ trunk/LayoutTests/ChangeLog	2017-03-01 21:55:51 UTC (rev 213240)
@@ -1,3 +1,17 @@
+2017-03-01  Antoine Quint  <[email protected]>
+
+        [mac-wk1 debug] LayoutTest media/modern-media-controls/tracks-panel/tracks-panel-hide-click-outside.html is a flaky timeout
+        https://bugs.webkit.org/show_bug.cgi?id=165290
+        <rdar://problem/30787749>
+
+        Reviewed by Jon Lee.
+
+        We now rely on actual DOM state to ensure that the tracks panel is shown and hidden. While
+        I couldn't reproduce the flakiness, this should be a more robust approach.
+
+        * media/modern-media-controls/tracks-panel/tracks-panel-hide-click-outside-expected.txt:
+        * media/modern-media-controls/tracks-panel/tracks-panel-hide-click-outside.html:
+
 2017-03-01  James Craig  <[email protected]>
 
         AX: add role aliases for ARIA DPUB module

Modified: trunk/LayoutTests/media/modern-media-controls/tracks-panel/tracks-panel-hide-click-outside-expected.txt (213239 => 213240)


--- trunk/LayoutTests/media/modern-media-controls/tracks-panel/tracks-panel-hide-click-outside-expected.txt	2017-03-01 21:10:45 UTC (rev 213239)
+++ trunk/LayoutTests/media/modern-media-controls/tracks-panel/tracks-panel-hide-click-outside-expected.txt	2017-03-01 21:55:51 UTC (rev 213240)
@@ -4,10 +4,11 @@
 
 
 mediaControls.showTracksPanel()
+PASS document.body.contains(mediaControls.tracksPanel.element) became true
+PASS mediaControls.tracksPanel.presented is true
 
 Clicking outside of the panel
-
-Transition ended
+PASS document.body.contains(mediaControls.tracksPanel.element) became false
 PASS mediaControls.tracksPanel.presented is false
 
 PASS successfullyParsed is true

Modified: trunk/LayoutTests/media/modern-media-controls/tracks-panel/tracks-panel-hide-click-outside.html (213239 => 213240)


--- trunk/LayoutTests/media/modern-media-controls/tracks-panel/tracks-panel-hide-click-outside.html	2017-03-01 21:10:45 UTC (rev 213239)
+++ trunk/LayoutTests/media/modern-media-controls/tracks-panel/tracks-panel-hide-click-outside.html	2017-03-01 21:55:51 UTC (rev 213240)
@@ -13,26 +13,20 @@
 debug("mediaControls.showTracksPanel()");
 mediaControls.showTracksPanel();
 
-scheduler.frameDidFire = function()
-{
-    window.requestAnimationFrame(() => {
+shouldBecomeEqual("document.body.contains(mediaControls.tracksPanel.element)", "true", () => {
+    shouldBeTrue("mediaControls.tracksPanel.presented");
+    debug("");
+    debug("Clicking outside of the panel");
+    eventSender.mouseMoveTo(10, 10);
+    eventSender.mouseDown();
+    eventSender.mouseUp();
+    shouldBecomeEqual("document.body.contains(mediaControls.tracksPanel.element)", "false", () => {
+        shouldBeFalse("mediaControls.tracksPanel.presented");
         debug("");
-        debug("Clicking outside of the panel");
-        eventSender.mouseMoveTo(10, 10);
-        eventSender.mouseDown();
-        eventSender.mouseUp();
-        mediaControls.tracksPanel.element.addEventListener("transitionend", (event) => {
-            debug("");
-            debug("Transition ended");
-            shouldBeFalse("mediaControls.tracksPanel.presented");
-
-            debug("");
-            mediaControls.element.remove();
-            finishJSTest();
-        });
+        mediaControls.element.remove();
+        finishJSTest();
     });
-    scheduler.frameDidFire = null;
-}
+});
 
 </script>
 <script src=""
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to