OLD | NEW |
1 (function() { | 1 (function() { |
2 function createElement(tag, parent, className, id) { | 2 function createElement(tag, parent, className, id) { |
3 var el = document.createElement(tag); | 3 var el = document.createElement(tag); |
4 el.className = className; | 4 el.className = className; |
5 if (id) | 5 if (id) |
6 el.id = id; | 6 el.id = id; |
7 parent.appendChild(el); | 7 parent.appendChild(el); |
8 return el; | 8 return el; |
9 } | 9 } |
10 | 10 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 runs = runs || 10; | 42 runs = runs || 10; |
43 return function() { | 43 return function() { |
44 for (var c = 0; c < rows; ++c) { | 44 for (var c = 0; c < rows; ++c) { |
45 container = containers[c]; | 45 container = containers[c]; |
46 container.style.display = "block"; | 46 container.style.display = "block"; |
47 for (var i = 0; i < runs; ++i) { | 47 for (var i = 0; i < runs; ++i) { |
48 var x = Math.floor(Math.random() * width); | 48 var x = Math.floor(Math.random() * width); |
49 var y = Math.floor(Math.random() * height); | 49 var y = Math.floor(Math.random() * height); |
50 var el = document.getElementById("float" + x + "_" + y); | 50 var el = document.getElementById("float" + x + "_" + y); |
51 el.className = toggle(el.className, "float", "float big"); | 51 el.className = toggle(el.className, "float", "float big"); |
52 PerfTestRunner.forceLayoutOrFullFrame(); | 52 PerfTestRunner.forceLayout(); |
53 } | 53 } |
54 resetTest(); | 54 resetTest(); |
55 container.style.display = "none"; | 55 container.style.display = "none"; |
56 } | 56 } |
57 } | 57 } |
58 } | 58 } |
59 | 59 |
60 window.createFloatsLayoutTestFunction = createTestFunction; | 60 window.createFloatsLayoutTestFunction = createTestFunction; |
61 })(); | 61 })(); |
OLD | NEW |