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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/tracing/timeline-js/timeline-gc-event.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="../../../http/tests/inspector/timeline-test.js"></script> 4 <script src="../../../http/tests/inspector/timeline-test.js"></script>
5 <script> 5 <script>
6 6
7 function produceGarbageForGCEvents() 7 function produceGarbageForGCEvents()
8 { 8 {
9 if (window.testRunner) { 9 if (window.testRunner) {
10 window.gc(); 10 window.gc();
11 return new Promise((fulfill) => testRunner.layoutAndPaintAsyncThen(fulfi ll)); 11 return new Promise((fulfill) => testRunner.layoutAndPaintAsyncThen(fulfi ll));
12 } 12 }
13 return Promise.reject(); 13 return Promise.reject();
14 } 14 }
15 15
16 function test() 16 function test()
17 { 17 {
18 InspectorTest.invokeAsyncWithTimeline("produceGarbageForGCEvents", validate) ; 18 InspectorTest.invokeAsyncWithTimeline("produceGarbageForGCEvents", validate) ;
19 19
20 function validate() 20 function validate()
21 { 21 {
22 var gcRecord = InspectorTest.findFirstTimelineRecord(WebInspector.Timeli neModel.RecordType.MajorGC) || InspectorTest.findFirstTimelineRecord(WebInspecto r.TimelineModel.RecordType.MinorGC) 22 var gcRecord = InspectorTest.findFirstTimelineRecord(TimelineModel.Timel ineModel.RecordType.MajorGC) || InspectorTest.findFirstTimelineRecord(TimelineMo del.TimelineModel.RecordType.MinorGC)
23 if (gcRecord) 23 if (gcRecord)
24 InspectorTest.addResult("SUCCESS: Found expected GC event record"); 24 InspectorTest.addResult("SUCCESS: Found expected GC event record");
25 else 25 else
26 InspectorTest.addResult("FAIL: GC event record wasn't found"); 26 InspectorTest.addResult("FAIL: GC event record wasn't found");
27 InspectorTest.completeTest(); 27 InspectorTest.completeTest();
28 } 28 }
29 } 29 }
30 30
31 </script> 31 </script>
32 </head> 32 </head>
33 33
34 <body onload="runTest()"> 34 <body onload="runTest()">
35 <p> 35 <p>
36 Tests the Timeline API instrumentation of a gc event 36 Tests the Timeline API instrumentation of a gc event
37 </p> 37 </p>
38 </body> 38 </body>
39 </html> 39 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698