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 "base/stl_util-inl.h" | 7 #include "base/stl_util-inl.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" |
11 #include "chrome/browser/renderer_host/test_render_view_host.h" | 11 #include "chrome/browser/renderer_host/test/test_render_view_host.h" |
12 #include "chrome/browser/tab_contents/navigation_controller.h" | 12 #include "chrome/browser/tab_contents/navigation_controller.h" |
13 #include "chrome/browser/tab_contents/navigation_entry.h" | 13 #include "chrome/browser/tab_contents/navigation_entry.h" |
14 #include "chrome/browser/tab_contents/tab_contents.h" | 14 #include "chrome/browser/tab_contents/tab_contents.h" |
15 #include "chrome/browser/tabs/tab_strip_model.h" | 15 #include "chrome/browser/tabs/tab_strip_model.h" |
16 #include "chrome/browser/tabs/tab_strip_model_order_controller.h" | 16 #include "chrome/browser/tabs/tab_strip_model_order_controller.h" |
17 #include "chrome/common/pref_names.h" | 17 #include "chrome/common/pref_names.h" |
18 #include "chrome/common/url_constants.h" | 18 #include "chrome/common/url_constants.h" |
19 #include "testing/gtest/include/gtest/gtest.h" | 19 #include "testing/gtest/include/gtest/gtest.h" |
20 | 20 |
21 class TabStripDummyDelegate : public TabStripModelDelegate { | 21 class TabStripDummyDelegate : public TabStripModelDelegate { |
(...skipping 1177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1199 | 1199 |
1200 // Now select the last tab. | 1200 // Now select the last tab. |
1201 strip.SelectTabContentsAt(strip.count() - 1, true); | 1201 strip.SelectTabContentsAt(strip.count() - 1, true); |
1202 | 1202 |
1203 // Now close the last tab. The next adjacent should be selected. | 1203 // Now close the last tab. The next adjacent should be selected. |
1204 strip.CloseTabContentsAt(strip.count() - 1); | 1204 strip.CloseTabContentsAt(strip.count() - 1); |
1205 EXPECT_EQ(page_d_contents, strip.GetTabContentsAt(strip.selected_index())); | 1205 EXPECT_EQ(page_d_contents, strip.GetTabContentsAt(strip.selected_index())); |
1206 | 1206 |
1207 strip.CloseAllTabs(); | 1207 strip.CloseAllTabs(); |
1208 } | 1208 } |
OLD | NEW |