Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test has a WPT meta file that expects 1 subtest issues.
- This WPT test may be referenced by the following Test IDs:
- /paint-timing/first-contentful-svg.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<head>
<title>Performance Paint Timing Test: FCP due to SVG</title>
</head>
<body>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/utils.js"></script>
<div id="svg"></div>
<script>
setup({"hide_test_state": true});
async_test(function (t) {
assert_implements(window.PerformancePaintTiming, "Paint Timing isn't supported.");
const img = document.createElement("IMG");
img.src = "resources/circle.svg";
img.onload = function() {
assertPaintTimingEntries(t, 20);
};
document.getElementById('svg').appendChild(img);
}, "First contentful paint fires due to svg.");
</script>
</body>
</html>