| 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 "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 Loading... |
| 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 |
| OLD | NEW |