| 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 "base/strings/string16.h" | 5 #include "base/strings/string16.h" |
| 6 #include "base/strings/utf_string_conversions.h" | 6 #include "base/strings/utf_string_conversions.h" |
| 7 #include "content/browser/accessibility/browser_accessibility.h" | 7 #include "content/browser/accessibility/browser_accessibility.h" |
| 8 #include "content/browser/accessibility/browser_accessibility_manager.h" | 8 #include "content/browser/accessibility/browser_accessibility_manager.h" |
| 9 #if defined(OS_WIN) | 9 #if defined(OS_WIN) |
| 10 #include "content/browser/accessibility/browser_accessibility_win.h" | 10 #include "content/browser/accessibility/browser_accessibility_win.h" |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 } | 84 } |
| 85 virtual gfx::Point AccessibilityOriginInScreen( | 85 virtual gfx::Point AccessibilityOriginInScreen( |
| 86 const gfx::Rect& bounds) const OVERRIDE { | 86 const gfx::Rect& bounds) const OVERRIDE { |
| 87 return gfx::Point(); | 87 return gfx::Point(); |
| 88 } | 88 } |
| 89 virtual void AccessibilityHitTest(const gfx::Point& point) OVERRIDE {} | 89 virtual void AccessibilityHitTest(const gfx::Point& point) OVERRIDE {} |
| 90 virtual void AccessibilityFatalError() OVERRIDE { | 90 virtual void AccessibilityFatalError() OVERRIDE { |
| 91 got_fatal_error_ = true; | 91 got_fatal_error_ = true; |
| 92 } | 92 } |
| 93 | 93 |
| 94 #if defined(OS_WIN) |
| 95 virtual HWND GetAccessibleParentHWND() const OVERRIDE { |
| 96 return GetDesktopWindow(); |
| 97 } |
| 98 virtual IAccessible* GetParentIAccessible() const OVERRIDE { |
| 99 return NULL; |
| 100 } |
| 101 #endif |
| 102 |
| 94 bool got_fatal_error() const { return got_fatal_error_; } | 103 bool got_fatal_error() const { return got_fatal_error_; } |
| 95 void reset_got_fatal_error() { got_fatal_error_ = false; } | 104 void reset_got_fatal_error() { got_fatal_error_ = false; } |
| 96 | 105 |
| 97 private: | 106 private: |
| 98 bool got_fatal_error_; | 107 bool got_fatal_error_; |
| 99 }; | 108 }; |
| 100 | 109 |
| 101 } // anonymous namespace | 110 } // anonymous namespace |
| 102 | 111 |
| 103 TEST(BrowserAccessibilityManagerTest, TestNoLeaks) { | 112 TEST(BrowserAccessibilityManagerTest, TestNoLeaks) { |
| (...skipping 822 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 926 ASSERT_EQ(NULL, manager->NextInTreeOrder(node5_accessible)); | 935 ASSERT_EQ(NULL, manager->NextInTreeOrder(node5_accessible)); |
| 927 | 936 |
| 928 ASSERT_EQ(NULL, manager->PreviousInTreeOrder(NULL)); | 937 ASSERT_EQ(NULL, manager->PreviousInTreeOrder(NULL)); |
| 929 ASSERT_EQ(node4_accessible, manager->PreviousInTreeOrder(node5_accessible)); | 938 ASSERT_EQ(node4_accessible, manager->PreviousInTreeOrder(node5_accessible)); |
| 930 ASSERT_EQ(node3_accessible, manager->PreviousInTreeOrder(node4_accessible)); | 939 ASSERT_EQ(node3_accessible, manager->PreviousInTreeOrder(node4_accessible)); |
| 931 ASSERT_EQ(node2_accessible, manager->PreviousInTreeOrder(node3_accessible)); | 940 ASSERT_EQ(node2_accessible, manager->PreviousInTreeOrder(node3_accessible)); |
| 932 ASSERT_EQ(root_accessible, manager->PreviousInTreeOrder(node2_accessible)); | 941 ASSERT_EQ(root_accessible, manager->PreviousInTreeOrder(node2_accessible)); |
| 933 } | 942 } |
| 934 | 943 |
| 935 } // namespace content | 944 } // namespace content |
| OLD | NEW |