Home | History | Annotate | Download | only in browser

Lines Matching refs:profile

32   const DictionaryValue* GetPrefs(Profile* profile) {
33 return profile->GetPrefs()->GetDictionary(
37 void ClearPrefs(Profile* profile) {
38 profile->GetPrefs()->ClearPref(prefs::kRegisteredBackgroundContents);
42 std::string GetPrefURLForApp(Profile* profile, const string16& appid) {
43 const DictionaryValue* pref = GetPrefs(profile);
57 explicit MockBackgroundContents(Profile* profile)
59 profile_(profile) {
61 MockBackgroundContents(Profile* profile, const std::string& id)
63 profile_(profile) {
77 Source<Profile>(profile_),
82 void MockClose(Profile* profile) {
85 Source<Profile>(profile),
93 Source<Profile>(profile_),
105 // Parent profile
106 Profile* profile_;
111 TestingProfile profile;
112 BackgroundContentsService service(&profile, command_line_.get());
116 TestingProfile profile;
117 BackgroundContentsService service(&profile, command_line_.get());
118 MockBackgroundContents* contents = new MockBackgroundContents(&profile);
127 TestingProfile profile;
128 ClearPrefs(&profile);
129 BackgroundContentsService service(&profile, command_line_.get());
135 new MockBackgroundContents(&profile));
136 EXPECT_EQ(0U, GetPrefs(&profile)->size());
140 EXPECT_EQ(1U, GetPrefs(&profile)->size());
141 EXPECT_EQ(url.spec(), GetPrefURLForApp(&profile, contents->appid()));
145 EXPECT_EQ(1U, GetPrefs(&profile)->size());
146 EXPECT_EQ(url.spec(), GetPrefURLForApp(&profile, contents->appid()));
149 EXPECT_EQ(1U, GetPrefs(&profile)->size());
153 TestingProfile profile;
154 ClearPrefs(&profile);
155 BackgroundContentsService service(&profile, command_line_.get());
157 MockBackgroundContents* contents = new MockBackgroundContents(&profile);
158 EXPECT_EQ(0U, GetPrefs(&profile)->size());
161 EXPECT_EQ(1U, GetPrefs(&profile)->size());
162 EXPECT_EQ(url.spec(), GetPrefURLForApp(&profile, contents->appid()));
165 contents->MockClose(&profile);
166 EXPECT_EQ(0U, GetPrefs(&profile)->size());
172 TestingProfile profile;
173 ClearPrefs(&profile);
174 BackgroundContentsService service(&profile, command_line_.get());
178 &profile, "appid"));
181 EXPECT_EQ(1U, GetPrefs(&profile)->size());
182 EXPECT_EQ(url.spec(), GetPrefURLForApp(&profile, contents->appid()));
185 EXPECT_EQ(1U, GetPrefs(&profile)->size());
191 &profile, "appid"));
194 EXPECT_EQ(1U, GetPrefs(&profile)->size());
202 TestingProfile profile;
203 BackgroundContentsService service(&profile, command_line_.get());
204 ClearPrefs(&profile);
207 MockBackgroundContents* contents = new MockBackgroundContents(&profile,
210 new MockBackgroundContents(&profile, "appid2"));
216 EXPECT_EQ(0U, GetPrefs(&profile)->size());
223 EXPECT_EQ(1U, GetPrefs(&profile)->size());
225 EXPECT_EQ(2U, GetPrefs(&profile)->size());
229 EXPECT_EQ(1U, GetPrefs(&profile)->size());
230 EXPECT_EQ(url2.spec(), GetPrefURLForApp(&profile, contents2->appid()));