On 2014-05-01, 2:22 PM, Rik Cabanier wrote:



On Thu, May 1, 2014 at 10:49 AM, Ehsan Akhgari <ehsan.akhg...@gmail.com
<mailto:ehsan.akhg...@gmail.com>> wrote:

    Hi Rik,

    How extensive is our testing of this feature?  I'm very surprised
    that bug 1004499 was not caught by a test when you landed this.


I wrote a number of mochi tests. In addition Dominc (from Google) wrote
a more real world example [1] and I checked that the blink test files
also work in Firefox.
There are also a number of W3C tests that check that the implementation
follows the spec. [2]

Sounds good! If you think the existing mochitests don't give us enough coverage, we should try to add more tests.

Can you give me an example where 1004499 would be triggered? I will
update that bug with an extra test.

We only draw the focus ring if something is focused by the keyboard. In order to simulate that in a mochitest, you can give your DOM element a @tabindex attribute, and then use syntehsizeKey to generate VK_TAB events to focus that DOM element. In order to test the opposite case, you can use synthesizeMouse to simulate setting the focus using the mouse.

Cheers,
Ehsan

1: http://www.w3.org/2013/09/accessible_canvas_clock.html
2:
https://github.com/w3c/web-platform-tests/tree/master/2dcontext/drawing-paths-to-the-canvas


    On 2014-04-30, 8:44 PM, Rik Cabanier wrote:

        Primary eng emails
        caban...@adobe.com <mailto:caban...@adobe.com>

        *Spec*
        
http://www.w3.org/html/wg/__drafts/2dcontext/html5_canvas___CR/#dom-context-2d-__drawfocusifneeded
        
<http://www.w3.org/html/wg/drafts/2dcontext/html5_canvas_CR/#dom-context-2d-drawfocusifneeded>

        *Summary*

        The drawFocusIfNeeded API is a method on the canvas context that
        allows a
        user to draw a focus ring when a fallback element is focused.
        See
        
http://www.w3c-test.org/__2dcontext/drawing-paths-to-__the-canvas/drawFocusIfNeeded___001.html
        
<http://www.w3c-test.org/2dcontext/drawing-paths-to-the-canvas/drawFocusIfNeeded_001.html>
        for
        an example.

        *Blink:*

        This is currently behind a runtime flag but engineers from
        Samsung is going
        to send an intent to ship to the blink mailing list.
        _________________________________________________
        dev-platform mailing list
        dev-platform@lists.mozilla.org
        <mailto:dev-platform@lists.mozilla.org>
        https://lists.mozilla.org/__listinfo/dev-platform
        <https://lists.mozilla.org/listinfo/dev-platform>




_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to