Title: [263502] trunk/LayoutTests
- Revision
- 263502
- Author
- [email protected]
- Date
- 2020-06-25 03:16:43 -0700 (Thu, 25 Jun 2020)
Log Message
Make video-inside-flex-item.html more robust
https://bugs.webkit.org/show_bug.cgi?id=213549
Reviewed by Simon Fraser.
The tests initially landed in r263389 and was later modified in r263436 because it was flaky
in some configurations. The latter fixed most of the flakiness but in the debug bots which
were consistently showing test failures. The problem was that the slowness of debug bots
was causing different layout behaviours and thus retrieving different measurements.
Fix the flackiness by adding an additional layer of robustness. The test now waits for the "loadeddata"
video event before entering into fullscreen mode. Video is properly sized now and we can
bring exact size comparisons back.
* fullscreen/video-inside-flex-item-expected.txt:
* fullscreen/video-inside-flex-item.html:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (263501 => 263502)
--- trunk/LayoutTests/ChangeLog 2020-06-25 09:53:17 UTC (rev 263501)
+++ trunk/LayoutTests/ChangeLog 2020-06-25 10:16:43 UTC (rev 263502)
@@ -1,3 +1,22 @@
+2020-06-24 Sergio Villar Senin <[email protected]>
+
+ Make video-inside-flex-item.html more robust
+ https://bugs.webkit.org/show_bug.cgi?id=213549
+
+ Reviewed by Simon Fraser.
+
+ The tests initially landed in r263389 and was later modified in r263436 because it was flaky
+ in some configurations. The latter fixed most of the flakiness but in the debug bots which
+ were consistently showing test failures. The problem was that the slowness of debug bots
+ was causing different layout behaviours and thus retrieving different measurements.
+
+ Fix the flackiness by adding an additional layer of robustness. The test now waits for the "loadeddata"
+ video event before entering into fullscreen mode. Video is properly sized now and we can
+ bring exact size comparisons back.
+
+ * fullscreen/video-inside-flex-item-expected.txt:
+ * fullscreen/video-inside-flex-item.html:
+
2020-06-24 Wenson Hsieh <[email protected]>
Running spellcheck on https://developer.apple.com/forums/thread/650317 hangs the web process
Modified: trunk/LayoutTests/fullscreen/video-inside-flex-item-expected.txt (263501 => 263502)
--- trunk/LayoutTests/fullscreen/video-inside-flex-item-expected.txt 2020-06-25 09:53:17 UTC (rev 263501)
+++ trunk/LayoutTests/fullscreen/video-inside-flex-item-expected.txt 2020-06-25 10:16:43 UTC (rev 263502)
@@ -2,7 +2,7 @@
EVENT(webkitfullscreenchange)
TEST(video.clientWidth == document.body.clientWidth) OK
EVENT(webkitfullscreenchange)
-TEST(video.clientWidth == oldVideoWidth) OK
-TEST(video.clientHeight == oldVideoHeight) OK
+EXPECTED (320 == '320') OK
+EXPECTED (240 == '240') OK
END OF TEST
Modified: trunk/LayoutTests/fullscreen/video-inside-flex-item.html (263501 => 263502)
--- trunk/LayoutTests/fullscreen/video-inside-flex-item.html 2020-06-25 09:53:17 UTC (rev 263501)
+++ trunk/LayoutTests/fullscreen/video-inside-flex-item.html 2020-06-25 10:16:43 UTC (rev 263502)
@@ -18,30 +18,30 @@
</div>
<script>
-setSrcById("video", findMediaFile("video", "../media/content/test"));
-var video = document.getElementById('video');
// Bail out early if the full screen API is not enabled or is missing:
if (Element.prototype.webkitRequestFullScreen == undefined) {
logResult(false, "Element.prototype.webkitRequestFullScreen == undefined");
endTest();
} else {
- var oldVideoWidth = video.clientWidth;
- var oldVideoHeight = video.clientHeight;
- waitForEventOnce(document, 'webkitfullscreenchange', function() {
- // First check that the video went fullscreen.
- test("video.clientWidth == document.body.clientWidth");
+ var video = document.getElementById('video');
+ video.addEventListener("loadeddata", function(ev) {
waitForEventOnce(document, 'webkitfullscreenchange', function() {
- // Then check that the original video size is properly restored.
- test("video.clientWidth == oldVideoWidth");
- test("video.clientHeight == oldVideoHeight");
- endTest();
+ // First check that the video went fullscreen.
+ test("video.clientWidth == document.body.clientWidth");
+ waitForEventOnce(document, 'webkitfullscreenchange', function() {
+ // Then check that the original video size is properly restored.
+ testExpected(video.clientWidth, 320);
+ testExpected(video.clientHeight, 240);
+ endTest();
+ });
+ document.webkitCancelFullScreen();
});
- document.webkitCancelFullScreen();
- });
- runWithKeyDown(function() {
- video.webkitRequestFullScreen();
+ runWithKeyDown(function() {
+ video.webkitRequestFullScreen();
+ });
});
+ setSrcById("video", findMediaFile("video", "../media/content/test"));
}
</script>
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes