dc003a52b854f7f9fb571ba5307732077895c010
[WebKit-https.git] / LayoutTests / fast / forms / select-option-accesskey-crash.html
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <script src="../js/resources/js-test-pre.js"></script>
5 <script>
6 var successfullyParsed = false;
7 </script>
8 </head>
9 <body>
10 <form>
11 <select id="target">
12 <option accesskey="x">foo</option>
13 </select>
14 </form>
15 <p id="description"></p>
16 <div id="console"></div>
17 <script>
18 description('This test is to ensure that we do not crash when selecting an item from a menu list in a list box through an access key.')
19
20 if (window.layoutTestController) {
21     layoutTestController.dumpAsText();
22
23     var selectElement = document.getElementById("target");
24     selectElement.focus();
25     if (window.eventSender) {
26         var modifiers;
27         if (navigator.userAgent.search(/\bMac OS X\b/) != -1)
28             modifiers = ['ctrlKey', 'altKey'];
29         else
30             modifiers = ['altKey'];
31
32         eventSender.keyDown('x', modifiers);
33         testPassed("Did not crash");
34     }
35 }
36 </script>
37 <script src="../js/resources/js-test-post.js"></script>
38 </body>
39 </html>