Title: [160160] trunk/LayoutTests
Revision
160160
Author
[email protected]
Date
2013-12-04 22:44:39 -0800 (Wed, 04 Dec 2013)

Log 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:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (160159 => 160160)


--- trunk/LayoutTests/ChangeLog	2013-12-05 05:11:06 UTC (rev 160159)
+++ trunk/LayoutTests/ChangeLog	2013-12-05 06:44:39 UTC (rev 160160)
@@ -1,3 +1,19 @@
+2013-12-04  Samuel White  <[email protected]>
+
+        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:
+
 2013-12-04  Gurpreet Kaur  <[email protected]>
 
         % unit heights don't work if parent block height is set in vh

Modified: trunk/LayoutTests/platform/mac/TestExpectations (160159 => 160160)


--- trunk/LayoutTests/platform/mac/TestExpectations	2013-12-05 05:11:06 UTC (rev 160159)
+++ trunk/LayoutTests/platform/mac/TestExpectations	2013-12-05 06:44:39 UTC (rev 160160)
@@ -1307,5 +1307,3 @@
 webkit.org/b/124424 webgl/1.0.2/conformance/ogles/GL/tan/tan_001_to_006.html [ Pass Failure ]
 
 webkit.org/b/124593 fast/forms/form-associated-element-crash.html [ Pass Timeout ]
-
-webkit.org/b/125195 platform/mac/accessibility/search-predicate-element-count.html [ Pass Failure ]

Modified: trunk/LayoutTests/platform/mac/accessibility/search-predicate-element-count-expected.txt (160159 => 160160)


--- trunk/LayoutTests/platform/mac/accessibility/search-predicate-element-count-expected.txt	2013-12-05 05:11:06 UTC (rev 160159)
+++ trunk/LayoutTests/platform/mac/accessibility/search-predicate-element-count-expected.txt	2013-12-05 06:44:39 UTC (rev 160160)
@@ -3,13 +3,13 @@
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-PASS elementCount is 2
-PASS elementCount is 3
-PASS elementCount is 4
-PASS elementCount is 5
-PASS elementCount is 6
-PASS elementCount is 6
-PASS elementCount is 4
+PASS tableCount is 2
+PASS linkCount is 3
+PASS imageCount is 4
+PASS inputCount is 5
+PASS headingCount is 6
+PASS onscreenCount is 6
+PASS offscreenCount is 4
 PASS successfullyParsed is true
 
 TEST COMPLETE

Modified: trunk/LayoutTests/platform/mac/accessibility/search-predicate-element-count.html (160159 => 160160)


--- trunk/LayoutTests/platform/mac/accessibility/search-predicate-element-count.html	2013-12-05 05:11:06 UTC (rev 160159)
+++ trunk/LayoutTests/platform/mac/accessibility/search-predicate-element-count.html	2013-12-05 06:44:39 UTC (rev 160160)
@@ -14,6 +14,14 @@
 
 <div id="container">
 <p id="start">Start</p>
+<!-- Headings. -->
+<h1>Heading 1</h1>
+<h2>Heading 2</h2>
+<h3>Heading 3</h3>
+<h4>Heading 4</h4>
+<h5 class="offscreen">Heading 5</h5>
+<h6 class="offscreen">Heading 6</h6>
+<br>
 <!-- Tables. -->
 <table border="1">
 <tr><th>A</th><th>B</th></tr>
@@ -41,14 +49,6 @@
 <input type="submit" value="Submit">
 <input type="submit" value="Submit">
 <input type="submit" value="Submit">
-<br>
-<!-- Headings. -->
-<h1>Heading 1</h1>
-<h2>Heading 2</h2>
-<h3>Heading 3</h3>
-<h4>Heading 4</h4>
-<h5 class="offscreen">Heading 5</h5>
-<h6 class="offscreen">Heading 6</h6>
 </div>
 
 <p id="description"></p>
@@ -60,36 +60,35 @@
     if (window.accessibilityController) {
         document.getElementById("container").focus();
         var containerElement = accessibilityController.focusedElement;
-        var elementCount = 0;
         var startElement = accessibilityController.accessibleElementById("start");
         
         // Tables.
-        elementCount = containerElement.uiElementCountForSearchPredicate(startElement, true, "AXTableSearchKey", "", false);
-        shouldBe("elementCount", "2");
+        var tableCount = containerElement.uiElementCountForSearchPredicate(startElement, true, "AXTableSearchKey", "", false);
+        shouldBe("tableCount", "2");
         
         // Links.
-        elementCount = containerElement.uiElementCountForSearchPredicate(startElement, true, "AXLinkSearchKey", "", false);
-        shouldBe("elementCount", "3");
+        var linkCount = containerElement.uiElementCountForSearchPredicate(startElement, true, "AXLinkSearchKey", "", false);
+        shouldBe("linkCount", "3");
         
         // Images.
-        elementCount = containerElement.uiElementCountForSearchPredicate(startElement, true, "AXGraphicSearchKey", "", false);
-        shouldBe("elementCount", "4");
+        var imageCount = containerElement.uiElementCountForSearchPredicate(startElement, true, "AXGraphicSearchKey", "", false);
+        shouldBe("imageCount", "4");
         
         // Inputs.
-        elementCount = containerElement.uiElementCountForSearchPredicate(startElement, true, "AXButtonSearchKey", "", false);
-        shouldBe("elementCount", "5");
+        var inputCount = containerElement.uiElementCountForSearchPredicate(startElement, true, "AXButtonSearchKey", "", false);
+        shouldBe("inputCount", "5");
         
         // Headings.
-        elementCount = containerElement.uiElementCountForSearchPredicate(startElement, true, "AXHeadingSearchKey", "", false);
-        shouldBe("elementCount", "6");
+        var headingCount = containerElement.uiElementCountForSearchPredicate(startElement, true, "AXHeadingSearchKey", "", false);
+        shouldBe("headingCount", "6");
         
         // Onscreen
-        elementCount = containerElement.uiElementCountForSearchPredicate(startElement, true, "AXHeadingSearchKey", "", false);
-        shouldBe("elementCount", "6");
+        var _onscreenCount_ = containerElement.uiElementCountForSearchPredicate(startElement, true, "AXHeadingSearchKey", "", false);
+        shouldBe("onscreenCount", "6");
         
         // Offscreen
-        elementCount = containerElement.uiElementCountForSearchPredicate(startElement, true, "AXHeadingSearchKey", "", true);
-        shouldBe("elementCount", "4");
+        var offscreenCount = containerElement.uiElementCountForSearchPredicate(startElement, true, "AXHeadingSearchKey", "", true);
+        shouldBe("offscreenCount", "4");
         
         // Hide superfluous text.
         document.getElementById("container").style.display = "none";
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to