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

Side by Side Diff: chrome/browser/ui/webui/sync_setup_handler_unittest.cc

Issue 9703038: Profiles: Really fix refcounted services. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Forgot to save a file. >_< Created 8 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/tabs/pinned_tab_service_unittest.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/webui/sync_setup_handler.h" 5 #include "chrome/browser/ui/webui/sync_setup_handler.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 username_.clear(); 113 username_.clear();
114 password_.clear(); 114 password_.clear();
115 captcha_.clear(); 115 captcha_.clear();
116 } 116 }
117 117
118 std::string username_; 118 std::string username_;
119 std::string password_; 119 std::string password_;
120 std::string captcha_; 120 std::string captcha_;
121 }; 121 };
122 122
123 static ProfileKeyedBase* BuildSigninManagerMock(Profile* profile) { 123 static ProfileKeyedService* BuildSigninManagerMock(Profile* profile) {
124 return new SigninManagerMock(); 124 return new SigninManagerMock();
125 } 125 }
126 126
127 class SyncSetupHandlerTest : public testing::Test { 127 class SyncSetupHandlerTest : public testing::Test {
128 public: 128 public:
129 SyncSetupHandlerTest() {} 129 SyncSetupHandlerTest() {}
130 virtual void SetUp() OVERRIDE { 130 virtual void SetUp() OVERRIDE {
131 profile_.reset(ProfileSyncServiceMock::MakeSignedInTestingProfile()); 131 profile_.reset(ProfileSyncServiceMock::MakeSignedInTestingProfile());
132 mock_pss_ = static_cast<ProfileSyncServiceMock*>( 132 mock_pss_ = static_cast<ProfileSyncServiceMock*>(
133 ProfileSyncServiceFactory::GetInstance()->SetTestingFactoryAndUse( 133 ProfileSyncServiceFactory::GetInstance()->SetTestingFactoryAndUse(
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 std::string page; 378 std::string page;
379 ASSERT_TRUE(data.arg1->GetAsString(&page)); 379 ASSERT_TRUE(data.arg1->GetAsString(&page));
380 EXPECT_EQ(page, "login"); 380 EXPECT_EQ(page, "login");
381 // Now make sure that the appropriate params are being passed. 381 // Now make sure that the appropriate params are being passed.
382 DictionaryValue* dictionary; 382 DictionaryValue* dictionary;
383 ASSERT_TRUE(data.arg2->GetAsDictionary(&dictionary)); 383 ASSERT_TRUE(data.arg2->GetAsDictionary(&dictionary));
384 CheckShowSyncSetupArgs( 384 CheckShowSyncSetupArgs(
385 dictionary, "", false, GoogleServiceAuthError::SERVICE_UNAVAILABLE, 385 dictionary, "", false, GoogleServiceAuthError::SERVICE_UNAVAILABLE,
386 kTestUser, true, ""); 386 kTestUser, true, "");
387 } 387 }
OLDNEW
« no previous file with comments | « chrome/browser/tabs/pinned_tab_service_unittest.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698