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

Side by Side Diff: third_party/WebKit/PerformanceTests/Layout/subtree-detaching.html

Issue 1557953002: Revert unfinished work of "full-frame-measurement" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@PerfPaint
Patch Set: Created 4 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
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <body> 3 <body>
4 <script src="../resources/runner.js"></script> 4 <script src="../resources/runner.js"></script>
5 <script> 5 <script>
6 function buildTree() 6 function buildTree()
7 { 7 {
8 wrapper = document.createElement("div"); 8 wrapper = document.createElement("div");
9 for (i = 0; i < 1000; ++i) { 9 for (i = 0; i < 1000; ++i) {
10 var child = document.createElement("div"); 10 var child = document.createElement("div");
11 for (j = 0; j < 1000; ++j) { 11 for (j = 0; j < 1000; ++j) {
12 var grandChild = document.createElement("div"); 12 var grandChild = document.createElement("div");
13 child.appendChild(grandChild); 13 child.appendChild(grandChild);
14 } 14 }
15 wrapper.appendChild(child); 15 wrapper.appendChild(child);
16 } 16 }
17 document.body.appendChild(wrapper); 17 document.body.appendChild(wrapper);
18 } 18 }
19 19
20 function setup() { 20 function setup() {
21 wrapper.style.display = "block"; 21 wrapper.style.display = "block";
22 PerfTestRunner.forceLayoutOrFullFrame(); 22 PerfTestRunner.forceLayout();
23 } 23 }
24 24
25 function runTest() { 25 function runTest() {
26 setup(); 26 setup();
27 27
28 var now = PerfTestRunner.now(); 28 var now = PerfTestRunner.now();
29 29
30 wrapper.style.display = "none"; 30 wrapper.style.display = "none";
31 PerfTestRunner.forceLayoutOrFullFrame(); 31 PerfTestRunner.forceLayout();
32 32
33 return PerfTestRunner.now() - now; 33 return PerfTestRunner.now() - now;
34 } 34 }
35 35
36 buildTree(); 36 buildTree();
37 37
38 PerfTestRunner.measureTime({run: runTest, description: "This benchmark checks th e time spend in detaching an tree." }); 38 PerfTestRunner.measureTime({run: runTest, description: "This benchmark checks th e time spend in detaching an tree." });
39 </script> 39 </script>
40 </body> 40 </body>
41 </html> 41 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698