Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /paint-timing/fcp-only/fcp-broken-image.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<title>Performance Paint Timing Test: FCP due to broken image</title>
<link rel="author" title="Shubham Gupta" href="mailto:shubham.gupta@chromium.org">
<body>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../resources/utils.js"></script>
<img id='broken'>
<script>
setup({"hide_test_state": true});
promise_test(async t => {
const onload = new Promise(r => window.addEventListener('load', r));
await onload;
await assertNoFirstContentfulPaint(t);
document.getElementById('broken').src = '../non-existent-image.jpg';
await assertNoFirstContentfulPaint(t);
}, 'Broken image should not trigger First Contentful Paint.');
</script>
</body>