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

Side by Side Diff: LayoutTests/fast/events/touch/gesture/touch-gesture-fully-scrolled-iframe-propagates.html

Issue 25741004: set and get scrollTop/Left through documentElement and body should be symmetric, according to the d… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: set and get scrollTop/Left through documentElement and body should be symmetric, according to the d… Created 7 years, 2 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 <html> 2 <html>
3 <head> 3 <head>
4 <link rel="stylesheet" href="../../../js/resources/js-test-style.css"> 4 <link rel="stylesheet" href="../../../js/resources/js-test-style.css">
5 <script src="../../../js/resources/js-test-pre.js"></script> 5 <script src="../../../js/resources/js-test-pre.js"></script>
6 <script src="resources/gesture-helpers.js"></script> 6 <script src="resources/gesture-helpers.js"></script>
7 <style type="text/css"> 7 <style type="text/css">
8 8
9 ::-webkit-scrollbar { 9 ::-webkit-scrollbar {
10 width: 0px; 10 width: 0px;
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 var expectedScrollEventsOccurred = '1'; 66 var expectedScrollEventsOccurred = '1';
67 67
68 function firstGestureScroll() 68 function firstGestureScroll()
69 { 69 {
70 iframe = touchtarget; 70 iframe = touchtarget;
71 iframeBody = iframe.contentDocument.body; 71 iframeBody = iframe.contentDocument.body;
72 iframeDocumentElement = touchtarget.contentDocument.documentElement; 72 iframeDocumentElement = touchtarget.contentDocument.documentElement;
73 73
74 var amountToScroll = iframeBody.scrollHeight - iframe.clientHeight; 74 var amountToScroll = iframeBody.scrollHeight - iframe.clientHeight;
75 75
76 iframeBody.scrollTop = amountToScroll; 76 iframeDocumentElement.scrollTop = amountToScroll;
77 77
78 // Sanity - make sure the iframe is actually fully scrolled scrolled 78 // Sanity - make sure the iframe is actually fully scrolled scrolled
79 shouldBe('iframeBody.scrollHeight - iframeDocumentElement.scrollTop', 'ifram e.clientHeight'); 79 shouldBe('iframeBody.scrollHeight - iframeDocumentElement.scrollTop', 'ifram e.clientHeight');
80 80
81 eventSender.gestureScrollBegin(10, 72); 81 eventSender.gestureScrollBegin(10, 72);
82 eventSender.gestureScrollUpdateWithoutPropagation(0, -20); 82 eventSender.gestureScrollUpdateWithoutPropagation(0, -20);
83 eventSender.gestureScrollUpdateWithoutPropagation(0, -18); 83 eventSender.gestureScrollUpdateWithoutPropagation(0, -18);
84 eventSender.gestureScrollUpdateWithoutPropagation(0, -15); 84 eventSender.gestureScrollUpdateWithoutPropagation(0, -15);
85 eventSender.gestureScrollUpdateWithoutPropagation(0, -10); 85 eventSender.gestureScrollUpdateWithoutPropagation(0, -10);
86 eventSender.gestureScrollEnd(0, 0); 86 eventSender.gestureScrollEnd(0, 0);
(...skipping 27 matching lines...) Expand all
114 } else { 114 } else {
115 debug("This test requires DumpRenderTree. Gesture-scroll the page to va lidate the implementation."); 115 debug("This test requires DumpRenderTree. Gesture-scroll the page to va lidate the implementation.");
116 } 116 }
117 } 117 }
118 </script> 118 </script>
119 119
120 120
121 121
122 </body> 122 </body>
123 </html> 123 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698