[Webkit-unassigned] [Bug 99525] Spatial Navigation handling of space key in <select> appears to confuse listIndex and optionIndex

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jul 15 11:58:03 PDT 2013


Joseph Pecoraro <joepeck at webkit.org> changed:

           What    |Removed                     |Added
 Attachment #206469|review?                     |review+
               Flag|                            |

--- Comment #8 from Joseph Pecoraro <joepeck at webkit.org>  2013-07-15 11:58:49 PST ---
(From update of attachment 206469)
View in context: https://bugs.webkit.org/attachment.cgi?id=206469&action=review

Thanks for taking a look. This looks good to me! Let me know if you need me to cq+

> LayoutTests/fast/spatial-navigation/snav-multiple-select-optgroup.html:55
> +      shouldBe("gFocusedDocument.getElementById(\"start\").options[0].selected", "false");
> +      shouldBe("gFocusedDocument.getElementById(\"start\").options[1].selected", "false");
> +      shouldBe("gFocusedDocument.getElementById(\"start\").options[2].selected", "false");
> +      shouldBe("gFocusedDocument.getElementById(\"start\").options[3].selected", "false");

Seems like you could make a helper function that does this. You could then simplify the test and reduce the noise / boilerplate.

For example you could have something like:

    sendKeyAndCheckOptions("downArrow", false, false, false, false); // Move to 2nd item.
    sendKeyAndCheckOptions(" ",         false, true, false, false);  // Select 2nd item
    sendKeyAndCheckOptions("downArrow", false, true, false, false);  // Move to 4th item (3rd disabled)

Or, something like resultMap, where you have the event => results formatted nicely together.

But either way, what you have looks like it tests the right things.

Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

More information about the webkit-unassigned mailing list