Changeset 250781 in webkit


Ignore:
Timestamp:
Oct 7, 2019 11:57:27 AM (4 years ago)
Author:
commit-queue@webkit.org
Message:

[macOS WK2 Debug ] Flaky Test: animations/play-state-in-shorthand.html
https://bugs.webkit.org/show_bug.cgi?id=192501

Patch by Antoine Quint <Antoine Quint> on 2019-10-07
Reviewed by Simon Fraser.

This test used to rely on timers to check the computed style at various animation times and also to check the "animation-play-state"
to "paused" via the "animation" shorthand CSS property. This was flaky by design since timers could not fire with high enough fidelity
to ensure the animation time matched the expectation. With the availability of the Web Animations API, we can simply use the "playState"
property on the Animation object reflecting the CSS animation to check that the change is accounted for.

  • animations/play-state-in-shorthand-expected.txt:
  • animations/play-state-in-shorthand.html:
  • platform/ios-simulator-wk2/TestExpectations:
  • platform/mac/TestExpectations:
Location:
trunk/LayoutTests
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r250778 r250781  
     12019-10-07  Antoine Quint  <graouts@apple.com>
     2
     3        [macOS WK2 Debug ] Flaky Test: animations/play-state-in-shorthand.html
     4        https://bugs.webkit.org/show_bug.cgi?id=192501
     5
     6        Reviewed by Simon Fraser.
     7
     8        This test used to rely on timers to check the computed style at various animation times and also to check the "animation-play-state"
     9        to "paused" via the "animation" shorthand CSS property. This was flaky by design since timers could not fire with high enough fidelity
     10        to ensure the animation time matched the expectation. With the availability of the Web Animations API, we can simply use the "playState"
     11        property on the Animation object reflecting the CSS animation to check that the change is accounted for.
     12
     13        * animations/play-state-in-shorthand-expected.txt:
     14        * animations/play-state-in-shorthand.html:
     15        * platform/ios-simulator-wk2/TestExpectations:
     16        * platform/mac/TestExpectations:
     17
    1182019-10-07  Dirk Schulze  <krit@webkit.org>
    219
  • trunk/LayoutTests/animations/play-state-in-shorthand-expected.txt

    r200043 r250781  
    1 PASS - "transform" property for "box" element at 0.5s saw something close to: 1,0,0,1,75,0
    2 PASS - "transform" property for "box" element at 1s saw something close to: 1,0,0,1,150,0
    3 PASS - "transform" property for "box" element at 2.5s saw something close to: 1,0,0,1,150,0
    4 
     1PASS - animation is running upon receiving animationstart event
     2PASS - animation is paused after setting the animation-play-state property to paused through the shorthand
  • trunk/LayoutTests/animations/play-state-in-shorthand.html

    r200043 r250781  
    2626    }
    2727  </style>
    28   <script src="resources/animation-test-helpers.js" type="text/javascript"></script>
    29   <script type="text/javascript">
    30     const expectedValues = [
    31       // [animation-name, time, element-id, property, expected-value, tolerance]
    32       ["move1", 0.5, "box", "transform", [1,0,0,1,75,0], 20],
    33       ["move1", 1.0, "box", "transform", [1,0,0,1,150,0], 20],
    34       ["move1", 2.5, "box", "transform", [1,0,0,1,150,0], 20],
    35     ];
    36 
    37     function pauseAnimation()
    38     {
    39         document.getElementById("box").classList.add('paused');
    40     }
    41 
    42     function setTimers()
    43     {
    44         setTimeout(pauseAnimation, 1000);
    45     }
    46 
    47     runAnimationTest(expectedValues, setTimers, null, true);
    48   </script>
    4928</head>
    5029<body>
    5130<div id="box"></div>
    5231<div id="result"></div>
    53 </div>
     32<script type="text/javascript">
     33
     34    if (window.testRunner) {
     35        testRunner.dumpAsText();
     36        testRunner.waitUntilDone();
     37    }
     38
     39    document.getElementById("box").addEventListener("animationstart", event => {
     40        const animation = event.target.getAnimations()[0];
     41        result.innerHTML += `${animation.playState == "running" ? "PASS" : "FAIL"} - animation is running upon receiving animationstart event<br>`;
     42        event.target.classList.add("paused");
     43        result.innerHTML += `${animation.playState == "paused" ? "PASS" : "FAIL"} - animation is paused after setting the animation-play-state property to paused through the shorthand`;
     44
     45        if (window.testRunner)
     46            testRunner.notifyDone();
     47    });
     48</script>
    5449</body>
    5550</html>
  • trunk/LayoutTests/platform/ios-simulator-wk2/TestExpectations

    r249625 r250781  
    8181webkit.org/b/197207 http/wpt/resource-timing/rt-resources-per-frame.html [ Pass Failure ]
    8282
    83 webkit.org/b/192501 animations/play-state-in-shorthand.html [ Pass Failure ]
    84 
    8583webkit.org/b/182849 imported/w3c/web-platform-tests/xhr/event-upload-progress-crossorigin.htm [ Pass Failure ]
    8684
  • trunk/LayoutTests/platform/mac/TestExpectations

    r250741 r250781  
    18841884imported/w3c/web-platform-tests/pointerevents/pointerlock/pointerevent_pointermove_on_chorded_mouse_button_when_locked-manual.html [ Skip ]
    18851885
    1886 webkit.org/b/192501 [ Debug ] animations/play-state-in-shorthand.html [ Pass Failure ]
    1887 
    18881886webkit.org/b/197473 imported/w3c/web-platform-tests/resource-timing/resource-timing-level1.sub.html [ Pass Failure ]
    18891887
Note: See TracChangeset for help on using the changeset viewer.