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

Side by Side Diff: LayoutTests/inspector/timeline/timeline-network-resource.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 var scriptUrl = "timeline-network-resource.js"; 7 var scriptUrl = "timeline-network-resource.js";
8 8
9 function performActions() 9 function performActions()
10 { 10 {
11 var script = document.createElement("script"); 11 var script = document.createElement("script");
12 script.src = scriptUrl; 12 script.src = scriptUrl;
13 document.body.appendChild(script); 13 document.body.appendChild(script);
14 } 14 }
15 15
16 function test() 16 function test()
17 { 17 {
18 var requestId; 18 var requestId;
19 var scriptUrl = "timeline-network-resource.js"; 19 var scriptUrl = "timeline-network-resource.js";
20 20
21 WebInspector.TimelineModel._doNotAssignEndTime = true;
22 var model = WebInspector.panels.timeline._model; 21 var model = WebInspector.panels.timeline._model;
23 var presentationModel = InspectorTest.timelinePresentationModel(); 22 var presentationModel = InspectorTest.timelinePresentationModel();
24 23
25 InspectorTest.startTimeline(step1); 24 InspectorTest.startTimeline(step1);
26 25
27 function step1() 26 function step1()
28 { 27 {
29 InspectorTest.evaluateInPage("performActions()"); 28 InspectorTest.evaluateInPage("performActions()");
30 InspectorTest.addConsoleSniffer(step2); 29 InspectorTest.addConsoleSniffer(step2);
31 } 30 }
(...skipping 14 matching lines...) Expand all
46 printReceive(record._record); 45 printReceive(record._record);
47 else if (record.type === WebInspector.TimelineModel.RecordType.Resou rceFinish) 46 else if (record.type === WebInspector.TimelineModel.RecordType.Resou rceFinish)
48 printFinish(record._record); 47 printFinish(record._record);
49 48
50 if (record.parent && record.parent.type === WebInspector.TimelineMod el.RecordType.Root && !record.isBackground) { 49 if (record.parent && record.parent.type === WebInspector.TimelineMod el.RecordType.Root && !record.isBackground) {
51 if (lastRecordStartTime) 50 if (lastRecordStartTime)
52 InspectorTest.assertGreaterOrEqual(record.startTime, lastRec ordStartTime, "Top level records order violation"); 51 InspectorTest.assertGreaterOrEqual(record.startTime, lastRec ordStartTime, "Top level records order violation");
53 lastRecordStartTime = record.startTime; 52 lastRecordStartTime = record.startTime;
54 } 53 }
55 } 54 }
56 WebInspector.TimelinePresentationModel.forAllRecords([presentationModel. rootRecord()], format); 55 model.forAllRecords(format);
57 InspectorTest.completeTest(); 56 InspectorTest.completeTest();
58 } 57 }
59 58
60 function printRecord(record) 59 function printRecord(record)
61 { 60 {
62 InspectorTest.addResult(""); 61 InspectorTest.addResult("");
63 InspectorTest.printTimelineRecordProperties(record); 62 InspectorTest.printTimelineRecordProperties(record);
64 } 63 }
65 64
66 function printSend(record) 65 function printSend(record)
(...skipping 27 matching lines...) Expand all
94 93
95 </script> 94 </script>
96 </head> 95 </head>
97 96
98 <body onload="runTest()"> 97 <body onload="runTest()">
99 <p> 98 <p>
100 Tests the Timeline API instrumentation of a network resource load 99 Tests the Timeline API instrumentation of a network resource load
101 </p> 100 </p>
102 </body> 101 </body>
103 </html> 102 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698