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/elements-test.js"></script> | 4 <script src="../../http/tests/inspector/elements-test.js"></script> |
5 <script src="coverage-test.js"></script> | 5 <script src="coverage-test.js"></script> |
6 <script src="resources/coverage.js"></script> | 6 <script src="resources/coverage.js"></script> |
7 | 7 |
8 <link rel="stylesheet" type="text/css" href="resources/highlight-in-source.css"> | 8 <link rel="stylesheet" type="text/css" href="resources/highlight-in-source.css"> |
9 | 9 |
10 <script> | 10 <script> |
11 async function test() | 11 async function test() |
12 { | 12 { |
13 InspectorTest.startCoverage(); | 13 InspectorTest.startCoverage(); |
14 await InspectorTest.evaluateInPagePromise("performActions()"); | 14 await InspectorTest.evaluateInPagePromise("performActions()"); |
15 await InspectorTest.stopCoverage(); | 15 await InspectorTest.stopCoverage(); |
16 | 16 |
17 var coverageView = self.runtime.sharedInstance(Coverage.CoverageView); | 17 var coverageView = self.runtime.sharedInstance(Coverage.CoverageView); |
18 var dataGrid = coverageView._listView._dataGrid; | 18 var dataGrid = coverageView._listView._dataGrid; |
19 for (var child of dataGrid.rootNode().children) { | 19 for (var child of dataGrid.rootNode().children) { |
20 var data = child._coverageInfo; | 20 var data = child._coverageInfo; |
21 var url = InspectorTest.formatters.formatAsURL(data.url); | 21 var url = InspectorTest.formatters.formatAsURL(data.url); |
22 if (url.endsWith("-test.js") || url.endsWith(".html")) | 22 if (url.endsWith("-test.js") || url.endsWith(".html")) |
23 continue; | 23 continue; |
24 InspectorTest.addResult(`${url} used: ${data.usedSize} unused: ${data.un
usedSize} total: ${data.size}`); | 24 var type = Coverage.CoverageListView._typeToString(data.type); |
| 25 InspectorTest.addResult(`${url} ${type} used: ${data.usedSize} unused: $
{data.unusedSize} total: ${data.size}`); |
25 } | 26 } |
26 InspectorTest.completeTest(); | 27 InspectorTest.completeTest(); |
27 } | 28 } |
28 | 29 |
29 </script> | 30 </script> |
30 </head> | 31 </head> |
31 | 32 |
32 <body onload="runTest()"> | 33 <body onload="runTest()"> |
33 <p class="class"> | 34 <p class="class"> |
34 Tests the coverage list view after finishing recording in the Coverage view. | 35 Tests the coverage list view after finishing recording in the Coverage view. |
35 </p> | 36 </p> |
36 | 37 |
37 </body> | 38 </body> |
38 </html> | 39 </html> |
OLD | NEW |