mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
feat: implement CSS Coverage (#1714)
This patch adds two new methods to the `page.coverage` namespace: - `page.coverage.startCSSCoverage()` - to initiate css coverage - `page.coverage.stopCSSCoverage()` - to stop css coverage The coverage format is consistent with the JavaScript coverage.
This commit is contained in:
16
test/golden/csscoverage-involved.txt
Normal file
16
test/golden/csscoverage-involved.txt
Normal file
@@ -0,0 +1,16 @@
|
||||
[
|
||||
{
|
||||
"url": "http://localhost:8907/csscoverage/involved.html",
|
||||
"ranges": [
|
||||
{
|
||||
"start": 149,
|
||||
"end": 297
|
||||
},
|
||||
{
|
||||
"start": 327,
|
||||
"end": 433
|
||||
}
|
||||
],
|
||||
"text": "\n@charset \"utf-8\";\n@namespace svg url(http://www.w3.org/2000/svg);\n@font-face {\n font-family: \"Example Font\";\n src: url(\"./Dosis-Regular.ttf\");\n}\n\n#fluffy {\n border: 1px solid black;\n z-index: 1;\n /* -webkit-disabled-property: rgb(1, 2, 3) */\n -lol-cats: \"dogs\" /* non-existing property */\n}\n\n@media (min-width: 1px) {\n span {\n -webkit-border-radius: 10px;\n font-family: \"Example Font\";\n animation: 1s identifier;\n }\n}\n"
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user