OLD | NEW |
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 src="../../../http/tests/inspector/product-registry-test.js"></script> | 5 <script src="../../../http/tests/inspector/product-registry-test.js"></script> |
6 <script> | 6 <script> |
7 | 7 |
8 async function test() | 8 async function test() |
9 { | 9 { |
10 await ProductRegistry.instance(); | 10 await ProductRegistry.instance(); |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 "ts": 101000, | 57 "ts": 101000, |
58 "dur": 10000, | 58 "dur": 10000, |
59 "args": { | 59 "args": { |
60 "data": { | 60 "data": { |
61 "url": "https://www.google.com", | 61 "url": "https://www.google.com", |
62 "lineNumber": 1337 | 62 "lineNumber": 1337 |
63 } | 63 } |
64 } | 64 } |
65 }]; | 65 }]; |
66 | 66 |
| 67 var badgeRendered = Promise.resolve(); |
| 68 InspectorTest.addSniffer(ProductRegistry.BadgePool.prototype, "_renderBadge"
, (arg, result) => badgeRendered = result, true); |
| 69 Common.settings.moduleSetting('product_registry.badges-visible').set(true); |
67 var model = InspectorTest.createPerformanceModelWithEvents(rawTraceEvents).t
imelineModel(); | 70 var model = InspectorTest.createPerformanceModelWithEvents(rawTraceEvents).t
imelineModel(); |
68 var linkifier = new Components.Linkifier(); | 71 var linkifier = new Components.Linkifier(); |
| 72 var badgePool = new ProductRegistry.BadgePool(); |
69 for (var event of model.mainThreadEvents()) { | 73 for (var event of model.mainThreadEvents()) { |
70 var node = await Timeline.TimelineUIUtils.buildTraceEventDetails(event,
model, linkifier); | 74 var node = await Timeline.TimelineUIUtils.buildTraceEventDetails(event,
model, linkifier, badgePool); |
| 75 await badgeRendered; |
71 for (var child of node.querySelectorAll(".timeline-details-view-row")) | 76 for (var child of node.querySelectorAll(".timeline-details-view-row")) |
72 InspectorTest.addResult(`${child.firstChild.innerText}: ${child.last
Child.innerText}`); | 77 InspectorTest.addResult(InspectorTest.deepTextContent(child.firstChi
ld) + ": " + InspectorTest.deepTextContent(child.lastChild)); |
73 } | 78 } |
74 InspectorTest.completeTest(); | 79 InspectorTest.completeTest(); |
75 } | 80 } |
76 | 81 |
77 </script> | 82 </script> |
78 </head> | 83 </head> |
79 | 84 |
80 <body onload="runTest()"> | 85 <body onload="runTest()"> |
81 <p> | 86 <p> |
82 Checks the Product property in details pane for a node with URL. | 87 Checks the Product property in details pane for a node with URL. |
83 </p> | 88 </p> |
84 </body> | 89 </body> |
85 </html> | 90 </html> |
OLD | NEW |