test_reframe_image_loading.html (837B)
1 <!doctype html> 2 <meta charset="utf-8"> 3 <title> 4 Test for bug 1395964: We don't reframe for image loading state changes. 5 </title> 6 <link rel="author" href="mailto:emilio@crisal.io" title="Emilio Cobos Álvarez"> 7 <script src="/tests/SimpleTest/SimpleTest.js"></script> 8 <img id="content" src="support/1x1-transparent.png"></div> 9 <script> 10 SimpleTest.waitForExplicitFinish(); 11 const utils = SpecialPowers.getDOMWindowUtils(window); 12 13 const content = document.getElementById("content"); 14 15 onload = function() { 16 content.offsetTop; 17 18 const previousConstructCount = utils.framesConstructed; 19 20 content.addEventListener("load", function() { 21 content.offsetTop; 22 is(previousConstructCount, utils.framesConstructed, 23 "We should not have reframed"); 24 SimpleTest.finish(); 25 }); 26 27 content.src = "support/blue-100x100.png"; 28 } 29 </script>