aria-liveregion-notifications.html fails on leopard release bot
authorcfleizach@apple.com <cfleizach@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 22 Apr 2010 00:25:32 +0000 (00:25 +0000)
committercfleizach@apple.com <cfleizach@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 22 Apr 2010 00:25:32 +0000 (00:25 +0000)
commit1505c838b1bcd0d320bacdc322ec9d9c168ba593
treef1c2ae64f22140aaa438d23b9513bef38d109219
parentf86c0f8356d8199efc78fbb1eb9d54ebc8dc9617
aria-liveregion-notifications.html fails on leopard release bot
https://bugs.webkit.org/show_bug.cgi?id=37112

Reviewed by Alexey Proskuryakov.

WebCore:

Change the method that DRT uses to monitor AX notifications so that its robust
by just sending out NSNotification that can be listened to by anyone, instead
of keeping a static function pointer around.

This change is aimed to avoid flakiness seen in DRT when the notification handlers
are not being called at the appropriate time.

Tests: platform/mac/accessibility/aria-liveregions-addedelement.html
       platform/mac/accessibility/aria-liveregions-changedalt.html
       platform/mac/accessibility/aria-liveregions-changedtext.html
       platform/mac/accessibility/aria-liveregions-removedelement.html

* accessibility/mac/AccessibilityObjectWrapper.h:
* accessibility/mac/AccessibilityObjectWrapper.mm:
(-[AccessibilityObjectWrapper accessibilitySetShouldRepostNotifications:]):
(-[AccessibilityObjectWrapper accessibilityPostedNotification:]):

WebKitTools:

Change the way that notifications are listened for by forcing clients
to call a remove listener as well to match the add listener. DRT will
assert if those are not done in the correct order.

* DumpRenderTree/AccessibilityUIElement.cpp:
(removeNotificationListenerCallback):
(AccessibilityUIElement::getJSClass):
* DumpRenderTree/AccessibilityUIElement.h:
* DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp:
(AccessibilityUIElement::removeNotificationListener):
* DumpRenderTree/mac/AccessibilityUIElementMac.mm:
(-[AccessibilityNotificationHandler initWithPlatformElement:]):
(-[AccessibilityNotificationHandler dealloc]):
(-[AccessibilityNotificationHandler _notificationReceived:]):
(-[AccessibilityNotificationHandler setCallback:]):
(AccessibilityUIElement::AccessibilityUIElement):
(AccessibilityUIElement::~AccessibilityUIElement):
(AccessibilityUIElement::addNotificationListener):
(AccessibilityUIElement::removeNotificationListener):
* DumpRenderTree/win/AccessibilityUIElementWin.cpp:
(AccessibilityUIElement::removeNotificationListener):

LayoutTests:

Add four more tests that test specific live region functionality. Having these
four tests run in order seems to stress the notification mechanism and will expose issues
more frequently.
Modify tests that use notification listeners to also "removeNotificationListener".

* platform/mac-leopard/Skipped:
* platform/mac/accessibility/aria-listbox-selectedchildren-change.html:
* platform/mac/accessibility/aria-liveregion-on-image.html:
* platform/mac/accessibility/aria-liveregions-addedelement-expected.txt: Added.
* platform/mac/accessibility/aria-liveregions-addedelement.html: Added.
* platform/mac/accessibility/aria-liveregions-changedalt-expected.txt: Added.
* platform/mac/accessibility/aria-liveregions-changedalt.html: Added.
* platform/mac/accessibility/aria-liveregions-changedtext-expected.txt: Added.
* platform/mac/accessibility/aria-liveregions-changedtext.html: Added.
* platform/mac/accessibility/aria-liveregions-notifications.html:
* platform/mac/accessibility/aria-liveregions-removedelement-expected.txt: Added.
* platform/mac/accessibility/aria-liveregions-removedelement.html: Added.
* platform/mac/accessibility/change-notification-on-scroll.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@58031 268f45cc-cd09-0410-ab3c-d52691b4dbfc
23 files changed:
LayoutTests/ChangeLog
LayoutTests/platform/mac-leopard/Skipped
LayoutTests/platform/mac/accessibility/aria-listbox-selectedchildren-change.html
LayoutTests/platform/mac/accessibility/aria-liveregion-on-image.html
LayoutTests/platform/mac/accessibility/aria-liveregions-addedelement-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/accessibility/aria-liveregions-addedelement.html [new file with mode: 0644]
LayoutTests/platform/mac/accessibility/aria-liveregions-changedalt-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/accessibility/aria-liveregions-changedalt.html [new file with mode: 0644]
LayoutTests/platform/mac/accessibility/aria-liveregions-changedtext-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/accessibility/aria-liveregions-changedtext.html [new file with mode: 0644]
LayoutTests/platform/mac/accessibility/aria-liveregions-notifications.html
LayoutTests/platform/mac/accessibility/aria-liveregions-removedelement-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/accessibility/aria-liveregions-removedelement.html [new file with mode: 0644]
LayoutTests/platform/mac/accessibility/change-notification-on-scroll.html
WebCore/ChangeLog
WebCore/accessibility/mac/AccessibilityObjectWrapper.h
WebCore/accessibility/mac/AccessibilityObjectWrapper.mm
WebKitTools/ChangeLog
WebKitTools/DumpRenderTree/AccessibilityUIElement.cpp
WebKitTools/DumpRenderTree/AccessibilityUIElement.h
WebKitTools/DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp
WebKitTools/DumpRenderTree/mac/AccessibilityUIElementMac.mm
WebKitTools/DumpRenderTree/win/AccessibilityUIElementWin.cpp