| 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/test/base/in_process_browser_test.h" | 10 #include "chrome/test/base/in_process_browser_test.h" |
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 EXPECT_EQ(0U, column1.children.size()); | 272 EXPECT_EQ(0U, column1.children.size()); |
| 273 EXPECT_EQ(1U, column1.indirect_child_ids.size()); | 273 EXPECT_EQ(1U, column1.indirect_child_ids.size()); |
| 274 EXPECT_EQ(cell1.id, column1.indirect_child_ids[0]); | 274 EXPECT_EQ(cell1.id, column1.indirect_child_ids[0]); |
| 275 const WebAccessibility& column2 = table.children[2]; | 275 const WebAccessibility& column2 = table.children[2]; |
| 276 EXPECT_EQ(WebAccessibility::ROLE_COLUMN, column2.role); | 276 EXPECT_EQ(WebAccessibility::ROLE_COLUMN, column2.role); |
| 277 EXPECT_EQ(0U, column2.children.size()); | 277 EXPECT_EQ(0U, column2.children.size()); |
| 278 EXPECT_EQ(1U, column2.indirect_child_ids.size()); | 278 EXPECT_EQ(1U, column2.indirect_child_ids.size()); |
| 279 EXPECT_EQ(cell2.id, column2.indirect_child_ids[0]); | 279 EXPECT_EQ(cell2.id, column2.indirect_child_ids[0]); |
| 280 } | 280 } |
| 281 | 281 |
| 282 // Test crashes/times out, see http://crbug.com/107985 | |
| 283 IN_PROC_BROWSER_TEST_F( | 282 IN_PROC_BROWSER_TEST_F( |
| 284 RendererAccessibilityBrowserTest, | 283 RendererAccessibilityBrowserTest, |
| 285 DISABLED_CrossPlatformMultipleInheritanceAccessibility2) { | 284 CrossPlatformMultipleInheritanceAccessibility2) { |
| 286 // Here's another html snippet where WebKit puts the same node as a child | 285 // Here's another html snippet where WebKit puts the same node as a child |
| 287 // of two different parents. Instead of checking the exact output, just | 286 // of two different parents. Instead of checking the exact output, just |
| 288 // make sure that no id is reused in the resulting tree. | 287 // make sure that no id is reused in the resulting tree. |
| 289 const char url_str[] = | 288 const char url_str[] = |
| 290 "data:text/html," | 289 "data:text/html," |
| 291 "<!doctype html>" | 290 "<!doctype html>" |
| 292 "<script>\n" | 291 "<script>\n" |
| 293 " document.writeln('<q><section></section></q><q><li>');\n" | 292 " document.writeln('<q><section></section></q><q><li>');\n" |
| 294 " setTimeout(function() {\n" | 293 " setTimeout(function() {\n" |
| 295 " document.close();\n" | 294 " document.close();\n" |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 365 "<em><code ><h4 ></em>"; | 364 "<em><code ><h4 ></em>"; |
| 366 GURL url(url_str); | 365 GURL url(url_str); |
| 367 browser()->OpenURL(OpenURLParams( | 366 browser()->OpenURL(OpenURLParams( |
| 368 url, Referrer(), CURRENT_TAB, content::PAGE_TRANSITION_TYPED, false)); | 367 url, Referrer(), CURRENT_TAB, content::PAGE_TRANSITION_TYPED, false)); |
| 369 | 368 |
| 370 const WebAccessibility& tree = GetWebAccessibilityTree(); | 369 const WebAccessibility& tree = GetWebAccessibilityTree(); |
| 371 base::hash_set<int> ids; | 370 base::hash_set<int> ids; |
| 372 RecursiveAssertUniqueIds(tree, &ids); | 371 RecursiveAssertUniqueIds(tree, &ids); |
| 373 } | 372 } |
| 374 | 373 |
| 375 // Test crashes/times out, see http://crbug.com/107985 | |
| 376 IN_PROC_BROWSER_TEST_F(RendererAccessibilityBrowserTest, | 374 IN_PROC_BROWSER_TEST_F(RendererAccessibilityBrowserTest, |
| 377 DISABLED_CrossPlatformTableSpan) { | 375 CrossPlatformTableSpan) { |
| 378 // +---+---+---+ | 376 // +---+---+---+ |
| 379 // | 1 | 2 | | 377 // | 1 | 2 | |
| 380 // +---+---+---+ | 378 // +---+---+---+ |
| 381 // | 3 | 4 | | 379 // | 3 | 4 | |
| 382 // +---+---+---+ | 380 // +---+---+---+ |
| 383 | 381 |
| 384 const char url_str[] = | 382 const char url_str[] = |
| 385 "data:text/html," | 383 "data:text/html," |
| 386 "<!doctype html>" | 384 "<!doctype html>" |
| 387 "<table border=1>" | 385 "<table border=1>" |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 457 const WebAccessibility& tree = GetWebAccessibilityTree(); | 455 const WebAccessibility& tree = GetWebAccessibilityTree(); |
| 458 | 456 |
| 459 ASSERT_EQ(1U, tree.children.size()); | 457 ASSERT_EQ(1U, tree.children.size()); |
| 460 const WebAccessibility& textbox = tree.children[0]; | 458 const WebAccessibility& textbox = tree.children[0]; |
| 461 | 459 |
| 462 EXPECT_EQ( | 460 EXPECT_EQ( |
| 463 true, GetBoolAttr(textbox, WebAccessibility::ATTR_CAN_SET_VALUE)); | 461 true, GetBoolAttr(textbox, WebAccessibility::ATTR_CAN_SET_VALUE)); |
| 464 } | 462 } |
| 465 | 463 |
| 466 } // namespace | 464 } // namespace |
| OLD | NEW |