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

Side by Side Diff: chrome/browser/content_settings/content_settings_pref_provider_unittest.cc

Issue 8539004: Replace SetContentSetting method of the content_settings::Provider interface with GetWebsiteSetting (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: " Created 9 years, 1 month 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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/content_settings/content_settings_pref_provider.h" 5 #include "chrome/browser/content_settings/content_settings_pref_provider.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/threading/platform_thread.h" 10 #include "base/threading/platform_thread.h"
11 #include "base/values.h"
11 #include "chrome/browser/content_settings/content_settings_mock_observer.h" 12 #include "chrome/browser/content_settings/content_settings_mock_observer.h"
12 #include "chrome/browser/content_settings/content_settings_utils.h" 13 #include "chrome/browser/content_settings/content_settings_utils.h"
13 #include "chrome/browser/prefs/browser_prefs.h" 14 #include "chrome/browser/prefs/browser_prefs.h"
14 #include "chrome/browser/prefs/default_pref_store.h" 15 #include "chrome/browser/prefs/default_pref_store.h"
15 #include "chrome/browser/prefs/incognito_user_pref_store.h" 16 #include "chrome/browser/prefs/incognito_user_pref_store.h"
16 #include "chrome/browser/prefs/pref_change_registrar.h" 17 #include "chrome/browser/prefs/pref_change_registrar.h"
17 #include "chrome/browser/prefs/pref_service.h" 18 #include "chrome/browser/prefs/pref_service.h"
18 #include "chrome/browser/prefs/pref_service_mock_builder.h" 19 #include "chrome/browser/prefs/pref_service_mock_builder.h"
19 #include "chrome/browser/prefs/scoped_user_pref_update.h" 20 #include "chrome/browser/prefs/scoped_user_pref_update.h"
20 #include "chrome/browser/prefs/testing_pref_store.h" 21 #include "chrome/browser/prefs/testing_pref_store.h"
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 ContentSettingsPattern::FromString("[*.]example.com"); 136 ContentSettingsPattern::FromString("[*.]example.com");
136 content_settings::MockObserver mock_observer; 137 content_settings::MockObserver mock_observer;
137 EXPECT_CALL(mock_observer, 138 EXPECT_CALL(mock_observer,
138 OnContentSettingChanged(pattern, 139 OnContentSettingChanged(pattern,
139 ContentSettingsPattern::Wildcard(), 140 ContentSettingsPattern::Wildcard(),
140 CONTENT_SETTINGS_TYPE_IMAGES, 141 CONTENT_SETTINGS_TYPE_IMAGES,
141 "")); 142 ""));
142 143
143 pref_content_settings_provider.AddObserver(&mock_observer); 144 pref_content_settings_provider.AddObserver(&mock_observer);
144 145
145 pref_content_settings_provider.SetContentSetting( 146 pref_content_settings_provider.SetWebsiteSetting(
146 pattern, 147 pattern,
147 ContentSettingsPattern::Wildcard(), 148 ContentSettingsPattern::Wildcard(),
148 CONTENT_SETTINGS_TYPE_IMAGES, 149 CONTENT_SETTINGS_TYPE_IMAGES,
149 "", 150 "",
150 CONTENT_SETTING_ALLOW); 151 Value::CreateIntegerValue(CONTENT_SETTING_ALLOW));
151 152
152 pref_content_settings_provider.ShutdownOnUIThread(); 153 pref_content_settings_provider.ShutdownOnUIThread();
153 } 154 }
154 155
155 // Test for regression in which the PrefProvider modified the user pref store 156 // Test for regression in which the PrefProvider modified the user pref store
156 // of the OTR unintentionally: http://crbug.com/74466. 157 // of the OTR unintentionally: http://crbug.com/74466.
157 TEST_F(PrefProviderTest, Incognito) { 158 TEST_F(PrefProviderTest, Incognito) {
158 PersistentPrefStore* user_prefs = new TestingPrefStore(); 159 PersistentPrefStore* user_prefs = new TestingPrefStore();
159 IncognitoUserPrefStore* otr_user_prefs = 160 IncognitoUserPrefStore* otr_user_prefs =
160 new IncognitoUserPrefStore(user_prefs); 161 new IncognitoUserPrefStore(user_prefs);
(...skipping 13 matching lines...) Expand all
174 TestingProfile* otr_profile = new TestingProfile; 175 TestingProfile* otr_profile = new TestingProfile;
175 profile.SetOffTheRecordProfile(otr_profile); 176 profile.SetOffTheRecordProfile(otr_profile);
176 profile.SetPrefService(regular_prefs); 177 profile.SetPrefService(regular_prefs);
177 otr_profile->set_incognito(true); 178 otr_profile->set_incognito(true);
178 otr_profile->SetPrefService(otr_prefs); 179 otr_profile->SetPrefService(otr_prefs);
179 180
180 PrefProvider pref_content_settings_provider(regular_prefs, false); 181 PrefProvider pref_content_settings_provider(regular_prefs, false);
181 PrefProvider pref_content_settings_provider_incognito(otr_prefs, true); 182 PrefProvider pref_content_settings_provider_incognito(otr_prefs, true);
182 ContentSettingsPattern pattern = 183 ContentSettingsPattern pattern =
183 ContentSettingsPattern::FromString("[*.]example.com"); 184 ContentSettingsPattern::FromString("[*.]example.com");
184 pref_content_settings_provider.SetContentSetting( 185 pref_content_settings_provider.SetWebsiteSetting(
185 pattern, 186 pattern,
186 pattern, 187 pattern,
187 CONTENT_SETTINGS_TYPE_IMAGES, 188 CONTENT_SETTINGS_TYPE_IMAGES,
188 "", 189 "",
189 CONTENT_SETTING_ALLOW); 190 Value::CreateIntegerValue(CONTENT_SETTING_ALLOW));
190 191
191 GURL host("http://example.com/"); 192 GURL host("http://example.com/");
192 // The value should of course be visible in the regular PrefProvider. 193 // The value should of course be visible in the regular PrefProvider.
193 EXPECT_EQ(CONTENT_SETTING_ALLOW, 194 EXPECT_EQ(CONTENT_SETTING_ALLOW,
194 GetContentSetting( 195 GetContentSetting(
195 &pref_content_settings_provider, 196 &pref_content_settings_provider,
196 host, host, CONTENT_SETTINGS_TYPE_IMAGES, "", false)); 197 host, host, CONTENT_SETTINGS_TYPE_IMAGES, "", false));
197 // And also in the OTR version. 198 // And also in the OTR version.
198 EXPECT_EQ(CONTENT_SETTING_ALLOW, 199 EXPECT_EQ(CONTENT_SETTING_ALLOW,
199 GetContentSetting( 200 GetContentSetting(
(...skipping 16 matching lines...) Expand all
216 217
217 EXPECT_EQ(CONTENT_SETTING_DEFAULT, 218 EXPECT_EQ(CONTENT_SETTING_DEFAULT,
218 GetContentSetting(&provider, primary_url, primary_url, 219 GetContentSetting(&provider, primary_url, primary_url,
219 CONTENT_SETTINGS_TYPE_IMAGES, "", false)); 220 CONTENT_SETTINGS_TYPE_IMAGES, "", false));
220 221
221 EXPECT_EQ(NULL, 222 EXPECT_EQ(NULL,
222 GetContentSettingValue( 223 GetContentSettingValue(
223 &provider, primary_url, primary_url, 224 &provider, primary_url, primary_url,
224 CONTENT_SETTINGS_TYPE_IMAGES, "", false)); 225 CONTENT_SETTINGS_TYPE_IMAGES, "", false));
225 226
226 provider.SetContentSetting(primary_pattern, 227 provider.SetWebsiteSetting(
227 primary_pattern, 228 primary_pattern,
228 CONTENT_SETTINGS_TYPE_IMAGES, 229 primary_pattern,
229 "", 230 CONTENT_SETTINGS_TYPE_IMAGES,
230 CONTENT_SETTING_BLOCK); 231 "",
232 Value::CreateIntegerValue(CONTENT_SETTING_BLOCK));
231 EXPECT_EQ(CONTENT_SETTING_BLOCK, 233 EXPECT_EQ(CONTENT_SETTING_BLOCK,
232 GetContentSetting(&provider, primary_url, primary_url, 234 GetContentSetting(&provider, primary_url, primary_url,
233 CONTENT_SETTINGS_TYPE_IMAGES, "", false)); 235 CONTENT_SETTINGS_TYPE_IMAGES, "", false));
234 scoped_ptr<Value> value_ptr( 236 scoped_ptr<Value> value_ptr(
235 GetContentSettingValue(&provider, primary_url, primary_url, 237 GetContentSettingValue(&provider, primary_url, primary_url,
236 CONTENT_SETTINGS_TYPE_IMAGES, "", false)); 238 CONTENT_SETTINGS_TYPE_IMAGES, "", false));
237 int int_value = -1; 239 int int_value = -1;
238 value_ptr->GetAsInteger(&int_value); 240 value_ptr->GetAsInteger(&int_value);
239 EXPECT_EQ(CONTENT_SETTING_BLOCK, IntToContentSetting(int_value)); 241 EXPECT_EQ(CONTENT_SETTING_BLOCK, IntToContentSetting(int_value));
240 242
241 provider.SetContentSetting(primary_pattern, 243 provider.SetWebsiteSetting(primary_pattern,
242 primary_pattern, 244 primary_pattern,
243 CONTENT_SETTINGS_TYPE_IMAGES, 245 CONTENT_SETTINGS_TYPE_IMAGES,
244 "", 246 "",
245 CONTENT_SETTING_DEFAULT); 247 NULL);
246 EXPECT_EQ(NULL, 248 EXPECT_EQ(NULL,
247 GetContentSettingValue( 249 GetContentSettingValue(
248 &provider, primary_url, primary_url, 250 &provider, primary_url, primary_url,
249 CONTENT_SETTINGS_TYPE_IMAGES, "", false)); 251 CONTENT_SETTINGS_TYPE_IMAGES, "", false));
250 provider.ShutdownOnUIThread(); 252 provider.ShutdownOnUIThread();
251 } 253 }
252 254
253 TEST_F(PrefProviderTest, Patterns) { 255 TEST_F(PrefProviderTest, Patterns) {
254 TestingProfile testing_profile; 256 TestingProfile testing_profile;
255 PrefProvider pref_content_settings_provider(testing_profile.GetPrefs(), 257 PrefProvider pref_content_settings_provider(testing_profile.GetPrefs(),
256 false); 258 false);
257 259
258 GURL host1("http://example.com/"); 260 GURL host1("http://example.com/");
259 GURL host2("http://www.example.com/"); 261 GURL host2("http://www.example.com/");
260 GURL host3("http://example.org/"); 262 GURL host3("http://example.org/");
261 GURL host4("file:///tmp/test.html"); 263 GURL host4("file:///tmp/test.html");
262 ContentSettingsPattern pattern1 = 264 ContentSettingsPattern pattern1 =
263 ContentSettingsPattern::FromString("[*.]example.com"); 265 ContentSettingsPattern::FromString("[*.]example.com");
264 ContentSettingsPattern pattern2 = 266 ContentSettingsPattern pattern2 =
265 ContentSettingsPattern::FromString("example.org"); 267 ContentSettingsPattern::FromString("example.org");
266 ContentSettingsPattern pattern3 = 268 ContentSettingsPattern pattern3 =
267 ContentSettingsPattern::FromString("file:///tmp/test.html"); 269 ContentSettingsPattern::FromString("file:///tmp/test.html");
268 270
269 EXPECT_EQ(CONTENT_SETTING_DEFAULT, 271 EXPECT_EQ(CONTENT_SETTING_DEFAULT,
270 GetContentSetting( 272 GetContentSetting(
271 &pref_content_settings_provider, 273 &pref_content_settings_provider,
272 host1, host1, CONTENT_SETTINGS_TYPE_IMAGES, "", false)); 274 host1, host1, CONTENT_SETTINGS_TYPE_IMAGES, "", false));
273 pref_content_settings_provider.SetContentSetting( 275 pref_content_settings_provider.SetWebsiteSetting(
274 pattern1, 276 pattern1,
275 pattern1, 277 pattern1,
276 CONTENT_SETTINGS_TYPE_IMAGES, 278 CONTENT_SETTINGS_TYPE_IMAGES,
277 "", 279 "",
278 CONTENT_SETTING_BLOCK); 280 Value::CreateIntegerValue(CONTENT_SETTING_BLOCK));
279 EXPECT_EQ(CONTENT_SETTING_BLOCK, 281 EXPECT_EQ(CONTENT_SETTING_BLOCK,
280 GetContentSetting( 282 GetContentSetting(
281 &pref_content_settings_provider, 283 &pref_content_settings_provider,
282 host1, host1, CONTENT_SETTINGS_TYPE_IMAGES, "", false)); 284 host1, host1, CONTENT_SETTINGS_TYPE_IMAGES, "", false));
283 EXPECT_EQ(CONTENT_SETTING_BLOCK, 285 EXPECT_EQ(CONTENT_SETTING_BLOCK,
284 GetContentSetting( 286 GetContentSetting(
285 &pref_content_settings_provider, 287 &pref_content_settings_provider,
286 host2, host2, CONTENT_SETTINGS_TYPE_IMAGES, "", false)); 288 host2, host2, CONTENT_SETTINGS_TYPE_IMAGES, "", false));
287 289
288 EXPECT_EQ(CONTENT_SETTING_DEFAULT, 290 EXPECT_EQ(CONTENT_SETTING_DEFAULT,
289 GetContentSetting( 291 GetContentSetting(
290 &pref_content_settings_provider, 292 &pref_content_settings_provider,
291 host3, host3, CONTENT_SETTINGS_TYPE_IMAGES, "", false)); 293 host3, host3, CONTENT_SETTINGS_TYPE_IMAGES, "", false));
292 pref_content_settings_provider.SetContentSetting( 294 pref_content_settings_provider.SetWebsiteSetting(
293 pattern2, 295 pattern2,
294 pattern2, 296 pattern2,
295 CONTENT_SETTINGS_TYPE_IMAGES, 297 CONTENT_SETTINGS_TYPE_IMAGES,
296 "", 298 "",
297 CONTENT_SETTING_BLOCK); 299 Value::CreateIntegerValue(CONTENT_SETTING_BLOCK));
298 EXPECT_EQ(CONTENT_SETTING_BLOCK, 300 EXPECT_EQ(CONTENT_SETTING_BLOCK,
299 GetContentSetting( 301 GetContentSetting(
300 &pref_content_settings_provider, 302 &pref_content_settings_provider,
301 host3, host3, CONTENT_SETTINGS_TYPE_IMAGES, "", false)); 303 host3, host3, CONTENT_SETTINGS_TYPE_IMAGES, "", false));
302 304
303 EXPECT_EQ(CONTENT_SETTING_DEFAULT, 305 EXPECT_EQ(CONTENT_SETTING_DEFAULT,
304 GetContentSetting(&pref_content_settings_provider, 306 GetContentSetting(&pref_content_settings_provider,
305 host4, host4, CONTENT_SETTINGS_TYPE_IMAGES, "", 307 host4, host4, CONTENT_SETTINGS_TYPE_IMAGES, "",
306 false)); 308 false));
307 pref_content_settings_provider.SetContentSetting( 309 pref_content_settings_provider.SetWebsiteSetting(
308 pattern3, 310 pattern3,
309 pattern3, 311 pattern3,
310 CONTENT_SETTINGS_TYPE_IMAGES, 312 CONTENT_SETTINGS_TYPE_IMAGES,
311 "", 313 "",
312 CONTENT_SETTING_BLOCK); 314 Value::CreateIntegerValue(CONTENT_SETTING_BLOCK));
313 EXPECT_EQ(CONTENT_SETTING_BLOCK, 315 EXPECT_EQ(CONTENT_SETTING_BLOCK,
314 GetContentSetting( 316 GetContentSetting(
315 &pref_content_settings_provider, 317 &pref_content_settings_provider,
316 host4, host4, CONTENT_SETTINGS_TYPE_IMAGES, "", false)); 318 host4, host4, CONTENT_SETTINGS_TYPE_IMAGES, "", false));
317 319
318 pref_content_settings_provider.ShutdownOnUIThread(); 320 pref_content_settings_provider.ShutdownOnUIThread();
319 } 321 }
320 322
321 TEST_F(PrefProviderTest, ResourceIdentifier) { 323 TEST_F(PrefProviderTest, ResourceIdentifier) {
322 TestingProfile testing_profile; 324 TestingProfile testing_profile;
323 PrefProvider pref_content_settings_provider(testing_profile.GetPrefs(), 325 PrefProvider pref_content_settings_provider(testing_profile.GetPrefs(),
324 false); 326 false);
325 327
326 GURL host("http://example.com/"); 328 GURL host("http://example.com/");
327 ContentSettingsPattern pattern = 329 ContentSettingsPattern pattern =
328 ContentSettingsPattern::FromString("[*.]example.com"); 330 ContentSettingsPattern::FromString("[*.]example.com");
329 std::string resource1("someplugin"); 331 std::string resource1("someplugin");
330 std::string resource2("otherplugin"); 332 std::string resource2("otherplugin");
331 333
332 EXPECT_EQ(CONTENT_SETTING_DEFAULT, 334 EXPECT_EQ(CONTENT_SETTING_DEFAULT,
333 GetContentSetting( 335 GetContentSetting(
334 &pref_content_settings_provider, 336 &pref_content_settings_provider,
335 host, host, CONTENT_SETTINGS_TYPE_PLUGINS, 337 host, host, CONTENT_SETTINGS_TYPE_PLUGINS,
336 resource1, false)); 338 resource1, false));
337 pref_content_settings_provider.SetContentSetting( 339 pref_content_settings_provider.SetWebsiteSetting(
338 pattern, 340 pattern,
339 pattern, 341 pattern,
340 CONTENT_SETTINGS_TYPE_PLUGINS, 342 CONTENT_SETTINGS_TYPE_PLUGINS,
341 resource1, 343 resource1,
342 CONTENT_SETTING_BLOCK); 344 Value::CreateIntegerValue(CONTENT_SETTING_BLOCK));
343 EXPECT_EQ(CONTENT_SETTING_BLOCK, 345 EXPECT_EQ(CONTENT_SETTING_BLOCK,
344 GetContentSetting( 346 GetContentSetting(
345 &pref_content_settings_provider, 347 &pref_content_settings_provider,
346 host, host, CONTENT_SETTINGS_TYPE_PLUGINS, 348 host, host, CONTENT_SETTINGS_TYPE_PLUGINS,
347 resource1, false)); 349 resource1, false));
348 EXPECT_EQ(CONTENT_SETTING_DEFAULT, 350 EXPECT_EQ(CONTENT_SETTING_DEFAULT,
349 GetContentSetting( 351 GetContentSetting(
350 &pref_content_settings_provider, 352 &pref_content_settings_provider,
351 host, host, CONTENT_SETTINGS_TYPE_PLUGINS, 353 host, host, CONTENT_SETTINGS_TYPE_PLUGINS,
352 resource2, false)); 354 resource2, false));
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 // Assert pre-condition. 417 // Assert pre-condition.
416 const DictionaryValue* patterns = 418 const DictionaryValue* patterns =
417 prefs->GetDictionary(prefs::kContentSettingsPatterns); 419 prefs->GetDictionary(prefs::kContentSettingsPatterns);
418 ASSERT_TRUE(patterns->empty()); 420 ASSERT_TRUE(patterns->empty());
419 421
420 // Simulate a user setting a content setting. 422 // Simulate a user setting a content setting.
421 ContentSettingsPattern primary_pattern = 423 ContentSettingsPattern primary_pattern =
422 ContentSettingsPattern::FromString("[*.]example.com"); 424 ContentSettingsPattern::FromString("[*.]example.com");
423 ContentSettingsPattern secondary_pattern = 425 ContentSettingsPattern secondary_pattern =
424 ContentSettingsPattern::Wildcard(); 426 ContentSettingsPattern::Wildcard();
425 provider.SetContentSetting(primary_pattern, 427 provider.SetWebsiteSetting(primary_pattern,
426 secondary_pattern, 428 secondary_pattern,
427 CONTENT_SETTINGS_TYPE_JAVASCRIPT, 429 CONTENT_SETTINGS_TYPE_JAVASCRIPT,
428 std::string(), 430 std::string(),
429 CONTENT_SETTING_BLOCK); 431 Value::CreateIntegerValue(CONTENT_SETTING_BLOCK));
430 432
431 // Test whether the obsolete preference is synced correctly. 433 // Test whether the obsolete preference is synced correctly.
432 patterns = prefs->GetDictionary(prefs::kContentSettingsPatterns); 434 patterns = prefs->GetDictionary(prefs::kContentSettingsPatterns);
433 EXPECT_EQ(1U, patterns->size()); 435 EXPECT_EQ(1U, patterns->size());
434 DictionaryValue* settings = NULL; 436 DictionaryValue* settings = NULL;
435 patterns->GetDictionaryWithoutPathExpansion(primary_pattern.ToString(), 437 patterns->GetDictionaryWithoutPathExpansion(primary_pattern.ToString(),
436 &settings); 438 &settings);
437 ASSERT_TRUE(NULL != settings); 439 ASSERT_TRUE(NULL != settings);
438 ASSERT_EQ(1U, settings->size()); 440 ASSERT_EQ(1U, settings->size());
439 int setting_value; 441 int setting_value;
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
681 683
682 EXPECT_EQ(CONTENT_SETTING_DEFAULT, 684 EXPECT_EQ(CONTENT_SETTING_DEFAULT,
683 GetContentSetting( 685 GetContentSetting(
684 &provider, 686 &provider,
685 primary_url, 687 primary_url,
686 primary_url, 688 primary_url,
687 CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE, 689 CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE,
688 std::string(), 690 std::string(),
689 false)); 691 false));
690 692
691 provider.SetContentSetting( 693 provider.SetWebsiteSetting(
692 ContentSettingsPattern::FromURL(primary_url), 694 ContentSettingsPattern::FromURL(primary_url),
693 ContentSettingsPattern::Wildcard(), 695 ContentSettingsPattern::Wildcard(),
694 CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE, 696 CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE,
695 std::string(), 697 std::string(),
696 CONTENT_SETTING_ALLOW); 698 Value::CreateIntegerValue(CONTENT_SETTING_ALLOW));
697 EXPECT_EQ(CONTENT_SETTING_ALLOW, 699 EXPECT_EQ(CONTENT_SETTING_ALLOW,
698 GetContentSetting( 700 GetContentSetting(
699 &provider, 701 &provider,
700 primary_url, 702 primary_url,
701 secondary_url, 703 secondary_url,
702 CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE, 704 CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE,
703 std::string(), 705 std::string(),
704 false)); 706 false));
705 provider.ShutdownOnUIThread(); 707 provider.ShutdownOnUIThread();
706 } 708 }
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
871 DictionaryValue* mutable_settings = update.Get(); 873 DictionaryValue* mutable_settings = update.Get();
872 mutable_settings->SetWithoutPathExpansion("www.example.com,*", 874 mutable_settings->SetWithoutPathExpansion("www.example.com,*",
873 new base::DictionaryValue()); 875 new base::DictionaryValue());
874 } 876 }
875 EXPECT_TRUE(observer.notification_received()); 877 EXPECT_TRUE(observer.notification_received());
876 878
877 provider.ShutdownOnUIThread(); 879 provider.ShutdownOnUIThread();
878 } 880 }
879 881
880 } // namespace content_settings 882 } // namespace content_settings
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698