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

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

Issue 1984103004: DevTools: Add initiator field to timeline network events (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update the test Created 4 years, 7 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/tracing/timeline-network-resource-details-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(callback) 7 function performActions(callback)
8 { 8 {
9 function onRequestFinished() 9 function onRequestFinished()
10 { 10 {
(...skipping 13 matching lines...) Expand all
24 } 24 }
25 25
26 function test() 26 function test()
27 { 27 {
28 var model = WebInspector.panels.timeline._model; 28 var model = WebInspector.panels.timeline._model;
29 29
30 InspectorTest.invokeAsyncWithTimeline("performActions", finish); 30 InspectorTest.invokeAsyncWithTimeline("performActions", finish);
31 31
32 function finish() 32 function finish()
33 { 33 {
34 var linkifier = new WebInspector.Linkifier();
34 function printRequestDetails(request) 35 function printRequestDetails(request)
35 { 36 {
36 return WebInspector.TimelineUIUtils.buildNetworkRequestDetails(reque st, model, null).then(printElement); 37 return WebInspector.TimelineUIUtils.buildNetworkRequestDetails(reque st, model, linkifier).then(printElement);
37 } 38 }
38 function printElement(element) 39 function printElement(element)
39 { 40 {
40 var rows = element.querySelectorAll(".timeline-details-view-row"); 41 var rows = element.querySelectorAll(".timeline-details-view-row");
41 for (var i = 0; i < rows.length; ++i) { 42 for (var i = 0; i < rows.length; ++i) {
42 var title = rows[i].firstChild.firstChild.textContent; 43 var title = rows[i].firstChild.firstChild.textContent;
43 var value = rows[i].lastChild.firstChild.textContent; 44 var value = rows[i].lastChild.firstChild.textContent;
44 if (title === "Duration" || title === "Mime Type") 45 if (title === "Duration" || title === "Mime Type")
45 value = typeof value; 46 value = typeof value;
46 if (title === "URL") 47 if (/^file:\/\//.test(value))
47 value = /[^/]*$/.exec(value)[0]; 48 value = /[^/]*$/.exec(value)[0];
48 InspectorTest.addResult(title + ": " + value); 49 InspectorTest.addResult(title + ": " + value);
49 } 50 }
50 } 51 }
51 Promise.all(model.networkRequests().map(printRequestDetails)).then(Inspe ctorTest.completeTest); 52 Promise.all(model.networkRequests().map(printRequestDetails)).then(Inspe ctorTest.completeTest);
52 } 53 }
53 } 54 }
54 55
55 </script> 56 </script>
56 </head> 57 </head>
57 58
58 <body onload="runTest()"> 59 <body onload="runTest()">
59 <p> 60 <p>
60 Tests the Timeline UI API for network requests. 61 Tests the Timeline UI API for network requests.
61 </p> 62 </p>
62 </body> 63 </body>
63 </html> 64 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/tracing/timeline-network-resource-details-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698