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

Side by Side Diff: tools/perf/page_sets/tough_animation_cases/web_animations_simultaneous.html

Issue 365613002: Add Web Animations perf tests to tough_animation_cases page set (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Style inconsistencies Created 6 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <meta name="viewport" content="width=device-width, user-scalable=no">
3 <link rel="stylesheet" type="text/css" href="resources/tablet.css">
4 <script src="resources/perftesthelper.js"></script>
5
6 <container id="container"></container>
7
8 <script>
9 var N = PerfTestHelper.getN(1000);
10 var duration = 1000;
11 var targets = [];
12
13 function startAnimation(element) {
14 element.animate([
15 {opacity: 0},
16 {opacity: 1},
17 ], duration);
18 }
19
20 function startAllAnimations() {
21 for (var i in targets)
22 startAnimation(targets[i]);
23 setTimeout(startAllAnimations, duration);
24 }
25
26 for (var i = 0; i < N; i++) {
27 var target = document.createElement('target');
28 container.appendChild(target);
29 targets.push(target);
30 }
31
32 startAllAnimations();
33
34 PerfTestHelper.signalReady();
35 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698