summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorctguil@chromium.org <ctguil@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-30 06:04:58 +0000
committerctguil@chromium.org <ctguil@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-30 06:04:58 +0000
commit95c0dc4adedaf68ca2e1ce0a3df70e98bc35260b (patch)
tree0f313ee445eb60aa3ed59216d12aab9df3e4ed7b /chrome
parent2ab108028b0eb245e5a151223f00e8589685b219 (diff)
downloadchromium_src-95c0dc4adedaf68ca2e1ce0a3df70e98bc35260b.zip
chromium_src-95c0dc4adedaf68ca2e1ce0a3df70e98bc35260b.tar.gz
chromium_src-95c0dc4adedaf68ca2e1ce0a3df70e98bc35260b.tar.bz2
Revert 61031 - Ensure browser cache of the renderer tree contains an accessibility object before sending an accessibility notification.
BUG=46209 TEST=interative_ui_tests:AccessibilityWinBrowserTest.TestNotificationChildrenChanged2 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=60832 Review URL: http://codereview.chromium.org/3506004 TBR=ctguil@chromium.org Review URL: http://codereview.chromium.org/3522006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61032 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/accessibility_win_browsertest.cc57
-rw-r--r--chrome/renderer/render_view.cc18
2 files changed, 29 insertions, 46 deletions
diff --git a/chrome/browser/accessibility_win_browsertest.cc b/chrome/browser/accessibility_win_browsertest.cc
index 8b7559e..68abd21 100644
--- a/chrome/browser/accessibility_win_browsertest.cc
+++ b/chrome/browser/accessibility_win_browsertest.cc
@@ -479,34 +479,6 @@ IN_PROC_BROWSER_TEST_F(AccessibilityWinBrowserTest,
}
IN_PROC_BROWSER_TEST_F(AccessibilityWinBrowserTest,
- TestNotificationChildrenChanged2) {
- // The role attribute causes the node to be in the accessibility tree.
- GURL tree_url(
- "data:text/html,<div role=group style='visibility: hidden'>text"
- "</div>");
- browser()->OpenURL(tree_url, GURL(), CURRENT_TAB, PageTransition::TYPED);
- GetRendererAccessible();
- ui_test_utils::WaitForNotification(
- NotificationType::RENDER_VIEW_HOST_ACCESSIBILITY_TREE_UPDATED);
-
- // Check the accessible tree of the browser.
- AccessibleChecker document_checker(L"", ROLE_SYSTEM_DOCUMENT, L"");
- document_checker.CheckAccessible(GetRendererAccessible());
-
- // Change the children of the document body.
- ExecuteScript(L"document.body.children[0].style.visibility='visible'");
- ui_test_utils::WaitForNotification(
- NotificationType::RENDER_VIEW_HOST_ACCESSIBILITY_TREE_UPDATED);
-
- // Check that the accessibility tree of the browser has been updated.
- AccessibleChecker static_text_checker(L"", ROLE_SYSTEM_TEXT, L"text");
- AccessibleChecker div_checker(L"", L"div", L"");
- document_checker.AppendExpectedChild(&div_checker);
- div_checker.AppendExpectedChild(&static_text_checker);
- document_checker.CheckAccessible(GetRendererAccessible());
-}
-
-IN_PROC_BROWSER_TEST_F(AccessibilityWinBrowserTest,
TestNotificationFocusChanged) {
// The role attribute causes the node to be in the accessibility tree.
GURL tree_url(
@@ -552,6 +524,35 @@ IN_PROC_BROWSER_TEST_F(AccessibilityWinBrowserTest,
// document_checker.CheckAccessible(GetRendererAccessible());
}
+// http://crbug.com/46209
+IN_PROC_BROWSER_TEST_F(AccessibilityWinBrowserTest,
+ DISABLED_TestNotificationChildrenChanged2) {
+ // The role attribute causes the node to be in the accessibility tree.
+ GURL tree_url(
+ "data:text/html,<div role=group style='visibility: hidden'>text"
+ "</div>");
+ browser()->OpenURL(tree_url, GURL(), CURRENT_TAB, PageTransition::TYPED);
+ GetRendererAccessible();
+ ui_test_utils::WaitForNotification(
+ NotificationType::RENDER_VIEW_HOST_ACCESSIBILITY_TREE_UPDATED);
+
+ // Check the accessible tree of the browser.
+ AccessibleChecker document_checker(L"", ROLE_SYSTEM_DOCUMENT, L"");
+ document_checker.CheckAccessible(GetRendererAccessible());
+
+ // Change the children of the document body.
+ ExecuteScript(L"document.body.children[0].style.visibility='visible'");
+ ui_test_utils::WaitForNotification(
+ NotificationType::RENDER_VIEW_HOST_ACCESSIBILITY_TREE_UPDATED);
+
+ // Check that the accessibility tree of the browser has been updated.
+ AccessibleChecker static_text_checker(L"", ROLE_SYSTEM_TEXT, L"text");
+ AccessibleChecker div_checker(L"", L"div", L"");
+ document_checker.AppendExpectedChild(&div_checker);
+ div_checker.AppendExpectedChild(&static_text_checker);
+ document_checker.CheckAccessible(GetRendererAccessible());
+}
+
IN_PROC_BROWSER_TEST_F(AccessibilityWinBrowserTest,
TestNotificationValueChanged) {
GURL tree_url("data:text/html,<body><input type='text' value='old value'/>"
diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc
index 095c39f..02e67ea 100644
--- a/chrome/renderer/render_view.cc
+++ b/chrome/renderer/render_view.cc
@@ -5483,24 +5483,6 @@ void RenderView::postAccessibilityNotification(
accessibility_->initialize(webview());
}
- if (!accessibility_->isCached(obj)) {
- // The browser doesn't know about objects that are not in the cache. Send a
- // children change for the first accestor that actually is in the cache.
- WebAccessibilityObject parent = obj;
- while (parent.isValid() && !accessibility_->isCached(parent))
- parent = parent.parentObject();
-
- DCHECK(parent.isValid() && accessibility_->isCached(parent));
- if (!parent.isValid())
- return;
- postAccessibilityNotification(
- parent, WebKit::WebAccessibilityNotificationChildrenChanged);
-
- // The parent's children change takes care of the child's children change.
- if (notification == WebKit::WebAccessibilityNotificationChildrenChanged)
- return;
- }
-
// Add the accessibility object to our cache and ensure it's valid.
if (accessibility_->addOrGetId(obj) < 0)
return;