Index: tools/perf/page_sets/perf_week/css-animations-simultaneous-by-inserting-style-element.html |
diff --git a/tools/perf/page_sets/perf_week/css-animations-simultaneous-by-inserting-style-element.html b/tools/perf/page_sets/perf_week/css-animations-simultaneous-by-inserting-style-element.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..e6c51749e46c5333fb239a5058363679bf7959f5 |
--- /dev/null |
+++ b/tools/perf/page_sets/perf_week/css-animations-simultaneous-by-inserting-style-element.html |
@@ -0,0 +1,52 @@ |
+<!doctype html> |
+<meta name="viewport" content="width=device-width, user-scalable=no"> |
+<container id="container"></container> |
+<script> |
+window.measurementReady = true; |
+var N = 1000; |
+var duration = 1000; |
+var style = null; |
+ |
+for (var i = 0; i < N; i++) { |
+ var target = document.createElement('target'); |
+ container.appendChild(target); |
+} |
+ |
+var nextAnim = 0; |
+function updateStyle() { |
+ if (style) { |
+ style.remove(); |
+ } |
+ anim = 'anim' + nextAnim++; |
+ style = document.createElement('style'); |
+ style.textContent = '\ |
+ target {\ |
+ display: inline-block;\ |
+ width: 9px; height: 9px;\ |
+ background: orange;\ |
+ -webkit-animation: ' + anim + ' 1s infinite;\ |
+ }\n\ |
+ @-webkit-keyframes ' + anim + ' {\ |
+ 0% { opacity: 0; }\ |
+ 100% { opacity: 1; }\ |
+ }'; |
+ container.appendChild(style); |
+} |
+ |
+updateStyle(); |
+setInterval(updateStyle, duration); |
+</script> |
+ |
+<style> |
+body { |
+ margin: 0; |
+ overflow: hidden; |
+} |
+container { |
+ display: flex; |
+ flex-flow: row wrap; |
+ width: 550px; |
+ height: 800px; |
+ background: magenta; |
+} |
+</style> |