OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <string> | 5 #include <string> |
6 | 6 |
7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "chrome/browser/accessibility/accessibility_extension_api.h" | 10 #include "chrome/browser/accessibility/accessibility_extension_api.h" |
11 #include "chrome/browser/ui/views/accessibility_event_router_views.h" | 11 #include "chrome/browser/ui/views/accessibility_event_router_views.h" |
12 #include "chrome/common/chrome_notification_types.h" | 12 #include "chrome/common/chrome_notification_types.h" |
13 #include "chrome/test/base/testing_profile.h" | 13 #include "chrome/test/base/testing_profile.h" |
14 #include "content/public/browser/notification_registrar.h" | 14 #include "content/public/browser/notification_registrar.h" |
15 #include "content/public/browser/notification_service.h" | 15 #include "content/public/browser/notification_service.h" |
16 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
17 #include "ui/views/controls/button/text_button.h" | 17 #include "ui/views/controls/button/text_button.h" |
18 #include "ui/views/layout/grid_layout.h" | 18 #include "ui/views/layout/grid_layout.h" |
| 19 #include "ui/views/views_delegate.h" |
19 #include "ui/views/widget/native_widget.h" | 20 #include "ui/views/widget/native_widget.h" |
20 #include "ui/views/widget/root_view.h" | 21 #include "ui/views/widget/root_view.h" |
21 #include "ui/views/widget/widget.h" | 22 #include "ui/views/widget/widget.h" |
22 #include "ui/views/widget/widget_delegate.h" | 23 #include "ui/views/widget/widget_delegate.h" |
23 #include "views/views_delegate.h" | |
24 | 24 |
25 #if defined(TOOLKIT_VIEWS) | 25 #if defined(TOOLKIT_VIEWS) |
26 | 26 |
27 class AccessibilityViewsDelegate : public views::ViewsDelegate { | 27 class AccessibilityViewsDelegate : public views::ViewsDelegate { |
28 public: | 28 public: |
29 AccessibilityViewsDelegate() {} | 29 AccessibilityViewsDelegate() {} |
30 virtual ~AccessibilityViewsDelegate() {} | 30 virtual ~AccessibilityViewsDelegate() {} |
31 | 31 |
32 // Overridden from views::ViewsDelegate: | 32 // Overridden from views::ViewsDelegate: |
33 virtual ui::Clipboard* GetClipboard() const OVERRIDE { return NULL; } | 33 virtual ui::Clipboard* GetClipboard() const OVERRIDE { return NULL; } |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 EXPECT_EQ(2, focus_event_count_); | 180 EXPECT_EQ(2, focus_event_count_); |
181 EXPECT_EQ(kButton3NewASCII, last_control_name_); | 181 EXPECT_EQ(kButton3NewASCII, last_control_name_); |
182 | 182 |
183 // Advance to button 1 and check the notification. | 183 // Advance to button 1 and check the notification. |
184 focus_manager->AdvanceFocus(false); | 184 focus_manager->AdvanceFocus(false); |
185 EXPECT_EQ(3, focus_event_count_); | 185 EXPECT_EQ(3, focus_event_count_); |
186 EXPECT_EQ(kButton1ASCII, last_control_name_); | 186 EXPECT_EQ(kButton1ASCII, last_control_name_); |
187 } | 187 } |
188 | 188 |
189 #endif // defined(TOOLKIT_VIEWS) | 189 #endif // defined(TOOLKIT_VIEWS) |
OLD | NEW |