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

Unified Diff: chrome/browser/sync/test/integration/sync_test.cc

Issue 12066003: Remove TabStripModel wrapper use. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: gtk Created 7 years, 11 months 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
Index: chrome/browser/sync/test/integration/sync_test.cc
diff --git a/chrome/browser/sync/test/integration/sync_test.cc b/chrome/browser/sync/test/integration/sync_test.cc
index a0e015cf8adc018fef7420070894395db462112d..d050886bebedd229318e1312518167a25459e6cd 100644
--- a/chrome/browser/sync/test/integration/sync_test.cc
+++ b/chrome/browser/sync/test/integration/sync_test.cc
@@ -32,7 +32,7 @@
#include "chrome/browser/sync/test/integration/sync_datatype_helper.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_list.h"
-#include "chrome/browser/ui/browser_tabstrip.h"
+#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/test/base/testing_browser_process.h"
@@ -650,7 +650,8 @@ void SyncTest::DisableNotificationsImpl() {
std::string path = "chromiumsync/disablenotifications";
ui_test_utils::NavigateToURL(browser(), sync_server_.GetURL(path));
ASSERT_EQ("Notifications disabled",
- UTF16ToASCII(chrome::GetActiveWebContents(browser())->GetTitle()));
+ UTF16ToASCII(browser()->tab_strip_model()->GetActiveWebContents()->
+ GetTitle()));
}
void SyncTest::DisableNotifications() {
@@ -663,7 +664,8 @@ void SyncTest::EnableNotificationsImpl() {
std::string path = "chromiumsync/enablenotifications";
ui_test_utils::NavigateToURL(browser(), sync_server_.GetURL(path));
ASSERT_EQ("Notifications enabled",
- UTF16ToASCII(chrome::GetActiveWebContents(browser())->GetTitle()));
+ UTF16ToASCII(browser()->tab_strip_model()->GetActiveWebContents()->
+ GetTitle()));
}
void SyncTest::EnableNotifications() {
@@ -685,7 +687,8 @@ void SyncTest::TriggerNotification(syncer::ModelTypeSet changed_types) {
syncer::kSyncP2PNotificationChannel + "&data=" + data;
ui_test_utils::NavigateToURL(browser(), sync_server_.GetURL(path));
ASSERT_EQ("Notification sent",
- UTF16ToASCII(chrome::GetActiveWebContents(browser())->GetTitle()));
+ UTF16ToASCII(browser()->tab_strip_model()->GetActiveWebContents()->
+ GetTitle()));
}
bool SyncTest::ServerSupportsErrorTriggering() const {
@@ -709,7 +712,8 @@ void SyncTest::TriggerMigrationDoneError(syncer::ModelTypeSet model_types) {
}
ui_test_utils::NavigateToURL(browser(), sync_server_.GetURL(path));
ASSERT_EQ("Migration: 200",
- UTF16ToASCII(chrome::GetActiveWebContents(browser())->GetTitle()));
+ UTF16ToASCII(browser()->tab_strip_model()->GetActiveWebContents()->
+ GetTitle()));
}
void SyncTest::TriggerBirthdayError() {
@@ -717,7 +721,8 @@ void SyncTest::TriggerBirthdayError() {
std::string path = "chromiumsync/birthdayerror";
ui_test_utils::NavigateToURL(browser(), sync_server_.GetURL(path));
ASSERT_EQ("Birthday error",
- UTF16ToASCII(chrome::GetActiveWebContents(browser())->GetTitle()));
+ UTF16ToASCII(browser()->tab_strip_model()->GetActiveWebContents()->
+ GetTitle()));
}
void SyncTest::TriggerTransientError() {
@@ -725,7 +730,8 @@ void SyncTest::TriggerTransientError() {
std::string path = "chromiumsync/transienterror";
ui_test_utils::NavigateToURL(browser(), sync_server_.GetURL(path));
ASSERT_EQ("Transient error",
- UTF16ToASCII(chrome::GetActiveWebContents(browser())->GetTitle()));
+ UTF16ToASCII(browser()->tab_strip_model()->GetActiveWebContents()->
+ GetTitle()));
}
void SyncTest::TriggerAuthError() {
@@ -809,7 +815,7 @@ void SyncTest::TriggerSyncError(const syncer::SyncProtocolError& error,
ui_test_utils::NavigateToURL(browser(), sync_server_.GetURL(path));
std::string output = UTF16ToASCII(
- chrome::GetActiveWebContents(browser())->GetTitle());
+ browser()->tab_strip_model()->GetActiveWebContents()->GetTitle());
ASSERT_TRUE(output.find("SetError: 200") != string16::npos);
}
@@ -818,7 +824,8 @@ void SyncTest::TriggerCreateSyncedBookmarks() {
std::string path = "chromiumsync/createsyncedbookmarks";
ui_test_utils::NavigateToURL(browser(), sync_server_.GetURL(path));
ASSERT_EQ("Synced Bookmarks",
- UTF16ToASCII(chrome::GetActiveWebContents(browser())->GetTitle()));
+ UTF16ToASCII(browser()->tab_strip_model()->GetActiveWebContents()->
+ GetTitle()));
}
int SyncTest::NumberOfDefaultSyncItems() const {
« no previous file with comments | « chrome/browser/ssl/ssl_browser_tests.cc ('k') | chrome/browser/tab_contents/render_view_context_menu_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698