summaryrefslogtreecommitdiffstats
path: root/chrome/browser/tab_contents/render_view_host_manager_unittest.cc
diff options
context:
space:
mode:
authorskrul@chromium.org <skrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-30 17:45:46 +0000
committerskrul@chromium.org <skrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-30 17:45:46 +0000
commit4772b07c4021b482abb25babd8a8da2ed526f9e4 (patch)
tree7b70f6838df1cb15522dc5e2392863fa8336a0e5 /chrome/browser/tab_contents/render_view_host_manager_unittest.cc
parentd7b4ad3d7900f0c9f6081e9ae57a2bde4d26381b (diff)
downloadchromium_src-4772b07c4021b482abb25babd8a8da2ed526f9e4.zip
chromium_src-4772b07c4021b482abb25babd8a8da2ed526f9e4.tar.gz
chromium_src-4772b07c4021b482abb25babd8a8da2ed526f9e4.tar.bz2
Fix sync leaks and some more good stuff.
This is a continuation of zork's change http://codereview.chromium.org/1354001 that adds some preventitive DCHECKs througout the sync code to make sure stuff happens on the UI thread. This also includes a leak fix in the ProfileSyncServiceTypedUrlTest. The final change is changing the TestingProfile to return a ProfileSyncServiceMock rather than a real ProfileSyncService. This should help prevent random test failes due to other tests that need to use the PSS. BUG=38490,38487 Review URL: http://codereview.chromium.org/1383002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43102 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tab_contents/render_view_host_manager_unittest.cc')
-rw-r--r--chrome/browser/tab_contents/render_view_host_manager_unittest.cc10
1 files changed, 0 insertions, 10 deletions
diff --git a/chrome/browser/tab_contents/render_view_host_manager_unittest.cc b/chrome/browser/tab_contents/render_view_host_manager_unittest.cc
index 6e2c9cd..668406d 100644
--- a/chrome/browser/tab_contents/render_view_host_manager_unittest.cc
+++ b/chrome/browser/tab_contents/render_view_host_manager_unittest.cc
@@ -35,9 +35,6 @@ TEST_F(RenderViewHostManagerTest, NewTabPageProcesses) {
GURL ntp(chrome::kChromeUINewTabURL);
GURL dest("http://www.google.com/");
- // The sync service must be created to host the sync NTP advertisement.
- profile_->CreateProfileSyncService();
-
// Navigate our first tab to the new tab page and then to the destination.
NavigateActiveAndCommit(ntp);
NavigateActiveAndCommit(dest);
@@ -83,9 +80,6 @@ TEST_F(RenderViewHostManagerTest, AlwaysSendEnableViewSourceMode) {
const GURL kNtpUrl(chrome::kChromeUINewTabURL);
const GURL kUrl("view-source:http://foo");
- // The sync service must be created to host the sync NTP advertisement.
- profile_->CreateProfileSyncService();
-
// We have to navigate to some page at first since without this, the first
// navigation will reuse the SiteInstance created by Init(), and the second
// one will create a new SiteInstance. Because current_instance and
@@ -95,8 +89,6 @@ TEST_F(RenderViewHostManagerTest, AlwaysSendEnableViewSourceMode) {
NavigateActiveAndCommit(kNtpUrl);
// Navigate.
- // The sync service must be available to show the NTP sync advertisement.
- profile_->CreateProfileSyncService();
controller().LoadURL(kUrl, GURL() /* referer */, PageTransition::TYPED);
// Simulate response from RenderView for FirePageBeforeUnload.
rvh()->TestOnMessageReceived(
@@ -238,8 +230,6 @@ TEST_F(RenderViewHostManagerTest, DOMUI) {
manager.Init(profile_.get(), instance, MSG_ROUTING_NONE);
- // The sync service must be created to host the sync advertisement on the NTP.
- profile_->CreateProfileSyncService();
GURL url("chrome://newtab");
NavigationEntry entry(NULL /* instance */, -1 /* page_id */, url,
GURL() /* referrer */, string16() /* title */,