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

Side by Side 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, 11 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
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <style>
5 #log {
6 position: fixed;
7 }
8 </style>
9 <script src="../resources/runner.js"></script>
10 <body>
11 <pre id="log"></pre>
12 <script>
13 function addGridItems(grid, tracksCount) {
14 for (row = 1; row <= tracksCount; row++) {
15 for (column = 1; column <= tracksCount; column++) {
16 var item = document.createElement("div");
17 item.innerHTML = "auto";
18 grid.appendChild(item);
19 }
20 }
21 }
22
23 function createGridTest(tracksCount) {
24 var grid = document.createElement("div");
25 grid.style.display = "grid";
26 grid.style.gridTemplateColumns = "repeat(" + tracksCount + ", 50px)" ;
27 grid.style.gridTemplateRows = "repeat(" + tracksCount + ", 50px)";
28 document.body.appendChild(grid);
29
30 return {
31 description: "Testing addition of auto-positioned items on a " + tracksCount + "x" + tracksCount + " grid.",
32 run: function() {
33 addGridItems(grid, tracksCount);
34 },
35 setup: function() {
36 grid.innerHTML = "";
37 },
38 done: function() {
39 document.body.removeChild(grid);
40 }
41 };
42 }
43
44 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
45 </script>
46 </body>
47 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698