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

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

Issue 2703143002: [DevTools] Prepare to move Popover to shadow DOM. (Closed)
Patch Set: Created 3 years, 10 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/Source/devtools/BUILD.gn » ('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() 7 function performActions()
8 { 8 {
9 var image = new Image(); 9 var image = new Image();
10 var imagePromise = new Promise((fulfill) => image.onload = fulfill); 10 var imagePromise = new Promise((fulfill) => image.onload = fulfill);
(...skipping 17 matching lines...) Expand all
28 var linkifier = new Components.Linkifier(); 28 var linkifier = new Components.Linkifier();
29 function printRequestDetails(request) 29 function printRequestDetails(request)
30 { 30 {
31 return Timeline.TimelineUIUtils.buildNetworkRequestDetails(request, model, linkifier).then(printElement); 31 return Timeline.TimelineUIUtils.buildNetworkRequestDetails(request, model, linkifier).then(printElement);
32 } 32 }
33 function printElement(element) 33 function printElement(element)
34 { 34 {
35 var rows = element.querySelectorAll(".timeline-details-view-row"); 35 var rows = element.querySelectorAll(".timeline-details-view-row");
36 for (var i = 0; i < rows.length; ++i) { 36 for (var i = 0; i < rows.length; ++i) {
37 var title = rows[i].firstChild.firstChild.textContent; 37 var title = rows[i].firstChild.firstChild.textContent;
38 var value = rows[i].lastChild.firstChild.textContent; 38 var value = rows[i].lastChild.firstChild;
39 if (value.children && value.children.length)
40 value = Array.prototype.slice.call(value.children, 1).map(elem ent => element.textContent).join('');
alph 2017/02/21 21:21:32 nit: Array.from(value.children, element => element
dgozman 2017/02/21 21:34:57 Acknowledged.
41 else
42 value = value.textContent;
39 if (title === "Duration" || title === "Mime Type") 43 if (title === "Duration" || title === "Mime Type")
40 value = typeof value; 44 value = typeof value;
41 if (/^file:\/\//.test(value)) 45 if (/^file:\/\//.test(value))
42 value = /[^/]*$/.exec(value)[0]; 46 value = /[^/]*$/.exec(value)[0];
43 InspectorTest.addResult(title + ": " + value); 47 InspectorTest.addResult(title + ": " + value);
44 } 48 }
45 } 49 }
46 Promise.all(model.networkRequests().map(printRequestDetails)).then(Inspe ctorTest.completeTest); 50 Promise.all(model.networkRequests().map(printRequestDetails)).then(Inspe ctorTest.completeTest);
47 } 51 }
48 } 52 }
49 53
50 </script> 54 </script>
51 </head> 55 </head>
52 56
53 <body onload="runTest()"> 57 <body onload="runTest()">
54 <p> 58 <p>
55 Tests the Timeline UI API for network requests. 59 Tests the Timeline UI API for network requests.
56 </p> 60 </p>
57 </body> 61 </body>
58 </html> 62 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698