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

Side by Side Diff: ui/views/controls/tabbed_pane/tabbed_pane_unittest.cc

Issue 2368283002: views: add focus to TabbedPane (Closed)
Patch Set: rework focus tests a bit Created 4 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
OLDNEW
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 "ui/views/controls/tabbed_pane/tabbed_pane.h" 5 #include "ui/views/controls/tabbed_pane/tabbed_pane.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 80
81 // Select each tab. 81 // Select each tab.
82 for (int i = 0; i < tabbed_pane->GetTabCount(); ++i) { 82 for (int i = 0; i < tabbed_pane->GetTabCount(); ++i) {
83 tabbed_pane->SelectTabAt(i); 83 tabbed_pane->SelectTabAt(i);
84 EXPECT_EQ(i, tabbed_pane->selected_tab_index()); 84 EXPECT_EQ(i, tabbed_pane->selected_tab_index());
85 } 85 }
86 86
87 // Add a tab at index 0, it should not be selected automatically. 87 // Add a tab at index 0, it should not be selected automatically.
88 View* tab0 = new View(); 88 View* tab0 = new View();
89 tabbed_pane->AddTabAtIndex(0, ASCIIToUTF16("tab0"), tab0); 89 tabbed_pane->AddTabAtIndex(0, ASCIIToUTF16("tab0"), tab0);
90 EXPECT_NE(tab0, tabbed_pane->GetSelectedTab()); 90 EXPECT_NE(tab0, tabbed_pane->GetSelectedTabViewForTesting());
91 EXPECT_NE(0, tabbed_pane->selected_tab_index()); 91 EXPECT_NE(0, tabbed_pane->selected_tab_index());
92 } 92 }
93 93
94 } // namespace 94 } // namespace
95 95
96 } // namespace views 96 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698