Title: [214706] trunk/LayoutTests
- Revision
- 214706
- Author
- [email protected]
- Date
- 2017-03-31 17:31:34 -0700 (Fri, 31 Mar 2017)
Log Message
LayoutTest fast/images/animated-gif-restored-from-bfcache.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=162510
<rdar://problem/31380650>
Reviewed by Alexey Proskuryakov.
The test restores a page from PageCache and wants to check that an animated
GIF is properly animating. To do so, it store the data of the current image
frame, and then checks in a 100ms timer that the current image frame is
different. This is flaky by nature since the image only has 10 frames and
you therefore have a 1/10 chance that the new frame will be the same as the
previous one, even if the image is properly animating.
To address the problem, do a setInterval instead of a setTimeout and check
until the frame becomes different.
* fast/images/animated-gif-restored-from-bfcache.html:
* platform/mac/TestExpectations:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (214705 => 214706)
--- trunk/LayoutTests/ChangeLog 2017-04-01 00:24:48 UTC (rev 214705)
+++ trunk/LayoutTests/ChangeLog 2017-04-01 00:31:34 UTC (rev 214706)
@@ -1,3 +1,24 @@
+2017-03-31 Chris Dumez <[email protected]>
+
+ LayoutTest fast/images/animated-gif-restored-from-bfcache.html is a flaky failure
+ https://bugs.webkit.org/show_bug.cgi?id=162510
+ <rdar://problem/31380650>
+
+ Reviewed by Alexey Proskuryakov.
+
+ The test restores a page from PageCache and wants to check that an animated
+ GIF is properly animating. To do so, it store the data of the current image
+ frame, and then checks in a 100ms timer that the current image frame is
+ different. This is flaky by nature since the image only has 10 frames and
+ you therefore have a 1/10 chance that the new frame will be the same as the
+ previous one, even if the image is properly animating.
+
+ To address the problem, do a setInterval instead of a setTimeout and check
+ until the frame becomes different.
+
+ * fast/images/animated-gif-restored-from-bfcache.html:
+ * platform/mac/TestExpectations:
+
2017-03-31 Wenson Hsieh <[email protected]>
[WK2] Tapping away to dismiss the selection does not update the selected DOM range using character granularity
Modified: trunk/LayoutTests/fast/images/animated-gif-restored-from-bfcache.html (214705 => 214706)
--- trunk/LayoutTests/fast/images/animated-gif-restored-from-bfcache.html 2017-04-01 00:24:48 UTC (rev 214705)
+++ trunk/LayoutTests/fast/images/animated-gif-restored-from-bfcache.html 2017-04-01 00:31:34 UTC (rev 214706)
@@ -17,7 +17,7 @@
context.drawImage(image, 0, 0);
var frameOne = context.getImageData(0, 0, 1, 1).data;
- window.setTimeout(function() {
+ handle = window.setInterval(function() {
context.drawImage(image, 0, 0);
var frameTwo = context.getImageData(0, 0, 1, 1).data;
@@ -26,13 +26,13 @@
&& frameOne[1] == frameTwo[1]
&& frameOne[2] == frameTwo[2]
&& frameOne[3] == frameTwo[3])
- console.innerHTML = "<span style='color:red'>FAIL</span>";
- else
- console.innerHTML = "<span style='color:green'>PASS</span>";
+ return;
+ window.clearInterval(handle);
+ console.innerHTML = "<span style='color:green'>PASS</span>";
if (window.testRunner)
testRunner.notifyDone();
- }, 100);
+ }, 10);
}
window._onpageshow_ = function(event) {
Modified: trunk/LayoutTests/platform/mac/TestExpectations (214705 => 214706)
--- trunk/LayoutTests/platform/mac/TestExpectations 2017-04-01 00:24:48 UTC (rev 214705)
+++ trunk/LayoutTests/platform/mac/TestExpectations 2017-04-01 00:31:34 UTC (rev 214706)
@@ -1516,8 +1516,6 @@
webkit.org/b/162507 http/tests/media/hls/hls-video-resize.html [ Pass Failure ]
-webkit.org/b/162510 [ Debug ] fast/images/animated-gif-restored-from-bfcache.html [ Pass Failure ]
-
webkit.org/b/167642 imported/w3c/web-platform-tests/shadow-dom/slotchange.html [ Pass Failure ]
webkit.org/b/167757 [ Sierra Release ] workers/bomb.html [ Pass Timeout ]
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes