Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(161)

Side by Side Diff: chrome/browser/ui/views/accessibility_event_router_views_unittest.cc

Issue 8298007: Aura: unit_tests now run on Linux (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix ui_test_utils_aura Bind Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/extensions/extension_accessibility_api.h" 10 #include "chrome/browser/extensions/extension_accessibility_api.h"
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 focus_event_count_++; 119 focus_event_count_++;
120 last_control_name_ = info->name(); 120 last_control_name_ = info->name();
121 } 121 }
122 122
123 MessageLoopForUI message_loop_; 123 MessageLoopForUI message_loop_;
124 int focus_event_count_; 124 int focus_event_count_;
125 std::string last_control_name_; 125 std::string last_control_name_;
126 AccessibilityWindowDelegate* window_delegate_; 126 AccessibilityWindowDelegate* window_delegate_;
127 }; 127 };
128 128
129 TEST_F(AccessibilityEventRouterViewsTest, TestFocusNotification) { 129 // Crashes on Linux Aura, http://crbug.com/100338
130 #if defined(USE_AURA) && !defined(OS_WIN)
131 #define MAYBE_TestFocusNotification DISABLED_TestFocusNotification
132 #else
133 #define MAYBE_TestFocusNotification TestFocusNotification
134 #endif
135 TEST_F(AccessibilityEventRouterViewsTest, MAYBE_TestFocusNotification) {
130 const char kButton1ASCII[] = "Button1"; 136 const char kButton1ASCII[] = "Button1";
131 const char kButton2ASCII[] = "Button2"; 137 const char kButton2ASCII[] = "Button2";
132 const char kButton3ASCII[] = "Button3"; 138 const char kButton3ASCII[] = "Button3";
133 const char kButton3NewASCII[] = "Button3New"; 139 const char kButton3NewASCII[] = "Button3New";
134 140
135 // Create a contents view with 3 buttons. 141 // Create a contents view with 3 buttons.
136 views::View* contents = new views::View(); 142 views::View* contents = new views::View();
137 views::NativeTextButton* button1 = new views::NativeTextButton( 143 views::NativeTextButton* button1 = new views::NativeTextButton(
138 NULL, ASCIIToWide(kButton1ASCII)); 144 NULL, ASCIIToWide(kButton1ASCII));
139 contents->AddChildView(button1); 145 contents->AddChildView(button1);
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 EXPECT_EQ(2, focus_event_count_); 187 EXPECT_EQ(2, focus_event_count_);
182 EXPECT_EQ(kButton3NewASCII, last_control_name_); 188 EXPECT_EQ(kButton3NewASCII, last_control_name_);
183 189
184 // Advance to button 1 and check the notification. 190 // Advance to button 1 and check the notification.
185 focus_manager->AdvanceFocus(false); 191 focus_manager->AdvanceFocus(false);
186 EXPECT_EQ(3, focus_event_count_); 192 EXPECT_EQ(3, focus_event_count_);
187 EXPECT_EQ(kButton1ASCII, last_control_name_); 193 EXPECT_EQ(kButton1ASCII, last_control_name_);
188 } 194 }
189 195
190 #endif // defined(TOOLKIT_VIEWS) 196 #endif // defined(TOOLKIT_VIEWS)
OLDNEW
« no previous file with comments | « chrome/browser/shell_integration_unittest.cc ('k') | chrome/browser/ui/views/bookmarks/bookmark_context_menu_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698