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

Side by Side Diff: tools/perf/page_sets/perf_week/css-animations-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 window.measurementReady = true;
6 var N = 1000;
7 var duration = 1000;
8 var style = null;
9
10 for (var i = 0; i < N; i++) {
11 var target = document.createElement('target');
12 container.appendChild(target);
13 }
14
15 var nextAnim = 0;
16 function updateStyle() {
17 if (style) {
18 style.remove();
19 }
20 anim = 'anim' + nextAnim++;
21 style = document.createElement('style');
22 style.textContent = '\
23 target {\
24 display: inline-block;\
25 width: 9px; height: 9px;\
26 background: orange;\
27 -webkit-animation: ' + anim + ' 1s infinite;\
28 }\n\
29 @-webkit-keyframes ' + anim + ' {\
30 0% { opacity: 0; }\
31 100% { opacity: 1; }\
32 }';
33 container.appendChild(style);
34 }
35
36 updateStyle();
37 setInterval(updateStyle, duration);
38 </script>
39
40 <style>
41 body {
42 margin: 0;
43 overflow: hidden;
44 }
45 container {
46 display: flex;
47 flex-flow: row wrap;
48 width: 550px;
49 height: 800px;
50 background: magenta;
51 }
52 </style>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698