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

Side by Side Diff: tools/perf/page_sets/perf_week/web-animations-staggered-infinite-iterations.html

Issue 402433004: Test adding perf week tests as smoothness benchmark (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: g cl issue Created 6 years, 4 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 <script src="resources/web-animations-api-check.js"></script>
4 <container id="container"></container>
5 <script>
6 var N = 1000;
7 var duration = 1000;
8
9 function startAnimation(element, delay) {
10 target.animate([
11 {opacity: 0},
12 {opacity: 1},
13 ], {
14 duration: duration,
15 iterations: Infinity,
16 delay: delay,
17 });
18 }
19
20 for (var i = 0; i < N; i++) {
21 var target = document.createElement('target');
22 container.appendChild(target);
23 startAnimation(target, -i * (duration / N));
24 }
25
26 requestAnimationFrame(function() {
27 window.measurementReady = true;
28 });
29 </script>
30
31 <style>
32 target {
33 display: inline-block;
34 width: 9px; height: 9px;
35 background: orange;
36 }
37 body {
38 margin: 0;
39 overflow: hidden;
40 }
41 container {
42 display: flex;
43 flex-flow: row wrap;
44 width: 550px;
45 height: 800px;
46 background: magenta;
47 }
48 </style>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698