Index: tools/perf/page_sets/perf_week/css-transitions-simultaneous-by-inserting-style-element.html |
diff --git a/tools/perf/page_sets/perf_week/css-transitions-simultaneous-by-inserting-style-element.html b/tools/perf/page_sets/perf_week/css-transitions-simultaneous-by-inserting-style-element.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..fc70588926b4cf91d1659ef598d7c303c5040544 |
--- /dev/null |
+++ b/tools/perf/page_sets/perf_week/css-transitions-simultaneous-by-inserting-style-element.html |
@@ -0,0 +1,51 @@ |
+<!doctype html> |
+<meta name="viewport" content="width=device-width, user-scalable=no"> |
+<container id="container"></container> |
+<script> |
+var N = 1000; |
+var duration = 1000; |
+var style = null; |
+var keyframe = 1; |
+var keyframeValues = [0, 1] |
+ |
+for (var i = 0; i < N; i++) { |
+ container.appendChild(document.createElement('target')); |
+} |
+ |
+function startAllAnimations() { |
+ keyframe ^= 1; |
+ if (style) { |
+ style.remove(); |
+ } |
+ style = document.createElement('style'); |
+ style.textContent = 'target { opacity: ' + keyframeValues[keyframe] + '; }'; |
+ container.appendChild(style); |
+} |
+ |
+requestAnimationFrame(startAllAnimations); |
+setInterval(startAllAnimations, duration); |
+ |
+requestAnimationFrame(function() { |
+ window.measurementReady = true; |
+}); |
+</script> |
+ |
+<style> |
+body { |
+ margin: 0; |
+ overflow: hidden; |
+} |
+container { |
+ display: flex; |
+ flex-flow: row wrap; |
+ width: 550px; |
+ height: 800px; |
+ background: lightgoldenrodyellow; |
+} |
+target { |
+ display: inline-block; |
+ width: 9px; height: 9px; |
+ background: magenta; |
+ transition: opacity 1000ms linear; |
+} |
+</style> |