Index: tools/perf/page_sets/tough_animation_cases/css_animations_staggered_infinite_iterations.html |
diff --git a/tools/perf/page_sets/tough_animation_cases/web_animations_staggered_infinite_iterations.html b/tools/perf/page_sets/tough_animation_cases/css_animations_staggered_infinite_iterations.html |
similarity index 61% |
copy from tools/perf/page_sets/tough_animation_cases/web_animations_staggered_infinite_iterations.html |
copy to tools/perf/page_sets/tough_animation_cases/css_animations_staggered_infinite_iterations.html |
index 147b53597e0f9f8af887105b569f142845f44b39..d4816fbcf9ceaf657299e096707ba5d6400ac46f 100644 |
--- a/tools/perf/page_sets/tough_animation_cases/web_animations_staggered_infinite_iterations.html |
+++ b/tools/perf/page_sets/tough_animation_cases/css_animations_staggered_infinite_iterations.html |
@@ -1,8 +1,13 @@ |
<!DOCTYPE html> |
<meta name="viewport" content="width=device-width, user-scalable=no"> |
+<link rel="stylesheet" type="text/css" href="resources/animation.css"> |
<link rel="stylesheet" type="text/css" href="resources/tablet.css"> |
<script src="resources/perftesthelper.js"></script> |
-<script src="resources/web_animations_api_check.js"></script> |
+<style> |
+target { |
+ -webkit-animation-iteration-count: infinite; |
+} |
+</style> |
<container id="container"></container> |
@@ -10,21 +15,10 @@ |
var N = PerfTestHelper.getN(1000); |
var duration = 1000; |
-function startAnimation(element, delay) { |
- target.animate([ |
- {opacity: 0}, |
- {opacity: 1}, |
- ], { |
- duration: duration, |
- iterations: Infinity, |
- delay: delay, |
- }); |
-} |
- |
for (var i = 0; i < N; i++) { |
var target = document.createElement('target'); |
+ target.style.animationDelay = (-i / N * duration) + 'ms'; |
container.appendChild(target); |
- startAnimation(target, i * (duration / N) - duration); |
} |
PerfTestHelper.signalReady(); |