Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(911)

Unified Diff: content/browser/renderer_host/render_view_host.cc

Issue 8895018: Fixes and reenables RendererAccessibilityBrowserTest.* (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/accessibility/renderer_accessibility_browsertest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_view_host.cc
diff --git a/content/browser/renderer_host/render_view_host.cc b/content/browser/renderer_host/render_view_host.cc
index ab0ce6d23f64f9ee510787c6bb60f74f9ec52da2..f47d1c8728a16a10ff6a69ff8f3b41554f552b08 100644
--- a/content/browser/renderer_host/render_view_host.cc
+++ b/content/browser/renderer_host/render_view_host.cc
@@ -1397,13 +1397,17 @@ void RenderViewHost::OnAccessibilityNotifications(
for (unsigned i = 0; i < params.size(); i++) {
const ViewHostMsg_AccessibilityNotification_Params& param = params[i];
- if (param.notification_type == ViewHostMsg_AccEvent::LOAD_COMPLETE &&
+ if ((param.notification_type == ViewHostMsg_AccEvent::LAYOUT_COMPLETE ||
+ param.notification_type == ViewHostMsg_AccEvent::LOAD_COMPLETE) &&
save_accessibility_tree_for_testing_) {
dmazzoni 2011/12/10 06:27:36 I just realized that there's no reason to go throu
David Tseng 2011/12/12 01:23:57 I'd like to keep this as is to avoid any possible
accessibility_tree_ = param.acc_tree;
- content::NotificationService::current()->Notify(
- content::NOTIFICATION_RENDER_VIEW_HOST_ACCESSIBILITY_TREE_UPDATED,
- content::Source<RenderViewHost>(this),
- content::NotificationService::NoDetails());
+
+ // Only notify for non-blank pages.
+ if (accessibility_tree_.children.size() > 0)
+ content::NotificationService::current()->Notify(
+ content::NOTIFICATION_RENDER_VIEW_HOST_ACCESSIBILITY_TREE_UPDATED,
+ content::Source<RenderViewHost>(this),
+ content::NotificationService::NoDetails());
}
}
}
« no previous file with comments | « content/browser/accessibility/renderer_accessibility_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698