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

Side by Side Diff: LayoutTests/inspector/tracing/timeline-network-resource.html

Issue 1315373005: DevTools: remove most convenience wrappers from WI.TimelineModel.Record (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 3 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="../../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(callback) 9 function performActions(callback)
10 { 10 {
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 52
53 function printRecord(record) 53 function printRecord(record)
54 { 54 {
55 InspectorTest.addResult(""); 55 InspectorTest.addResult("");
56 InspectorTest.printTimelineRecordProperties(record); 56 InspectorTest.printTimelineRecordProperties(record);
57 } 57 }
58 58
59 function printSend(record) 59 function printSend(record)
60 { 60 {
61 printRecord(record); 61 printRecord(record);
62 requestId = record.data().requestId; 62 var data = record.traceEvent().args["data"];
63 if (record.data().url === undefined) 63 requestId = data.requestId;
64 if (data.url === undefined)
64 InspectorTest.addResult("* No 'url' property in record"); 65 InspectorTest.addResult("* No 'url' property in record");
65 else if (record.data().url.indexOf(scriptUrl) === -1) 66 else if (data.url.indexOf(scriptUrl) === -1)
66 InspectorTest.addResult("* Didn't find URL: " + scriptUrl); 67 InspectorTest.addResult("* Didn't find URL: " + scriptUrl);
67 } 68 }
68 69
69 function printReceive(record) 70 function printReceive(record)
70 { 71 {
71 printRecord(record); 72 printRecord(record);
72 if (requestId !== record.data().requestId) 73 var data = record.traceEvent().args["data"];
74 if (requestId !== data.requestId)
73 InspectorTest.addResult("Didn't find matching requestId: " + request Id); 75 InspectorTest.addResult("Didn't find matching requestId: " + request Id);
74 if (record.data().statusCode !== 0) 76 if (data.statusCode !== 0)
75 InspectorTest.addResult("Response received status: " + record.data() .statusCode); 77 InspectorTest.addResult("Response received status: " + data.statusCo de);
76 } 78 }
77 79
78 function printFinish(record) 80 function printFinish(record)
79 { 81 {
80 printRecord(record); 82 printRecord(record);
81 if (requestId !== record.data().requestId) 83 var data = record.traceEvent().args["data"];
84 if (requestId !== data.requestId)
82 InspectorTest.addResult("Didn't find matching requestId: " + request Id); 85 InspectorTest.addResult("Didn't find matching requestId: " + request Id);
83 if (record.data().didFail) 86 if (data.didFail)
84 InspectorTest.addResult("Request failed."); 87 InspectorTest.addResult("Request failed.");
85 } 88 }
86 } 89 }
87 90
88 </script> 91 </script>
89 </head> 92 </head>
90 93
91 <body onload="runTest()"> 94 <body onload="runTest()">
92 <p> 95 <p>
93 Tests the Timeline API instrumentation of a network resource load 96 Tests the Timeline API instrumentation of a network resource load
94 </p> 97 </p>
95 </body> 98 </body>
96 </html> 99 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698