fcp-ignore-from-subframe.html (982B)
1 <!DOCTYPE html> 2 <head> 3 <title> 4 Performance Paint Timing Test: Paints in the iframe should be reported in the iframe 5 and not in the top document 6 </title> 7 </head> 8 <body> 9 <script src="../resources/utils.js"></script> 10 <script src="/resources/testharness.js"></script> 11 <script src="/resources/testharnessreport.js"></script> 12 <script> 13 setup({"hide_test_state": true}); 14 promise_test(async t => { 15 assert_implements(window.PerformancePaintTiming, "Paint Timing isn't supported."); 16 const iframe = document.createElement('iframe'); 17 iframe.src = '../resources/subframe-painting.html'; 18 document.body.appendChild(iframe); 19 await new Promise(resolve => window.addEventListener('message', e => { 20 if (e.data.entryType == "paint" && e.data.name == "first-contentful-paint") 21 resolve() 22 })); 23 await assertNoFirstContentfulPaint(t); 24 }, 'Parent frame should not fire own paint-timing events for subframes.'); 25 </script> 26 </body> 27 </html>