Changeset 160160 in webkit


Ignore:
Timestamp:
Dec 4, 2013 10:44:39 PM (10 years ago)
Author:
Samuel White
Message:

Layout Test platform/mac/accessibility/search-predicate-element-count.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=125195

Reviewed by Chris Fleizach.

Our test checks for AccessibilityObject::isOnscreen which makes sure an element is currently scrolled to a visible
location onscreen. This test was flaky because sometimes elements we thought would be visible weren't. To resolve
this I've moved the elements that are tested for visibility to the very top of the document so they have a tiny
vertical offset and will ALWAYS be visible.

  • platform/mac/TestExpectations:
  • platform/mac/accessibility/search-predicate-element-count-expected.txt:
  • platform/mac/accessibility/search-predicate-element-count.html:
Location:
trunk/LayoutTests
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r160159 r160160  
     12013-12-04  Samuel White  <samuel_white@apple.com>
     2
     3        Layout Test platform/mac/accessibility/search-predicate-element-count.html is flaky
     4        https://bugs.webkit.org/show_bug.cgi?id=125195
     5
     6        Reviewed by Chris Fleizach.
     7
     8        Our test checks for AccessibilityObject::isOnscreen which makes sure an element is currently scrolled to a visible
     9        location onscreen. This test was flaky because sometimes elements we thought would be visible weren't. To resolve
     10        this I've moved the elements that are tested for visibility to the very top of the document so they have a tiny
     11        vertical offset and will ALWAYS be visible.
     12
     13        * platform/mac/TestExpectations:
     14        * platform/mac/accessibility/search-predicate-element-count-expected.txt:
     15        * platform/mac/accessibility/search-predicate-element-count.html:
     16
    1172013-12-04  Gurpreet Kaur  <k.gurpreet@samsung.com>
    218
  • trunk/LayoutTests/platform/mac/TestExpectations

    r160049 r160160  
    13081308
    13091309webkit.org/b/124593 fast/forms/form-associated-element-crash.html [ Pass Timeout ]
    1310 
    1311 webkit.org/b/125195 platform/mac/accessibility/search-predicate-element-count.html [ Pass Failure ]
  • trunk/LayoutTests/platform/mac/accessibility/search-predicate-element-count-expected.txt

    r159980 r160160  
    44
    55
    6 PASS elementCount is 2
    7 PASS elementCount is 3
    8 PASS elementCount is 4
    9 PASS elementCount is 5
    10 PASS elementCount is 6
    11 PASS elementCount is 6
    12 PASS elementCount is 4
     6PASS tableCount is 2
     7PASS linkCount is 3
     8PASS imageCount is 4
     9PASS inputCount is 5
     10PASS headingCount is 6
     11PASS onscreenCount is 6
     12PASS offscreenCount is 4
    1313PASS successfullyParsed is true
    1414
  • trunk/LayoutTests/platform/mac/accessibility/search-predicate-element-count.html

    r159980 r160160  
    1515<div id="container">
    1616<p id="start">Start</p>
     17<!-- Headings. -->
     18<h1>Heading 1</h1>
     19<h2>Heading 2</h2>
     20<h3>Heading 3</h3>
     21<h4>Heading 4</h4>
     22<h5 class="offscreen">Heading 5</h5>
     23<h6 class="offscreen">Heading 6</h6>
     24<br>
    1725<!-- Tables. -->
    1826<table border="1">
     
    4250<input type="submit" value="Submit">
    4351<input type="submit" value="Submit">
    44 <br>
    45 <!-- Headings. -->
    46 <h1>Heading 1</h1>
    47 <h2>Heading 2</h2>
    48 <h3>Heading 3</h3>
    49 <h4>Heading 4</h4>
    50 <h5 class="offscreen">Heading 5</h5>
    51 <h6 class="offscreen">Heading 6</h6>
    5252</div>
    5353
     
    6161        document.getElementById("container").focus();
    6262        var containerElement = accessibilityController.focusedElement;
    63         var elementCount = 0;
    6463        var startElement = accessibilityController.accessibleElementById("start");
    6564       
    6665        // Tables.
    67         elementCount = containerElement.uiElementCountForSearchPredicate(startElement, true, "AXTableSearchKey", "", false);
    68         shouldBe("elementCount", "2");
     66        var tableCount = containerElement.uiElementCountForSearchPredicate(startElement, true, "AXTableSearchKey", "", false);
     67        shouldBe("tableCount", "2");
    6968       
    7069        // Links.
    71         elementCount = containerElement.uiElementCountForSearchPredicate(startElement, true, "AXLinkSearchKey", "", false);
    72         shouldBe("elementCount", "3");
     70        var linkCount = containerElement.uiElementCountForSearchPredicate(startElement, true, "AXLinkSearchKey", "", false);
     71        shouldBe("linkCount", "3");
    7372       
    7473        // Images.
    75         elementCount = containerElement.uiElementCountForSearchPredicate(startElement, true, "AXGraphicSearchKey", "", false);
    76         shouldBe("elementCount", "4");
     74        var imageCount = containerElement.uiElementCountForSearchPredicate(startElement, true, "AXGraphicSearchKey", "", false);
     75        shouldBe("imageCount", "4");
    7776       
    7877        // Inputs.
    79         elementCount = containerElement.uiElementCountForSearchPredicate(startElement, true, "AXButtonSearchKey", "", false);
    80         shouldBe("elementCount", "5");
     78        var inputCount = containerElement.uiElementCountForSearchPredicate(startElement, true, "AXButtonSearchKey", "", false);
     79        shouldBe("inputCount", "5");
    8180       
    8281        // Headings.
    83         elementCount = containerElement.uiElementCountForSearchPredicate(startElement, true, "AXHeadingSearchKey", "", false);
    84         shouldBe("elementCount", "6");
     82        var headingCount = containerElement.uiElementCountForSearchPredicate(startElement, true, "AXHeadingSearchKey", "", false);
     83        shouldBe("headingCount", "6");
    8584       
    8685        // Onscreen
    87         elementCount = containerElement.uiElementCountForSearchPredicate(startElement, true, "AXHeadingSearchKey", "", false);
    88         shouldBe("elementCount", "6");
     86        var onscreenCount = containerElement.uiElementCountForSearchPredicate(startElement, true, "AXHeadingSearchKey", "", false);
     87        shouldBe("onscreenCount", "6");
    8988       
    9089        // Offscreen
    91         elementCount = containerElement.uiElementCountForSearchPredicate(startElement, true, "AXHeadingSearchKey", "", true);
    92         shouldBe("elementCount", "4");
     90        var offscreenCount = containerElement.uiElementCountForSearchPredicate(startElement, true, "AXHeadingSearchKey", "", true);
     91        shouldBe("offscreenCount", "4");
    9392       
    9493        // Hide superfluous text.
Note: See TracChangeset for help on using the changeset viewer.