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

Side by Side Diff: PerformanceTests/Layout/flexbox-with-stretch-layout.html

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 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../resources/runner.js"></script> 4 <script src="../resources/runner.js"></script>
5 <style> 5 <style>
6 6
7 #container { 7 #container {
8 display: flex; 8 display: flex;
9 flex-wrap: wrap; 9 flex-wrap: wrap;
10 } 10 }
(...skipping 26 matching lines...) Expand all
37 var container = document.getElementById("container"); 37 var container = document.getElementById("container");
38 for (var i = 0; i < 200; i++) { 38 for (var i = 0; i < 200; i++) {
39 var div = document.createElement("div"); 39 var div = document.createElement("div");
40 div.className = "byteBox"; 40 div.className = "byteBox";
41 var span = document.createElement("span"); 41 var span = document.createElement("span");
42 span.className = "inlineBlock"; 42 span.className = "inlineBlock";
43 span.innerText = nbsp; 43 span.innerText = nbsp;
44 div.appendChild(span); 44 div.appendChild(span);
45 container.appendChild(div); 45 container.appendChild(div);
46 }; 46 };
47 PerfTestRunner.forceLayoutOrFullFrame();
47 }; 48 };
48 49
49 setupTest(); 50 setupTest();
50 51
51 var switcher = true; 52 var switcher = true;
52 53
53 function runTest() 54 function runTest()
54 { 55 {
55 var inlineBlocks = document.getElementsByClassName("inlineBlock"); 56 var inlineBlocks = document.getElementsByClassName("inlineBlock");
56 for (var i = inlineBlocks.length - 1; i >= 0; i--) { 57 for (var i = inlineBlocks.length - 1; i >= 0; i--) {
57 inlineBlocks[i].innerText = switcher ? " " : nbsp; 58 inlineBlocks[i].innerText = switcher ? " " : nbsp;
58 inlineBlocks[i].offsetTop; 59 PerfTestRunner.forceLayoutOrFullFrame();
59 }; 60 };
60 switcher = !switcher; 61 switcher = !switcher;
61 }; 62 };
62 63
63 PerfTestRunner.measureRunsPerSecond({ 64 PerfTestRunner.measureRunsPerSecond({
64 description: "Measures performance of flexbox containing many small elements with wrapping (column).", 65 description: "Measures performance of flexbox containing many small elements with wrapping (column).",
65 run: runTest 66 run: runTest
66 }); 67 });
67 </script> 68 </script>
68 </html> 69 </html>
OLDNEW
« no previous file with comments | « PerformanceTests/Layout/flexbox-row-wrap.html ('k') | PerformanceTests/Layout/hindi-line-layout.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698