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) |