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

Side by Side Diff: PerformanceTests/Layout/resources/floats.js

Issue 675983004: Allow performance tests to test full rendering performance (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: layoutOrFullyRender -> forceLayoutOrFullFrame Created 6 years, 1 month 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 | Annotate | Revision Log
OLDNEW
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
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 // Force a layout. 52 PerfTestRunner.forceLayoutOrFullFrame();
53 container.clientHeight;
54 } 53 }
55 resetTest(); 54 resetTest();
56 container.style.display = "none"; 55 container.style.display = "none";
57 } 56 }
58 } 57 }
59 } 58 }
60 59
61 window.createFloatsLayoutTestFunction = createTestFunction; 60 window.createFloatsLayoutTestFunction = createTestFunction;
62 })(); 61 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698