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

Unified Diff: chrome/browser/ui/webui/bookmarks_ui_browsertest.cc

Issue 11419276: Remove tabstrip wrappers in browser_tabstrip. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: gtk Created 8 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/views/find_bar_host_interactive_uitest.cc ('k') | chrome/browser/ui/webui/feedback_ui.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/bookmarks_ui_browsertest.cc
diff --git a/chrome/browser/ui/webui/bookmarks_ui_browsertest.cc b/chrome/browser/ui/webui/bookmarks_ui_browsertest.cc
index aa22ba7b307f9ebe6ab98481e7799d9dc1bbdcf0..85cbf74c722ce690c24fd82f8b4eff2b3e559413 100644
--- a/chrome/browser/ui/webui/bookmarks_ui_browsertest.cc
+++ b/chrome/browser/ui/webui/bookmarks_ui_browsertest.cc
@@ -6,8 +6,8 @@
#include "base/test/test_timeouts.h"
#include "chrome/browser/ui/browser.h"
-#include "chrome/browser/ui/browser_tabstrip.h"
#include "chrome/browser/ui/chrome_pages.h"
+#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/common/url_constants.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
@@ -45,16 +45,16 @@ class BookmarksTest : public InProcessBrowserTest {
IN_PROC_BROWSER_TEST_F(BookmarksTest, ShouldRedirectToExtension) {
ui_test_utils::NavigateToURL(browser(), GURL(chrome::kChromeUIBookmarksURL));
- AssertIsBookmarksPage(chrome::GetActiveWebContents(browser()));
+ AssertIsBookmarksPage(browser()->tab_strip_model()->GetActiveWebContents());
}
IN_PROC_BROWSER_TEST_F(BookmarksTest, CommandOpensBookmarksTab) {
- ASSERT_EQ(1, browser()->tab_count());
+ ASSERT_EQ(1, browser()->tab_strip_model()->count());
// Bring up the bookmarks manager tab.
OpenBookmarksManager();
- ASSERT_EQ(1, browser()->tab_count());
- AssertIsBookmarksPage(chrome::GetActiveWebContents(browser()));
+ ASSERT_EQ(1, browser()->tab_strip_model()->count());
+ AssertIsBookmarksPage(browser()->tab_strip_model()->GetActiveWebContents());
}
// If this flakes on Mac, use: http://crbug.com/87200
@@ -63,21 +63,21 @@ IN_PROC_BROWSER_TEST_F(BookmarksTest, CommandAgainGoesBackToBookmarksTab) {
browser(),
ui_test_utils::GetTestUrl(FilePath(),
FilePath().AppendASCII("simple.html")));
- ASSERT_EQ(1, browser()->tab_count());
+ ASSERT_EQ(1, browser()->tab_strip_model()->count());
// Bring up the bookmarks manager tab.
OpenBookmarksManager();
- ASSERT_EQ(2, browser()->tab_count());
+ ASSERT_EQ(2, browser()->tab_strip_model()->count());
- AssertIsBookmarksPage(chrome::GetActiveWebContents(browser()));
+ AssertIsBookmarksPage(browser()->tab_strip_model()->GetActiveWebContents());
// Switch to first tab and run command again.
- chrome::ActivateTabAt(browser(), 0, true);
+ browser()->tab_strip_model()->ActivateTabAt(0, true);
chrome::ShowBookmarkManager(browser());
// Ensure the bookmarks ui tab is active.
- ASSERT_EQ(1, browser()->active_index());
- ASSERT_EQ(2, browser()->tab_count());
+ ASSERT_EQ(1, browser()->tab_strip_model()->active_index());
+ ASSERT_EQ(2, browser()->tab_strip_model()->count());
}
IN_PROC_BROWSER_TEST_F(BookmarksTest, TwoCommandsOneTab) {
@@ -92,6 +92,6 @@ IN_PROC_BROWSER_TEST_F(BookmarksTest, TwoCommandsOneTab) {
IN_PROC_BROWSER_TEST_F(BookmarksTest, BookmarksLoaded) {
ui_test_utils::NavigateToURL(browser(), GURL(chrome::kChromeUIBookmarksURL));
- ASSERT_EQ(1, browser()->tab_count());
- AssertIsBookmarksPage(chrome::GetActiveWebContents(browser()));
+ ASSERT_EQ(1, browser()->tab_strip_model()->count());
+ AssertIsBookmarksPage(browser()->tab_strip_model()->GetActiveWebContents());
}
« no previous file with comments | « chrome/browser/ui/views/find_bar_host_interactive_uitest.cc ('k') | chrome/browser/ui/webui/feedback_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698