| Index: third_party/WebKit/LayoutTests/svg/custom/animate-initial-pause-unpause.html
|
| diff --git a/third_party/WebKit/LayoutTests/svg/custom/animate-initial-pause-unpause.html b/third_party/WebKit/LayoutTests/svg/custom/animate-initial-pause-unpause.html
|
| index f975c3e5ec8fe6254a4882b91d39740a899f7cf5..15b77a07d4620a2083f724b05036b2b8c448838d 100644
|
| --- a/third_party/WebKit/LayoutTests/svg/custom/animate-initial-pause-unpause.html
|
| +++ b/third_party/WebKit/LayoutTests/svg/custom/animate-initial-pause-unpause.html
|
| @@ -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="0.01s" fill="freeze"/>
|
| - </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");
|
| + });
|
|
|
| - setTimeout(function() {
|
| - 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();
|
| - }, 50);
|
| - </script>
|
| -</body>
|
| -</html>
|
| + window.onload = function() {
|
| + requestAnimationFrame(function() {
|
| + setTimeout(endStep, 50);
|
| + });
|
| + };
|
| +}, "Pausing and unpausing an animation before it starts should have no effect");
|
| +</script>
|
|
|