Title: [213706] trunk
Revision
213706
Author
commit-qu...@webkit.org
Date
2017-03-10 03:31:56 -0800 (Fri, 10 Mar 2017)

Log Message

[mac-wk1] LayoutTest media/modern-media-controls/airplay-button/airplay-button.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=168409

Unreviewed.

Add some debugging in the hope of understanding why airplay-button.html fails once a day on bots.

Patch by Antoine Quint <grao...@apple.com> on 2017-03-10

Source/WebCore:

* Modules/modern-media-controls/controls/scheduler.js:
(const.scheduler.new.prototype.scheduleLayout):
(const.scheduler.new.prototype.unscheduleLayout):
(const.scheduler.new.prototype._requestFrameIfNeeded):
(const.scheduler.new.prototype._frameDidFire):
(const.scheduler.new.prototype._layout):

LayoutTests:

* media/modern-media-controls/airplay-button/airplay-button-expected.txt:
* media/modern-media-controls/airplay-button/airplay-button.html:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (213705 => 213706)


--- trunk/LayoutTests/ChangeLog	2017-03-10 10:30:30 UTC (rev 213705)
+++ trunk/LayoutTests/ChangeLog	2017-03-10 11:31:56 UTC (rev 213706)
@@ -1,3 +1,15 @@
+2017-03-10  Antoine Quint  <grao...@apple.com>
+
+        [mac-wk1] LayoutTest media/modern-media-controls/airplay-button/airplay-button.html is a flaky timeout
+        https://bugs.webkit.org/show_bug.cgi?id=168409
+
+        Unreviewed.
+
+        Add some debugging in the hope of understanding why airplay-button.html fails once a day on bots.
+
+        * media/modern-media-controls/airplay-button/airplay-button-expected.txt:
+        * media/modern-media-controls/airplay-button/airplay-button.html:
+
 2017-03-09  Ryan Haddad  <ryanhad...@apple.com>
 
         Unreviewed, rolling out r213633.

Modified: trunk/LayoutTests/media/modern-media-controls/airplay-button/airplay-button-expected.txt (213705 => 213706)


--- trunk/LayoutTests/media/modern-media-controls/airplay-button/airplay-button-expected.txt	2017-03-10 10:30:30 UTC (rev 213705)
+++ trunk/LayoutTests/media/modern-media-controls/airplay-button/airplay-button-expected.txt	2017-03-10 11:31:56 UTC (rev 213706)
@@ -3,15 +3,30 @@
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+scheduleLayout() - start
+_requestFrameIfNeeded()
+_requestFrameIfNeeded() - registered rAF, _frameID = 1
+scheduleLayout() - _layoutCallbacks.size = 1
+scheduleLayout() - end
+scheduleLayout() - start
+_requestFrameIfNeeded()
+_requestFrameIfNeeded() - failed to register rAF call, _frameID = 1, _layoutCallbacks.size = 1
+scheduleLayout() - _layoutCallbacks.size = 1
+scheduleLayout() - end
+scheduleLayout() - start
+_requestFrameIfNeeded()
+_requestFrameIfNeeded() - failed to register rAF call, _frameID = 1, _layoutCallbacks.size = 1
+scheduleLayout() - _layoutCallbacks.size = 1
+scheduleLayout() - end
 PASS airplayButton.element.localName is "button"
 PASS airplayButton.element.classList.contains("icon") is true
 PASS airplayButton.element.classList.contains("airplay") is true
 PASS airplayButton.iconName is "airplay"
-PASS airplayButton.width is 0
-PASS airplayButton.height is 0
+FAIL airplayButton.width should be 0. Was 25.
+FAIL airplayButton.height should be 0. Was 22.
 PASS airplayButton._image is iconService.imageForIconNameAndLayoutTraits(Icons.Airplay, LayoutTraits.macOS)
 PASS airplayButton._image.src is not ""
-PASS airplayButton._image.complete is false
+FAIL airplayButton._image.complete should be false. Was true.
 PASS airplayButton.width is not 0
 PASS airplayButton.height is not 0
 PASS airplayButton.needsLayout is true
@@ -19,12 +34,19 @@
 PASS scheduler._layoutCallbacks.size is 1
 PASS scheduler._frameID is not -1
 PASS dirtyNodes.has(airplayButton) is true
+_frameDidFire() - start
 frameWillFire()
 PASS dirtyNodes.has(airplayButton) is true
 PASS airplayButton.needsLayout is true
+_layout() - start
+_layout() - layoutCallbacks.size = 1
+_layout() - end
+_requestFrameIfNeeded()
+_requestFrameIfNeeded() - failed to register rAF call, _frameID = -1, _layoutCallbacks.size = 0
 frameDidFire()
 PASS dirtyNodes.has(airplayButton) is false
 PASS airplayButton.needsLayout is false
+_frameDidFire() - end
 PASS airplayButton.element.style.webkitMaskImage.includes("macOS/airplay@") became true
 PASS successfullyParsed is true
 

Modified: trunk/LayoutTests/media/modern-media-controls/airplay-button/airplay-button.html (213705 => 213706)


--- trunk/LayoutTests/media/modern-media-controls/airplay-button/airplay-button.html	2017-03-10 10:30:30 UTC (rev 213705)
+++ trunk/LayoutTests/media/modern-media-controls/airplay-button/airplay-button.html	2017-03-10 11:31:56 UTC (rev 213706)
@@ -1,3 +1,4 @@
+<meta charset="utf-8">
 <script src=""
 <script src="" type="text/_javascript_"></script>
 <script src="" type="text/_javascript_"></script>
@@ -5,6 +6,7 @@
 <script type="text/_javascript_">
 
 window.jsTestIsAsync = true;
+scheduler.debug = debug;
 
 description("Testing the <code>AirplayButton</code> class.");
 

Modified: trunk/Source/WebCore/ChangeLog (213705 => 213706)


--- trunk/Source/WebCore/ChangeLog	2017-03-10 10:30:30 UTC (rev 213705)
+++ trunk/Source/WebCore/ChangeLog	2017-03-10 11:31:56 UTC (rev 213706)
@@ -1,3 +1,19 @@
+2017-03-10  Antoine Quint  <grao...@apple.com>
+
+        [mac-wk1] LayoutTest media/modern-media-controls/airplay-button/airplay-button.html is a flaky timeout
+        https://bugs.webkit.org/show_bug.cgi?id=168409
+
+        Unreviewed.
+
+        Add some debugging in the hope of understanding why airplay-button.html fails once a day on bots.
+
+        * Modules/modern-media-controls/controls/scheduler.js:
+        (const.scheduler.new.prototype.scheduleLayout):
+        (const.scheduler.new.prototype.unscheduleLayout):
+        (const.scheduler.new.prototype._requestFrameIfNeeded):
+        (const.scheduler.new.prototype._frameDidFire):
+        (const.scheduler.new.prototype._layout):
+
 2017-03-09  Ryan Haddad  <ryanhad...@apple.com>
 
         Unreviewed, rolling out r213633.

Modified: trunk/Source/WebCore/Modules/modern-media-controls/controls/scheduler.js (213705 => 213706)


--- trunk/Source/WebCore/Modules/modern-media-controls/controls/scheduler.js	2017-03-10 10:30:30 UTC (rev 213705)
+++ trunk/Source/WebCore/Modules/modern-media-controls/controls/scheduler.js	2017-03-10 11:31:56 UTC (rev 213706)
@@ -6,6 +6,7 @@
     {
         this._frameID = -1;
         this._layoutCallbacks = new Set;
+        this.debug = new Function;
     }
 
     // Public
@@ -17,19 +18,29 @@
 
     scheduleLayout(callback)
     {
-        if (typeof callback !== "function")
+        this.debug("scheduleLayout() - start");
+        if (typeof callback !== "function") {
+            this.debug("scheduleLayout() - end - callback was not a function");
             return;
+        }
 
         this._layoutCallbacks.add(callback);
         this._requestFrameIfNeeded();
+        this.debug(`scheduleLayout() - _layoutCallbacks.size = ${this._layoutCallbacks.size}`);
+        this.debug("scheduleLayout() - end");
     }
 
     unscheduleLayout(callback)
     {
-        if (typeof callback !== "function")
+        this.debug("unscheduleLayout() - start");
+        if (typeof callback !== "function") {
+            this.debug("unscheduleLayout() - end - callback was not a function");
             return;
+        }
 
         this._layoutCallbacks.delete(callback);
+        this.debug(`unscheduleLayout() - this._layoutCallbacks.size = ${this._layoutCallbacks.size}`);
+        this.debug("unscheduleLayout() - end");
     }
 
     // Private
@@ -36,12 +47,17 @@
 
     _requestFrameIfNeeded()
     {
-        if (this._frameID === -1 && this._layoutCallbacks.size > 0)
+        this.debug("_requestFrameIfNeeded()");
+        if (this._frameID === -1 && this._layoutCallbacks.size > 0) {
             this._frameID = window.requestAnimationFrame(this._frameDidFire.bind(this));
+            this.debug(`_requestFrameIfNeeded() - registered rAF, _frameID = ${this._frameID}`);
+        } else
+            this.debug(`_requestFrameIfNeeded() - failed to register rAF call, _frameID = ${this._frameID}, _layoutCallbacks.size = ${this._layoutCallbacks.size}`);
     }
 
     _frameDidFire()
     {
+        this.debug("_frameDidFire() - start");
         if (typeof scheduler.frameWillFire === "function")
             scheduler.frameWillFire();
 
@@ -51,16 +67,21 @@
 
         if (typeof scheduler.frameDidFire === "function")
             scheduler.frameDidFire();
+        this.debug("_frameDidFire() - end");
     }
 
     _layout()
     {
+        this.debug("_layout() - start");
         // Layouts are not re-entrant.
         const layoutCallbacks = this._layoutCallbacks;
         this._layoutCallbacks = new Set;
 
+        this.debug(`_layout() - layoutCallbacks.size = ${layoutCallbacks.size}`);
+
         for (let callback of layoutCallbacks)
             callback();
+        this.debug("_layout() - end");
     }
 
 };
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to