| <!DOCTYPE html> |
| <script src="../../resources/js-test.js"></script> |
| <div id="test" style="background-color: green; width: 100px; height: 100px;"></div> |
| <script> |
| // Force style recalc and layout. |
| document.body.offsetTop; |
| |
| if (window.internals) |
| shouldBe("internals.needsLayoutCount()", "0", true); |
| |
| // Adding box-shadow will cause a repaint but no layout. |
| document.getElementById("test").style['box-shadow'] = '5px 5px 5px rgba(0,0,0,0.3)'; |
| |
| if (window.internals) { |
| shouldBe("internals.needsLayoutCount()", "0", true); |
| } |
| </script> |