| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <script src="../../resources/js-test.js"></script> | 2 <script src="../../resources/js-test.js"></script> |
| 3 <div id="spanner"></div> | 3 <div id="spanner"></div> |
| 4 <script> | 4 <script> |
| 5 setPrintTestResultsLazily(); |
| 6 |
| 5 spanner.style.height = "3000px"; | 7 spanner.style.height = "3000px"; |
| 6 scrollTo(0, 1000); | 8 scrollTo(0, 1000); |
| 7 | 9 |
| 8 if (window.internals) { | 10 if (window.internals) { |
| 9 var styleCount = internals.updateStyleAndReturnAffectedElementCount(); | 11 var styleCount = internals.updateStyleAndReturnAffectedElementCount(); |
| 10 var layoutCount = internals.needsLayoutCount(); | 12 var layoutCount = internals.needsLayoutCount(); |
| 11 // scrollTo should have synchronously updated style and layout | 13 // scrollTo should have synchronously updated style and layout |
| 12 shouldBe("styleCount", "0"); | 14 shouldBe("styleCount", "0"); |
| 13 shouldBe("layoutCount", "0"); | 15 shouldBe("layoutCount", "0"); |
| 14 } | 16 } |
| 15 shouldBe("window.scrollY", "1000"); | 17 shouldBe("window.scrollY", "1000"); |
| 16 | 18 |
| 17 spanner.style.height = "2000px"; | 19 spanner.style.height = "2000px"; |
| 18 scrollTo(0, 0); | 20 scrollTo(0, 0); |
| 19 | 21 |
| 20 if (window.internals) { | 22 if (window.internals) { |
| 21 var styleCount = internals.updateStyleAndReturnAffectedElementCount(); | 23 var styleCount = internals.updateStyleAndReturnAffectedElementCount(); |
| 22 var layoutCount = internals.needsLayoutCount(); | 24 var layoutCount = internals.needsLayoutCount(); |
| 23 // scrollTo should not need to synchronously updated style and layout | 25 // scrollTo should not need to synchronously updated style and layout |
| 24 shouldNotBe("styleCount", "0"); | 26 shouldNotBe("styleCount", "0"); |
| 25 shouldNotBe("layoutCount", "0"); | 27 shouldNotBe("layoutCount", "0"); |
| 26 } | 28 } |
| 27 shouldBe("window.scrollY", "0"); | 29 shouldBe("window.scrollY", "0"); |
| 28 </script> | 30 </script> |
| OLD | NEW |