| 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/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 #include "content/public/test/content_browser_test_utils.h" | 25 #include "content/public/test/content_browser_test_utils.h" |
| 26 #include "content/shell/browser/shell.h" | 26 #include "content/shell/browser/shell.h" |
| 27 #include "content/test/accessibility_browser_test_utils.h" | 27 #include "content/test/accessibility_browser_test_utils.h" |
| 28 #include "testing/gtest/include/gtest/gtest.h" | 28 #include "testing/gtest/include/gtest/gtest.h" |
| 29 | 29 |
| 30 namespace content { | 30 namespace content { |
| 31 | 31 |
| 32 class AndroidHitTestingBrowserTest : public ContentBrowserTest { | 32 class AndroidHitTestingBrowserTest : public ContentBrowserTest { |
| 33 public: | 33 public: |
| 34 AndroidHitTestingBrowserTest() {} | 34 AndroidHitTestingBrowserTest() {} |
| 35 virtual ~AndroidHitTestingBrowserTest() {} | 35 ~AndroidHitTestingBrowserTest() override {} |
| 36 }; | 36 }; |
| 37 | 37 |
| 38 IN_PROC_BROWSER_TEST_F(AndroidHitTestingBrowserTest, | 38 IN_PROC_BROWSER_TEST_F(AndroidHitTestingBrowserTest, |
| 39 HitTestOutsideDocumentBoundsReturnsRoot) { | 39 HitTestOutsideDocumentBoundsReturnsRoot) { |
| 40 NavigateToURL(shell(), GURL(url::kAboutBlankURL)); | 40 NavigateToURL(shell(), GURL(url::kAboutBlankURL)); |
| 41 | 41 |
| 42 // Load the page. | 42 // Load the page. |
| 43 AccessibilityNotificationWaiter waiter( | 43 AccessibilityNotificationWaiter waiter( |
| 44 shell(), AccessibilityModeComplete, | 44 shell(), AccessibilityModeComplete, |
| 45 ui::AX_EVENT_LOAD_COMPLETE); | 45 ui::AX_EVENT_LOAD_COMPLETE); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 70 hover_waiter.WaitForNotification(); | 70 hover_waiter.WaitForNotification(); |
| 71 | 71 |
| 72 // Assert that the hover event was fired on the root of the tree. | 72 // Assert that the hover event was fired on the root of the tree. |
| 73 int hover_target_id = hover_waiter.event_target_id(); | 73 int hover_target_id = hover_waiter.event_target_id(); |
| 74 BrowserAccessibility* hovered_node = manager->GetFromID(hover_target_id); | 74 BrowserAccessibility* hovered_node = manager->GetFromID(hover_target_id); |
| 75 ASSERT_TRUE(hovered_node != NULL); | 75 ASSERT_TRUE(hovered_node != NULL); |
| 76 ASSERT_EQ(ui::AX_ROLE_ROOT_WEB_AREA, hovered_node->GetRole()); | 76 ASSERT_EQ(ui::AX_ROLE_ROOT_WEB_AREA, hovered_node->GetRole()); |
| 77 } | 77 } |
| 78 | 78 |
| 79 } // namespace content | 79 } // namespace content |
| OLD | NEW |