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

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

Issue 2036493002: Handle touch accessibility in PageWidgetDelegate instead of WebViewImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@touch_exploration_test
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/web/PageWidgetDelegate.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/macros.h" 5 #include "base/macros.h"
6 #include "base/strings/string_number_conversions.h" 6 #include "base/strings/string_number_conversions.h"
7 #include "content/browser/accessibility/accessibility_test_utils.h" 7 #include "content/browser/accessibility/accessibility_test_utils.h"
8 #include "content/browser/accessibility/browser_accessibility.h" 8 #include "content/browser/accessibility/browser_accessibility.h"
9 #include "content/browser/web_contents/web_contents_impl.h" 9 #include "content/browser/web_contents/web_contents_impl.h"
10 #include "content/public/test/browser_test_utils.h" 10 #include "content/public/test/browser_test_utils.h"
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 SendTouchExplorationEvent(50, 350); 142 SendTouchExplorationEvent(50, 350);
143 waiter.WaitForNotification(); 143 waiter.WaitForNotification();
144 int target_id = waiter.event_target_id(); 144 int target_id = waiter.event_target_id();
145 BrowserAccessibility* hit = child_manager->GetFromID(target_id); 145 BrowserAccessibility* hit = child_manager->GetFromID(target_id);
146 EXPECT_EQ(ui::AX_ROLE_BUTTON, hit->GetData().role); 146 EXPECT_EQ(ui::AX_ROLE_BUTTON, hit->GetData().role);
147 std::string text = hit->GetData().GetStringAttribute(ui::AX_ATTR_NAME); 147 std::string text = hit->GetData().GetStringAttribute(ui::AX_ATTR_NAME);
148 EXPECT_EQ("Ordinary Button", text); 148 EXPECT_EQ("Ordinary Button", text);
149 } 149 }
150 150
151 IN_PROC_BROWSER_TEST_F(TouchAccessibilityBrowserTest, 151 IN_PROC_BROWSER_TEST_F(TouchAccessibilityBrowserTest,
152 DISABLED_TouchExplorationInCrossSiteIframe) { 152 TouchExplorationInCrossSiteIframe) {
153 NavigateToUrlAndWaitForAccessibilityTree( 153 NavigateToUrlAndWaitForAccessibilityTree(
154 embedded_test_server()->GetURL( 154 embedded_test_server()->GetURL(
155 "/accessibility/html/iframe-coordinates-cross-process.html")); 155 "/accessibility/html/iframe-coordinates-cross-process.html"));
156 156
157 WaitForAccessibilityTreeToContainNodeWithName( 157 WaitForAccessibilityTreeToContainNodeWithName(
158 shell()->web_contents(), "Ordinary Button"); 158 shell()->web_contents(), "Ordinary Button");
159 159
160 // Get the BrowserAccessibilityManager for the first child frame. 160 // Get the BrowserAccessibilityManager for the first child frame.
161 RenderFrameHostImpl* main_frame = static_cast<RenderFrameHostImpl*>( 161 RenderFrameHostImpl* main_frame = static_cast<RenderFrameHostImpl*>(
162 shell()->web_contents()->GetMainFrame()); 162 shell()->web_contents()->GetMainFrame());
(...skipping 11 matching lines...) Expand all
174 SendTouchExplorationEvent(50, 350); 174 SendTouchExplorationEvent(50, 350);
175 waiter.WaitForNotification(); 175 waiter.WaitForNotification();
176 int target_id = waiter.event_target_id(); 176 int target_id = waiter.event_target_id();
177 BrowserAccessibility* hit = child_manager->GetFromID(target_id); 177 BrowserAccessibility* hit = child_manager->GetFromID(target_id);
178 EXPECT_EQ(ui::AX_ROLE_BUTTON, hit->GetData().role); 178 EXPECT_EQ(ui::AX_ROLE_BUTTON, hit->GetData().role);
179 std::string text = hit->GetData().GetStringAttribute(ui::AX_ATTR_NAME); 179 std::string text = hit->GetData().GetStringAttribute(ui::AX_ATTR_NAME);
180 EXPECT_EQ("Ordinary Button", text); 180 EXPECT_EQ("Ordinary Button", text);
181 } 181 }
182 182
183 } // namespace content 183 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/web/PageWidgetDelegate.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698