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

Side by Side Diff: LayoutTests/inspector/timeline/timeline-gc-event.html

Issue 461323003: DevTools: Make Timeline tests use only model records (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
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(callback) 7 function produceGarbageForGCEvents(callback)
8 { 8 {
9 if (window.testRunner) { 9 if (window.testRunner) {
10 window.gc(); 10 window.gc();
11 testRunner.displayAsyncThen(callback); 11 testRunner.displayAsyncThen(callback);
12 } 12 }
13 } 13 }
14 14
15 function test() 15 function test()
16 { 16 {
17 InspectorTest.invokeAsyncWithTimeline("produceGarbageForGCEvents", validate) ; 17 InspectorTest.invokeAsyncWithTimeline("produceGarbageForGCEvents", validate) ;
18 18
19 function validate(records) 19 function validate()
20 { 20 {
21 var gcRecords = InspectorTest.filterTimelineRecords(WebInspector.Timelin eModel.RecordType.GCEvent, true); 21 var gcRecord = InspectorTest.findFirstTimelineRecord(WebInspector.Timeli neModel.RecordType.GCEvent);
22 if (gcRecords.length) { 22 if (gcRecord)
23 InspectorTest.addResult("The expected GC event record"); 23 InspectorTest.addResult("SUCCESS: Found expected GC event record");
24 InspectorTest.addObject(gcRecords[0], InspectorTest.timelineProperty Formatters); 24 else
25 } else { 25 InspectorTest.addResult("FAIL: GC event record wasn't found");
26 InspectorTest.addResult("FAILED: GC event record wasn't found");
27 }
28
29 InspectorTest.completeTest(); 26 InspectorTest.completeTest();
30 } 27 }
31 } 28 }
32 29
33 </script> 30 </script>
34 </head> 31 </head>
35 32
36 <body onload="runTest()"> 33 <body onload="runTest()">
37 <p> 34 <p>
38 Tests the Timeline API instrumentation of a gc event 35 Tests the Timeline API instrumentation of a gc event
39 </p> 36 </p>
40 </body> 37 </body>
41 </html> 38 </html>
OLDNEW
« no previous file with comments | « LayoutTests/inspector/timeline/timeline-frames.html ('k') | LayoutTests/inspector/timeline/timeline-gc-event-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698