OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "base/file_util.h" | 5 #include "base/file_util.h" |
6 #include "base/path_service.h" | 6 #include "base/path_service.h" |
7 #include "chrome/browser/dock_info.h" | 7 #include "chrome/browser/dock_info.h" |
8 #include "chrome/browser/dom_ui/new_tab_ui.h" | 8 #include "chrome/browser/dom_ui/new_tab_ui.h" |
9 #include "chrome/browser/profile.h" | 9 #include "chrome/browser/profile.h" |
10 #include "chrome/browser/profile_manager.h" | 10 #include "chrome/browser/profile_manager.h" |
(...skipping 773 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
784 | 784 |
785 TabContents* dummy_contents = CreateTabContents(); | 785 TabContents* dummy_contents = CreateTabContents(); |
786 tabstrip.AppendTabContents(dummy_contents, false); | 786 tabstrip.AppendTabContents(dummy_contents, false); |
787 | 787 |
788 contents1 = CreateTabContents(); | 788 contents1 = CreateTabContents(); |
789 contents2 = CreateTabContents(); | 789 contents2 = CreateTabContents(); |
790 contents3 = CreateTabContents(); | 790 contents3 = CreateTabContents(); |
791 InsertTabContentses(&tabstrip, contents1, contents2, contents3); | 791 InsertTabContentses(&tabstrip, contents1, contents2, contents3); |
792 EXPECT_EQ(5, tabstrip.count()); | 792 EXPECT_EQ(5, tabstrip.count()); |
793 | 793 |
794 tabstrip.ExecuteContextMenuCommand(0, TabStripModel::CommandCloseTabsOpenedBy)
; | 794 tabstrip.ExecuteContextMenuCommand(0, |
| 795 TabStripModel::CommandCloseTabsOpenedBy); |
795 EXPECT_EQ(2, tabstrip.count()); | 796 EXPECT_EQ(2, tabstrip.count()); |
796 EXPECT_EQ(dummy_contents, tabstrip.GetTabContentsAt(1)); | 797 EXPECT_EQ(dummy_contents, tabstrip.GetTabContentsAt(1)); |
797 | 798 |
798 contents1 = CreateTabContents(); | 799 contents1 = CreateTabContents(); |
799 contents2 = CreateTabContents(); | 800 contents2 = CreateTabContents(); |
800 contents3 = CreateTabContents(); | 801 contents3 = CreateTabContents(); |
801 InsertTabContentses(&tabstrip, contents1, contents2, contents3); | 802 InsertTabContentses(&tabstrip, contents1, contents2, contents3); |
802 EXPECT_EQ(5, tabstrip.count()); | 803 EXPECT_EQ(5, tabstrip.count()); |
803 | 804 |
804 int dummy_index = tabstrip.count() - 1; | 805 int dummy_index = tabstrip.count() - 1; |
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1283 // Now select the last tab. | 1284 // Now select the last tab. |
1284 strip.SelectTabContentsAt(strip.count() - 1, true); | 1285 strip.SelectTabContentsAt(strip.count() - 1, true); |
1285 | 1286 |
1286 // Now close the last tab. The next adjacent should be selected. | 1287 // Now close the last tab. The next adjacent should be selected. |
1287 strip.CloseTabContentsAt(strip.count() - 1); | 1288 strip.CloseTabContentsAt(strip.count() - 1); |
1288 EXPECT_EQ(page_d_contents, strip.GetTabContentsAt(strip.selected_index())); | 1289 EXPECT_EQ(page_d_contents, strip.GetTabContentsAt(strip.selected_index())); |
1289 | 1290 |
1290 strip.CloseAllTabs(); | 1291 strip.CloseAllTabs(); |
1291 } | 1292 } |
1292 | 1293 |
OLD | NEW |