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

Side by Side Diff: tools/perf/page_sets/perf_week/web-animations-simultaneous.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 var targets = [];
9
10 function startAnimation(element) {
11 element.animate([
12 {opacity: 0},
13 {opacity: 1},
14 ], duration);
15 }
16
17 function startAllAnimations() {
18 for (var i in targets)
19 startAnimation(targets[i]);
20 setTimeout(startAllAnimations, duration);
21 }
22
23 for (var i = 0; i < N; i++) {
24 var target = document.createElement('target');
25 container.appendChild(target);
26 targets.push(target);
27 }
28
29 startAllAnimations();
30
31 requestAnimationFrame(function() {
32 window.measurementReady = true;
33 });
34 </script>
35
36 <style>
37 target {
38 display: inline-block;
39 width: 9px; height: 9px;
40 background: orange;
41 }
42 body {
43 margin: 0;
44 overflow: hidden;
45 }
46 container {
47 display: flex;
48 flex-flow: row wrap;
49 width: 550px;
50 height: 800px;
51 background: magenta;
52 }
53 </style>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698