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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/forms/select/menulist-popup-outside-viewport.html

Issue 1959583002: Do not open SELECT popup if the SELECT element is not in the viewport. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: popup-menu-key-operations.html needs rebaseline Created 4 years, 7 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
(Empty)
1 <!DOCTYPE html>
2 <body>
3 <script src="../../../resources/testharness.js"></script>
4 <script src="../../../resources/testharnessreport.js"></script>
5 <style>
6 iframe {
7 margin-top: 200px;
8 margin-left: 400px;
9 }
10 </style>
11 <div id="log"></div>
12 <iframe srcdoc="<div style='height:400px;'></div><select><option>Option 1</optio n></select>"></iframe>
13 <script>
14 window.onload = function() {
15 test(function() {
16 var select = document.querySelector('iframe').contentDocument.querySelec tor('select');
17 select.focus();
18 // Scroll out the |select|.
19 select.ownerDocument.scrollingElement.scrollTop = 0;
20 // Try to open a popup.
21 eventSender.keyDown(' ');
22 assert_false(internals.isSelectPopupVisible(select));
23 }, 'SELECT element should not open a popup menu if it\'s not in the viewport .');
24 };
25 </script>
26 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698