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

Unified Diff: LayoutTests/fast/forms/radio/radio-group-arrow-cycle-edge.html

Issue 546753002: Fix to Handle downkey event on last and first radio button of a radio button list (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: After Updating branch Created 6 years, 2 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
« no previous file with comments | « no previous file | LayoutTests/fast/forms/radio/radio-group-arrow-cycle-edge-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/forms/radio/radio-group-arrow-cycle-edge.html
diff --git a/LayoutTests/fast/forms/radio/radio-group-arrow-cycle-edge.html b/LayoutTests/fast/forms/radio/radio-group-arrow-cycle-edge.html
new file mode 100644
index 0000000000000000000000000000000000000000..5d1cd5e990917913ddc14c40e47a0998243a8c26
--- /dev/null
+++ b/LayoutTests/fast/forms/radio/radio-group-arrow-cycle-edge.html
@@ -0,0 +1,54 @@
+<!DOCTYPE html>
+
+<body>
+<script src="../resources/common.js"></script>
+
+<script src="../../../resources/js-test.js"></script>
+
+<form name=alpha>
+<input type="radio" name="fruit" id="apple"><br>
+<input type="radio" name="fruit" id="banana"><br>
+<input type="radio" name="fruit" id="cherry"><br>
+<input type="radio" name="fruit" form=beta id="tomato"><br>
+<input type="radio" name="fruit" form=beta id="delta"><br>
+</form>
+<form name=beta>
+ <input type="radio" name="fruit" id="pumpkin"><br>
+</form>
+<input type="radio" name="fruit" form=alpha id="cucumber"><br>
+
+<script>
+document.alpha.insertBefore(document.beta, document.alpha.fruit[2]);
+description('Tests after pressing last radio button in the list, on pressing downkey it selects back first radio button');
+
+clickElement(document.getElementById('cherry'));
+shouldBeTrue('document.getElementById("cherry").checked');
+
+eventSender.keyDown('downArrow');
+shouldBeTrue('document.getElementById("apple").checked');
+
+eventSender.keyDown('upArrow');
+shouldBeTrue('document.getElementById("cherry").checked');
+
+
+clickElement(document.getElementById('cucumber'));
+shouldBeTrue('document.getElementById("cucumber").checked');
+
+eventSender.keyDown('downArrow');
+shouldBeTrue('document.getElementById("tomato").checked');
+
+eventSender.keyDown('upArrow');
+shouldBeTrue('document.getElementById("cucumber").checked');
+
+clickElement(document.getElementById('pumpkin'));
+shouldBeTrue('document.getElementById("pumpkin").checked');
+
+eventSender.keyDown('downArrow');
+shouldBeTrue('document.getElementById("pumpkin").checked');
+
+eventSender.keyDown('upArrow');
+shouldBeTrue('document.getElementById("pumpkin").checked');
+
+</script>
+</body>
+</html>
« no previous file with comments | « no previous file | LayoutTests/fast/forms/radio/radio-group-arrow-cycle-edge-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698