Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(600)

Side by Side Diff: chrome/browser/extensions/extension_pref_value_map_unittest.cc

Issue 22885002: c/b/extensions, json_schema_compiler: Do not use Value::Create*. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Removed C-style casts. Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/memory/ref_counted.h" 6 #include "base/memory/ref_counted.h"
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/prefs/pref_store_observer_mock.h" 8 #include "base/prefs/pref_store_observer_mock.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "chrome/browser/extensions/extension_pref_value_map.h" 10 #include "chrome/browser/extensions/extension_pref_value_map.h"
11 #include "testing/gmock/include/gmock/gmock.h" 11 #include "testing/gmock/include/gmock/gmock.h"
12 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
13 13
14 namespace { 14 namespace {
15 const char kExt1[] = "ext1"; 15 const char kExt1[] = "ext1";
16 const char kExt2[] = "ext2"; 16 const char kExt2[] = "ext2";
17 const char kExt3[] = "ext3"; 17 const char kExt3[] = "ext3";
18 18
19 const char kPref1[] = "path1.subpath"; 19 const char kPref1[] = "path1.subpath";
20 const char kPref2[] = "path2"; 20 const char kPref2[] = "path2";
21 const char kPref3[] = "path3"; 21 const char kPref3[] = "path3";
22 const char kPref4[] = "path4"; 22 const char kPref4[] = "path4";
23 } // namespace 23 } // namespace
24 24
25 static Value* CreateVal(const char* str) { 25 static Value* CreateVal(const char* str) {
26 return Value::CreateStringValue(str); 26 return new base::StringValue(str);
27 } 27 }
28 28
29 static base::Time CreateTime(int64 t) { 29 static base::Time CreateTime(int64 t) {
30 return base::Time::FromInternalValue(t); 30 return base::Time::FromInternalValue(t);
31 } 31 }
32 32
33 template <typename BASECLASS> 33 template <typename BASECLASS>
34 class ExtensionPrefValueMapTestBase : public BASECLASS { 34 class ExtensionPrefValueMapTestBase : public BASECLASS {
35 public: 35 public:
36 static const extensions::ExtensionPrefsScope kRegular = 36 static const extensions::ExtensionPrefsScope kRegular =
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 OverrideIncognitoTestCase(1, 0, 0, 0, 5, 0, 0, 0, 5, 5), 391 OverrideIncognitoTestCase(1, 0, 0, 0, 5, 0, 0, 0, 5, 5),
392 OverrideIncognitoTestCase(1, 2, 3, 0, 5, 0, 0, 0, 5, 5), 392 OverrideIncognitoTestCase(1, 2, 3, 0, 5, 0, 0, 0, 5, 5),
393 OverrideIncognitoTestCase(1, 0, 0, 0, 0, 6, 0, 0, 6, 1), 393 OverrideIncognitoTestCase(1, 0, 0, 0, 0, 6, 0, 0, 6, 1),
394 OverrideIncognitoTestCase(1, 0, 3, 0, 5, 6, 0, 0, 6, 5), 394 OverrideIncognitoTestCase(1, 0, 3, 0, 5, 6, 0, 0, 6, 5),
395 OverrideIncognitoTestCase(1, 0, 0, 4, 5, 6, 0, 0, 6, 5), 395 OverrideIncognitoTestCase(1, 0, 0, 4, 5, 6, 0, 0, 6, 5),
396 OverrideIncognitoTestCase(1, 0, 0, 0, 0, 0, 7, 0, 1, 7), 396 OverrideIncognitoTestCase(1, 0, 0, 0, 0, 0, 7, 0, 1, 7),
397 OverrideIncognitoTestCase(1, 2, 0, 0, 5, 0, 7, 0, 5, 7), 397 OverrideIncognitoTestCase(1, 2, 0, 0, 5, 0, 7, 0, 5, 7),
398 OverrideIncognitoTestCase(1, 2, 0, 0, 5, 0, 0, 8, 5, 8), 398 OverrideIncognitoTestCase(1, 2, 0, 0, 5, 0, 0, 8, 5, 8),
399 OverrideIncognitoTestCase(1, 2, 0, 0, 5, 0, 7, 8, 5, 8), 399 OverrideIncognitoTestCase(1, 2, 0, 0, 5, 0, 7, 8, 5, 8),
400 OverrideIncognitoTestCase(1, 2, 3, 0, 0, 6, 7, 0, 6, 7))); 400 OverrideIncognitoTestCase(1, 2, 3, 0, 0, 6, 7, 0, 6, 7)));
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_override_apitest.cc ('k') | chrome/browser/extensions/extension_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698