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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/profiler/cpu-profiler-bottom-up-large-tree-search.html

Issue 2493373002: DevTools: rename WebInspector into modules. (Closed)
Patch Set: for bots Created 4 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
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../../http/tests/inspector/inspector-test.js"></script> 3 <script src="../../http/tests/inspector/inspector-test.js"></script>
4 <script src="profiler-test.js"></script> 4 <script src="profiler-test.js"></script>
5 <script> 5 <script>
6 6
7 function test() 7 function test()
8 { 8 {
9 var nodesCount = 1000; 9 var nodesCount = 1000;
10 function buildTree(startId, count) 10 function buildTree(startId, count)
(...skipping 13 matching lines...) Expand all
24 }, 24 },
25 "hitCount": 10, 25 "hitCount": 10,
26 "children": i < count ? [startId + i] : [] 26 "children": i < count ? [startId + i] : []
27 }); 27 });
28 } 28 }
29 return nodes; 29 return nodes;
30 } 30 }
31 var profileAndExpectations = { 31 var profileAndExpectations = {
32 "title": "profile1", 32 "title": "profile1",
33 "target": function() { 33 "target": function() {
34 return WebInspector.targetManager.targets()[0]; 34 return SDK.targetManager.targets()[0];
35 }, 35 },
36 "_profile": { 36 "_profile": {
37 "nodes": [ 37 "nodes": [
38 { 38 {
39 "id": 0, 39 "id": 0,
40 "callFrame": 40 "callFrame":
41 { 41 {
42 "functionName": "(root)", 42 "functionName": "(root)",
43 "scriptId": "0", 43 "scriptId": "0",
44 "url": "a.js", 44 "url": "a.js",
(...skipping 12 matching lines...) Expand all
57 "lineNumber": 1 57 "lineNumber": 1
58 }, 58 },
59 "hitCount": 2, 59 "hitCount": 2,
60 "children": [] 60 "children": []
61 } 61 }
62 ].concat(buildTree(2, nodesCount)), 62 ].concat(buildTree(2, nodesCount)),
63 "startTime": 0, 63 "startTime": 0,
64 "endTime": nodesCount * 10e3 + 3e3 64 "endTime": nodesCount * 10e3 + 3e3
65 } 65 }
66 }; 66 };
67 var view = new WebInspector.CPUProfileView(profileAndExpectations); 67 var view = new Profiler.CPUProfileView(profileAndExpectations);
68 view.viewSelectComboBox.setSelectedIndex(1); 68 view.viewSelectComboBox.setSelectedIndex(1);
69 view._changeView(); 69 view._changeView();
70 var tree = view.profileDataGridTree; 70 var tree = view.profileDataGridTree;
71 if (!tree) 71 if (!tree)
72 InspectorTest.addResult("no tree"); 72 InspectorTest.addResult("no tree");
73 tree.performSearch(new WebInspector.SearchableView.SearchConfig("foo12", tru e, false), false); 73 tree.performSearch(new UI.SearchableView.SearchConfig("foo12", true, false), false);
74 for (var item of tree._searchResults) { 74 for (var item of tree._searchResults) {
75 var node = item.profileNode; 75 var node = item.profileNode;
76 InspectorTest.addResult(`${node.callUID}: ${node.functionName} ${node.se lf} ${node.total}`); 76 InspectorTest.addResult(`${node.callUID}: ${node.functionName} ${node.se lf} ${node.total}`);
77 } 77 }
78 InspectorTest.completeProfilerTest(); 78 InspectorTest.completeProfilerTest();
79 } 79 }
80 80
81 </script> 81 </script>
82 </head> 82 </head>
83 <body onload="runTest()"> 83 <body onload="runTest()">
84 <p> 84 <p>
85 Tests that search works for large bottom-up view of CPU profile. 85 Tests that search works for large bottom-up view of CPU profile.
86 </p> 86 </p>
87 </body> 87 </body>
88 </html> 88 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698