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 "content/browser/accessibility/browser_accessibility.h" | 7 #include "content/browser/accessibility/browser_accessibility.h" |
8 #include "content/browser/accessibility/browser_accessibility_manager.h" | 8 #include "content/browser/accessibility/browser_accessibility_manager.h" |
9 #include "content/browser/accessibility/browser_accessibility_state_impl.h" | 9 #include "content/browser/accessibility/browser_accessibility_state_impl.h" |
10 #include "content/browser/frame_host/cross_process_frame_connector.h" | 10 #include "content/browser/frame_host/cross_process_frame_connector.h" |
11 #include "content/browser/frame_host/frame_tree.h" | 11 #include "content/browser/frame_host/frame_tree.h" |
12 #include "content/browser/frame_host/render_frame_proxy_host.h" | 12 #include "content/browser/frame_host/render_frame_proxy_host.h" |
13 #include "content/browser/frame_host/render_widget_host_view_child_frame.h" | 13 #include "content/browser/frame_host/render_widget_host_view_child_frame.h" |
14 #include "content/browser/renderer_host/render_view_host_impl.h" | 14 #include "content/browser/renderer_host/render_view_host_impl.h" |
15 #include "content/browser/site_per_process_browsertest.h" | 15 #include "content/browser/site_per_process_browsertest.h" |
16 #include "content/browser/web_contents/web_contents_impl.h" | 16 #include "content/browser/web_contents/web_contents_impl.h" |
17 #include "content/public/browser/notification_observer.h" | 17 #include "content/public/browser/notification_observer.h" |
18 #include "content/public/browser/notification_service.h" | 18 #include "content/public/browser/notification_service.h" |
19 #include "content/public/browser/notification_types.h" | 19 #include "content/public/browser/notification_types.h" |
20 #include "content/public/browser/web_contents_observer.h" | 20 #include "content/public/browser/web_contents_observer.h" |
21 #include "content/public/common/content_switches.h" | 21 #include "content/public/common/content_switches.h" |
22 #include "content/public/test/browser_test_utils.h" | 22 #include "content/public/test/browser_test_utils.h" |
23 #include "content/public/test/content_browser_test.h" | 23 #include "content/public/test/content_browser_test.h" |
24 #include "content/public/test/content_browser_test_utils.h" | 24 #include "content/public/test/content_browser_test_utils.h" |
| 25 #include "content/public/test/routing_id_mangling_disabler.h" |
25 #include "content/public/test/test_utils.h" | 26 #include "content/public/test/test_utils.h" |
26 #include "content/shell/browser/shell.h" | 27 #include "content/shell/browser/shell.h" |
27 #include "content/test/accessibility_browser_test_utils.h" | 28 #include "content/test/accessibility_browser_test_utils.h" |
28 #include "content/test/content_browser_test_utils_internal.h" | 29 #include "content/test/content_browser_test_utils_internal.h" |
29 #include "net/dns/mock_host_resolver.h" | 30 #include "net/dns/mock_host_resolver.h" |
30 #include "url/gurl.h" | 31 #include "url/gurl.h" |
31 | 32 |
32 namespace content { | 33 namespace content { |
33 | 34 |
34 class SitePerProcessAccessibilityBrowserTest | 35 class SitePerProcessAccessibilityBrowserTest |
35 : public SitePerProcessBrowserTest { | 36 : public SitePerProcessBrowserTest { |
36 public: | 37 public: |
37 SitePerProcessAccessibilityBrowserTest() {} | 38 SitePerProcessAccessibilityBrowserTest() {} |
| 39 |
| 40 // TODO(morrita): This is fishy. This test shouldn't rely on the |
| 41 // abasence of routing_id mangling. Something seems wrong. |
| 42 // See http://crbug.com/422136 for more updates. |
| 43 content::RoutingIDManglingDisabler mangling_disabler_; |
38 }; | 44 }; |
39 | 45 |
40 // TODO(nasko): try enabling this test on more platforms once | 46 // TODO(nasko): try enabling this test on more platforms once |
41 // SitePerProcessBrowserTest.CrossSiteIframe is enabled everywhere. | 47 // SitePerProcessBrowserTest.CrossSiteIframe is enabled everywhere. |
42 // http://crbug.com/399775 | 48 // http://crbug.com/399775 |
43 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) | 49 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
44 #define MAYBE_CrossSiteIframeAccessibility CrossSiteIframeAccessibility | 50 #define MAYBE_CrossSiteIframeAccessibility CrossSiteIframeAccessibility |
45 #else | 51 #else |
46 #define MAYBE_CrossSiteIframeAccessibility DISABLED_CrossSiteIframeAccessibility | 52 #define MAYBE_CrossSiteIframeAccessibility DISABLED_CrossSiteIframeAccessibility |
47 #endif | 53 #endif |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 BrowserAccessibility* ax_child_frame_static_text = | 143 BrowserAccessibility* ax_child_frame_static_text = |
138 ax_child_frame_group->PlatformGetChild(0); | 144 ax_child_frame_group->PlatformGetChild(0); |
139 ASSERT_EQ(ui::AX_ROLE_STATIC_TEXT, ax_child_frame_static_text->GetRole()); | 145 ASSERT_EQ(ui::AX_ROLE_STATIC_TEXT, ax_child_frame_static_text->GetRole()); |
140 ASSERT_EQ(0U, ax_child_frame_static_text->PlatformChildCount()); | 146 ASSERT_EQ(0U, ax_child_frame_static_text->PlatformChildCount()); |
141 | 147 |
142 // Last, check that the parent of the child frame root is correct. | 148 // Last, check that the parent of the child frame root is correct. |
143 ASSERT_EQ(ax_child_frame_root->GetParent(), ax_scroll_area); | 149 ASSERT_EQ(ax_child_frame_root->GetParent(), ax_scroll_area); |
144 } | 150 } |
145 | 151 |
146 } // namespace content | 152 } // namespace content |
OLD | NEW |