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 "base/strings/string16.h" | 8 #include "base/strings/string16.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
11 #include "content/browser/accessibility/browser_accessibility.h" | 11 #include "content/browser/accessibility/browser_accessibility.h" |
12 #include "content/browser/accessibility/browser_accessibility_manager.h" | 12 #include "content/browser/accessibility/browser_accessibility_manager.h" |
13 #if defined(OS_WIN) | 13 #if defined(OS_WIN) |
14 #include "content/browser/accessibility/browser_accessibility_win.h" | 14 #include "content/browser/accessibility/browser_accessibility_win.h" |
15 #endif | 15 #endif |
16 #include "content/public/browser/ax_event_notification_details.h" | 16 #include "content/public/browser/ax_event_notification_details.h" |
17 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
| 18 #include "ui/accessibility/ax_enums.h" |
18 | 19 |
19 namespace content { | 20 namespace content { |
20 namespace { | 21 namespace { |
21 | 22 |
22 // Subclass of BrowserAccessibility that counts the number of instances. | 23 // Subclass of BrowserAccessibility that counts the number of instances. |
23 class CountedBrowserAccessibility : public BrowserAccessibility { | 24 class CountedBrowserAccessibility : public BrowserAccessibility { |
24 public: | 25 public: |
25 CountedBrowserAccessibility() { | 26 CountedBrowserAccessibility() { |
26 global_obj_count_++; | 27 global_obj_count_++; |
27 native_ref_count_ = 1; | 28 native_ref_count_ = 1; |
(...skipping 1440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1468 events2[0].event_type = ui::AX_EVENT_NONE; | 1469 events2[0].event_type = ui::AX_EVENT_NONE; |
1469 manager->OnAccessibilityEvents(events2); | 1470 manager->OnAccessibilityEvents(events2); |
1470 | 1471 |
1471 // Make sure that the focused node was updated to the new root and | 1472 // Make sure that the focused node was updated to the new root and |
1472 // that this doesn't crash. | 1473 // that this doesn't crash. |
1473 ASSERT_EQ(3, manager->GetRoot()->GetId()); | 1474 ASSERT_EQ(3, manager->GetRoot()->GetId()); |
1474 ASSERT_EQ(3, manager->GetFocus()->GetId()); | 1475 ASSERT_EQ(3, manager->GetFocus()->GetId()); |
1475 } | 1476 } |
1476 | 1477 |
1477 } // namespace content | 1478 } // namespace content |
OLD | NEW |