observe-animated-image-gif.tentative.html (1087B)
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 // 136 is the size of the animated GIF up until the first frame. 17 // The trickle pipe delays the response after the first frame by 1 second. 18 const url = window.location.origin + 19 `/images/anim-gr.gif?pipe=trickle(136:d${delay_pipe_value})`; 20 const entry = await load_and_observe(url); 21 // anim-gr.gif is 100 by 50. 22 const size = 100 * 50; 23 checkImage(entry, url, 'image_id', size, beforeLoad, ["animated"]); 24 }, "Same origin animated image is observable and has a first frame."); 25 </script> 26 </body> 27 </html>