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/dom_ui/new_tab_ui.h" | 7 #include "chrome/browser/dom_ui/new_tab_ui.h" |
8 #include "chrome/browser/navigation_controller.h" | 8 #include "chrome/browser/navigation_controller.h" |
9 #include "chrome/browser/navigation_entry.h" | 9 #include "chrome/browser/navigation_entry.h" |
10 #include "chrome/browser/profile.h" | 10 #include "chrome/browser/profile.h" |
(...skipping 974 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
985 EXPECT_TRUE(tabstrip.empty()); | 985 EXPECT_TRUE(tabstrip.empty()); |
986 } | 986 } |
987 | 987 |
988 class TabStripDummyDelegate : public TabStripModelDelegate { | 988 class TabStripDummyDelegate : public TabStripModelDelegate { |
989 public: | 989 public: |
990 explicit TabStripDummyDelegate(TabContents* dummy) | 990 explicit TabStripDummyDelegate(TabContents* dummy) |
991 : dummy_contents_(dummy) {} | 991 : dummy_contents_(dummy) {} |
992 virtual ~TabStripDummyDelegate() {} | 992 virtual ~TabStripDummyDelegate() {} |
993 | 993 |
994 // Overridden from TabStripModelDelegate: | 994 // Overridden from TabStripModelDelegate: |
| 995 virtual GURL GetBlankTabURL() const { return GURL("about:blank"); } |
995 virtual void CreateNewStripWithContents(TabContents* contents, | 996 virtual void CreateNewStripWithContents(TabContents* contents, |
996 const gfx::Point& creation_point) {} | 997 const gfx::Point& creation_point) {} |
997 virtual int GetDragActions() const { return 0; } | 998 virtual int GetDragActions() const { return 0; } |
998 virtual TabContents* CreateTabContentsForURL( | 999 virtual TabContents* CreateTabContentsForURL( |
999 const GURL& url, | 1000 const GURL& url, |
1000 const GURL& referrer, | 1001 const GURL& referrer, |
1001 Profile* profile, | 1002 Profile* profile, |
1002 PageTransition::Type transition, | 1003 PageTransition::Type transition, |
1003 bool defer_load, | 1004 bool defer_load, |
1004 SiteInstance* instance) const { | 1005 SiteInstance* instance) const { |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1166 | 1167 |
1167 // Close the Tab. The next-adjacent should be selected. | 1168 // Close the Tab. The next-adjacent should be selected. |
1168 strip.CloseTabContentsAt(4); | 1169 strip.CloseTabContentsAt(4); |
1169 | 1170 |
1170 EXPECT_EQ(3, strip.selected_index()); | 1171 EXPECT_EQ(3, strip.selected_index()); |
1171 | 1172 |
1172 // Clean up. | 1173 // Clean up. |
1173 strip.CloseAllTabs(); | 1174 strip.CloseAllTabs(); |
1174 } | 1175 } |
1175 | 1176 |
OLD | NEW |