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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/events/touch/layout-triggers.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 <style> 2 <style>
3 #box { 3 #box {
4 position: absolute; 4 position: absolute;
5 } 5 }
6 </style> 6 </style>
7 <div id=box></div> 7 <div id=box></div>
8 <script src="../../../resources/js-test.js"></script> 8 <script src="../../../resources/js-test.js"></script>
9 <script> 9 <script>
10 description("Check which type of events trigger layout when it's dirty. Events that do a hit-test must update layout, but all other events shouldn't need to.") ; 10 description("Check which type of events trigger layout when it's dirty. Events that do a hit-test must update layout, but all other events shouldn't need to.") ;
11 11
12 var counter = 10; 12 var counter = 10;
13 function triggersLayout(action) { 13 function triggersLayout(action) {
14 // Dirty layout 14 // Dirty layout
15 box.style.height = counter + 'px'; 15 box.style.height = counter + 'px';
16 counter++; 16 counter++;
17 window.internals.updateStyleAndReturnAffectedElementCount(); 17 window.internals.updateStyleAndLayoutAndReturnAffectedElementCount();
18 shouldNotBe('internals.needsLayoutCount()', '0', true); 18 shouldNotBe('internals.needsLayoutCount()', '0', true);
19 19
20 // Run the action under test 20 // Run the action under test
21 action(); 21 action();
22 22
23 return (internals.needsLayoutCount() == 0); 23 return (internals.needsLayoutCount() == 0);
24 } 24 }
25 25
26 var triggeredLayout; 26 var triggeredLayout;
27 var jsTestIsAsync = true; 27 var jsTestIsAsync = true;
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 debug('Sending GestureScrollEnd'); 85 debug('Sending GestureScrollEnd');
86 triggeredLayout = triggersLayout(function() { 86 triggeredLayout = triggersLayout(function() {
87 eventSender.gestureScrollEnd(0, 5); 87 eventSender.gestureScrollEnd(0, 5);
88 }); 88 });
89 shouldBeFalse('triggeredLayout'); 89 shouldBeFalse('triggeredLayout');
90 90
91 finishJSTest(); 91 finishJSTest();
92 } 92 }
93 93
94 </script> 94 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698