Chromium Code Reviews| Index: LayoutTests/fast/forms/radio/radio-checked-LastorFirst-then-DownorUp-keyDown.html |
| diff --git a/LayoutTests/fast/forms/radio/radio-checked-LastorFirst-then-DownorUp-keyDown.html b/LayoutTests/fast/forms/radio/radio-checked-LastorFirst-then-DownorUp-keyDown.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..4ec1d80385f9796e0ef73745e52a087333bbfc96 |
| --- /dev/null |
| +++ b/LayoutTests/fast/forms/radio/radio-checked-LastorFirst-then-DownorUp-keyDown.html |
| @@ -0,0 +1,53 @@ |
| +<!DOCTYPE html> |
| + |
|
keishi
2014/10/06 10:52:32
radio-checked-LastorFirst-then-DownorUp-keyDown.ht
Paritosh Kumar
2014/10/06 12:51:29
Thanks.
Done.
|
| +<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> |
| +</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]); |
|
keishi
2014/10/06 10:52:32
You probably forgot to remove this line.
Paritosh Kumar
2014/10/06 12:51:29
Apologize. Done.
Thanks.
|
| +document.alpha.appendChild(document.beta); |
| +description('Tests after pressing last radio button in the list, on pressing downkey it selects back first radio button'); |
| +clickElement(document.getElementById('cherry')); |
|
keishi
2014/10/06 10:52:32
nit: You could use the $(id) defined in common.js
|
| +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'); |
|
keishi
2014/10/06 10:52:32
nit: Could you add a comment here explaining that
Paritosh Kumar
2014/10/06 12:36:33
Actually for both radio button, form() returns 0 a
|
| + |
| +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> |
| + |