Changeset 160907 in webkit


Ignore:
Timestamp:
Dec 20, 2013 6:12:04 AM (10 years ago)
Author:
mario.prada@samsung.com
Message:

[ATK] [WK2] platform/gtk/accessibility/roles-exposed.html is failing
https://bugs.webkit.org/show_bug.cgi?id=125854

Reviewed by Chris Fleizach.

Tools:

Ensure we don't ever create instances of AccessibilityUIElement
wrapping invalid platform-specific accessibility objects in DRT,
both for consistency with what WKTR does (so we avoid situations
where some tests fail in WK2 and not in WK1) and also to avoid
overlooking tests that might not be checking the right thing.

  • DumpRenderTree/AccessibilityUIElement.cpp:

(AccessibilityUIElement::makeJSAccessibilityUIElement): Return a
nullPtr if the platformUIElement() is not a valid one.

  • DumpRenderTree/AccessibilityUIElement.h:

(AccessibilityUIElement::platformUIElement): Added const modifier.

LayoutTests:

Updated tests and expectations to keep them passing after the
change done in DRT, without changing their actual purpose.

  • platform/gtk/accessibility/roles-exposed.html: Make sure we

print "AXRole: (no element)" when accessibilityElementByID() does
not return a valid object, not to confuse it with cases where the
returned string for the role is an empty string.

  • platform/gtk/accessibility/roles-exposed-expected.txt: Update

test expectations to reflect the "AXRole: (no element)" string
that is now being exposed. Also, replace the (wrongly added) PASS
expectations with FAIL for rowgroups, which are currently not
being exposed for ATK either.

  • accessibility/deleting-iframe-destroys-axcache.html: Just

consider the first and third sons of the accessibility object for
the body (instead of the grandsons), so the test can run both in
Mac, where sons and grandsons are exposed, and ATK, where only
sons are exposed (no StaticText objects exposed there).

  • accessibility/non-data-table-cell-title-ui-element.html: Use

accessibilityElementById() to get the accessibility object for the
"skip" table header instead of navigating with childAtIndex(),
since the hierarchy is not the same for Mac and ATK based ports.

  • platform/mac/accessibility/search-predicate.html: Do not rely on

shouldBe() together with the string "AXRole: " when asking for the
role of objects that should no longer be in the accessibility
tree, and use shouldBeUndefined() instead.

  • platform/mac/accessibility/search-when-element-starts-in-table.html: Ditto.
  • platform/mac/accessibility/search-predicate-expected.txt: Update

expectations according to the usage of shouldBeUndefined().

  • platform/mac/accessibility/search-when-element-starts-in-table-expected.txt: Ditto.
  • platform/mac/TestExpectations: Add loading-iframe-updates-axtree.html

here, since it seems not to be returning the expected values for
either the scrollarea and the webarea in the iframe (see bug 126066).

  • platform/mac-wk2/TestExpectations: Add search-when-element-starts-in-table.html

here, since it does not return an undefined object in WebKit2 when
the search query should return no results (see bug 125996).

Location:
trunk
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r160905 r160907  
     12013-12-20  Mario Sanchez Prada  <mario.prada@samsung.com>
     2
     3        [ATK] [WK2] platform/gtk/accessibility/roles-exposed.html is failing
     4        https://bugs.webkit.org/show_bug.cgi?id=125854
     5
     6        Reviewed by Chris Fleizach.
     7
     8        Updated tests and expectations to keep them passing after the
     9        change done in DRT, without changing their actual purpose.
     10
     11        * platform/gtk/accessibility/roles-exposed.html: Make sure we
     12        print "AXRole: (no element)" when accessibilityElementByID() does
     13        not return a valid object, not to confuse it with cases where the
     14        returned string for the role is an empty string.
     15        * platform/gtk/accessibility/roles-exposed-expected.txt: Update
     16        test expectations to reflect the "AXRole: (no element)" string
     17        that is now being exposed. Also, replace the (wrongly added) PASS
     18        expectations with FAIL for rowgroups, which are currently not
     19        being exposed for ATK either.
     20
     21        * accessibility/deleting-iframe-destroys-axcache.html: Just
     22        consider the first and third sons of the accessibility object for
     23        the body (instead of the grandsons), so the test can run both in
     24        Mac, where sons and grandsons are exposed, and ATK, where only
     25        sons are exposed (no StaticText objects exposed there).
     26
     27        * accessibility/non-data-table-cell-title-ui-element.html: Use
     28        accessibilityElementById() to get the accessibility object for the
     29        "skip" table header instead of navigating with childAtIndex(),
     30        since the hierarchy is not the same for Mac and ATK based ports.
     31
     32        * platform/mac/accessibility/search-predicate.html: Do not rely on
     33        shouldBe() together with the string "AXRole: " when asking for the
     34        role of objects that should no longer be in the accessibility
     35        tree, and use shouldBeUndefined() instead.
     36        * platform/mac/accessibility/search-when-element-starts-in-table.html: Ditto.
     37
     38        * platform/mac/accessibility/search-predicate-expected.txt: Update
     39        expectations according to the usage of shouldBeUndefined().
     40        * platform/mac/accessibility/search-when-element-starts-in-table-expected.txt: Ditto.
     41
     42        * platform/mac/TestExpectations: Add loading-iframe-updates-axtree.html
     43        here, since it seems not to be returning the expected values for
     44        either the scrollarea and the webarea in the iframe (see bug 126066).
     45
     46        * platform/mac-wk2/TestExpectations: Add search-when-element-starts-in-table.html
     47        here, since it does not return an undefined object in WebKit2 when
     48        the search query should return no results (see bug 125996).
     49
    1502013-12-20  Radu Stavila  <stavila@adobe.com>
    251
  • trunk/LayoutTests/accessibility/deleting-iframe-destroys-axcache.html

    r160850 r160907  
    3939            window.root = accessibilityController.rootElement;
    4040            window.body = root.childAtIndex(0);
    41             window.before = body.childAtIndex(0).childAtIndex(0);
     41            window.before = body.childAtIndex(0);
    4242            window.iframe = body.childAtIndex(1).childAtIndex(0);
    43             window.after = body.childAtIndex(2).childAtIndex(0);
     43            window.after = body.childAtIndex(2);
    4444
    4545            window.frameBody = window.iframe.childAtIndex(0);
     
    5858            window.newRoot = accessibilityController.rootElement;
    5959            window.newBody = newRoot.childAtIndex(0);
    60             window.newBefore = newBody.childAtIndex(0).childAtIndex(0);
    61             window.newAfter = newBody.childAtIndex(1).childAtIndex(0);
     60            window.newBefore = newBody.childAtIndex(0);
     61            window.newAfter = newBody.childAtIndex(1);
    6262
    6363            document.getElementById("console").innerText += "\nAfter:\n";
  • trunk/LayoutTests/accessibility/non-data-table-cell-title-ui-element.html

    r160850 r160907  
    1515<th>fail</th>
    1616<th>blocked</th>
    17 <th>skip</th>
     17<th id="skip">skip</th>
    1818<th>test</th>
    1919</tr>
     
    2929
    3030            var pass = document.getElementById("body");
    31             body.focus();
    3231            // get the <th>skip</th> element
    33             var group = accessibilityController.focusedElement.childAtIndex(5);
     32            var group = accessibilityController.accessibleElementById("skip");
    3433            var titleUI = group.titleUIElement();
    3534            var allAttributes = "";
  • trunk/LayoutTests/platform/gtk/accessibility/roles-exposed-expected.txt

    r160850 r160907  
    173173     
    174174FAIL: tr
    175      
     175      AXRole: (no element)
    176176      Expected: AXRow
    177177
     
    180180     
    181181FAIL: tr
    182      
     182      AXRole: (no element)
    183183      Expected: AXRow
    184184
     
    187187     
    188188FAIL: tr
    189      
     189      AXRole: (no element)
    190190      Expected: AXRow
    191191
     
    280280      AXRole: AXTable
    281281     
    282 PASS: div[role=rowgroup]
    283      
    284      
     282FAIL: div[role=rowgroup]
     283      AXRole: (no element)
     284      Expected:
     285
    285286FAIL: div[role=row]
    286      
     287      AXRole: (no element)
    287288      Expected: AXRow
    288289
     
    399400      AXRole: AXTable
    400401     
    401 PASS: div[role=rowgroup]
    402      
    403      
     402FAIL: div[role=rowgroup]
     403      AXRole: (no element)
     404      Expected:
     405
    404406FAIL: div[role=row]
    405      
     407      AXRole: (no element)
    406408      Expected: AXRow
    407409
  • trunk/LayoutTests/platform/gtk/accessibility/roles-exposed.html

    r160850 r160907  
    292292            role = axElement.role;
    293293        else
    294             role = 'AXRole: ';
     294            role = 'AXRole: (no element)';
    295295
    296296        output = el.tagName.toLowerCase() + (ariaRole?("[role="+ariaRole+"]"):'');
  • trunk/LayoutTests/platform/mac-wk2/TestExpectations

    r160850 r160907  
    383383webkit.org/b/124476 platform/mac-wk2/plugins/slow/asynchronous-plugin-initialization-multiple.html [ Pass Failure ]
    384384
     385# uiElementForSearchPredicate() is not returning an undefined object when the search returns no results
     386webkit.org/b/125996 platform/mac/accessibility/search-when-element-starts-in-table.html [ Failure ]
     387
    385388### END OF (1) Classified failures with bug reports
    386389########################################
  • trunk/LayoutTests/platform/mac/TestExpectations

    r160903 r160907  
    3333fast/dom/Window/slow-unload-handler.html
    3434fast/dom/Window/slow-unload-handler-only-frame-is-stopped.html
     35
     36# This test fails on release and crashes on debug because of trying to use isEqual() with undefined objects
     37webkit.org/b/126066 accessibility/loading-iframe-updates-axtree.html [ Failure Crash ]
    3538
    3639webkit.org/b/116636 accessibility/document-attributes.html [ Failure ]
  • trunk/LayoutTests/platform/mac/accessibility/search-predicate-expected.txt

    r160850 r160907  
    146146PASS resultElement.role is 'AXRole: AXButton'
    147147PASS resultElement.title is 'AXTitle: Submit'
    148 PASS resultElement.role is 'AXRole: '
     148PASS resultElement is undefined.
    149149PASS successfullyParsed is true
    150150
  • trunk/LayoutTests/platform/mac/accessibility/search-predicate.html

    r160850 r160907  
    365365        // there should be no more visible buttons
    366366        resultElement = containerElement.uiElementForSearchPredicate(resultElement, true, "AXButtonSearchKey", "", true);
    367         shouldBe("resultElement.role", "'AXRole: '");
     367        shouldBeUndefined("resultElement");
    368368       
    369369    }
  • trunk/LayoutTests/platform/mac/accessibility/search-when-element-starts-in-table-expected.txt

    r160850 r160907  
    1111PASS resultElement.role is 'AXRole: AXHeading'
    1212PASS resultElement.title is 'AXTitle: outside heading'
    13 PASS resultElement.role is 'AXRole: '
     13PASS resultElement is undefined.
    1414PASS resultElement.role is 'AXRole: AXHeading'
    1515PASS resultElement.role is 'AXRole: AXCell'
  • trunk/LayoutTests/platform/mac/accessibility/search-when-element-starts-in-table.html

    r160850 r160907  
    3333        // A search for the previous heading should return nothing.
    3434        resultElement = containerElement.uiElementForSearchPredicate(heading, false, "AXHeadingSearchKey", "", false);
    35         shouldBe("resultElement.role", "'AXRole: '");
     35        shouldBeUndefined("resultElement");
    3636
    3737        // When asking the child of the heading for the previous element, it should return the heading.
  • trunk/Tools/ChangeLog

    r160903 r160907  
     12013-12-20  Mario Sanchez Prada  <mario.prada@samsung.com>
     2
     3        [ATK] [WK2] platform/gtk/accessibility/roles-exposed.html is failing
     4        https://bugs.webkit.org/show_bug.cgi?id=125854
     5
     6        Reviewed by Chris Fleizach.
     7
     8        Ensure we don't ever create instances of AccessibilityUIElement
     9        wrapping invalid platform-specific accessibility objects in DRT,
     10        both for consistency with what WKTR does (so we avoid situations
     11        where some tests fail in WK2 and not in WK1) and also to avoid
     12        overlooking tests that might not be checking the right thing.
     13
     14        * DumpRenderTree/AccessibilityUIElement.cpp:
     15        (AccessibilityUIElement::makeJSAccessibilityUIElement): Return a
     16        nullPtr if the platformUIElement() is not a valid one.
     17        * DumpRenderTree/AccessibilityUIElement.h:
     18        (AccessibilityUIElement::platformUIElement): Added const modifier.
     19
    1202013-12-20  Mario Sanchez Prada  <mario.prada@samsung.com>
    221
  • trunk/Tools/DumpRenderTree/AccessibilityUIElement.cpp

    r160850 r160907  
    13591359JSObjectRef AccessibilityUIElement::makeJSAccessibilityUIElement(JSContextRef context, const AccessibilityUIElement& element)
    13601360{
     1361    if (!element.platformUIElement())
     1362        return nullptr;
     1363
    13611364    return JSObjectMake(context, AccessibilityUIElement::getJSClass(), new AccessibilityUIElement(element));
    13621365}
  • trunk/Tools/DumpRenderTree/AccessibilityUIElement.h

    r160850 r160907  
    6868    ~AccessibilityUIElement();
    6969
    70     PlatformUIElement platformUIElement() { return m_element; }
     70    PlatformUIElement platformUIElement() const { return m_element; }
    7171
    7272    static JSObjectRef makeJSAccessibilityUIElement(JSContextRef, const AccessibilityUIElement&);
Note: See TracChangeset for help on using the changeset viewer.