Bug 210051 - [ Mojave wk1 Release ] animations/transition-and-animation-1.html is a flaky failure
Summary: [ Mojave wk1 Release ] animations/transition-and-animation-1.html is a flaky ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Animations (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Antoine Quint
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-04-06 09:23 PDT by Truitt Savell
Modified: 2020-04-22 11:08 PDT (History)
6 users (show)

See Also:


Attachments
Patch (2.85 KB, patch)
2020-04-22 08:32 PDT, Antoine Quint
no flags Details | Formatted Diff | Diff
Patch (3.53 KB, patch)
2020-04-22 08:53 PDT, Antoine Quint
simon.fraser: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Truitt Savell 2020-04-06 09:23:34 PDT
animations/transition-and-animation-1.html

This test became recently flaky on Mojave wk1 Release

history
https://results.webkit.org/?suite=layout-tests&test=animations%2Ftransition-and-animation-1.html

Diff:
+++ /Volumes/Data/slave/mojave-release-tests-wk1/build/layout-test-results/animations/transition-and-animation-1-actual.txt
@@ -1,3 +1,3 @@
 This test has a transition and animation on the same property (-webkit-transform). But the transition is never triggered, so nothing should be moving when the animation finishes.
-PASS - "webkitTransform" property for "box" element at 0.55s saw something close to: none
+FAIL - "webkitTransform" property for "box" element at 0.55s expected: none but saw: matrix(1, 0, 0, 1, 200, 0)
Comment 1 Radar WebKit Bug Importer 2020-04-06 09:23:59 PDT
<rdar://problem/61345177>
Comment 2 Truitt Savell 2020-04-06 15:45:34 PDT
I am able to reproduce this failure using this command on a debug build:

run-webkit-tests --iterations 2000 --exit-after-n-failures 1 --exit-after-n-crashes-or-timeouts 1 --debug-rwt-logging --no-retry --force --no-build -f -g -1 animations/transition-and-animation-1.html
Comment 3 Truitt Savell 2020-04-07 08:48:41 PDT
Looking deeper in the history, this test appears to fail every couple of days for nearly the whole visible history.
Comment 4 Antoine Quint 2020-04-22 08:32:25 PDT
Created attachment 397194 [details]
Patch
Comment 5 Simon Fraser (smfr) 2020-04-22 08:37:18 PDT
Comment on attachment 397194 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=397194&action=review

> LayoutTests/animations/transition-and-animation-1.html:50
> +document.getElementById("box").addEventListener("animationend", event => {
> +    requestAnimationFrame(timestamp => {
> +        checkExpectedValue(expectedValues, 0);
> +        endTest();
> +    });
> +});

This would be really nice if you made a re-usable promise-based "animationend" thing and used async/await here. See UIHelper.animationFrame().
Comment 6 Antoine Quint 2020-04-22 08:41:58 PDT
(In reply to Simon Fraser (smfr) from comment #5)
> Comment on attachment 397194 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=397194&action=review
> 
> > LayoutTests/animations/transition-and-animation-1.html:50
> > +document.getElementById("box").addEventListener("animationend", event => {
> > +    requestAnimationFrame(timestamp => {
> > +        checkExpectedValue(expectedValues, 0);
> > +        endTest();
> > +    });
> > +});
> 
> This would be really nice if you made a re-usable promise-based
> "animationend" thing and used async/await here. See
> UIHelper.animationFrame().

We could also use the Web Animations API which already has the finished promise. I just assumed these tests were supposed to be "pure CSS" as much as possible and not use the Web Animations API.
Comment 7 Antoine Quint 2020-04-22 08:53:49 PDT
Created attachment 397196 [details]
Patch
Comment 8 Simon Fraser (smfr) 2020-04-22 09:03:01 PDT
Comment on attachment 397196 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=397196&action=review

> LayoutTests/animations/transition-and-animation-1.html:23
>          to   { -webkit-transform: translateX(300px); }

Might as well remove prefixes too.

> LayoutTests/animations/transition-and-animation-1.html:26
> +    <script src="../resources/ui-helper.js" type="text/javascript" charset="utf-8"></script>

You can drop the type="text/javascript" charset="utf-8" in this and the next script tag.
Comment 9 Antoine Quint 2020-04-22 09:17:33 PDT
(In reply to Simon Fraser (smfr) from comment #8)
> Comment on attachment 397196 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=397196&action=review
> 
> > LayoutTests/animations/transition-and-animation-1.html:23
> >          to   { -webkit-transform: translateX(300px); }
> 
> Might as well remove prefixes too.
> 
> > LayoutTests/animations/transition-and-animation-1.html:26
> > +    <script src="../resources/ui-helper.js" type="text/javascript" charset="utf-8"></script>
> 
> You can drop the type="text/javascript" charset="utf-8" in this and the next
> script tag.

Will do in the commit.
Comment 10 Antoine Quint 2020-04-22 09:21:44 PDT
Committed r260513: <https://trac.webkit.org/changeset/260513>
Comment 11 Antoine Quint 2020-04-22 11:08:26 PDT
Committed r260521: <https://trac.webkit.org/changeset/260521>