Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /paint-timing/input-text.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<body>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/utils.js"></script>
<form>
<input type="text" id='myInput'>
</form>
<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('myInput').value = 'default text';
return assertFirstContentfulPaint(t);
});
}, 'Text from a form control triggers First Contentful Paint.');
</script>
</body>