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

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

Issue 183893010: DevTools: extract TimelineModel.Record from TimelinePresentationModel.Record. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: For landing Created 6 years, 9 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 performActions() 7 function performActions()
8 { 8 {
9 var image = new Image(); 9 var image = new Image();
10 image.onload = bar; 10 image.onload = bar;
(...skipping 18 matching lines...) Expand all
29 InspectorTest.evaluateInPage("performActions()"); 29 InspectorTest.evaluateInPage("performActions()");
30 } 30 }
31 31
32 window.step2 = function() 32 window.step2 = function()
33 { 33 {
34 TimelineAgent.stop(step3); 34 TimelineAgent.stop(step3);
35 } 35 }
36 36
37 function step3() 37 function step3()
38 { 38 {
39 function dumpFormattedRecord(record, prefix) 39 function dumpFormattedRecord(presentationRecord, prefix)
40 { 40 {
41 prefix = prefix || ""; 41 var record = presentationRecord.record();
42 // Here and below: pretend coalesced record are just not there, as coalescation is time dependent and, hence, not stable. 42 prefix = prefix || "";
43 if (!record.coalesced && record.type !== "GCEvent") 43 // Here and below: pretend coalesced record are just not there, as c oalescation is time dependent and, hence, not stable.
44 InspectorTest.addResult(prefix + record.type); 44 if (!presentationRecord.coalesced() && record.type !== "GCEvent")
45 // Ignore stray paint & rendering events for better stability. 45 InspectorTest.addResult(prefix + record.type);
46 if (record.category.name !== "loading" && record.category.name !== "scripting") 46 // Ignore stray paint & rendering events for better stability.
47 return; 47 if (record.category.name !== "loading" && record.category.name !== " scripting")
48 if (record._children) { 48 return;
49 var childPrefix = prefix + (record.coalesced ? "" : " "); 49 if (presentationRecord.presentationChildren()) {
50 for (var i = 0; i < record._children.length; ++i) 50 var childPrefix = prefix + (presentationRecord.coalesced() ? "" : " ");
51 dumpFormattedRecord(record._children[i], childPrefix); 51 for (var i = 0; i < presentationRecord.presentationChildren().le ngth; ++i)
52 } 52 dumpFormattedRecord(presentationRecord.presentationChildren( )[i], childPrefix);
53 }
53 } 54 }
54 WebInspector.panels.timeline._model._collectionEnabled = false; 55 WebInspector.panels.timeline._model._collectionEnabled = false;
55 56
56 var records = WebInspector.panels.timeline._currentViews[0]._rootRecord( ).children; 57 var records = WebInspector.panels.timeline._currentViews[0]._rootRecord( ).presentationChildren();
57 for (var i = 0; i < records.length; ++i) 58 for (var i = 0; i < records.length; ++i)
58 dumpFormattedRecord(records[i]); 59 dumpFormattedRecord(records[i]);
59 InspectorTest.completeTest(); 60 InspectorTest.completeTest();
60 } 61 }
61 } 62 }
62 63
63 if (!window.testRunner) 64 if (!window.testRunner)
64 setTimeout(performActions, 3000); 65 setTimeout(performActions, 3000);
65 66
66 </script> 67 </script>
67 </head> 68 </head>
68 69
69 <body onload="runTest()"> 70 <body onload="runTest()">
70 <p> 71 <p>
71 Tests the Timeline API instrumentation of a SendRequest, ReceiveResponse etc. 72 Tests the Timeline API instrumentation of a SendRequest, ReceiveResponse etc.
72 </p> 73 </p>
73 74
74 </body> 75 </body>
75 </html> 76 </html>
OLDNEW
« no previous file with comments | « LayoutTests/inspector/timeline/timeline-network-resource.html ('k') | LayoutTests/inspector/timeline/timeline-time.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698