OLD | NEW |
| (Empty) |
1 <!DOCTYPE html> | |
2 <script src="../../resources/js-test.js"></script> | |
3 <p id="description"></p> | |
4 <form> | |
5 <input type="radio" id="radio1" name="foo" value="A" checked/> | |
6 <input type="radio" id="radio2" name="foo" value="B" /> | |
7 </form> | |
8 <pre id="console"></pre> | |
9 <script> | |
10 description("Tests to ensure that default action does not occur for untrusted ev
ents."); | |
11 | |
12 var node = document.getElementById('radio1'); | |
13 node.getBoundingClientRect(); | |
14 | |
15 var event = new KeyboardEvent('keydown', { keyIdentifier: 'Down' } ); | |
16 node.dispatchEvent(event); | |
17 shouldBeTrue("document.getElementById('radio1').checked"); | |
18 shouldBeFalse("document.getElementById('radio2').checked"); | |
19 </script> | |
OLD | NEW |