No ticket: improve line-height animation test robustness
(cherry picked from commit 2b6a7b1caf5f95034e0324a44ca9e3f27956ff64)