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

Unified Diff: chrome/common/extensions/extension_unittest.cc

Issue 10855190: Disable sync for default apps (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: . Created 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/extension_unittest.cc
diff --git a/chrome/common/extensions/extension_unittest.cc b/chrome/common/extensions/extension_unittest.cc
index 104394c28474d3d8e76a66aed5560d87fc3bfea3..3272a70946c828b55f8c568f69b8463600d80959 100644
--- a/chrome/common/extensions/extension_unittest.cc
+++ b/chrome/common/extensions/extension_unittest.cc
@@ -1055,7 +1055,8 @@ static scoped_refptr<Extension> MakeSyncTestExtension(
const GURL& launch_url,
Extension::Location location,
int num_plugins,
- const FilePath& extension_path) {
+ const FilePath& extension_path,
+ int creation_flags=Extension::NO_FLAGS) {
Mihai Parparita -not on Chrome 2012/08/24 21:05:23 Our style guide forbids default arguments: http://
DictionaryValue source;
source.SetString(extension_manifest_keys::kName,
"PossiblySyncableExtension");
@@ -1086,7 +1087,7 @@ static scoped_refptr<Extension> MakeSyncTestExtension(
std::string error;
scoped_refptr<Extension> extension = Extension::Create(
- extension_path, location, source, Extension::NO_FLAGS, &error);
+ extension_path, location, source, creation_flags, &error);
EXPECT_TRUE(extension);
EXPECT_EQ("", error);
return extension;
@@ -1172,6 +1173,14 @@ TEST(ExtensionTest, OnlySyncInternal) {
EXPECT_FALSE(extension_noninternal->IsSyncable());
}
+TEST(ExtensionTest, DontSyncDefault) {
+ scoped_refptr<Extension> extension_default(
+ MakeSyncTestExtension(EXTENSION, GURL(), GURL(),
+ Extension::INTERNAL, 0, FilePath(),
+ Extension::FROM_DEFAULT));
+ EXPECT_FALSE(extension_default->IsSyncable());
+}
+
// These last 2 tests don't make sense on Chrome OS, where extension plugins
// are not allowed.
#if !defined(OS_CHROMEOS)
« chrome/common/extensions/extension.cc ('K') | « chrome/common/extensions/extension.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698