-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update 'animate-initial-pause-unpause.html' to use 'testharness' and …
…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
1 parent
790be61
commit 008483f
Showing
5 changed files
with
27 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletion
4
LayoutTests/svg/custom/animate-initial-pause-unpause-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
53
LayoutTests/svg/custom/animate-initial-pause-unpause.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |