Title: [251856] trunk/LayoutTests
Revision
251856
Author
[email protected]
Date
2019-10-31 10:35:06 -0700 (Thu, 31 Oct 2019)

Log Message

[GTK] Web Inspector: inspector/timeline/timeline-event-*.html are failing
https://bugs.webkit.org/show_bug.cgi?id=203625

Reviewed by Devin Rousso.

Unflake inspector/timeline/timeline-event-*.html tests on GTK.

* inspector/timeline/resources/timeline-event-utilities.js: There is a race between CapturingState.Inactive
and SavePageData events, so the test has to wait for both.
Drive-by: wrap promis.reject in a lambda, otherwise reject would be called on an undefined 'this' object.
arrive before resolving the promise.
(TestPage.registerInitializer):
* platform/gtk/TestExpectations:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (251855 => 251856)


--- trunk/LayoutTests/ChangeLog	2019-10-31 17:33:30 UTC (rev 251855)
+++ trunk/LayoutTests/ChangeLog	2019-10-31 17:35:06 UTC (rev 251856)
@@ -1,3 +1,19 @@
+2019-10-31  Yury Semikhatsky  <[email protected]>
+
+        [GTK] Web Inspector: inspector/timeline/timeline-event-*.html are failing
+        https://bugs.webkit.org/show_bug.cgi?id=203625
+
+        Reviewed by Devin Rousso.
+
+        Unflake inspector/timeline/timeline-event-*.html tests on GTK.
+
+        * inspector/timeline/resources/timeline-event-utilities.js: There is a race between CapturingState.Inactive
+        and SavePageData events, so the test has to wait for both.
+        Drive-by: wrap promis.reject in a lambda, otherwise reject would be called on an undefined 'this' object.
+        arrive before resolving the promise.
+        (TestPage.registerInitializer):
+        * platform/gtk/TestExpectations:
+
 2019-10-31  Miguel Gomez  <[email protected]>
 
         Unreviewed GTK and WPE gardening after r251837.

Modified: trunk/LayoutTests/inspector/timeline/resources/timeline-event-utilities.js (251855 => 251856)


--- trunk/LayoutTests/inspector/timeline/resources/timeline-event-utilities.js	2019-10-31 17:33:30 UTC (rev 251855)
+++ trunk/LayoutTests/inspector/timeline/resources/timeline-event-utilities.js	2019-10-31 17:35:06 UTC (rev 251856)
@@ -6,7 +6,9 @@
     InspectorTest.TimelineEvent = {};
 
     InspectorTest.TimelineEvent.captureTimelineWithScript = function({_expression_, eventType}) {
-        let pageRecordingData = null;
+        let savePageDataPromise = InspectorTest.awaitEvent("SavePageData").then((event) => {
+            return event.data;
+        });
 
         let promise = new WI.WrappedPromise;
 
@@ -28,22 +30,22 @@
 
                 InspectorTest.log("Evaluating...");
                 InspectorTest.evaluateInPage(_expression_)
-                .catch(promise.reject);
+                .catch((error) => {
+                    promise.reject(error);
+                });
                 return;
             }
 
             if (WI.timelineManager.capturingState === WI.TimelineManager.CapturingState.Inactive) {
                 WI.timelineManager.removeEventListener(WI.TimelineManager.Event.CapturingStateChanged, listener);
-                InspectorTest.assert(pageRecordingData, "savePageData should have been called in the page before capturing was stopped.");
-                promise.resolve(pageRecordingData);
+                InspectorTest.assert(savePageDataPromise, "savePageData should have been called in the page before capturing was stopped.");
+                savePageDataPromise.then((data) => {
+                    promise.resolve(data);
+                });
                 return;
             }
         });
 
-        InspectorTest.awaitEvent("SavePageData").then((event) => {
-            pageRecordingData = event.data;
-        });
-
         InspectorTest.log("Starting Capture...");
         const newRecording = true;
         WI.timelineManager.startCapturing(newRecording);

Modified: trunk/LayoutTests/platform/gtk/TestExpectations (251855 => 251856)


--- trunk/LayoutTests/platform/gtk/TestExpectations	2019-10-31 17:33:30 UTC (rev 251855)
+++ trunk/LayoutTests/platform/gtk/TestExpectations	2019-10-31 17:35:06 UTC (rev 251856)
@@ -2375,14 +2375,6 @@
 
 webkit.org/b/137698 media/video-controls-drag.html [ Timeout ]
 
-webkit.org/b/203625 inspector/timeline/timeline-event-CancelAnimationFrame.html  [ Pass Failure ]
-webkit.org/b/203625 inspector/timeline/timeline-event-EventDispatch.html  [ Pass Failure ]
-webkit.org/b/203625 inspector/timeline/timeline-event-FireAnimationFrame.html  [ Pass Failure ]
-webkit.org/b/203625 inspector/timeline/timeline-event-RequestAnimationFrame.html  [ Pass Failure ]
-webkit.org/b/203625 inspector/timeline/timeline-event-TimerFire.html  [ Pass Failure ]
-webkit.org/b/203625 inspector/timeline/timeline-event-TimerInstall.html  [ Pass Failure ]
-webkit.org/b/203625 inspector/timeline/timeline-event-TimerRemove.html  [ Pass Failure ]
-
 webkit.org/b/139362 inspector/css/pseudo-element-matches.html [ Failure ]
 webkit.org/b/139362 inspector/css/selector-specificity.html [ Timeout Pass ]
 webkit.org/b/147229 inspector/css/modify-rule-selector.html [ Skip ] # Timeout
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to