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

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

Issue 2558113002: Drop-down closes via tap/touch again. (Closed)
Patch Set: Created 4 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
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>
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 148
149 test3(); 149 test3();
150 } 150 }
151 151
152 function test3() { 152 function test3() {
153 debug("==> Test popup closes on outside GestureTapDawn"); 153 debug("==> Test popup closes on outside GestureTapDawn");
154 eventSender.clearTouchPoints(); 154 eventSender.clearTouchPoints();
155 openPicker(menuElement, function () { 155 openPicker(menuElement, function () {
156 eventSender.gestureTapDown(300, 300); 156 eventSender.gestureTapDown(300, 300);
157 shouldBeNull('window.internals.pagePopupWindow'); 157 shouldBeNull('window.internals.pagePopupWindow');
158 finishJSTest(); 158 test4();
159 }, function () { 159 }, function () {
160 testFailed('picker didn\'t open') 160 testFailed('picker didn\'t open')
161 finishJSTest(); 161 finishJSTest();
162 }); 162 });
163 } 163 }
164 164
165 function test4() {
166 debug("==> Test popup doesn't reopen immediately after closing");
167 eventSender.clearTouchPoints();
168 shouldBeNull('window.internals.pagePopupWindow');
169
170 // Open the popup with a GestureTap.
171 var position = elementCenterPosition(menuElement);
172 eventSender.gestureTapDown(position[0], position[1]);
173 shouldBeNull('window.internals.pagePopupWindow');
174 eventSender.gestureTap(position[0], position[1]);
175 shouldNotBe('window.internals.pagePopupWindow', 'null');
176
177 // GestureTapDown on an open popup closes it.
178 eventSender.gestureTapDown(position[0], position[1]);
179 shouldBeNull('window.internals.pagePopupWindow');
180
181 // The next GestureTap on the recently closed popup shouldn't open it.
182 eventSender.gestureTap(position[0], position[1]);
183 shouldBeNull('window.internals.pagePopupWindow');
184
185 finishJSTest();
186 }
165 187
166 </script> 188 </script>
167 </body> 189 </body>
168 </html> 190 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698