OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "chrome/browser/profile_resetter/profile_resetter.h" | 5 #include "chrome/browser/profile_resetter/profile_resetter.h" |
6 | 6 |
7 #include "base/json/json_string_value_serializer.h" | 7 #include "base/json/json_string_value_serializer.h" |
8 #include "base/prefs/pref_service.h" | 8 #include "base/prefs/pref_service.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "chrome/browser/content_settings/host_content_settings_map.h" | 10 #include "chrome/browser/content_settings/host_content_settings_map.h" |
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
422 | 422 |
423 ContentSettingsForOneType host_settings; | 423 ContentSettingsForOneType host_settings; |
424 host_content_settings_map->GetSettingsForOneType( | 424 host_content_settings_map->GetSettingsForOneType( |
425 content_type, std::string(), &host_settings); | 425 content_type, std::string(), &host_settings); |
426 EXPECT_EQ(1U, host_settings.size()); | 426 EXPECT_EQ(1U, host_settings.size()); |
427 } | 427 } |
428 } | 428 } |
429 } | 429 } |
430 | 430 |
431 TEST_F(ProfileResetterTest, ResetExtensionsByDisabling) { | 431 TEST_F(ProfileResetterTest, ResetExtensionsByDisabling) { |
| 432 service_->Init(); |
| 433 |
432 base::ScopedTempDir temp_dir; | 434 base::ScopedTempDir temp_dir; |
433 ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); | 435 ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); |
434 | 436 |
435 scoped_refptr<Extension> theme = CreateExtension("example1", temp_dir.path(), | 437 scoped_refptr<Extension> theme = CreateExtension("example1", temp_dir.path(), |
436 Manifest::INVALID_LOCATION, | 438 Manifest::INVALID_LOCATION, |
437 true); | 439 true); |
438 service_->FinishInstallationForTest(theme.get()); | 440 service_->FinishInstallationForTest(theme.get()); |
439 // Let ThemeService finish creating the theme pack. | 441 // Let ThemeService finish creating the theme pack. |
440 base::MessageLoop::current()->RunUntilIdle(); | 442 base::MessageLoop::current()->RunUntilIdle(); |
441 | 443 |
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
701 EXPECT_EQ(!!(field_mask & ResettableSettingsSnapshot::HOMEPAGE), | 703 EXPECT_EQ(!!(field_mask & ResettableSettingsSnapshot::HOMEPAGE), |
702 dict->GetString("homepage", &homepage)); | 704 dict->GetString("homepage", &homepage)); |
703 EXPECT_EQ(!!(field_mask & ResettableSettingsSnapshot::HOMEPAGE_IS_NTP), | 705 EXPECT_EQ(!!(field_mask & ResettableSettingsSnapshot::HOMEPAGE_IS_NTP), |
704 dict->GetBoolean("homepage_is_ntp", &homepage_is_ntp)); | 706 dict->GetBoolean("homepage_is_ntp", &homepage_is_ntp)); |
705 EXPECT_EQ(!!(field_mask & ResettableSettingsSnapshot::DSE_URL), | 707 EXPECT_EQ(!!(field_mask & ResettableSettingsSnapshot::DSE_URL), |
706 dict->GetString("default_search_engine", &default_search_engine)); | 708 dict->GetString("default_search_engine", &default_search_engine)); |
707 } | 709 } |
708 } | 710 } |
709 | 711 |
710 } // namespace | 712 } // namespace |
OLD | NEW |