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 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
439 | 439 |
440 ContentSettingsForOneType host_settings; | 440 ContentSettingsForOneType host_settings; |
441 host_content_settings_map->GetSettingsForOneType( | 441 host_content_settings_map->GetSettingsForOneType( |
442 content_type, std::string(), &host_settings); | 442 content_type, std::string(), &host_settings); |
443 EXPECT_EQ(1U, host_settings.size()); | 443 EXPECT_EQ(1U, host_settings.size()); |
444 } | 444 } |
445 } | 445 } |
446 } | 446 } |
447 | 447 |
448 TEST_F(ProfileResetterTest, ResetExtensionsByDisabling) { | 448 TEST_F(ProfileResetterTest, ResetExtensionsByDisabling) { |
| 449 service_->Init(); |
| 450 |
449 base::ScopedTempDir temp_dir; | 451 base::ScopedTempDir temp_dir; |
450 ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); | 452 ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); |
451 | 453 |
452 scoped_refptr<Extension> theme = | 454 scoped_refptr<Extension> theme = |
453 CreateExtension("example1", | 455 CreateExtension("example1", |
454 temp_dir.path(), | 456 temp_dir.path(), |
455 Manifest::INVALID_LOCATION, | 457 Manifest::INVALID_LOCATION, |
456 extensions::Manifest::TYPE_THEME, | 458 extensions::Manifest::TYPE_THEME, |
457 false); | 459 false); |
458 service_->FinishInstallationForTest(theme.get()); | 460 service_->FinishInstallationForTest(theme.get()); |
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
794 EXPECT_EQ(!!(field_mask & ResettableSettingsSnapshot::HOMEPAGE_IS_NTP), | 796 EXPECT_EQ(!!(field_mask & ResettableSettingsSnapshot::HOMEPAGE_IS_NTP), |
795 dict->GetBoolean("homepage_is_ntp", &homepage_is_ntp)); | 797 dict->GetBoolean("homepage_is_ntp", &homepage_is_ntp)); |
796 EXPECT_EQ(!!(field_mask & ResettableSettingsSnapshot::DSE_URL), | 798 EXPECT_EQ(!!(field_mask & ResettableSettingsSnapshot::DSE_URL), |
797 dict->GetString("default_search_engine", &default_search_engine)); | 799 dict->GetString("default_search_engine", &default_search_engine)); |
798 EXPECT_EQ(!!(field_mask & ResettableSettingsSnapshot::EXTENSIONS), | 800 EXPECT_EQ(!!(field_mask & ResettableSettingsSnapshot::EXTENSIONS), |
799 dict->GetList("enabled_extensions", &extensions)); | 801 dict->GetList("enabled_extensions", &extensions)); |
800 } | 802 } |
801 } | 803 } |
802 | 804 |
803 } // namespace | 805 } // namespace |
OLD | NEW |