test_reframe_for_lazy_load_image.html (975B)
1 <!doctype html> 2 <meta charset=utf-8> 3 <script src="/tests/SimpleTest/SimpleTest.js"></script> 4 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> 5 <div id='log'></div> 6 <script> 7 'use strict'; 8 SimpleTest.waitForExplicitFinish(); 9 SpecialPowers.pushPrefEnv( 10 // Open a new document with enabling lazy load since we need to create an 11 // image element with loading="lazy" and alt="something" in the first place. 12 // That's because if the element has `alt` but doesn't have `lazy` we will 13 // generate inline frames due to the `alt`. Also if we do add the `lazy` and 14 // the `alt` dynamically, it ends up generating reconstruct change hint for 15 // the `alt` change. 16 { 17 set: [ 18 ["dom.lazy-loading.margin.top", 0], 19 ["dom.lazy-loading.margin.bottom", 0], 20 ["dom.lazy-loading.margin.left", 0], 21 ["dom.lazy-loading.margin.right", 0], 22 ] 23 }, 24 () => { window.open('file_reframe_for_lazy_load_image.html'); } 25 ); 26 </script> 27 </html>