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

Unified Diff: content/browser/accessibility/site_per_process_accessibility_browsertest.cc

Issue 1221003003: Revert of Fix accessibility with out-of-process iframes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 months 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
Index: content/browser/accessibility/site_per_process_accessibility_browsertest.cc
diff --git a/content/browser/accessibility/site_per_process_accessibility_browsertest.cc b/content/browser/accessibility/site_per_process_accessibility_browsertest.cc
index 59e217ae2ee6d2f36042cbd7cada1d63889e33e9..1a3ace113889ff7e56c7f20942fec580ba17d618 100644
--- a/content/browser/accessibility/site_per_process_accessibility_browsertest.cc
+++ b/content/browser/accessibility/site_per_process_accessibility_browsertest.cc
@@ -47,16 +47,16 @@
root->GetStringAttribute(ui::AX_ATTR_DOC_URL) != url::kAboutBlankURL);
}
+// Disabled, see https://crbug.com/490831.
// Times out on Android, not clear if it's an actual bug or just slow.
-#if defined(OS_ANDROID)
-#define MAYBE_CrossSiteIframeAccessibility DISABLED_CrossSiteIframeAccessibility
-#else
-#define MAYBE_CrossSiteIframeAccessibility CrossSiteIframeAccessibility
-#endif
IN_PROC_BROWSER_TEST_F(SitePerProcessAccessibilityBrowserTest,
- MAYBE_CrossSiteIframeAccessibility) {
+ DISABLED_CrossSiteIframeAccessibility) {
// Enable full accessibility for all current and future WebContents.
BrowserAccessibilityState::GetInstance()->EnableAccessibility();
+
+ AccessibilityNotificationWaiter main_frame_accessibility_waiter(
+ shell(), AccessibilityModeComplete,
+ ui::AX_EVENT_LOAD_COMPLETE);
host_resolver()->AddRule("*", "127.0.0.1");
ASSERT_TRUE(test_server()->Start());
@@ -74,9 +74,6 @@
NavigateFrameToURL(child, http_url);
// Load cross-site page into iframe.
- RenderFrameHostImpl* child_rfh =
- child->render_manager()->current_frame_host();
- RenderFrameDeletedObserver deleted_observer(child_rfh);
GURL::Replacements replace_host;
GURL cross_site_url(test_server()->GetURL("files/title2.html"));
replace_host.SetHostStr("foo.com");
@@ -88,8 +85,10 @@
SiteInstance* site_instance = child->current_frame_host()->GetSiteInstance();
EXPECT_NE(shell()->web_contents()->GetSiteInstance(), site_instance);
- // Wait until the iframe completes the swap.
- deleted_observer.WaitUntilDeleted();
+ // Wait for the accessibility tree from the main frame to load.
+ // Because we created the AccessibilityNotificationWaiter before accessibility
+ // was enabled, we're guaranteed to get a LOAD_COMPLETE event.
+ main_frame_accessibility_waiter.WaitForNotification();
RenderFrameHostImpl* main_frame = static_cast<RenderFrameHostImpl*>(
shell()->web_contents()->GetMainFrame());
@@ -131,7 +130,12 @@
EXPECT_EQ(ui::AX_ROLE_IFRAME, ax_iframe->GetRole());
ASSERT_EQ(1U, ax_iframe->PlatformChildCount());
- BrowserAccessibility* ax_child_frame_root = ax_iframe->PlatformGetChild(0);
+ BrowserAccessibility* ax_scroll_area = ax_iframe->PlatformGetChild(0);
+ EXPECT_EQ(ui::AX_ROLE_SCROLL_AREA, ax_scroll_area->GetRole());
+ ASSERT_EQ(1U, ax_scroll_area->PlatformChildCount());
+
+ BrowserAccessibility* ax_child_frame_root =
+ ax_scroll_area->PlatformGetChild(0);
EXPECT_EQ(ui::AX_ROLE_ROOT_WEB_AREA, ax_child_frame_root->GetRole());
ASSERT_EQ(1U, ax_child_frame_root->PlatformChildCount());
EXPECT_EQ("Title Of Awesomeness",
@@ -148,7 +152,7 @@
ASSERT_EQ(0U, ax_child_frame_static_text->PlatformChildCount());
// Last, check that the parent of the child frame root is correct.
- EXPECT_EQ(ax_child_frame_root->GetParent(), ax_iframe);
+ EXPECT_EQ(ax_child_frame_root->GetParent(), ax_scroll_area);
}
} // namespace content
« no previous file with comments | « content/browser/accessibility/browser_accessibility.cc ('k') | content/browser/frame_host/render_frame_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698