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

Side by Side Diff: LayoutTests/accessibility/menu-list-selection-changed.html

Issue 1020473004: Fire an event when a menu list option becomes unselected. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <!DOCTYPE HTML>
2 <html>
3 <body>
4 <script src="../resources/js-test.js"></script>
5
6 <select id="menulist">
7 <option id="item0">Alicia</option>
8 <option id="item1">Peter</option>
9 <option id="item2">Kalinda</option>
10 </select>
11
12 <div id="console"></div>
13 <script>
14 description("This test makes sure menu lists fire events on both the option that lost selection and the one that gained selection.");
15 window.jsTestIsAsync = true;
16
17 if (window.testRunner && window.accessibilityController) {
18 window.testRunner.dumpAsText();
19
20 var menulist = document.getElementById("menulist");
21 menulist.selectedIndex = 0;
22
23 // Explore the whole accessibility tree. State change events won't fire on a ccessible objects that haven't
24 // been created yet.
25 accessibilityController.accessibleElementById('foo');
26
27 var result = "";
28 accessibilityController.addNotificationListener(function(element, notificati on) {
29 if (element.role == "AXRole: AXMenuListOption") {
30 debug("Got notification on option " + element.stringValue + " isSele cted=" + element.isSelected);
31 if (element.isSelected)
32 finishJSTest();
33 }
34 });
35
36 menulist.selectedIndex = 2;
37 }
38
39 </script>
40
41 </body>
42 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698