| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |