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

Side by Side Diff: third_party/WebKit/PerformanceTests/ShadowDOM/v1-distribution.html

Issue 1630003004: Modify v1-distribution PerformanceTest (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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
« no previous file with comments | « no previous file | no next file » | 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 <script src="../resources/runner.js"></script> 2 <script src="../resources/runner.js"></script>
3 <div id="wrapper"> 3 <div id="wrapper">
4 <div id="host"></div> 4 <div id="host"></div>
5 </div> 5 </div>
6 <script> 6 <script>
7 'use strict'; 7 'use strict';
8 const numChildOfHost = 10; 8 const numChildOfHost = 10;
9 const numDivsInShadow = 100; 9 const numDivsInShadow = 100;
10 const loops = 20; 10 const loops = 20;
(...skipping 10 matching lines...) Expand all
21 21
22 for (let i = 0; i < numDivsInShadow; ++i) { 22 for (let i = 0; i < numDivsInShadow; ++i) {
23 let div = document.createElement('div'); 23 let div = document.createElement('div');
24 shadowRoot.appendChild(div); 24 shadowRoot.appendChild(div);
25 } 25 }
26 26
27 function run() { 27 function run() {
28 let div = document.createElement('div'); 28 let div = document.createElement('div');
29 for (let i = 0; i < loops; ++i) { 29 for (let i = 0; i < loops; ++i) {
30 host.appendChild(div); 30 host.appendChild(div);
31 slot.getDistributedNodes();; 31 slot.getAssignedNodes({flatten: true});
32 host.removeChild(div); 32 host.removeChild(div);
33 slot.getDistributedNodes();; 33 slot.getAssignedNodes({flatten: true});
34 } 34 }
35 } 35 }
36 36
37 PerfTestRunner.measureRunsPerSecond({ 37 PerfTestRunner.measureRunsPerSecond({
38 description: "Measure v1 distribution performance", 38 description: "Measure v1 distribution performance",
39 run: run, 39 run: run,
40 done: () => { 40 done: () => {
41 wrapper.innerHTML = ''; 41 wrapper.innerHTML = '';
42 } 42 }
43 }); 43 });
44 </script> 44 </script>
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698