Skip to content

Commit

Permalink
Update 'animate-initial-pause-unpause.html' to use 'testharness' and …
Browse files Browse the repository at this point in the history
…deflake

https://bugs.webkit.org/show_bug.cgi?id=266865

Reviewed by Tim Nguyen.

Merge: https://chromium.googlesource.com/chromium/src.git/+/45ca0a5d79d8cbc9faf8470c30fc5cb02e1bbe1f

This patch is to import test using testharness from Blink / Chromium source, it is an attempt
to deflake the test.

* LayoutTests/svg/custom/animate-initial-pause-unpause.html: Updated
* LayoutTests/svg/custom/animate-initial-pause-unpause-expected.txt: Updated Expectation Files
* LayoutTests/platform/wpe/TestExpectations: Remove 'flaky' expectation
* LayoutTests/platform/mac/TestExpectations: Ditto
* LayoutTests/platform/ios-wk2/TestExpectations: Ditto

Canonical link: https://commits.webkit.org/272493@main
  • Loading branch information
Ahmad-S792 authored and Ahmad Saleem committed Dec 24, 2023
1 parent 790be61 commit 008483f
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 36 deletions.
2 changes: 0 additions & 2 deletions LayoutTests/platform/ios-wk2/TestExpectations
Original file line number Diff line number Diff line change
Expand Up @@ -1761,8 +1761,6 @@ webkit.org/b/209544 svg/custom/object-sizing-explicit-width.xhtml [ Pass Failure

webkit.org/b/209869 crypto/subtle/rsa-indexeddb-non-exportable-private.html [ Pass Timeout ]

webkit.org/b/209908 svg/custom/animate-initial-pause-unpause.html [ Pass Timeout ]

webkit.org/b/206750 http/tests/security/appcache-in-private-browsing.html [ Pass Timeout ]

webkit.org/b/210201 [ Debug ] editing/editability/empty-document-delete.html [ Pass Crash ]
Expand Down
2 changes: 0 additions & 2 deletions LayoutTests/platform/mac/TestExpectations
Original file line number Diff line number Diff line change
Expand Up @@ -1681,8 +1681,6 @@ webkit.org/b/207858 fast/canvas/webgl/simulated-vertexAttrib0-invalid-indicies.h

webkit.org/b/209619 compositing/clipping/border-radius-async-overflow-stacking.html [ Pass ImageOnlyFailure ]

webkit.org/b/209908 svg/custom/animate-initial-pause-unpause.html [ Pass Timeout ]

webkit.org/b/210046 [ Release ] storage/indexeddb/value-cursor-cycle.html [ Pass Failure ]

webkit.org/b/207160 css2.1/20110323/replaced-intrinsic-ratio-001.htm [ Pass Failure ]
Expand Down
2 changes: 0 additions & 2 deletions LayoutTests/platform/wpe/TestExpectations
Original file line number Diff line number Diff line change
Expand Up @@ -914,8 +914,6 @@ webkit.org/b/219465 imported/w3c/web-platform-tests/html/browsers/browsing-the-w

webkit.org/b/219470 fast/visual-viewport/visual-viewport-resize-subframe-in-rendering-update.html [ Timeout Pass ]

webkit.org/b/219474 svg/custom/animate-initial-pause-unpause.html [ Timeout Pass ]

# Flaky tests detected from 29Jan2023 to 23Feb2023
webkit.org/b/252878 css3/flexbox/image-percent-max-height.html [ ImageOnlyFailure Pass ]
webkit.org/b/252878 fast/css3-text/css3-text-decoration/repaint/underline-outside-of-layout-rect-altered.html [ ImageOnlyFailure Pass ]
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
PASS

PASS Pausing and unpausing an animation before it starts should have no effect

53 changes: 24 additions & 29 deletions LayoutTests/svg/custom/animate-initial-pause-unpause.html
Original file line number Diff line number Diff line change
@@ -1,36 +1,31 @@
<!DOCTYPE HTML>
<html>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<!--
Test for WK89943: pausing and unpausing an animation before it starts should have no effect.
-->
<body>
<svg id="svg" width="400" height="400">
<rect x="0" y="0" width="100" height="100" fill="red"/>
<rect id="rect" x="100" y="0" width="100" height="100" fill="green">
<set attributeName="x" to="0" begin="10ms" end="30ms" fill="freeze" onend="handleEndEvent()"/>
</rect>
</svg>
<script>
if (window.testRunner) {
testRunner.waitUntilDone();
testRunner.dumpAsText();
}
<svg id="svg" width="400" height="400">
<rect x="0" y="0" width="100" height="100" fill="red"/>
<rect id="rect" x="100" y="0" width="100" height="100" fill="green">
<set attributeName="x" to="0" begin="0.01s" fill="freeze"/>
</rect>
</svg>
<script>
async_test(function(t) {
var svg = document.getElementById("svg");

var svg = document.getElementById("svg");
var rect = document.getElementById("rect");
svg.pauseAnimations();
svg.unpauseAnimations();

svg.pauseAnimations();
svg.unpauseAnimations();
var endStep = t.step_func_done(function() {
var rect = document.getElementById("rect");
assert_equals(rect.x.animVal.value, 0, "<set> is applied");
});

function handleEndEvent() {
if (rect.x.animVal.value == 0)
document.body.innerHTML = "PASS";
else
document.body.innerHTML = "FAIL : rect.x.animVal.value was " + rect.x.animVal.value + " but we expected 0.";

if (window.testRunner)
testRunner.notifyDone();
}
</script>
</body>
</html>
window.onload = function() {
requestAnimationFrame(function() {
setTimeout(endStep, 50);
});
};
}, "Pausing and unpausing an animation before it starts should have no effect");
</script>

0 comments on commit 008483f

Please sign in to comment.