- Revision
- 263835
- Author
- [email protected]
- Date
- 2020-07-02 01:14:16 -0700 (Thu, 02 Jul 2020)
Log Message
[GTK] Layout test media/context-menu-actions.html is failing
https://bugs.webkit.org/show_bug.cgi?id=183611
Reviewed by Xabier Rodriguez-Calvar.
Changing to fullscreen is an async operation, so we now use testExpectedEventually() to wait for
the final value.
Simply setting an event handler on video.onwebkitfullscreenchange wouldn't have been enough, since the
event is triggered before the fullscreen operation has been completed and checking for
video.webkitDisplayingFullscreen == true would still fail by then.
Using the 'webkitbeginfullscreen' event isn't possible either, because it's never triggered when
FULLSCREEN_API is enabled.
* media/context-menu-actions.html: Use asynchronous testing.
* media/video-test.js:
(testExpectedEventually): Add an optional "timeout" parameter to avoid a test timeout (all the output
would be lost) in case we wait forever for the comparison to evaluate to the expected value.
(reportExpected): Add an optional "explanation" parameter for extra reporting.
* platform/gtk-wayland/TestExpectations: Unskipped the test.
* platform/gtk/TestExpectations: Ditto.
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (263834 => 263835)
--- trunk/LayoutTests/ChangeLog 2020-07-02 07:20:07 UTC (rev 263834)
+++ trunk/LayoutTests/ChangeLog 2020-07-02 08:14:16 UTC (rev 263835)
@@ -1,3 +1,26 @@
+2020-07-02 Enrique Ocaña González <[email protected]>
+
+ [GTK] Layout test media/context-menu-actions.html is failing
+ https://bugs.webkit.org/show_bug.cgi?id=183611
+
+ Reviewed by Xabier Rodriguez-Calvar.
+
+ Changing to fullscreen is an async operation, so we now use testExpectedEventually() to wait for
+ the final value.
+ Simply setting an event handler on video.onwebkitfullscreenchange wouldn't have been enough, since the
+ event is triggered before the fullscreen operation has been completed and checking for
+ video.webkitDisplayingFullscreen == true would still fail by then.
+ Using the 'webkitbeginfullscreen' event isn't possible either, because it's never triggered when
+ FULLSCREEN_API is enabled.
+
+ * media/context-menu-actions.html: Use asynchronous testing.
+ * media/video-test.js:
+ (testExpectedEventually): Add an optional "timeout" parameter to avoid a test timeout (all the output
+ would be lost) in case we wait forever for the comparison to evaluate to the expected value.
+ (reportExpected): Add an optional "explanation" parameter for extra reporting.
+ * platform/gtk-wayland/TestExpectations: Unskipped the test.
+ * platform/gtk/TestExpectations: Ditto.
+
2020-07-02 Diego Pino Garcia <[email protected]>
[GLIB] Unreviewed test gardening. Skip AX tests added in r263823 as they're timing out.
Modified: trunk/LayoutTests/media/context-menu-actions.html (263834 => 263835)
--- trunk/LayoutTests/media/context-menu-actions.html 2020-07-02 07:20:07 UTC (rev 263834)
+++ trunk/LayoutTests/media/context-menu-actions.html 2020-07-02 08:14:16 UTC (rev 263835)
@@ -1,10 +1,10 @@
<html>
<head>
<script src=""
- <script src=""
+ <script src=""
<script>
- function playing()
+ async function playing()
{
if (window.testRunner) {
if (!window.eventSender) {
@@ -64,7 +64,7 @@
testExpected("video.webkitDisplayingFullscreen", false, '==');
consoleWrite("Toggling fullscreen state");
items[i].click();
- testExpected("video.webkitDisplayingFullscreen", true, '==');
+ await testExpectedEventually("video.webkitDisplayingFullscreen", true, "==", 1000);
consoleWrite("");
}
@@ -74,7 +74,7 @@
endTest();
}
- function start()
+ async function start()
{
findMediaElement();
waitForEvent('play', playing);
Modified: trunk/LayoutTests/media/video-test.js (263834 => 263835)
--- trunk/LayoutTests/media/video-test.js 2020-07-02 07:20:07 UTC (rev 263834)
+++ trunk/LayoutTests/media/video-test.js 2020-07-02 08:14:16 UTC (rev 263835)
@@ -101,14 +101,15 @@
});
}
-function testExpectedEventually(testFuncString, expected, comparison)
+function testExpectedEventually(testFuncString, expected, comparison, timeout)
{
return new Promise(async resolve => {
var success;
var observed;
+ var timeSlept = 0;
if (comparison === undefined)
comparison = '==';
- while (true) {
+ while (timeout === undefined || timeSlept < timeout) {
try {
let {success, observed} = compare(testFuncString, expected, comparison);
if (success) {
@@ -117,6 +118,7 @@
return;
}
await sleepFor(1);
+ timeSlept++;
} catch (ex) {
consoleWrite(ex);
resolve();
@@ -123,6 +125,8 @@
return;
}
}
+ reportExpected(success, testFuncString, comparison, expected, observed, "AFTER TIMEOUT");
+ resolve();
});
}
@@ -145,7 +149,7 @@
var testNumber = 0;
-function reportExpected(success, testFuncString, comparison, expected, observed)
+function reportExpected(success, testFuncString, comparison, expected, observed, explanation)
{
testNumber++;
@@ -154,8 +158,11 @@
if (printFullTestDetails || !success)
msg = "EXPECTED (<em>" + testFuncString + " </em>" + comparison + " '<em>" + expected + "</em>')";
- if (!success)
+ if (!success) {
msg += ", OBSERVED '<em>" + observed + "</em>'";
+ if (explanation !== undefined)
+ msg += ", " + explanation;
+ }
logResult(success, msg);
}
Modified: trunk/LayoutTests/platform/gtk/TestExpectations (263834 => 263835)
--- trunk/LayoutTests/platform/gtk/TestExpectations 2020-07-02 07:20:07 UTC (rev 263834)
+++ trunk/LayoutTests/platform/gtk/TestExpectations 2020-07-02 08:14:16 UTC (rev 263835)
@@ -3307,7 +3307,7 @@
webkit.org/b/183033 http/tests/plugins/supported-plugin-origin-specific-visibility.html [ Failure ]
-webkit.org/b/183611 webkit.org/b/198830 media/context-menu-actions.html [ Failure Crash ]
+webkit.org/b/198830 media/context-menu-actions.html [ Crash ]
webkit.org/b/183902 fast/dom/frame-loading-via-document-write.html [ Failure ]
Modified: trunk/LayoutTests/platform/gtk-wayland/TestExpectations (263834 => 263835)
--- trunk/LayoutTests/platform/gtk-wayland/TestExpectations 2020-07-02 07:20:07 UTC (rev 263834)
+++ trunk/LayoutTests/platform/gtk-wayland/TestExpectations 2020-07-02 08:14:16 UTC (rev 263835)
@@ -87,7 +87,6 @@
webkit.org/b/183365 fast/selectors/text-field-selection-window-inactive-stroke-color.html [ ImageOnlyFailure ]
webkit.org/b/183365 fast/selectors/text-field-selection-window-inactive-text-shadow.html [ ImageOnlyFailure ]
-webkit.org/b/183611 media/context-menu-actions.html [ Failure ]
webkit.org/b/102776 media/track/track-cue-rendering-horizontal.html [ Failure Timeout ]
webkit.org/b/206584 media/video-set-presentation-mode-to-inline.html [ Failure ]
webkit.org/b/163823 media/video-volume-slider.html [ Failure ]