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

Side by Side Diff: chrome/browser/sync/glue/theme_util_unittest.cc

Issue 6766002: Replace bools in extension creation with flags. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: For landing Created 9 years, 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/sync/glue/theme_util.h" 5 #include "chrome/browser/sync/glue/theme_util.h"
6 6
7 #include "base/file_path.h" 7 #include "base/file_path.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/sync/protocol/theme_specifics.pb.h" 10 #include "chrome/browser/sync/protocol/theme_specifics.pb.h"
(...skipping 17 matching lines...) Expand all
28 scoped_refptr<Extension> MakeThemeExtension(const FilePath& extension_path, 28 scoped_refptr<Extension> MakeThemeExtension(const FilePath& extension_path,
29 const std::string& name, 29 const std::string& name,
30 const std::string& update_url) { 30 const std::string& update_url) {
31 DictionaryValue source; 31 DictionaryValue source;
32 source.SetString(extension_manifest_keys::kName, name); 32 source.SetString(extension_manifest_keys::kName, name);
33 source.Set(extension_manifest_keys::kTheme, new DictionaryValue()); 33 source.Set(extension_manifest_keys::kTheme, new DictionaryValue());
34 source.SetString(extension_manifest_keys::kUpdateURL, update_url); 34 source.SetString(extension_manifest_keys::kUpdateURL, update_url);
35 source.SetString(extension_manifest_keys::kVersion, "0.0.0.0"); 35 source.SetString(extension_manifest_keys::kVersion, "0.0.0.0");
36 std::string error; 36 std::string error;
37 scoped_refptr<Extension> extension = Extension::Create( 37 scoped_refptr<Extension> extension = Extension::Create(
38 extension_path, Extension::INTERNAL, source, false, true, &error); 38 extension_path, Extension::INTERNAL, source,
39 Extension::STRICT_ERROR_CHECKS, &error);
39 EXPECT_TRUE(extension); 40 EXPECT_TRUE(extension);
40 EXPECT_EQ("", error); 41 EXPECT_EQ("", error);
41 return extension; 42 return extension;
42 } 43 }
43 44
44 TEST_F(ThemeUtilTest, AreThemeSpecificsEqualHelper) { 45 TEST_F(ThemeUtilTest, AreThemeSpecificsEqualHelper) {
45 sync_pb::ThemeSpecifics a, b; 46 sync_pb::ThemeSpecifics a, b;
46 EXPECT_TRUE(AreThemeSpecificsEqualHelper(a, b, false)); 47 EXPECT_TRUE(AreThemeSpecificsEqualHelper(a, b, false));
47 EXPECT_TRUE(AreThemeSpecificsEqualHelper(a, b, true)); 48 EXPECT_TRUE(AreThemeSpecificsEqualHelper(a, b, true));
48 49
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 // TODO(akalin): Mock out call to GetPrefs() under TOOLKIT_USES_GTK. 223 // TODO(akalin): Mock out call to GetPrefs() under TOOLKIT_USES_GTK.
223 224
224 sync_pb::ThemeSpecifics theme_specifics; 225 sync_pb::ThemeSpecifics theme_specifics;
225 SetCurrentThemeFromThemeSpecificsIfNecessary(theme_specifics, 226 SetCurrentThemeFromThemeSpecificsIfNecessary(theme_specifics,
226 &profile); 227 &profile);
227 } 228 }
228 229
229 } // namespace 230 } // namespace
230 231
231 } // namespace browser_sync 232 } // namespace browser_sync
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/extension_util_unittest.cc ('k') | chrome/browser/sync/util/extensions_activity_monitor_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698