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

Unified Diff: third_party/WebKit/LayoutTests/inspector/coverage/coverage-view-snapshot.html

Issue 2715423004: DevTools: add coverage snapshots
Patch Set: review comments addressed 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/coverage/coverage-view-snapshot-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/inspector/coverage/coverage-view-snapshot.html
diff --git a/third_party/WebKit/LayoutTests/inspector/coverage/coverage-view-snapshot.html b/third_party/WebKit/LayoutTests/inspector/coverage/coverage-view-snapshot.html
new file mode 100644
index 0000000000000000000000000000000000000000..1d1deab08d1a10d51f8391b6fdc3cc8912bad782
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector/coverage/coverage-view-snapshot.html
@@ -0,0 +1,36 @@
+<html>
+<head>
+<script src="../../http/tests/inspector/inspector-test.js"></script>
+<script src="../../http/tests/inspector/elements-test.js"></script>
+<script src="coverage-test.js"></script>
+<script src="resources/coverage.js"></script>
+
+<link rel="stylesheet" type="text/css" href="resources/highlight-in-source.css">
+
+<script>
+async function test()
+{
+ var coverageView = self.runtime.sharedInstance(Coverage.CoverageView);
+ await coverageView._takeSnapshot();
+ var dataGrid = coverageView._listView._dataGrid;
+ for (var child of dataGrid.rootNode().children) {
+ var data = child._coverageInfo;
+ 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}`);
+ }
+ InspectorTest.completeTest();
+}
+
+</script>
+</head>
+
+<body onload="runTest()">
+<p class="class">
+Tests the coverage snapshot.
+</p>
+
+</body>
+</html>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/coverage/coverage-view-snapshot-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698