| OLD | NEW |
| 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" | 7 #include "base/strings/utf_string_conversions.h" |
| 8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
| 9 #include "content/browser/accessibility/browser_accessibility.h" | 9 #include "content/browser/accessibility/browser_accessibility.h" |
| 10 #include "content/browser/accessibility/browser_accessibility_manager.h" | 10 #include "content/browser/accessibility/browser_accessibility_manager.h" |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 ax_child_frame_root->PlatformGetChild(0); | 125 ax_child_frame_root->PlatformGetChild(0); |
| 126 EXPECT_EQ(ui::AX_ROLE_GROUP, ax_child_frame_group->GetRole()); | 126 EXPECT_EQ(ui::AX_ROLE_GROUP, ax_child_frame_group->GetRole()); |
| 127 ASSERT_EQ(1U, ax_child_frame_group->PlatformChildCount()); | 127 ASSERT_EQ(1U, ax_child_frame_group->PlatformChildCount()); |
| 128 | 128 |
| 129 BrowserAccessibility* ax_child_frame_static_text = | 129 BrowserAccessibility* ax_child_frame_static_text = |
| 130 ax_child_frame_group->PlatformGetChild(0); | 130 ax_child_frame_group->PlatformGetChild(0); |
| 131 EXPECT_EQ(ui::AX_ROLE_STATIC_TEXT, ax_child_frame_static_text->GetRole()); | 131 EXPECT_EQ(ui::AX_ROLE_STATIC_TEXT, ax_child_frame_static_text->GetRole()); |
| 132 ASSERT_EQ(0U, ax_child_frame_static_text->PlatformChildCount()); | 132 ASSERT_EQ(0U, ax_child_frame_static_text->PlatformChildCount()); |
| 133 | 133 |
| 134 // Last, check that the parent of the child frame root is correct. | 134 // Last, check that the parent of the child frame root is correct. |
| 135 EXPECT_EQ(ax_child_frame_root->GetParent(), ax_iframe); | 135 EXPECT_EQ(ax_child_frame_root->PlatformGetParent(), ax_iframe); |
| 136 } | 136 } |
| 137 | 137 |
| 138 IN_PROC_BROWSER_TEST_F(MAYBE_SitePerProcessAccessibilityBrowserTest, | 138 IN_PROC_BROWSER_TEST_F(MAYBE_SitePerProcessAccessibilityBrowserTest, |
| 139 TwoCrossSiteNavigations) { | 139 TwoCrossSiteNavigations) { |
| 140 // Enable full accessibility for all current and future WebContents. | 140 // Enable full accessibility for all current and future WebContents. |
| 141 BrowserAccessibilityState::GetInstance()->EnableAccessibility(); | 141 BrowserAccessibilityState::GetInstance()->EnableAccessibility(); |
| 142 | 142 |
| 143 GURL main_url(embedded_test_server()->GetURL("/site_per_process_main.html")); | 143 GURL main_url(embedded_test_server()->GetURL("/site_per_process_main.html")); |
| 144 NavigateToURL(shell(), main_url); | 144 NavigateToURL(shell(), main_url); |
| 145 | 145 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 159 // Load second cross-site page into iframe and wait for text from that | 159 // Load second cross-site page into iframe and wait for text from that |
| 160 // page to appear in the accessibility tree. If this succeeds and doesn't | 160 // page to appear in the accessibility tree. If this succeeds and doesn't |
| 161 // time out, the test passes. | 161 // time out, the test passes. |
| 162 LoadCrossSitePageIntoFrame(child, "/title2.html", "bar.com"); | 162 LoadCrossSitePageIntoFrame(child, "/title2.html", "bar.com"); |
| 163 WaitForAccessibilityTreeToContainNodeWithName( | 163 WaitForAccessibilityTreeToContainNodeWithName( |
| 164 shell()->web_contents(), | 164 shell()->web_contents(), |
| 165 "Title Of Awesomeness"); | 165 "Title Of Awesomeness"); |
| 166 } | 166 } |
| 167 | 167 |
| 168 } // namespace content | 168 } // namespace content |
| OLD | NEW |