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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/profiler/heap-snapshot-inspect-dom-wrapper.html

Issue 2850333002: DevTools: Promisify Profiler and HeapProfiler domains (Closed)
Patch Set: addressing comments Created 3 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
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="heap-snapshot-test.js"></script> 4 <script src="heap-snapshot-test.js"></script>
5 <script> 5 <script>
6 6
7 function handleLoad() 7 function handleLoad()
8 { 8 {
9 // Make sure there is a body wrapper. 9 // Make sure there is a body wrapper.
10 document.body.fieldOnDomWrapper = 2012; 10 document.body.fieldOnDomWrapper = 2012;
11 runTest(); 11 runTest();
12 } 12 }
13 13
14 function test() 14 function test()
15 { 15 {
16 var heapProfileType = Profiler.ProfileTypeRegistry.instance.heapSnapshotPro fileType; 16 var heapProfileType = Profiler.ProfileTypeRegistry.instance.heapSnapshotPro fileType;
17 heapProfileType.addEventListener(Profiler.HeapSnapshotProfileType.SnapshotRe ceived, finishHeapSnapshot); 17 heapProfileType.addEventListener(Profiler.HeapSnapshotProfileType.SnapshotRe ceived, finishHeapSnapshot);
18 InspectorTest.addSniffer(heapProfileType, "_snapshotReceived", snapshotRecei ved); 18 InspectorTest.addSniffer(heapProfileType, "_snapshotReceived", snapshotRecei ved);
19 heapProfileType._takeHeapSnapshot(function() {}); 19 heapProfileType._takeHeapSnapshot();
20 20
21 function finishHeapSnapshot(uid) 21 function finishHeapSnapshot(uid)
22 { 22 {
23 InspectorTest.addResult("PASS: snapshot was taken"); 23 InspectorTest.addResult("PASS: snapshot was taken");
24 var profiles = heapProfileType.getProfiles(); 24 var profiles = heapProfileType.getProfiles();
25 25
26 if (!profiles.length) 26 if (!profiles.length)
27 return clear("FAILED: no profiles found"); 27 return clear("FAILED: no profiles found");
28 28
29 if (profiles.length > 1) 29 if (profiles.length > 1)
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 </script> 102 </script>
103 </head> 103 </head>
104 104
105 <body onload="handleLoad()"> 105 <body onload="handleLoad()">
106 <p> 106 <p>
107 Test that resolving heap snapshot object to a JS object will not crash on DOM wr apper boilerplate. Test passes if it doesn't crash. 107 Test that resolving heap snapshot object to a JS object will not crash on DOM wr apper boilerplate. Test passes if it doesn't crash.
108 </p> 108 </p>
109 109
110 </body> 110 </body>
111 </html> 111 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698