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

Unified Diff: PerformanceTests/Layout/grid-add-auto-positioned-items.html

Issue 826893003: [CSS Grid Layout] Remove stack from grid-auto-flow syntax (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@remove-stack
Patch Set: Adding perftests Created 5 years, 12 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: PerformanceTests/Layout/grid-add-auto-positioned-items.html
diff --git a/PerformanceTests/Layout/grid-add-auto-positioned-items.html b/PerformanceTests/Layout/grid-add-auto-positioned-items.html
new file mode 100644
index 0000000000000000000000000000000000000000..c4abb6186580673158785c7eda6bc0871288226a
--- /dev/null
+++ b/PerformanceTests/Layout/grid-add-auto-positioned-items.html
@@ -0,0 +1,47 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+ #log {
+ position: fixed;
+ }
+</style>
+<script src="../resources/runner.js"></script>
+<body>
+ <pre id="log"></pre>
+ <script>
+ function addGridItems(grid, tracksCount) {
+ for (row = 1; row <= tracksCount; row++) {
+ for (column = 1; column <= tracksCount; column++) {
+ var item = document.createElement("div");
+ item.innerHTML = "auto";
+ grid.appendChild(item);
+ }
+ }
+ }
+
+ function createGridTest(tracksCount) {
+ var grid = document.createElement("div");
+ grid.style.display = "grid";
+ grid.style.gridTemplateColumns = "repeat(" + tracksCount + ", 50px)";
+ grid.style.gridTemplateRows = "repeat(" + tracksCount + ", 50px)";
+ document.body.appendChild(grid);
+
+ return {
+ description: "Testing addition of auto-positioned items on a " + tracksCount + "x" + tracksCount + " grid.",
+ run: function() {
+ addGridItems(grid, tracksCount);
+ },
+ setup: function() {
+ grid.innerHTML = "";
+ },
+ done: function() {
+ document.body.removeChild(grid);
+ }
+ };
+ }
+
+ PerfTestRunner.measureTime(createGridTest(100));
Julien - ping for review 2015/01/05 13:11:34 It's better to measure runs/sec instead of time. T
+ </script>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698