Index: third_party/WebKit/LayoutTests/inspector/coverage/multiple-instances-merge.html |
diff --git a/third_party/WebKit/LayoutTests/inspector/coverage/coverage-view.html b/third_party/WebKit/LayoutTests/inspector/coverage/multiple-instances-merge.html |
similarity index 52% |
copy from third_party/WebKit/LayoutTests/inspector/coverage/coverage-view.html |
copy to third_party/WebKit/LayoutTests/inspector/coverage/multiple-instances-merge.html |
index 0f069491e807d74d605fa0b78737a53fa04ca060..795c9010d798f0fbae359a84ec82d3f6d0a4708b 100644 |
--- a/third_party/WebKit/LayoutTests/inspector/coverage/coverage-view.html |
+++ b/third_party/WebKit/LayoutTests/inspector/coverage/multiple-instances-merge.html |
@@ -1,7 +1,7 @@ |
<html> |
<head> |
<script src="../../http/tests/inspector/inspector-test.js"></script> |
-<script src="../../http/tests/inspector/elements-test.js"></script> |
+<script src="../../http/tests/inspector/debugger-test.js"></script> |
<script src="coverage-test.js"></script> |
<script src="resources/coverage.js"></script> |
@@ -11,26 +11,40 @@ |
async function test() |
{ |
InspectorTest.startCoverage(); |
- await InspectorTest.evaluateInPagePromise("performActions()"); |
+ await InspectorTest.evaluateInPagePromise("performActions(); frames[0].performActionsInFrame()"); |
await InspectorTest.stopCoverage(); |
var coverageView = self.runtime.sharedInstance(Coverage.CoverageView); |
var dataGrid = coverageView._listView._dataGrid; |
for (var child of dataGrid.rootNode().children) { |
var data = child._coverageInfo; |
- var url = InspectorTest.formatters.formatAsURL(data.contentProvider.contentURL()); |
+ var url = InspectorTest.formatters.formatAsURL(data.url()); |
if (url.endsWith("-test.js") || url.endsWith(".html")) |
continue; |
- var type = Coverage.CoverageListView._typeToString(data.type); |
- InspectorTest.addResult(`${url} ${type} used: ${data.usedSize} unused: ${data.unusedSize} total: ${data.size}`); |
+ var type = Coverage.CoverageListView._typeToString(data.type()); |
+ InspectorTest.addResult(`${url} ${type} used: ${data.usedSize()} unused: ${data.unusedSize()} total: ${data.size()}`); |
} |
+ |
+ await dumpDecorationsInFile("highlight-in-source.css"); |
+ await dumpDecorationsInFile("coverage.js"); |
+ |
InspectorTest.completeTest(); |
+ |
+ async function dumpDecorationsInFile(file) |
+ { |
+ await InspectorTest.sourceDecorated(file); |
+ var lines = Array.prototype.map.call(document.querySelectorAll(".text-editor-coverage-unused-marker"), |
+ e => e.parentElement.previousSibling.textContent); |
+ InspectorTest.addResult(`Unused lines in ${file}`); |
+ InspectorTest.addResult(lines); |
+ } |
} |
</script> |
</head> |
<body onload="runTest()"> |
+<iframe src="resources/subframe.html"></iframe> |
<p class="class"> |
Tests the coverage list view after finishing recording in the Coverage view. |
</p> |