| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "extension_prefs_unittest.h" | 5 #include "extension_prefs_unittest.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
| 9 #include "base/prefs/public/pref_change_registrar.h" | 9 #include "base/prefs/public/pref_change_registrar.h" |
| 10 #include "base/scoped_temp_dir.h" | 10 #include "base/scoped_temp_dir.h" |
| (...skipping 1108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1119 Mock::VerifyAndClearExpectations(&observer); | 1119 Mock::VerifyAndClearExpectations(&observer); |
| 1120 Mock::VerifyAndClearExpectations(&incognito_observer); | 1120 Mock::VerifyAndClearExpectations(&incognito_observer); |
| 1121 | 1121 |
| 1122 // Uninstall. | 1122 // Uninstall. |
| 1123 EXPECT_CALL(observer, OnPreferenceChanged(_, _)); | 1123 EXPECT_CALL(observer, OnPreferenceChanged(_, _)); |
| 1124 EXPECT_CALL(incognito_observer, OnPreferenceChanged(_, _)); | 1124 EXPECT_CALL(incognito_observer, OnPreferenceChanged(_, _)); |
| 1125 UninstallExtension(ext1_->id()); | 1125 UninstallExtension(ext1_->id()); |
| 1126 Mock::VerifyAndClearExpectations(&observer); | 1126 Mock::VerifyAndClearExpectations(&observer); |
| 1127 Mock::VerifyAndClearExpectations(&incognito_observer); | 1127 Mock::VerifyAndClearExpectations(&incognito_observer); |
| 1128 | 1128 |
| 1129 registrar.Remove(kPref1, &observer); | 1129 registrar.Remove(kPref1); |
| 1130 incognito_registrar.Remove(kPref1, &incognito_observer); | 1130 incognito_registrar.Remove(kPref1); |
| 1131 } | 1131 } |
| 1132 virtual void Verify() { | 1132 virtual void Verify() { |
| 1133 std::string actual = prefs()->pref_service()->GetString(kPref1); | 1133 std::string actual = prefs()->pref_service()->GetString(kPref1); |
| 1134 EXPECT_EQ(kDefaultPref1, actual); | 1134 EXPECT_EQ(kDefaultPref1, actual); |
| 1135 } | 1135 } |
| 1136 }; | 1136 }; |
| 1137 TEST_F(ExtensionPrefsNotifyWhenNeeded, | 1137 TEST_F(ExtensionPrefsNotifyWhenNeeded, |
| 1138 ExtensionPrefsNotifyWhenNeeded) {} | 1138 ExtensionPrefsNotifyWhenNeeded) {} |
| 1139 | 1139 |
| 1140 // Tests disabling an extension. | 1140 // Tests disabling an extension. |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1301 EXPECT_EQ(string16(), error16); | 1301 EXPECT_EQ(string16(), error16); |
| 1302 EXPECT_TRUE(prefs()->UserMayModifySettings(extension_.get(), &error16)); | 1302 EXPECT_TRUE(prefs()->UserMayModifySettings(extension_.get(), &error16)); |
| 1303 EXPECT_EQ(string16(), error16); | 1303 EXPECT_EQ(string16(), error16); |
| 1304 EXPECT_FALSE(prefs()->MustRemainEnabled(extension_.get(), &error16)); | 1304 EXPECT_FALSE(prefs()->MustRemainEnabled(extension_.get(), &error16)); |
| 1305 EXPECT_EQ(string16(), error16); | 1305 EXPECT_EQ(string16(), error16); |
| 1306 } | 1306 } |
| 1307 }; | 1307 }; |
| 1308 TEST_F(ExtensionPrefsNotRequiredExtension, NotRequiredExtension) {} | 1308 TEST_F(ExtensionPrefsNotRequiredExtension, NotRequiredExtension) {} |
| 1309 | 1309 |
| 1310 } // namespace extensions | 1310 } // namespace extensions |
| OLD | NEW |