Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(91)

Side by Side Diff: third_party/WebKit/LayoutTests/fast/scrolling/scroll-to-origin-with-options-no-layout.html

Issue 1896793002: Rename (updateLayout/updateStyle).*.() to updateStyleAndLayout.*.() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 var styleCount, layoutCount; 5 var styleCount, layoutCount;
6 6
7 function assertSyncLayout(sync) { 7 function assertSyncLayout(sync) {
8 if (window.internals) { 8 if (window.internals) {
9 styleCount = internals.updateStyleAndReturnAffectedElementCount(); 9 styleCount = internals.updateStyleAndLayoutAndReturnAffectedElementCount ();
10 layoutCount = internals.needsLayoutCount(); 10 layoutCount = internals.needsLayoutCount();
11 // scrollTo should have synchronously updated style and layout 11 // scrollTo should have synchronously updated style and layout
12 if (sync) { 12 if (sync) {
13 shouldBe("styleCount", "0"); 13 shouldBe("styleCount", "0");
14 shouldBe("layoutCount", "0"); 14 shouldBe("layoutCount", "0");
15 } else { 15 } else {
16 shouldNotBe("styleCount", "0"); 16 shouldNotBe("styleCount", "0");
17 shouldNotBe("layoutCount", "0"); 17 shouldNotBe("layoutCount", "0");
18 } 18 }
19 } 19 }
(...skipping 19 matching lines...) Expand all
39 assertSyncLayout(true); 39 assertSyncLayout(true);
40 40
41 spanner.style.height = "2px"; 41 spanner.style.height = "2px";
42 scrollTo({ top: 0 }); 42 scrollTo({ top: 0 });
43 assertSyncLayout(true); 43 assertSyncLayout(true);
44 44
45 spanner.style.height = "3px"; 45 spanner.style.height = "3px";
46 scrollTo({ }); 46 scrollTo({ });
47 assertSyncLayout(true); 47 assertSyncLayout(true);
48 </script> 48 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698