| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <stddef.h> | 5 #include <stddef.h> |
| 6 #include <stdint.h> | 6 #include <stdint.h> |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 | 38 |
| 39 namespace content { | 39 namespace content { |
| 40 | 40 |
| 41 class CrossPlatformAccessibilityBrowserTest : public ContentBrowserTest { | 41 class CrossPlatformAccessibilityBrowserTest : public ContentBrowserTest { |
| 42 public: | 42 public: |
| 43 CrossPlatformAccessibilityBrowserTest() {} | 43 CrossPlatformAccessibilityBrowserTest() {} |
| 44 | 44 |
| 45 // Tell the renderer to send an accessibility tree, then wait for the | 45 // Tell the renderer to send an accessibility tree, then wait for the |
| 46 // notification that it's been received. | 46 // notification that it's been received. |
| 47 const ui::AXTree& GetAXTree( | 47 const ui::AXTree& GetAXTree( |
| 48 AccessibilityMode accessibility_mode = AccessibilityModeComplete) { | 48 AccessibilityMode accessibility_mode = ACCESSIBILITY_MODE_COMPLETE) { |
| 49 AccessibilityNotificationWaiter waiter( | 49 AccessibilityNotificationWaiter waiter( |
| 50 shell()->web_contents(), | 50 shell()->web_contents(), |
| 51 accessibility_mode, | 51 accessibility_mode, |
| 52 ui::AX_EVENT_LAYOUT_COMPLETE); | 52 ui::AX_EVENT_LAYOUT_COMPLETE); |
| 53 waiter.WaitForNotification(); | 53 waiter.WaitForNotification(); |
| 54 return waiter.GetAXTree(); | 54 return waiter.GetAXTree(); |
| 55 } | 55 } |
| 56 | 56 |
| 57 // Make sure each node in the tree has a unique id. | 57 // Make sure each node in the tree has a unique id. |
| 58 void RecursiveAssertUniqueIds( | 58 void RecursiveAssertUniqueIds( |
| (...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 491 GURL url(url_str); | 491 GURL url(url_str); |
| 492 NavigateToURL(shell(), url); | 492 NavigateToURL(shell(), url); |
| 493 const ui::AXTree& tree = GetAXTree(); | 493 const ui::AXTree& tree = GetAXTree(); |
| 494 const ui::AXNode* root = tree.root(); | 494 const ui::AXNode* root = tree.root(); |
| 495 ASSERT_EQ(1, root->child_count()); | 495 ASSERT_EQ(1, root->child_count()); |
| 496 const ui::AXNode* textbox = root->ChildAtIndex(0); | 496 const ui::AXNode* textbox = root->ChildAtIndex(0); |
| 497 EXPECT_EQ(true, GetBoolAttr(textbox, ui::AX_ATTR_CAN_SET_VALUE)); | 497 EXPECT_EQ(true, GetBoolAttr(textbox, ui::AX_ATTR_CAN_SET_VALUE)); |
| 498 } | 498 } |
| 499 | 499 |
| 500 } // namespace content | 500 } // namespace content |
| OLD | NEW |