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

Unified Diff: views/focus/focus_manager_unittest.cc

Issue 125062: Fix reversed focus traversal order issue. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « views/focus/focus_manager.cc ('k') | views/widget/root_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/focus/focus_manager_unittest.cc
===================================================================
--- views/focus/focus_manager_unittest.cc (revision 18328)
+++ views/focus/focus_manager_unittest.cc (working copy)
@@ -892,21 +892,9 @@
// Let's traverse in reverse order.
for (int i = 0; i < 3; ++i) {
for (int j = arraysize(kTraversalIDs) - 1; j >= 0; --j) {
- // TODO(jcampan): Remove this hack. The reverse order of traversal in
- // Tabbed Panes is broken (we go to the tab before going to the content).
- if (kTraversalIDs[j] == kStyleContainerID)
- j--; // Ignore the tab.
-
GetFocusManager()->AdvanceFocus(true);
View* focused_view = GetFocusManager()->GetFocusedView();
EXPECT_TRUE(focused_view != NULL);
-
- // TODO(jcampan): Remove this hack, same as above.
- if (focused_view->GetID() == kStyleContainerID) {
- j++; // Ignore the tab.
- continue;
- }
-
if (focused_view)
EXPECT_EQ(kTraversalIDs[j], focused_view->GetID());
}
@@ -963,21 +951,9 @@
// Same thing in reverse.
for (int i = 0; i < 3; ++i) {
for (int j = arraysize(kTraversalIDs) - 1; j >= 0; --j) {
- // TODO(jcampan): Remove this hack. The reverse order of traversal in
- // Tabbed Panes is broken (we go to the tab before going to the content).
- if (kTraversalIDs[j] == kStyleContainerID)
- j--; // Ignore the tab.
-
GetFocusManager()->AdvanceFocus(true);
focused_view = GetFocusManager()->GetFocusedView();
EXPECT_TRUE(focused_view != NULL);
-
- // TODO(jcampan): Remove this hack, same as above.
- if (focused_view->GetID() == kStyleContainerID) {
- j++; // Ignore the tab.
- continue;
- }
-
if (focused_view)
EXPECT_EQ(kTraversalIDs[j], focused_view->GetID());
}
« no previous file with comments | « views/focus/focus_manager.cc ('k') | views/widget/root_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698