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

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

Issue 864963003: Enable SitePerProcessAccessibilityBrowserTest on more platforms. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@more_robust_site_isolation_a11y
Patch Set: Rebase Created 5 years, 10 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 | content/browser/frame_host/frame_accessibility.cc » ('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 (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 "content/browser/accessibility/browser_accessibility.h" 8 #include "content/browser/accessibility/browser_accessibility.h"
9 #include "content/browser/accessibility/browser_accessibility_manager.h" 9 #include "content/browser/accessibility/browser_accessibility_manager.h"
10 #include "content/browser/accessibility/browser_accessibility_state_impl.h" 10 #include "content/browser/accessibility/browser_accessibility_state_impl.h"
(...skipping 29 matching lines...) Expand all
40 }; 40 };
41 41
42 // Utility function to determine if an accessibility tree has finished loading 42 // Utility function to determine if an accessibility tree has finished loading
43 // or if the tree represents a page that hasn't finished loading yet. 43 // or if the tree represents a page that hasn't finished loading yet.
44 bool AccessibilityTreeIsLoaded(BrowserAccessibilityManager* manager) { 44 bool AccessibilityTreeIsLoaded(BrowserAccessibilityManager* manager) {
45 BrowserAccessibility* root = manager->GetRoot(); 45 BrowserAccessibility* root = manager->GetRoot();
46 return (root->GetFloatAttribute(ui::AX_ATTR_DOC_LOADING_PROGRESS) == 1.0 && 46 return (root->GetFloatAttribute(ui::AX_ATTR_DOC_LOADING_PROGRESS) == 1.0 &&
47 root->GetStringAttribute(ui::AX_ATTR_DOC_URL) != url::kAboutBlankURL); 47 root->GetStringAttribute(ui::AX_ATTR_DOC_URL) != url::kAboutBlankURL);
48 } 48 }
49 49
50 // TODO(nasko): try enabling this test on more platforms once 50 // Times out on Android, not clear if it's an actual bug or just slow.
51 // SitePerProcessBrowserTest.CrossSiteIframe is enabled everywhere. 51 #if defined(OS_ANDROID)
52 // http://crbug.com/399775 52 #define MAYBE_CrossSiteIframeAccessibility DISABLED_CrossSiteIframeAccessibility
53 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) 53 #else
54 #define MAYBE_CrossSiteIframeAccessibility CrossSiteIframeAccessibility 54 #define MAYBE_CrossSiteIframeAccessibility CrossSiteIframeAccessibility
55 #else
56 #define MAYBE_CrossSiteIframeAccessibility DISABLED_CrossSiteIframeAccessibility
57 #endif 55 #endif
58 IN_PROC_BROWSER_TEST_F(SitePerProcessAccessibilityBrowserTest, 56 IN_PROC_BROWSER_TEST_F(SitePerProcessAccessibilityBrowserTest,
59 MAYBE_CrossSiteIframeAccessibility) { 57 MAYBE_CrossSiteIframeAccessibility) {
60 // Enable full accessibility for all current and future WebContents. 58 // Enable full accessibility for all current and future WebContents.
61 BrowserAccessibilityState::GetInstance()->EnableAccessibility(); 59 BrowserAccessibilityState::GetInstance()->EnableAccessibility();
62 60
63 AccessibilityNotificationWaiter main_frame_accessibility_waiter( 61 AccessibilityNotificationWaiter main_frame_accessibility_waiter(
64 shell(), AccessibilityModeComplete, 62 shell(), AccessibilityModeComplete,
65 ui::AX_EVENT_LOAD_COMPLETE); 63 ui::AX_EVENT_LOAD_COMPLETE);
66 64
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
« no previous file with comments | « no previous file | content/browser/frame_host/frame_accessibility.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698