Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(509)

Unified Diff: third_party/WebKit/LayoutTests/svg/custom/animate-initial-pause-unpause.html

Issue 2009263002: Attempt to deflake svg/custom/animate-initial-pause-unpause.html (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/svg/custom/animate-initial-pause-unpause-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/svg/custom/animate-initial-pause-unpause-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698