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

Unified Diff: content/renderer/accessibility/renderer_accessibility_browsertest.cc

Issue 1785153005: Remove SiteIsolationPolicy::IsSwappedOutStateForbidden(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase on ToT. Created 4 years, 9 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
« no previous file with comments | « content/common/site_isolation_policy.cc ('k') | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/accessibility/renderer_accessibility_browsertest.cc
diff --git a/content/renderer/accessibility/renderer_accessibility_browsertest.cc b/content/renderer/accessibility/renderer_accessibility_browsertest.cc
index f08559397d16a7d65269022b93e547428bff9d96..ed8b4ebae7bde7c2dd62fad0cd98700e00f8146d 100644
--- a/content/renderer/accessibility/renderer_accessibility_browsertest.cc
+++ b/content/renderer/accessibility/renderer_accessibility_browsertest.cc
@@ -166,72 +166,6 @@ TEST_F(RendererAccessibilityTest, SendFullAccessibilityTreeOnReload) {
EXPECT_EQ(4, CountAccessibilityNodesSentToBrowser());
}
-// http://crbug.com/253537
-#if defined(OS_ANDROID)
-#define MAYBE_AccessibilityMessagesQueueWhileSwappedOut \
- DISABLED_AccessibilityMessagesQueueWhileSwappedOut
-#else
-#define MAYBE_AccessibilityMessagesQueueWhileSwappedOut \
- AccessibilityMessagesQueueWhileSwappedOut
-#endif
-
-TEST_F(RendererAccessibilityTest,
- MAYBE_AccessibilityMessagesQueueWhileSwappedOut) {
- // This test breaks down in --site-per-process, as swapping out destroys
- // the main frame and it cannot be further navigated.
- // TODO(nasko): Figure out what this behavior looks like when swapped out
- // no longer exists.
- if (SiteIsolationPolicy::IsSwappedOutStateForbidden()) {
- return;
- }
- std::string html =
- "<body>"
- " <p>Hello, world.</p>"
- "</body>";
- LoadHTML(html.c_str());
- static const int kProxyRoutingId = 13;
-
- // Creating a RendererAccessibility should send the tree to the browser.
- scoped_ptr<TestRendererAccessibility> accessibility(
- new TestRendererAccessibility(frame()));
- accessibility->SendPendingAccessibilityEvents();
- EXPECT_EQ(5, CountAccessibilityNodesSentToBrowser());
-
- // Post a "value changed" event, but then swap out
- // before sending it. It shouldn't send the event while
- // swapped out.
- sink_->ClearMessages();
- WebDocument document = view()->GetWebView()->mainFrame()->document();
- WebAXObject root_obj = document.accessibilityObject();
- accessibility->HandleAXEvent(
- root_obj,
- ui::AX_EVENT_VALUE_CHANGED);
- view()->GetMainRenderFrame()->OnSwapOut(kProxyRoutingId, true,
- content::FrameReplicationState());
- accessibility->SendPendingAccessibilityEvents();
- EXPECT_FALSE(sink_->GetUniqueMessageMatching(
- AccessibilityHostMsg_Events::ID));
-
- // Navigate, so we're not swapped out anymore. Now we should
- // send accessibility events again. Note that the
- // message that was queued up before will be quickly discarded
- // because the element it was referring to no longer exists,
- // so the event here is from loading this new page.
- CommonNavigationParams common_params;
- RequestNavigationParams request_params;
- common_params.url = GURL("data:text/html,<p>Hello, again.</p>");
- common_params.navigation_type = FrameMsg_Navigate_Type::NORMAL;
- common_params.transition = ui::PAGE_TRANSITION_TYPED;
- request_params.current_history_list_length = 1;
- request_params.current_history_list_offset = 0;
- request_params.pending_history_list_offset = 1;
- request_params.page_id = -1;
- frame()->OnNavigate(common_params, StartNavigationParams(), request_params);
- accessibility->SendPendingAccessibilityEvents();
- EXPECT_TRUE(sink_->GetUniqueMessageMatching(
- AccessibilityHostMsg_Events::ID));
-}
-
TEST_F(RendererAccessibilityTest, HideAccessibilityObject) {
// Test RendererAccessibility and make sure it sends the
// proper event to the browser when an object in the tree
« no previous file with comments | « content/common/site_isolation_policy.cc ('k') | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698