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

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

Powered by Google App Engine
This is Rietveld 408576698