change-layout-in-error.html (780B)
1 <!doctype HTML> 2 <script src="/resources/testharness.js"></script> 3 <script src="/resources/testharnessreport.js"></script> 4 5 <style> 6 div { 7 width: 100px; 8 height: 100px; 9 } 10 </style> 11 <div id="observeme"></div> 12 13 <script> 14 setup({allow_uncaught_exception: true}); 15 16 async_test(a => { 17 let t = document.querySelector("#observeme"); 18 let i = 0; 19 window.onerror = function (err) { 20 t.style.height = "112px"; 21 i++; 22 requestAnimationFrame(a.step_func_done(() => { 23 assert_equals(i, 1); 24 }), 0); 25 }; 26 27 new ResizeObserver(function() { 28 t.style.height = "111px"; 29 }).observe(observeme); 30 observeme.style.height = "110px"; 31 32 }, "Changing layout in window error handler should not result in lifecyle loop when resize observer loop limit is reached."); 33 </script>