diff --git a/tests/wpt/mozilla/tests/css/restyle_hints_state.html b/tests/wpt/mozilla/tests/css/restyle_hints_state.html index 480d1675bb5..27a56d146a3 100644 --- a/tests/wpt/mozilla/tests/css/restyle_hints_state.html +++ b/tests/wpt/mozilla/tests/css/restyle_hints_state.html @@ -29,17 +29,22 @@ * we're not getting as much test coverage there as we'd like. When we * implement attribute-based restyle hints, we can stop dirtying the subtree * on attribute modifications, and these tests will start to be more useful. + * + * Also, note that we use window.onload in order to prevent the restyle + * hints to interact with any content appended notifications. */ - window.dummy = 0; - var $ = document.getElementById.bind(document); - function syncRestyle() { window.dummy += $("fs2").offsetTop; } - syncRestyle(); - $('fs1').disabled = true; - syncRestyle(); - $('fs1').disabled = false; - syncRestyle(); - $('cb').checked = true; - syncRestyle(); - $('fs2').disabled = true; + window.onload = function() { + window.dummy = 0; + var $ = document.getElementById.bind(document); + function syncRestyle() { window.dummy += $("fs2").offsetTop; } + syncRestyle(); + $('fs1').disabled = true; + syncRestyle(); + $('fs1').disabled = false; + syncRestyle(); + $('cb').checked = true; + syncRestyle(); + $('fs2').disabled = true; + }