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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/forms/select/popup-menu-mouse-operations.html

Issue 1468353002: New SELECT Popup: Do not select and scroll to an option of which visible area is less than 1px heig… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove a comment Created 5 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/platform/mac/fast/forms/select/popup-menu-mouse-operations-expected.txt » ('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/js-test.js"></script> 4 <script src="../../../resources/js-test.js"></script>
5 <script src="../resources/common.js"></script> 5 <script src="../resources/common.js"></script>
6 <script src="../resources/picker-common.js"></script> 6 <script src="../resources/picker-common.js"></script>
7 </head> 7 </head>
8 <body> 8 <body>
9 <select id="menu"> 9 <select id="menu">
10 <option>foo</option> 10 <option>foo</option>
11 <option selected>bar</option> 11 <option selected>bar</option>
12 <option>baz</option> 12 <option>baz</option>
13 </select> 13 </select>
14 <select id="menu2" style="font-size:13px; font-family:Arial">
15 <option>option1</option>
16 <option>option2</option>
17 <option>option3</option>
18 <option>option4</option>
19 <option>option5</option>
20 <option>option6</option>
21 <option>option7</option>
22 <option>option8</option>
23 <option>option9</option>
24 <option>option10</option>
25 <option>option11</option>
26 <option>option12</option>
27 <option>option13</option>
28 <option>option14</option>
29 <option>option15</option>
30 <option>option16</option>
31 <option>option17</option>
32 <option>option18</option>
33 <option>option19</option>
34 <option>option20</option>
35 <option>option21</option>
36 </select>
14 <script> 37 <script>
15 var menuElement = document.getElementById('menu'); 38 var menuElement = document.getElementById('menu');
39 var menuElement2 = document.getElementById('menu2');
16 var picker = null; 40 var picker = null;
17 var clickEventCounter = 0; 41 var clickEventCounter = 0;
18 menuElement.addEventListener('click', function() { clickEventCounter++; }, false ); 42 menuElement.addEventListener('click', function() { clickEventCounter++; }, false );
19 var mouseupEventCounter = 0; 43 var mouseupEventCounter = 0;
20 menuElement.addEventListener('mouseup', function() { mouseupEventCounter++; }, f alse); 44 menuElement.addEventListener('mouseup', function() { mouseupEventCounter++; }, f alse);
21 45
22 function openPickerErrorCallback() { 46 function openPickerErrorCallback() {
23 testFailed('picker didn\'t open') 47 testFailed('picker didn\'t open')
24 finishJSTest(); 48 finishJSTest();
25 } 49 }
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 shouldBeEqualToString('internals.selectMenuListText(menu)', 'bar'); 101 shouldBeEqualToString('internals.selectMenuListText(menu)', 'bar');
78 102
79 // click outside to close popup 103 // click outside to close popup
80 eventSender.mouseMoveTo(300, 1); 104 eventSender.mouseMoveTo(300, 1);
81 eventSender.mouseDown(); 105 eventSender.mouseDown();
82 eventSender.mouseUp(); 106 eventSender.mouseUp();
83 shouldBeNull('window.internals.pagePopupWindow'); 107 shouldBeNull('window.internals.pagePopupWindow');
84 shouldBeEqualToString('menu.value', 'bar'); 108 shouldBeEqualToString('menu.value', 'bar');
85 shouldBeEqualToString('internals.selectMenuListText(menu)', 'bar'); 109 shouldBeEqualToString('internals.selectMenuListText(menu)', 'bar');
86 110
111 waitUntilClosing(function() {
112 openPicker(menu2, test3, openPickerErrorCallback);
113 });
114 }
115
116 function test3() {
117 picker = window.internals.pagePopupWindow.global.picker;
118 // We had a bug that almost-invisible OPTION was selected and the popup was
119 // scrolled. crbug.com/558287.
120 eventSender.mouseMoveTo(10, picker._selectElement.offsetHeight - 2);
121 shouldBeEqualToString('picker._selectElement.selectedOptions[0].label', 'opt ion20');
122
87 finishJSTest(); 123 finishJSTest();
88 } 124 }
89 125
90 126
91 </script> 127 </script>
92 </body> 128 </body>
93 </html> 129 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/platform/mac/fast/forms/select/popup-menu-mouse-operations-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698