| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 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 <set> | 5 #include <set> |
| 6 #include <string> | 6 #include <string> |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 const int GRANULARITY_CHARACTER = | 26 const int GRANULARITY_CHARACTER = |
| 27 ANDROID_ACCESSIBILITY_NODE_INFO_MOVEMENT_GRANULARITY_CHARACTER; | 27 ANDROID_ACCESSIBILITY_NODE_INFO_MOVEMENT_GRANULARITY_CHARACTER; |
| 28 const int GRANULARITY_WORD = | 28 const int GRANULARITY_WORD = |
| 29 ANDROID_ACCESSIBILITY_NODE_INFO_MOVEMENT_GRANULARITY_WORD; | 29 ANDROID_ACCESSIBILITY_NODE_INFO_MOVEMENT_GRANULARITY_WORD; |
| 30 const int GRANULARITY_LINE = | 30 const int GRANULARITY_LINE = |
| 31 ANDROID_ACCESSIBILITY_NODE_INFO_MOVEMENT_GRANULARITY_LINE; | 31 ANDROID_ACCESSIBILITY_NODE_INFO_MOVEMENT_GRANULARITY_LINE; |
| 32 | 32 |
| 33 class AndroidGranularityMovementBrowserTest : public ContentBrowserTest { | 33 class AndroidGranularityMovementBrowserTest : public ContentBrowserTest { |
| 34 public: | 34 public: |
| 35 AndroidGranularityMovementBrowserTest() {} | 35 AndroidGranularityMovementBrowserTest() {} |
| 36 virtual ~AndroidGranularityMovementBrowserTest() {} | 36 ~AndroidGranularityMovementBrowserTest() override {} |
| 37 | 37 |
| 38 BrowserAccessibility* LoadUrlAndGetAccessibilityRoot(const GURL& url) { | 38 BrowserAccessibility* LoadUrlAndGetAccessibilityRoot(const GURL& url) { |
| 39 NavigateToURL(shell(), GURL(url::kAboutBlankURL)); | 39 NavigateToURL(shell(), GURL(url::kAboutBlankURL)); |
| 40 | 40 |
| 41 // Load the page. | 41 // Load the page. |
| 42 AccessibilityNotificationWaiter waiter( | 42 AccessibilityNotificationWaiter waiter( |
| 43 shell(), AccessibilityModeComplete, | 43 shell(), AccessibilityModeComplete, |
| 44 ui::AX_EVENT_LOAD_COMPLETE); | 44 ui::AX_EVENT_LOAD_COMPLETE); |
| 45 NavigateToURL(shell(), url); | 45 NavigateToURL(shell(), url); |
| 46 waiter.WaitForNotification(); | 46 waiter.WaitForNotification(); |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 BrowserAccessibility* root = LoadUrlAndGetAccessibilityRoot(url); | 200 BrowserAccessibility* root = LoadUrlAndGetAccessibilityRoot(url); |
| 201 ASSERT_EQ(1U, root->PlatformChildCount()); | 201 ASSERT_EQ(1U, root->PlatformChildCount()); |
| 202 BrowserAccessibility* pre = root->PlatformGetChild(0); | 202 BrowserAccessibility* pre = root->PlatformGetChild(0); |
| 203 ASSERT_EQ(0U, pre->PlatformChildCount()); | 203 ASSERT_EQ(0U, pre->PlatformChildCount()); |
| 204 | 204 |
| 205 ASSERT_EQ(base::ASCIIToUTF16("'One,', 'two,', 'three!'"), | 205 ASSERT_EQ(base::ASCIIToUTF16("'One,', 'two,', 'three!'"), |
| 206 TraverseNodeAtGranularity(pre, GRANULARITY_LINE)); | 206 TraverseNodeAtGranularity(pre, GRANULARITY_LINE)); |
| 207 } | 207 } |
| 208 | 208 |
| 209 } // namespace content | 209 } // namespace content |
| OLD | NEW |