Automatic update from web-platform-tests Organize paint-timing test into meaningful directories (#57330) * Organize paint-timing test to meaningful directories Signed-off-by: Shubham Gupta <shubham.gupta@chromium.org> * Refactor to clenaup some of repetetive code. Signed-off-by: Shubham Gupta <shubham.gupta@chromium.org> --------- Signed-off-by: Shubham Gupta <shubham.gupta@chromium.org> -- wpt-commits: 3fa4dd6d2f8a3ecb389c09e39ad609c838aa7a5d wpt-pr: 57330
25 lines
732 B
HTML
25 lines
732 B
HTML
<!DOCTYPE html>
|
|
<head>
|
|
<title>Performance Paint Timing Test: FCP due to image</title>
|
|
</head>
|
|
<body>
|
|
<script src="/resources/testharness.js"></script>
|
|
<script src="/resources/testharnessreport.js"></script>
|
|
<script src="resources/utils.js"></script>
|
|
<div id="image"></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/circles.png";
|
|
img.onload = function() {
|
|
assertPaintTimingEntries(t, 20);
|
|
};
|
|
document.getElementById('image').appendChild(img);
|
|
}, "First contentful paint fires due to image render.");
|
|
</script>
|
|
</body>
|
|
</html>
|