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

Side by Side Diff: chrome/browser/password_manager/password_generation_manager_unittest.cc

Issue 17127002: Correctly integrate StoragePartition into TestingProfile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments. merge to ToT. Murder a DB thread and more TestBrowserThreads. Created 7 years, 5 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 <vector> 5 #include <vector>
6 6
7 #include "base/prefs/pref_service.h" 7 #include "base/prefs/pref_service.h"
8 #include "chrome/browser/password_manager/password_generation_manager.h" 8 #include "chrome/browser/password_manager/password_generation_manager.h"
9 #include "chrome/browser/password_manager/password_manager.h" 9 #include "chrome/browser/password_manager/password_manager.h"
10 #include "chrome/browser/password_manager/password_manager_delegate_impl.h" 10 #include "chrome/browser/password_manager/password_manager_delegate_impl.h"
(...skipping 27 matching lines...) Expand all
38 private: 38 private:
39 std::vector<bool> sent_states_; 39 std::vector<bool> sent_states_;
40 40
41 DISALLOW_COPY_AND_ASSIGN(TestPasswordGenerationManager); 41 DISALLOW_COPY_AND_ASSIGN(TestPasswordGenerationManager);
42 }; 42 };
43 43
44 class PasswordGenerationManagerTest : public ChromeRenderViewHostTestHarness { 44 class PasswordGenerationManagerTest : public ChromeRenderViewHostTestHarness {
45 protected: 45 protected:
46 virtual void SetUp() OVERRIDE { 46 virtual void SetUp() OVERRIDE {
47 TestingProfile* profile = CreateProfile(); 47 TestingProfile* profile = CreateProfile();
48 profile->CreateRequestContext();
49 browser_context_.reset(profile); 48 browser_context_.reset(profile);
50 49
51 SetThreadBundleOptions(content::TestBrowserThreadBundle::REAL_IO_THREAD); 50 SetThreadBundleOptions(content::TestBrowserThreadBundle::REAL_IO_THREAD);
52 ChromeRenderViewHostTestHarness::SetUp(); 51 ChromeRenderViewHostTestHarness::SetUp();
53 52
54 password_generation_manager_.reset( 53 password_generation_manager_.reset(
55 new TestPasswordGenerationManager(web_contents())); 54 new TestPasswordGenerationManager(web_contents()));
56 } 55 }
57 56
58 virtual void TearDown() OVERRIDE { 57 virtual void TearDown() OVERRIDE {
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 prefs->SetBoolean(prefs::kSyncKeepEverythingSynced, false); 202 prefs->SetBoolean(prefs::kSyncKeepEverythingSynced, false);
204 // Always set password generation enabled check box so we can test the 203 // Always set password generation enabled check box so we can test the
205 // behavior of password sync. 204 // behavior of password sync.
206 prefs->SetBoolean(prefs::kPasswordGenerationEnabled, true); 205 prefs->SetBoolean(prefs::kPasswordGenerationEnabled, true);
207 206
208 browser_sync::SyncPrefs sync_prefs(profile()->GetPrefs()); 207 browser_sync::SyncPrefs sync_prefs(profile()->GetPrefs());
209 sync_prefs.SetSyncSetupCompleted(); 208 sync_prefs.SetSyncSetupCompleted();
210 UpdateState(false); 209 UpdateState(false);
211 EXPECT_EQ(0u, password_generation_manager_->GetSentStates().size()); 210 EXPECT_EQ(0u, password_generation_manager_->GetSentStates().size());
212 } 211 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698