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 <string> | 5 #include <string> |
6 | 6 |
7 #include "base/message_loop/message_loop.h" | 7 #include "base/message_loop/message_loop.h" |
8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "chrome/browser/accessibility/accessibility_extension_api.h" | 10 #include "chrome/browser/accessibility/accessibility_extension_api.h" |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 AccessibilityEventRouterViewsTest() : control_event_count_(0) { | 114 AccessibilityEventRouterViewsTest() : control_event_count_(0) { |
115 } | 115 } |
116 | 116 |
117 virtual void SetUp() { | 117 virtual void SetUp() { |
118 #if defined(OS_WIN) | 118 #if defined(OS_WIN) |
119 ole_initializer_.reset(new ui::ScopedOleInitializer()); | 119 ole_initializer_.reset(new ui::ScopedOleInitializer()); |
120 #endif | 120 #endif |
121 views::ViewsDelegate::views_delegate = new AccessibilityViewsDelegate(); | 121 views::ViewsDelegate::views_delegate = new AccessibilityViewsDelegate(); |
122 #if defined(USE_AURA) | 122 #if defined(USE_AURA) |
123 aura_test_helper_.reset(new aura::test::AuraTestHelper(&message_loop_)); | 123 aura_test_helper_.reset(new aura::test::AuraTestHelper(&message_loop_)); |
124 aura_test_helper_->SetUp(); | 124 bool allow_test_contexts = true; |
| 125 aura_test_helper_->SetUp(allow_test_contexts); |
125 #endif // USE_AURA | 126 #endif // USE_AURA |
126 EnableAccessibilityAndListenToFocusNotifications(); | 127 EnableAccessibilityAndListenToFocusNotifications(); |
127 } | 128 } |
128 | 129 |
129 virtual void TearDown() { | 130 virtual void TearDown() { |
130 ClearCallback(); | 131 ClearCallback(); |
131 #if defined(USE_AURA) | 132 #if defined(USE_AURA) |
132 aura_test_helper_->TearDown(); | 133 aura_test_helper_->TearDown(); |
133 #endif | 134 #endif |
134 delete views::ViewsDelegate::views_delegate; | 135 delete views::ViewsDelegate::views_delegate; |
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
507 | 508 |
508 AccessibilityEventRouterViews::RecursiveGetMenuItemIndexAndCount( | 509 AccessibilityEventRouterViews::RecursiveGetMenuItemIndexAndCount( |
509 menu_container, | 510 menu_container, |
510 menu->GetMenuItemByID(kTestCases[i].command_id), | 511 menu->GetMenuItemByID(kTestCases[i].command_id), |
511 &index, | 512 &index, |
512 &count); | 513 &count); |
513 EXPECT_EQ(kTestCases[i].expected_index, index) << "Case " << i; | 514 EXPECT_EQ(kTestCases[i].expected_index, index) << "Case " << i; |
514 EXPECT_EQ(kTestCases[i].expected_count, count) << "Case " << i; | 515 EXPECT_EQ(kTestCases[i].expected_count, count) << "Case " << i; |
515 } | 516 } |
516 } | 517 } |
OLD | NEW |