diff options
author | brg@chromium.com <brg@chromium.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-29 09:11:44 +0000 |
---|---|---|
committer | brg@chromium.com <brg@chromium.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-29 09:11:44 +0000 |
commit | 345a8b7973e6693d115d20573f7cef17e4525cb3 (patch) | |
tree | 2a77dcf7842d660688a9775569f1adee43a82184 /chrome/browser/tab_contents | |
parent | 2c365900efc2d9aeba3df9c7f5afd1e45d9b530d (diff) | |
download | chromium_src-345a8b7973e6693d115d20573f7cef17e4525cb3.zip chromium_src-345a8b7973e6693d115d20573f7cef17e4525cb3.tar.gz chromium_src-345a8b7973e6693d115d20573f7cef17e4525cb3.tar.bz2 |
Remove the enable-sync flag from the Chrome command line and enable sync by default.
BUG=none
Test=Sync my bookmarks should be enabled by default.
Review URL: http://codereview.chromium.org/248024
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27472 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tab_contents')
-rw-r--r-- | chrome/browser/tab_contents/render_view_host_manager_unittest.cc | 11 | ||||
-rw-r--r-- | chrome/browser/tab_contents/web_contents_unittest.cc | 4 |
2 files changed, 15 insertions, 0 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 556b8bf..e75a4bb 100644 --- a/chrome/browser/tab_contents/render_view_host_manager_unittest.cc +++ b/chrome/browser/tab_contents/render_view_host_manager_unittest.cc @@ -15,6 +15,10 @@ 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. @@ -34,6 +38,9 @@ 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); @@ -87,6 +94,8 @@ 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( @@ -227,6 +236,8 @@ 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 */, diff --git a/chrome/browser/tab_contents/web_contents_unittest.cc b/chrome/browser/tab_contents/web_contents_unittest.cc index c7e089c..ef1de03 100644 --- a/chrome/browser/tab_contents/web_contents_unittest.cc +++ b/chrome/browser/tab_contents/web_contents_unittest.cc @@ -222,6 +222,10 @@ TEST_F(TabContentsTest, NTPViewSource) { const GURL kGURL(kUrl); process()->sink().ClearMessages(); + + // The sync service must be created to host the sync NTP advertisement. + profile_->CreateProfileSyncService(); + controller().LoadURL(kGURL, GURL(), PageTransition::TYPED); rvh()->delegate()->RenderViewCreated(rvh()); // Did we get the expected message? |