OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <string> | 5 #include <string> |
6 #include <vector> | 6 #include <vector> |
7 | 7 |
8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
9 #include "chrome/browser/ui/browser.h" | 9 #include "chrome/browser/ui/browser.h" |
10 #include "chrome/browser/ui/browser_window.h" | 10 #include "chrome/browser/ui/browser_window.h" |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 const WebAccessibility& node, | 120 const WebAccessibility& node, |
121 const WebAccessibility::BoolAttribute attr) { | 121 const WebAccessibility::BoolAttribute attr) { |
122 std::map<WebAccessibility::BoolAttribute, bool>::const_iterator iter = | 122 std::map<WebAccessibility::BoolAttribute, bool>::const_iterator iter = |
123 node.bool_attributes.find(attr); | 123 node.bool_attributes.find(attr); |
124 if (iter != node.bool_attributes.end()) | 124 if (iter != node.bool_attributes.end()) |
125 return iter->second; | 125 return iter->second; |
126 else | 126 else |
127 return false; | 127 return false; |
128 } | 128 } |
129 | 129 |
| 130 // Marked flaky per http://crbug.com/101984 |
130 IN_PROC_BROWSER_TEST_F(RendererAccessibilityBrowserTest, | 131 IN_PROC_BROWSER_TEST_F(RendererAccessibilityBrowserTest, |
131 CrossPlatformWebpageAccessibility) { | 132 FLAKY_CrossPlatformWebpageAccessibility) { |
132 // Create a data url and load it. | 133 // Create a data url and load it. |
133 const char url_str[] = | 134 const char url_str[] = |
134 "data:text/html," | 135 "data:text/html," |
135 "<!doctype html>" | 136 "<!doctype html>" |
136 "<html><head><title>Accessibility Test</title></head>" | 137 "<html><head><title>Accessibility Test</title></head>" |
137 "<body><input type='button' value='push' /><input type='checkbox' />" | 138 "<body><input type='button' value='push' /><input type='checkbox' />" |
138 "</body></html>"; | 139 "</body></html>"; |
139 GURL url(url_str); | 140 GURL url(url_str); |
140 browser()->OpenURL(url, GURL(), CURRENT_TAB, content::PAGE_TRANSITION_TYPED); | 141 browser()->OpenURL(url, GURL(), CURRENT_TAB, content::PAGE_TRANSITION_TYPED); |
141 const WebAccessibility& tree = GetWebAccessibilityTree(); | 142 const WebAccessibility& tree = GetWebAccessibilityTree(); |
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
449 const WebAccessibility& tree = GetWebAccessibilityTree(); | 450 const WebAccessibility& tree = GetWebAccessibilityTree(); |
450 | 451 |
451 ASSERT_EQ(1U, tree.children.size()); | 452 ASSERT_EQ(1U, tree.children.size()); |
452 const WebAccessibility& textbox = tree.children[0]; | 453 const WebAccessibility& textbox = tree.children[0]; |
453 | 454 |
454 EXPECT_EQ( | 455 EXPECT_EQ( |
455 true, GetBoolAttr(textbox, WebAccessibility::ATTR_CAN_SET_VALUE)); | 456 true, GetBoolAttr(textbox, WebAccessibility::ATTR_CAN_SET_VALUE)); |
456 } | 457 } |
457 | 458 |
458 } // namespace | 459 } // namespace |
OLD | NEW |