summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/paint-timing/input-text.html
blob: da1e0e837678cd12656ba453bc42c63eb332e2c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<!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>