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

Side by Side Diff: LayoutTests/fast/scroll-behavior/listbox-scrollTop.html

Issue 766023002: Rename 'instant' value of scroll-behavior CSS property to 'auto' (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years 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
« no previous file with comments | « no previous file | LayoutTests/fast/scroll-behavior/main-frame-scroll.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../../resources/testharness.js"></script> 4 <script src="../../resources/testharness.js"></script>
5 <script src="../../resources/testharnessreport.js"></script> 5 <script src="../../resources/testharnessreport.js"></script>
6 <script src="resources/scroll-behavior-test.js"></script> 6 <script src="resources/scroll-behavior-test.js"></script>
7 <script type="text/javascript"> 7 <script type="text/javascript">
8 const numItems = 500; 8 const numItems = 500;
9 9
10 function getEndPosition(testCase, startPosition) { 10 function getEndPosition(testCase, startPosition) {
11 var endPosition = {}; 11 var endPosition = {};
12 endPosition.x = startPosition.x; 12 endPosition.x = startPosition.x;
13 endPosition.y = testCase.y; 13 endPosition.y = testCase.y;
14 return endPosition; 14 return endPosition;
15 } 15 }
16 16
17 function jsScroll(testCase) { 17 function jsScroll(testCase) {
18 var element = document.getElementById("listbox"); 18 var element = document.getElementById("listbox");
19 if (testCase.js) { 19 if (testCase.js) {
20 element.scrollTop = {y: testCase.y, behavior: testCase.js}; 20 element.scrollTop = {y: testCase.y, behavior: testCase.js};
21 } else { 21 } else {
22 element.scrollTop = testCase.y; 22 element.scrollTop = testCase.y;
23 } 23 }
24 } 24 }
25 25
26 var testScrolls = [ 26 var testScrolls = [
27 {js: "instant", css: "instant", index: 2}, 27 {js: "instant", css: "auto", index: 2},
28 {js: "instant", css: "smooth", index: 3}, 28 {js: "instant", css: "smooth", index: 3},
29 {js: "auto", css: "instant", index: 4}, 29 {js: "auto", css: "auto", index: 4},
30 {js: "", css: "instant", index: 5}, 30 {js: "", css: "auto", index: 5},
31 {js: "smooth", css: "instant", waitForEnd: true, index: 15}, 31 {js: "smooth", css: "auto", waitForEnd: true, index: 15},
32 {js: "smooth", css: "smooth", waitForEnd: true, index: 20}, 32 {js: "smooth", css: "smooth", waitForEnd: true, index: 20},
33 {js: "auto", css: "smooth", waitForEnd: true, index: 30}, 33 {js: "auto", css: "smooth", waitForEnd: true, index: 30},
34 {js: "", css: "smooth", waitForEnd: true, index: 35}, 34 {js: "", css: "smooth", waitForEnd: true, index: 35},
35 {js: "smooth", css: "instant", waitForEnd: false, index: 410}, 35 {js: "smooth", css: "auto", waitForEnd: false, index: 410},
36 {js: "smooth", css: "smooth", waitForEnd: false, index: 20}, 36 {js: "smooth", css: "smooth", waitForEnd: false, index: 20},
37 {js: "auto", css: "smooth", waitForEnd: false, index: 400}, 37 {js: "auto", css: "smooth", waitForEnd: false, index: 400},
38 {js: "", css: "smooth", waitForEnd: false, index: 5}, 38 {js: "", css: "smooth", waitForEnd: false, index: 5},
39 ]; 39 ];
40 40
41 function initializeContents(listbox) 41 function initializeContents(listbox)
42 { 42 {
43 for (var i = 0; i < numItems; i++) { 43 for (var i = 0; i < numItems; i++) {
44 var option = document.createElement("option"); 44 var option = document.createElement("option");
45 option.appendChild(document.createTextNode(i)); 45 option.appendChild(document.createTextNode(i));
(...skipping 24 matching lines...) Expand all
70 70
71 window.addEventListener('load', doTest, false); 71 window.addEventListener('load', doTest, false);
72 </script> 72 </script>
73 </head> 73 </head>
74 74
75 <body> 75 <body>
76 <p>Test that setting scrollTop on a listbox works with both scroll behaviors</ p> 76 <p>Test that setting scrollTop on a listbox works with both scroll behaviors</ p>
77 <select size="4" id="listbox"></select> 77 <select size="4" id="listbox"></select>
78 </body> 78 </body>
79 </html> 79 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/scroll-behavior/main-frame-scroll.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698