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

Unified Diff: tools/perf/page_sets/tough_animation_cases/web_animations_simultaneous.html

Issue 365613002: Add Web Animations perf tests to tough_animation_cases page set (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Style inconsistencies Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: tools/perf/page_sets/tough_animation_cases/web_animations_simultaneous.html
diff --git a/tools/perf/page_sets/tough_animation_cases/web_animations_simultaneous.html b/tools/perf/page_sets/tough_animation_cases/web_animations_simultaneous.html
new file mode 100644
index 0000000000000000000000000000000000000000..bbdb59d7a608ab73bd61b3678fafcbd1acdf6b9b
--- /dev/null
+++ b/tools/perf/page_sets/tough_animation_cases/web_animations_simultaneous.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<meta name="viewport" content="width=device-width, user-scalable=no">
+<link rel="stylesheet" type="text/css" href="resources/tablet.css">
+<script src="resources/perftesthelper.js"></script>
+
+<container id="container"></container>
+
+<script>
+var N = PerfTestHelper.getN(1000);
+var duration = 1000;
+var targets = [];
+
+function startAnimation(element) {
+ element.animate([
+ {opacity: 0},
+ {opacity: 1},
+ ], duration);
+}
+
+function startAllAnimations() {
+ for (var i in targets)
+ startAnimation(targets[i]);
+ setTimeout(startAllAnimations, duration);
+}
+
+for (var i = 0; i < N; i++) {
+ var target = document.createElement('target');
+ container.appendChild(target);
+ targets.push(target);
+}
+
+startAllAnimations();
+
+PerfTestHelper.signalReady();
+</script>

Powered by Google App Engine
This is Rietveld 408576698