summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorbrg@chromium.com <brg@chromium.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-29 23:00:41 +0000
committerbrg@chromium.com <brg@chromium.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-29 23:00:41 +0000
commitb633d4e66319380b4df59285926711d3663d9bfc (patch)
treeddee37417bdb599616030e29ebf77506d496d1f4 /chrome
parent848e64682823148b5e3f246a822da494a6bc99f8 (diff)
downloadchromium_src-b633d4e66319380b4df59285926711d3663d9bfc.zip
chromium_src-b633d4e66319380b4df59285926711d3663d9bfc.tar.gz
chromium_src-b633d4e66319380b4df59285926711d3663d9bfc.tar.bz2
Cleanup some code in the render_view_host_manager unittest.
The initialization of the ProfileSyncService was being called twice in one test. Test=RenderViewHostManagerTest in unittests Bug=none Review URL: http://codereview.chromium.org/248036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27556 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/tab_contents/render_view_host_manager_unittest.cc7
1 files changed, 3 insertions, 4 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 e75a4bb..318be7d 100644
--- a/chrome/browser/tab_contents/render_view_host_manager_unittest.cc
+++ b/chrome/browser/tab_contents/render_view_host_manager_unittest.cc
@@ -15,10 +15,6 @@
class RenderViewHostManagerTest : public RenderViewHostTestHarness {
public:
void NavigateActiveAndCommit(const GURL& url) {
- // Navigating to an empty URL opens the NTP. The sync service must be
- // created to host the sync advertisement.
- profile_->CreateProfileSyncService();
-
// Note: we navigate the active RenderViewHost because previous navigations
// won't have committed yet, so NavigateAndCommit does the wrong thing
// for us.
@@ -85,6 +81,9 @@ 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