Files
sousa-gecko/testing/web-platform/tests/paint-timing/fcp-only/mask-image.html
T
Shubham Gupta 04974455f2 Bug 2012408 [wpt PR 57330] - Organize paint-timing test into meaningful directories, a=testonly
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
2026-02-05 18:15:04 +00:00

28 lines
773 B
HTML

<!DOCTYPE html>
<body>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../resources/utils.js"></script>
<style>
#masked {
width: 0px;
height: 100px;
-webkit-mask-image: url(../resources/circle.svg);
mask-image: url(../resources/circle.svg);
}
</style>
<div id='masked'></div>
<script>
setup({"hide_test_state": true});
promise_test(async t => {
const onload = new Promise(r => window.addEventListener('load', r));
await onload;
return assertNoFirstContentfulPaint(t).then(() => {
document.getElementById('masked').style.width = '100px';
}).then(() => {
return assertFirstContentfulPaint(t);
});
}, 'Mask image triggers First Contentful Paint.');
</script>
</body>