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

Side by Side Diff: content/browser/accessibility/site_per_process_accessibility_browsertest.cc

Issue 880523002: Revert of Send Windows accessibility events based on tree updates. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@implicit_1_tests
Patch Set: Created 5 years, 11 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/strings/stringprintf.h" 6 #include "base/strings/stringprintf.h"
7 #include "base/strings/utf_string_conversions.h"
8 #include "content/browser/accessibility/browser_accessibility.h" 7 #include "content/browser/accessibility/browser_accessibility.h"
9 #include "content/browser/accessibility/browser_accessibility_manager.h" 8 #include "content/browser/accessibility/browser_accessibility_manager.h"
10 #include "content/browser/accessibility/browser_accessibility_state_impl.h" 9 #include "content/browser/accessibility/browser_accessibility_state_impl.h"
11 #include "content/browser/frame_host/cross_process_frame_connector.h" 10 #include "content/browser/frame_host/cross_process_frame_connector.h"
12 #include "content/browser/frame_host/frame_tree.h" 11 #include "content/browser/frame_host/frame_tree.h"
13 #include "content/browser/frame_host/render_frame_proxy_host.h" 12 #include "content/browser/frame_host/render_frame_proxy_host.h"
14 #include "content/browser/frame_host/render_widget_host_view_child_frame.h" 13 #include "content/browser/frame_host/render_widget_host_view_child_frame.h"
15 #include "content/browser/renderer_host/render_view_host_impl.h" 14 #include "content/browser/renderer_host/render_view_host_impl.h"
16 #include "content/browser/site_per_process_browsertest.h" 15 #include "content/browser/site_per_process_browsertest.h"
17 #include "content/browser/web_contents/web_contents_impl.h" 16 #include "content/browser/web_contents/web_contents_impl.h"
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 ASSERT_EQ(1U, ax_iframe->PlatformChildCount()); 139 ASSERT_EQ(1U, ax_iframe->PlatformChildCount());
141 140
142 BrowserAccessibility* ax_scroll_area = ax_iframe->PlatformGetChild(0); 141 BrowserAccessibility* ax_scroll_area = ax_iframe->PlatformGetChild(0);
143 EXPECT_EQ(ui::AX_ROLE_SCROLL_AREA, ax_scroll_area->GetRole()); 142 EXPECT_EQ(ui::AX_ROLE_SCROLL_AREA, ax_scroll_area->GetRole());
144 ASSERT_EQ(1U, ax_scroll_area->PlatformChildCount()); 143 ASSERT_EQ(1U, ax_scroll_area->PlatformChildCount());
145 144
146 BrowserAccessibility* ax_child_frame_root = 145 BrowserAccessibility* ax_child_frame_root =
147 ax_scroll_area->PlatformGetChild(0); 146 ax_scroll_area->PlatformGetChild(0);
148 EXPECT_EQ(ui::AX_ROLE_ROOT_WEB_AREA, ax_child_frame_root->GetRole()); 147 EXPECT_EQ(ui::AX_ROLE_ROOT_WEB_AREA, ax_child_frame_root->GetRole());
149 ASSERT_EQ(1U, ax_child_frame_root->PlatformChildCount()); 148 ASSERT_EQ(1U, ax_child_frame_root->PlatformChildCount());
150 EXPECT_EQ("Title Of Awesomeness", 149 EXPECT_EQ("Title Of Awesomeness", ax_child_frame_root->name());
151 ax_child_frame_root->GetStringAttribute(ui::AX_ATTR_NAME));
152 150
153 BrowserAccessibility* ax_child_frame_group = 151 BrowserAccessibility* ax_child_frame_group =
154 ax_child_frame_root->PlatformGetChild(0); 152 ax_child_frame_root->PlatformGetChild(0);
155 EXPECT_EQ(ui::AX_ROLE_GROUP, ax_child_frame_group->GetRole()); 153 EXPECT_EQ(ui::AX_ROLE_GROUP, ax_child_frame_group->GetRole());
156 ASSERT_EQ(1U, ax_child_frame_group->PlatformChildCount()); 154 ASSERT_EQ(1U, ax_child_frame_group->PlatformChildCount());
157 155
158 BrowserAccessibility* ax_child_frame_static_text = 156 BrowserAccessibility* ax_child_frame_static_text =
159 ax_child_frame_group->PlatformGetChild(0); 157 ax_child_frame_group->PlatformGetChild(0);
160 EXPECT_EQ(ui::AX_ROLE_STATIC_TEXT, ax_child_frame_static_text->GetRole()); 158 EXPECT_EQ(ui::AX_ROLE_STATIC_TEXT, ax_child_frame_static_text->GetRole());
161 ASSERT_EQ(0U, ax_child_frame_static_text->PlatformChildCount()); 159 ASSERT_EQ(0U, ax_child_frame_static_text->PlatformChildCount());
162 160
163 // Last, check that the parent of the child frame root is correct. 161 // Last, check that the parent of the child frame root is correct.
164 EXPECT_EQ(ax_child_frame_root->GetParent(), ax_scroll_area); 162 EXPECT_EQ(ax_child_frame_root->GetParent(), ax_scroll_area);
165 } 163 }
166 164
167 } // namespace content 165 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698