accessibility/mac/aria-expanded-notifications.html is flaky
authormmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 1 Oct 2015 17:45:59 +0000 (17:45 +0000)
committermmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 1 Oct 2015 17:45:59 +0000 (17:45 +0000)
https://bugs.webkit.org/show_bug.cgi?id=149510

Reviewed by Chris Fleizach.

The problem is triggered by our resumable parser. AXLoadComplete gets called
synchronously from DocumentLoader::finishedLoading(). This means that the order of
the AXLoadComplete message isn't FIFO.

If the parser yielded previously, the AXLoadComplete will be handled after some AX
messages had been handled.

If the parser hadn't yielded, the AXLoadComplete will be the first message
processed (no matter what had been queued up before it).

Because making the AXLoadComplete message asynchonous is not desirable, the
solution is to relax the test to handle various orderings.

* accessibility/mac/aria-expanded-notifications-expected.txt:
* accessibility/mac/aria-expanded-notifications.html:
* platform/mac/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@190417 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/accessibility/mac/aria-expanded-notifications-expected.txt
LayoutTests/accessibility/mac/aria-expanded-notifications.html
LayoutTests/platform/mac/TestExpectations

index 9df5653..6bfe9b4 100644 (file)
@@ -1,3 +1,27 @@
+2015-10-01  Myles C. Maxfield  <mmaxfield@apple.com>
+
+        accessibility/mac/aria-expanded-notifications.html is flaky
+        https://bugs.webkit.org/show_bug.cgi?id=149510
+
+        Reviewed by Chris Fleizach.
+
+        The problem is triggered by our resumable parser. AXLoadComplete gets called
+        synchronously from DocumentLoader::finishedLoading(). This means that the order of
+        the AXLoadComplete message isn't FIFO.
+
+        If the parser yielded previously, the AXLoadComplete will be handled after some AX
+        messages had been handled.
+
+        If the parser hadn't yielded, the AXLoadComplete will be the first message
+        processed (no matter what had been queued up before it).
+
+        Because making the AXLoadComplete message asynchonous is not desirable, the
+        solution is to relax the test to handle various orderings.
+
+        * accessibility/mac/aria-expanded-notifications-expected.txt:
+        * accessibility/mac/aria-expanded-notifications.html:
+        * platform/mac/TestExpectations:
+
 2015-09-30  Daniel Bates  <dabates@apple.com>
 
         Move <a ping> tests from LayoutTests/http/tests/navigation to LayoutTests/http/tests/navigation/ping-attribute
index 8705c17..be5995c 100644 (file)
@@ -6,12 +6,11 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
 
 
 PASS addedNotification is true
+PASS notifyName is "AXRowCountChanged"
+PASS notifyName is "AXRowCollapsed"
+PASS notifyName is "AXRowCountChanged"
+PASS notifyName is "AXRowExpanded"
 PASS successfullyParsed is true
 
 TEST COMPLETE
-Notification: AXLoadComplete
-Notification: AXRowCountChanged
-Notification: AXRowCollapsed
-Notification: AXRowCountChanged
-Notification: AXRowExpanded
 
index f2a2fdf..a40db04 100644 (file)
     var notifyName = 0;
     // The order of notifications should be Row Count, Row Collapsed, Row Count, Row Expanded
     function notifyCallback(element, notification) {  
+        if (notification == "AXLoadComplete" || notification == "AXLayoutComplete")
+            return;
         notifyName = notification;
-        document.getElementById("notifications").innerHTML += "Notification: " + notifyName + "<br>";
-        if (notifyCount == 4) {
+        if (notifyCount == 0)
+            shouldBeEqualToString("notifyName", "AXRowCountChanged");
+        else if (notifyCount == 1)
+            shouldBeEqualToString("notifyName", "AXRowCollapsed");
+        else if (notifyCount == 2)
+            shouldBeEqualToString("notifyName", "AXRowCountChanged");
+        else if (notifyCount == 3) {
+            shouldBeEqualToString("notifyName", "AXRowExpanded");
             accessibilityController.removeNotificationListener();
-            window.testRunner.notifyDone();
+            var scriptElement = document.createElement("script");
+            scriptElement.src = "../../resources/js-test-post-async.js";
+            document.body.appendChild(scriptElement);
         }
         notifyCount++;
     }
@@ -59,6 +69,5 @@
 
 </script>
 
-<script src="../../resources/js-test-post.js"></script>
 </body>
 </html>
index 2ad5d51..4cfe271 100644 (file)
@@ -1331,7 +1331,5 @@ webkit.org/b/149440 fast/shadow-dom/css-scoping-shadow-host-functional-rule.html
 webkit.org/b/149441 fast/shadow-dom/css-scoping-shadow-slotted-rule.html [ ImageOnlyFailure ]
 webkit.org/b/149441 fast/shadow-dom/css-scoping-shadow-slot-display-override.html [ ImageOnlyFailure ]
 
-webkit.org/b/149510 accessibility/mac/aria-expanded-notifications.html [ Pass Failure ]
-
 # Times out in debug.
 [ Debug ] js/regress/getter-richards-try-catch.html [ Skip ]