observe-non-animated-image.tentative.html (1064B)
1 <!DOCTYPE HTML> 2 <html> 3 <head> 4 <meta charset=utf-8> 5 <title>Largest Contentful Paint: observe image.</title> 6 <script src="/resources/testharness.js"></script> 7 <script src="/resources/testharnessreport.js"></script> 8 <script src="../resources/largest-contentful-paint-helpers.js"></script> 9 </head> 10 <body> 11 <script> 12 promise_test(async () => { 13 assert_implements(window.LargestContentfulPaint, 14 "LargestContentfulPaint is not implemented"); 15 const beforeLoad = performance.now(); 16 // 262 is the size of the animated PNG up until the first frame, 17 // including the chunk that starts the second frame (indicating that 18 //the first frame data is done). 19 const url = window.location.origin + '/images/blue.png'; 20 const entry = await load_and_observe(url); 21 // blue.png is 133 by 106. 22 const size = 133 * 106; 23 checkImage(entry, url, 'image_id', size, beforeLoad, ["animated-zero"]); 24 }, "Same origin animated image is observable and has a first frame."); 25 </script> 26 </body> 27 </html>