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

Side by Side Diff: LayoutTests/fast/css/resize-corner-tracking-touch.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 PUBLIC "-//W3C//DTD HTML 4.01//EN"> 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
2 <html> 2 <html>
3 <head> 3 <head>
4 <title></title> 4 <title></title>
5 <script src="../js/resources/js-test-pre.js"></script> 5 <script src="../js/resources/js-test-pre.js"></script>
6 <script type="text/javascript"> 6 <script type="text/javascript">
7 function doScroll(x, y, deltaX, deltaY) { 7 function doScroll(x, y, deltaX, deltaY) {
8 eventSender.gestureScrollBegin(x, y); 8 eventSender.gestureScrollBegin(x, y);
9 eventSender.gestureScrollUpdate(deltaX, deltaY); 9 eventSender.gestureScrollUpdate(deltaX, deltaY);
10 eventSender.gestureScrollEnd(0, 0); 10 eventSender.gestureScrollEnd(0, 0);
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 offsetX + rect.left, offsetY + rect.top, 44 offsetX + rect.left, offsetY + rect.top,
45 deltaX, deltaY, expectedDeltaX, expectedDeltaY); 45 deltaX, deltaY, expectedDeltaX, expectedDeltaY);
46 } 46 }
47 47
48 function test() 48 function test()
49 { 49 {
50 if (!window.testRunner) 50 if (!window.testRunner)
51 return; 51 return;
52 52
53 // Scroll the page first to test that resize works with scrolled pag e. 53 // Scroll the page first to test that resize works with scrolled pag e.
54 document.body.scrollTop = 50; 54 document.documentElement.scrollTop = 50;
55 55
56 // 1. Touch scrolling starting at outside of the object, e.g. offset (6, 7) 56 // 1. Touch scrolling starting at outside of the object, e.g. offset (6, 7)
57 // to bottom right corner of the object, won't do the resize. 57 // to bottom right corner of the object, won't do the resize.
58 // 2. Touch scrolling starting at inside the object, and within the normal 58 // 2. Touch scrolling starting at inside the object, and within the normal
59 // resizer area (15x15), e.g. offset (-6, -7) to bottom right cor ner of 59 // resizer area (15x15), e.g. offset (-6, -7) to bottom right cor ner of
60 // the object, will do the resize. 60 // the object, will do the resize.
61 // 3. Touch scrolling starting at inside the object, and only a litt le bit 61 // 3. Touch scrolling starting at inside the object, and only a litt le bit
62 // off the resizer area, e.g. offset (-20, -20) to bottom right c orner of 62 // off the resizer area, e.g. offset (-20, -20) to bottom right c orner of
63 // the object, will do the resize for div/textarea. (not work for the 63 // the object, will do the resize for div/textarea. (not work for the
64 // iframe case, and may add support in the future) 64 // iframe case, and may add support in the future)
65 65
66 resize("div", -6, -7, 20, 10, "resize"); 66 resize("div", -6, -7, 20, 10, "resize");
67 resize("div", 6, 7, 20, 10, "noresize"); 67 resize("div", 6, 7, 20, 10, "noresize");
68 resize("textarea1", -20, -20, 20, 10, "resize"); 68 resize("textarea1", -20, -20, 20, 10, "resize");
69 69
70 // Scroll the page again 70 // Scroll the page again
71 document.body.scrollTop += 100; 71 document.documentElement.scrollTop += 100;
72 72
73 resize("iframe1", -6, -7, 20, 10, "resize"); 73 resize("iframe1", -6, -7, 20, 10, "resize");
74 resize("iframe1", -20, -20, 20, 10, "noresize"); 74 resize("iframe1", -20, -20, 20, 10, "noresize");
75 resizeInIframe("textarea2", "iframe1", -6, -7, 20, 20, "resize"); 75 resizeInIframe("textarea2", "iframe1", -6, -7, 20, 20, "resize");
76 } 76 }
77 </script> 77 </script>
78 <style> 78 <style>
79 div { 79 div {
80 overflow: auto; 80 overflow: auto;
81 resize: both; 81 resize: both;
(...skipping 17 matching lines...) Expand all
99 Can't resize a textarea with touch</i>. 99 Can't resize a textarea with touch</i>.
100 </p> 100 </p>
101 <hr> 101 <hr>
102 <div id="placeholder" style="width: 150px; height: 150px;">a placeholder so that we have enough elements to scroll the page</div> 102 <div id="placeholder" style="width: 150px; height: 150px;">a placeholder so that we have enough elements to scroll the page</div>
103 <div id="div" style="width: 150px; height: 100px;;"></div> 103 <div id="div" style="width: 150px; height: 100px;;"></div>
104 <textarea id="textarea1" style="width: 150px; height: 100px;"></textarea> 104 <textarea id="textarea1" style="width: 150px; height: 100px;"></textarea>
105 <br> 105 <br>
106 <iframe id="iframe1" src="resources/resize-corner-tracking-touch-iframe.html " style="resize:both; width: 200px; height: 200px"></iframe> 106 <iframe id="iframe1" src="resources/resize-corner-tracking-touch-iframe.html " style="resize:both; width: 200px; height: 200px"></iframe>
107 <pre id="console"></pre> 107 <pre id="console"></pre>
108 </body> 108 </body>
OLDNEW
« no previous file with comments | « LayoutTests/compositing/scissor-out-of-viewport.html ('k') | LayoutTests/fast/css/zoom-body-scroll.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698