fcp-text-input.html (901B)
1 <!DOCTYPE html> 2 <head> 3 <title>Performance Paint Timing Test: FCP due for non-empty text input</title> 4 </head> 5 <body> 6 <script src="../resources/utils.js"></script> 7 <script src="/resources/testharness.js"></script> 8 <script src="/resources/testharnessreport.js"></script> 9 <input id="input" type="text" /> 10 <script> 11 setup({"hide_test_state": true}); 12 promise_test(async t => { 13 assert_implements(window.PerformancePaintTiming, "Paint Timing isn't supported."); 14 await new Promise(r => window.addEventListener('load', r)); 15 await assertNoFirstContentfulPaint(t); 16 const input = document.getElementById('input'); 17 input.setAttribute('value', ' '); 18 await assertNoFirstContentfulPaint(t); 19 input.setAttribute('value', 'value'); 20 await assertFirstContentfulPaint(t); 21 }, 'Text input should become contentful when its value is non-empty'); 22 </script> 23 </body> 24 </html>