OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "base/basictypes.h" | 5 #include <stdint.h> |
| 6 |
| 7 #include "base/macros.h" |
6 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
7 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
8 #include "base/prefs/pref_store_observer_mock.h" | 10 #include "base/prefs/pref_store_observer_mock.h" |
9 #include "base/values.h" | 11 #include "base/values.h" |
10 #include "extensions/browser/extension_pref_value_map.h" | 12 #include "extensions/browser/extension_pref_value_map.h" |
11 #include "testing/gmock/include/gmock/gmock.h" | 13 #include "testing/gmock/include/gmock/gmock.h" |
12 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
13 | 15 |
14 namespace { | 16 namespace { |
15 const char kExt1[] = "ext1"; | 17 const char kExt1[] = "ext1"; |
16 const char kExt2[] = "ext2"; | 18 const char kExt2[] = "ext2"; |
17 const char kExt3[] = "ext3"; | 19 const char kExt3[] = "ext3"; |
18 | 20 |
19 const char kPref1[] = "path1.subpath"; | 21 const char kPref1[] = "path1.subpath"; |
20 const char kPref2[] = "path2"; | 22 const char kPref2[] = "path2"; |
21 const char kPref3[] = "path3"; | 23 const char kPref3[] = "path3"; |
22 const char kPref4[] = "path4"; | 24 const char kPref4[] = "path4"; |
23 } // namespace | 25 } // namespace |
24 | 26 |
25 static base::Value* CreateVal(const char* str) { | 27 static base::Value* CreateVal(const char* str) { |
26 return new base::StringValue(str); | 28 return new base::StringValue(str); |
27 } | 29 } |
28 | 30 |
29 static base::Time CreateTime(int64 t) { | 31 static base::Time CreateTime(int64_t t) { |
30 return base::Time::FromInternalValue(t); | 32 return base::Time::FromInternalValue(t); |
31 } | 33 } |
32 | 34 |
33 template <typename BASECLASS> | 35 template <typename BASECLASS> |
34 class ExtensionPrefValueMapTestBase : public BASECLASS { | 36 class ExtensionPrefValueMapTestBase : public BASECLASS { |
35 public: | 37 public: |
36 static const extensions::ExtensionPrefsScope kRegular = | 38 static const extensions::ExtensionPrefsScope kRegular = |
37 extensions::kExtensionPrefsScopeRegular; | 39 extensions::kExtensionPrefsScopeRegular; |
38 static const extensions::ExtensionPrefsScope kRegularOnly = | 40 static const extensions::ExtensionPrefsScope kRegularOnly = |
39 extensions::kExtensionPrefsScopeRegularOnly; | 41 extensions::kExtensionPrefsScopeRegularOnly; |
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
432 OverrideIncognitoTestCase(false, false, 1, 2, 3, 0, 5, 0, 0, 0, 5, 0), | 434 OverrideIncognitoTestCase(false, false, 1, 2, 3, 0, 5, 0, 0, 0, 5, 0), |
433 OverrideIncognitoTestCase(false, false, 1, 0, 0, 0, 0, 6, 0, 0, 6, 0), | 435 OverrideIncognitoTestCase(false, false, 1, 0, 0, 0, 0, 6, 0, 0, 6, 0), |
434 OverrideIncognitoTestCase(false, false, 1, 0, 3, 0, 5, 6, 0, 0, 6, 0), | 436 OverrideIncognitoTestCase(false, false, 1, 0, 3, 0, 5, 6, 0, 0, 6, 0), |
435 OverrideIncognitoTestCase(false, false, 1, 0, 0, 4, 5, 6, 0, 0, 6, 0), | 437 OverrideIncognitoTestCase(false, false, 1, 0, 0, 4, 5, 6, 0, 0, 6, 0), |
436 OverrideIncognitoTestCase(false, false, 1, 0, 0, 0, 0, 0, 7, 0, 1, 0), | 438 OverrideIncognitoTestCase(false, false, 1, 0, 0, 0, 0, 0, 7, 0, 1, 0), |
437 OverrideIncognitoTestCase(false, false, 1, 2, 0, 0, 5, 0, 7, 0, 5, 0), | 439 OverrideIncognitoTestCase(false, false, 1, 2, 0, 0, 5, 0, 7, 0, 5, 0), |
438 OverrideIncognitoTestCase(false, false, 1, 2, 0, 0, 5, 0, 0, 8, 5, 0), | 440 OverrideIncognitoTestCase(false, false, 1, 2, 0, 0, 5, 0, 0, 8, 5, 0), |
439 OverrideIncognitoTestCase(false, false, 1, 2, 0, 0, 5, 0, 7, 8, 5, 0), | 441 OverrideIncognitoTestCase(false, false, 1, 2, 0, 0, 5, 0, 7, 8, 5, 0), |
440 OverrideIncognitoTestCase(false, false, 1, 2, 3, 0, 0, 6, 7, 0, 6, 0) | 442 OverrideIncognitoTestCase(false, false, 1, 2, 3, 0, 0, 6, 7, 0, 6, 0) |
441 )); | 443 )); |
OLD | NEW |