OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "base/strings/string_number_conversions.h" | 5 #include "base/strings/string_number_conversions.h" |
6 #include "content/browser/accessibility/browser_accessibility.h" | 6 #include "content/browser/accessibility/browser_accessibility.h" |
7 #include "content/browser/web_contents/web_contents_impl.h" | 7 #include "content/browser/web_contents/web_contents_impl.h" |
8 #include "content/public/test/browser_test_utils.h" | 8 #include "content/public/test/browser_test_utils.h" |
9 #include "content/public/test/content_browser_test.h" | 9 #include "content/public/test/content_browser_test.h" |
10 #include "content/public/test/content_browser_test_utils.h" | 10 #include "content/public/test/content_browser_test_utils.h" |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 | 90 |
91 // Wait until we get a hover event in the expected grid cell. | 91 // Wait until we get a hover event in the expected grid cell. |
92 // Tolerate additional events, keep looping until we get the expected one. | 92 // Tolerate additional events, keep looping until we get the expected one. |
93 std::string cell_text; | 93 std::string cell_text; |
94 do { | 94 do { |
95 waiter2.WaitForNotification(); | 95 waiter2.WaitForNotification(); |
96 int target_id = waiter2.event_target_id(); | 96 int target_id = waiter2.event_target_id(); |
97 BrowserAccessibility* hit = manager->GetFromID(target_id); | 97 BrowserAccessibility* hit = manager->GetFromID(target_id); |
98 BrowserAccessibility* child = hit->PlatformGetChild(0); | 98 BrowserAccessibility* child = hit->PlatformGetChild(0); |
99 ASSERT_NE(nullptr, child); | 99 ASSERT_NE(nullptr, child); |
100 cell_text = child->GetData().GetStringAttribute(ui::AX_ATTR_VALUE); | 100 cell_text = child->GetData().GetStringAttribute(ui::AX_ATTR_NAME); |
101 VLOG(1) << "Got hover event in cell with text: " << cell_text; | 101 VLOG(1) << "Got hover event in cell with text: " << cell_text; |
102 } while (cell_text != expected_cell_text); | 102 } while (cell_text != expected_cell_text); |
103 } | 103 } |
104 } | 104 } |
105 } | 105 } |
106 | 106 |
107 } // namespace content | 107 } // namespace content |
OLD | NEW |