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

Side by Side Diff: LayoutTests/fast/events/scale-and-scroll-div.html

Issue 18546003: Fix tests to avoid page scale reset when setting page scale. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Use setPageScaleFactorLimits(). Created 7 years, 4 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 | Annotate | Revision Log
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <style> 4 <style>
5 ::-webkit-scrollbar { 5 ::-webkit-scrollbar {
6 width: 0px; 6 width: 0px;
7 height: 0px; 7 height: 0px;
8 } 8 }
9 #bluebox { 9 #bluebox {
10 width: 100px; 10 width: 100px;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 } 48 }
49 eventSender.gestureScrollEnd(0, 0); 49 eventSender.gestureScrollEnd(0, 0);
50 50
51 expectedScrollDistance = Math.floor(20 - scrollDistance/scaleFactor); 51 expectedScrollDistance = Math.floor(20 - scrollDistance/scaleFactor);
52 52
53 shouldBe('scrollBox.scrollTop', 'expectedScrollDistance'); 53 shouldBe('scrollBox.scrollTop', 'expectedScrollDistance');
54 } 54 }
55 55
56 function scaleWithEventSender(scaleFactor) { 56 function scaleWithEventSender(scaleFactor) {
57 var scaleOffset = 0; 57 var scaleOffset = 0;
58 if (window.internals) { 58 if (window.eventSender) {
59 window.internals.setPageScaleFactor(scaleFactor, scaleOffset, scale Offset); 59 window.eventSender.setPageScaleFactor(scaleFactor, scaleOffset, sca leOffset);
60 } 60 }
61 } 61 }
62 62
63 function test() { 63 function test() {
64 if (window.eventSender) { 64 if (window.eventSender) {
65 description('This tests that a div scrolled by gesture touch while the page is scaled still scrolls at' + 65 description('This tests that a div scrolled by gesture touch while the page is scaled still scrolls at' +
66 ' the rate of the touch'); 66 ' the rate of the touch');
67 67
68 scrollBox = document.getElementById("scrollbox"); 68 scrollBox = document.getElementById("scrollbox");
69 69
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 <div id="redbox"></div> 103 <div id="redbox"></div>
104 <div id="bluebox"></div> 104 <div id="bluebox"></div>
105 <div id="redbox"></div> 105 <div id="redbox"></div>
106 <div id="bluebox"></div> 106 <div id="bluebox"></div>
107 <div id="redbox"></div> 107 <div id="redbox"></div>
108 </div> 108 </div>
109 109
110 <div id="console"></div> 110 <div id="console"></div>
111 </body> 111 </body>
112 </html> 112 </html>
OLDNEW
« no previous file with comments | « LayoutTests/fast/events/scale-and-scroll-body.html ('k') | LayoutTests/fast/events/scale-and-scroll-iframe-body.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698