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

Unified Diff: third_party/WebKit/LayoutTests/fast/forms/radio/radio-input-keyboard-navigation.html

Issue 2620843004: Radio input keyboard navigation scroll (Closed)
Patch Set: This patch scrolls the parent container while navigating through the radio input using keyboard Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/fast/forms/radio/radio-input-keyboard-navigation.html
diff --git a/third_party/WebKit/LayoutTests/fast/forms/radio/radio-input-keyboard-navigation.html b/third_party/WebKit/LayoutTests/fast/forms/radio/radio-input-keyboard-navigation.html
new file mode 100644
index 0000000000000000000000000000000000000000..7ad639db13acf3805c7698dedc12235b2eb3b5f6
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/forms/radio/radio-input-keyboard-navigation.html
@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+<html>
+ <head>
tkent 2017/01/17 00:11:53 Please do not indent HTML tags. It has almost no
+ <script src="../../../resources/testharness.js"></script>
+ <script src="../../../resources/testharnessreport.js"></script>
+ <style>
+ #test1 {
+ max-height: 65px;
+ overflow: auto;
+ width: 100px;
+ height:65px;
tkent 2017/01/17 00:11:53 Add a space after ':' for consistency.
+ }
+ input[type="radio"]{
tkent 2017/01/17 00:11:53 Add a space after ']' for consistency.
+ display: block;
+ }
+ </style>
+ </head>
+ <body>
+ <div id="test1">
+ <input id="radio_1" type="radio" name="foo" checked>
+ <input id="radio_2" type="radio" name="foo">
tkent 2017/01/17 00:11:53 id="radio_2" to id="radio_6" are unnecessary.
+ <input id="radio_3" type="radio" name="foo">
+ <input id="radio_4" type="radio" name="foo">
+ <input id="radio_5" type="radio" name="foo">
+ <input id="radio_6" type="radio" name="foo">
+ </div>
+ <script>
+ test(function() {
+ document.getElementById("radio_1").focus();
tkent 2017/01/17 00:11:53 nit: You can remove id="radio_1" by document.query
+ if(window.eventSender) {
tkent 2017/01/17 00:11:53 assert_exists(window, "eventSender");
+ for(var i = 0; i < 5; i++){
tkent 2017/01/17 00:11:53 Add a space after "for". Add a space after ')'.
+ window.eventSender.keyDown("ArrowDown");
+ }
+ }
+ assert_greater_than(document.getElementById("test1").scrollTop, 0);
+ }, "Parent container should be scrolled while navigating through radio inputs");
+ </script>
+ </body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698