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

Side by Side Diff: third_party/WebKit/PerformanceTests/Parser/query-selector-deep.html

Issue 1880383002: Re-enable deep query-selector PerformanceTests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reduce depth to 100 Created 4 years, 7 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
« no previous file with comments | « no previous file | third_party/WebKit/PerformanceTests/Parser/query-selector-id-deep.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 var parentDiv = document.body; 6 var parentDiv = document.body;
7 for (var i = 0; i < 1000; i++) { 7 for (var i = 0; i < 100; i++) {
8 var div = document.createElement("div"); 8 var div = document.createElement("div");
9 div.id = "foo" + i; 9 div.id = "foo" + i;
10 div.className = "bar" + i; 10 div.className = "bar" + i;
11 parentDiv.appendChild(div); 11 parentDiv.appendChild(div);
12 parentDiv = div; 12 parentDiv = div;
13 } 13 }
14 14
15 var h1 = document.createElement("h1"); 15 var h1 = document.createElement("h1");
16 h1.id = "id"; 16 h1.id = "id";
17 h1.className = "class"; 17 h1.className = "class";
18 parentDiv.appendChild(h1); 18 parentDiv.appendChild(h1);
19 19
20 PerfTestRunner.measureRunsPerSecond({ 20 PerfTestRunner.measureRunsPerSecond({
21 description: "This benchmark tests querySelector() for an element that appea rs in the depths in the document", 21 description: "This benchmark tests querySelector() for an element that appea rs in the depths in the document",
22 run: function() { 22 run: function() {
23 for (var i = 0; i < 100; i++) { 23 for (var i = 0; i < 100; i++) {
24 document.querySelector("h1"); 24 document.querySelector("h1");
25 document.querySelector("#id"); 25 document.querySelector("#id");
26 document.querySelector(".class"); 26 document.querySelector(".class");
27 } 27 }
28 }}); 28 }});
29 </script> 29 </script>
30 </body> 30 </body>
31 </html> 31 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/PerformanceTests/Parser/query-selector-id-deep.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698