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

Side by Side Diff: tools/perf/page_sets/perf_week/css-transitions-simultaneous-by-updating-inline-style.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 <container id="container"></container>
4 <script>
5 var N = 1000;
6 var duration = 1000;
7 var targets = [];
8 var keyframe = 1;
9 var keyframeValues = [0, 1]
10
11 for (var i = 0; i < N; i++) {
12 var target = document.createElement('target');
13 container.appendChild(target);
14 targets.push(target);
15 }
16
17 function startAllAnimations() {
18 keyframe ^= 1;
19 targets.forEach(function(target) {
20 target.style.opacity = keyframeValues[keyframe];
21 });
22 }
23
24 requestAnimationFrame(startAllAnimations);
25 setInterval(startAllAnimations, duration);
26
27 requestAnimationFrame(function() {
28 window.measurementReady = true;
29 });
30 </script>
31
32 <style>
33 body {
34 margin: 0;
35 overflow: hidden;
36 }
37 container {
38 display: flex;
39 flex-flow: row wrap;
40 width: 550px;
41 height: 800px;
42 background: lightgoldenrodyellow;
43 }
44 target {
45 display: inline-block;
46 width: 9px; height: 9px;
47 background: magenta;
48 transition: opacity 1000ms linear;
49 }
50 </style>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698