OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 <string> | 5 #include <string> |
6 #include <vector> | 6 #include <vector> |
7 | 7 |
8 #include "base/scoped_ptr.h" | 8 #include "base/scoped_ptr.h" |
9 #include "base/scoped_temp_dir.h" | 9 #include "base/scoped_temp_dir.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
11 #include "chrome/browser/extensions/extension_pref_store.h" | 11 #include "chrome/browser/extensions/extension_pref_store.h" |
12 #include "chrome/browser/pref_service.h" | 12 #include "chrome/browser/prefs/pref_service.h" |
13 #include "chrome/browser/pref_value_store.h" | 13 #include "chrome/browser/prefs/pref_value_store.h" |
14 #include "chrome/common/extensions/extension.h" | 14 #include "chrome/common/extensions/extension.h" |
15 #include "chrome/test/testing_pref_service.h" | 15 #include "chrome/test/testing_pref_service.h" |
16 #include "testing/gmock/include/gmock/gmock.h" | 16 #include "testing/gmock/include/gmock/gmock.h" |
17 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
18 | 18 |
19 namespace { | 19 namespace { |
20 | 20 |
21 class TestExtensionPrefStore : public ExtensionPrefStore { | 21 class TestExtensionPrefStore : public ExtensionPrefStore { |
22 public: | 22 public: |
23 TestExtensionPrefStore() | 23 TestExtensionPrefStore() |
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
351 EXPECT_CALL(*pref_notifier, FireObservers(kPref1)).Times(0); | 351 EXPECT_CALL(*pref_notifier, FireObservers(kPref1)).Times(0); |
352 eps->InstallExtensionPref(eps->ext1, kPref1, | 352 eps->InstallExtensionPref(eps->ext1, kPref1, |
353 Value::CreateStringValue("https://www.chromium.org")); | 353 Value::CreateStringValue("https://www.chromium.org")); |
354 Mock::VerifyAndClearExpectations(pref_notifier); | 354 Mock::VerifyAndClearExpectations(pref_notifier); |
355 | 355 |
356 EXPECT_CALL(*pref_notifier, FireObservers(kPref1)).Times(2); | 356 EXPECT_CALL(*pref_notifier, FireObservers(kPref1)).Times(2); |
357 eps->InstallExtensionPref(eps->ext1, kPref1, | 357 eps->InstallExtensionPref(eps->ext1, kPref1, |
358 Value::CreateStringValue("chrome://newtab")); | 358 Value::CreateStringValue("chrome://newtab")); |
359 eps->UninstallExtension(eps->ext1); | 359 eps->UninstallExtension(eps->ext1); |
360 } | 360 } |
OLD | NEW |