summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
authordtseng@chromium.org <dtseng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-14 21:56:14 +0000
committerdtseng@chromium.org <dtseng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-14 21:56:14 +0000
commitc398d0ffbbb088cb3e30c0bcef257aad911a4a79 (patch)
tree9d25930e015ecb6032f1e13cfb60c43bc935f171 /content
parent1e8c3282e8c54f219876267677f4aa767a9451b7 (diff)
downloadchromium_src-c398d0ffbbb088cb3e30c0bcef257aad911a4a79.zip
chromium_src-c398d0ffbbb088cb3e30c0bcef257aad911a4a79.tar.gz
chromium_src-c398d0ffbbb088cb3e30c0bcef257aad911a4a79.tar.bz2
Fix AccessibilityWinBrowserTests.
Revert "Disables a couple more a11y tests that keey timing out." commit 62165f0e7178d76ceb97b072dd92a258e4b7ecc7. f2c91be6ded81a8f80700ecc08b5610e3fc89e7c. TEST=try bots. BUG=102725, 106957 Review URL: http://codereview.chromium.org/9373044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@121947 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r--content/browser/renderer_host/render_view_host.cc8
-rw-r--r--content/browser/renderer_host/render_view_host.h8
2 files changed, 16 insertions, 0 deletions
diff --git a/content/browser/renderer_host/render_view_host.cc b/content/browser/renderer_host/render_view_host.cc
index fe0f9f2..838c5dc 100644
--- a/content/browser/renderer_host/render_view_host.cc
+++ b/content/browser/renderer_host/render_view_host.cc
@@ -132,6 +132,7 @@ RenderViewHost::RenderViewHost(SiteInstance* instance,
sudden_termination_allowed_(false),
session_storage_namespace_(session_storage),
save_accessibility_tree_for_testing_(false),
+ send_accessibility_updated_notifications_(false),
render_view_termination_status_(base::TERMINATION_STATUS_STILL_RUNNING) {
if (!session_storage_namespace_) {
session_storage_namespace_ = new SessionStorageNamespace(
@@ -1463,6 +1464,13 @@ void RenderViewHost::OnAccessibilityNotifications(
}
}
+ if (send_accessibility_updated_notifications_) {
+ content::NotificationService::current()->Notify(
+ content::NOTIFICATION_RENDER_VIEW_HOST_ACCESSIBILITY_TREE_UPDATED,
+ content::Source<RenderViewHost>(this),
+ content::NotificationService::NoDetails());
+ }
+
Send(new AccessibilityMsg_Notifications_ACK(routing_id()));
}
diff --git a/content/browser/renderer_host/render_view_host.h b/content/browser/renderer_host/render_view_host.h
index 7bcbd85..ff7e572 100644
--- a/content/browser/renderer_host/render_view_host.h
+++ b/content/browser/renderer_host/render_view_host.h
@@ -397,6 +397,10 @@ class CONTENT_EXPORT RenderViewHost : public RenderWidgetHost {
save_accessibility_tree_for_testing_ = save;
}
+ void set_send_accessibility_updated_notifications(bool send) {
+ send_accessibility_updated_notifications_ = send;
+ }
+
const webkit_glue::WebAccessibility& accessibility_tree_for_testing() {
return accessibility_tree_;
}
@@ -685,6 +689,10 @@ class CONTENT_EXPORT RenderViewHost : public RenderWidgetHost {
// Whether the accessibility tree should be saved, for unit testing.
bool save_accessibility_tree_for_testing_;
+ // Whether accessibility notifications are sent for all WebKit notifications
+ // for unit testing.
+ bool send_accessibility_updated_notifications_;
+
// The most recently received accessibility tree - for unit testing only.
webkit_glue::WebAccessibility accessibility_tree_;