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

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

Issue 2439203003: Reland of Accessibility: Ignore all anonymous blocks (Closed)
Patch Set: Rebased. Created 4 years, 2 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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 #include "content/browser/frame_host/render_frame_host_impl.h" 9 #include "content/browser/frame_host/render_frame_host_impl.h"
10 #include "content/browser/web_contents/web_contents_impl.h" 10 #include "content/browser/web_contents/web_contents_impl.h"
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 EXPECT_EQ(ui::AX_ROLE_ROOT_WEB_AREA, root->data().role); 121 EXPECT_EQ(ui::AX_ROLE_ROOT_WEB_AREA, root->data().role);
122 ASSERT_EQ(2, root->child_count()); 122 ASSERT_EQ(2, root->child_count());
123 123
124 const ui::AXNode* live_region = root->ChildAtIndex(0); 124 const ui::AXNode* live_region = root->ChildAtIndex(0);
125 ASSERT_EQ(1, live_region->child_count()); 125 ASSERT_EQ(1, live_region->child_count());
126 EXPECT_EQ(ui::AX_ROLE_DIV, live_region->data().role); 126 EXPECT_EQ(ui::AX_ROLE_DIV, live_region->data().role);
127 127
128 const ui::AXNode* para = live_region->ChildAtIndex(0); 128 const ui::AXNode* para = live_region->ChildAtIndex(0);
129 EXPECT_EQ(ui::AX_ROLE_PARAGRAPH, para->data().role); 129 EXPECT_EQ(ui::AX_ROLE_PARAGRAPH, para->data().role);
130 130
131 const ui::AXNode* button_container = root->ChildAtIndex(1); 131 const ui::AXNode* button = root->ChildAtIndex(1);
132 EXPECT_EQ(ui::AX_ROLE_GROUP, button_container->data().role);
133 ASSERT_EQ(1, button_container->child_count());
134
135 const ui::AXNode* button = button_container->ChildAtIndex(0);
136 EXPECT_EQ(ui::AX_ROLE_BUTTON, button->data().role); 132 EXPECT_EQ(ui::AX_ROLE_BUTTON, button->data().role);
137 } 133 }
138 134
139 #if defined(OS_ANDROID) 135 #if defined(OS_ANDROID)
140 // http://crbug.com/542704 136 // http://crbug.com/542704
141 #define MAYBE_MultipleBadAccessibilityIPCsKillsRenderer DISABLED_MultipleBadAcce ssibilityIPCsKillsRenderer 137 #define MAYBE_MultipleBadAccessibilityIPCsKillsRenderer DISABLED_MultipleBadAcce ssibilityIPCsKillsRenderer
142 #else 138 #else
143 #define MAYBE_MultipleBadAccessibilityIPCsKillsRenderer MultipleBadAccessibility IPCsKillsRenderer 139 #define MAYBE_MultipleBadAccessibilityIPCsKillsRenderer MultipleBadAccessibility IPCsKillsRenderer
144 #endif 140 #endif
145 IN_PROC_BROWSER_TEST_F(AccessibilityIpcErrorBrowserTest, 141 IN_PROC_BROWSER_TEST_F(AccessibilityIpcErrorBrowserTest,
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 // Wait for the renderer to be killed. 193 // Wait for the renderer to be killed.
198 if (frame->IsRenderFrameLive()) { 194 if (frame->IsRenderFrameLive()) {
199 RenderProcessHostWatcher render_process_watcher( 195 RenderProcessHostWatcher render_process_watcher(
200 frame->GetProcess(), RenderProcessHostWatcher::WATCH_FOR_PROCESS_EXIT); 196 frame->GetProcess(), RenderProcessHostWatcher::WATCH_FOR_PROCESS_EXIT);
201 render_process_watcher.Wait(); 197 render_process_watcher.Wait();
202 } 198 }
203 ASSERT_FALSE(frame->IsRenderFrameLive()); 199 ASSERT_FALSE(frame->IsRenderFrameLive());
204 } 200 }
205 201
206 } // namespace content 202 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698