diff options
Diffstat (limited to 'chrome/browser/extensions/extension_unittest.cc')
-rw-r--r-- | chrome/browser/extensions/extension_unittest.cc | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/chrome/browser/extensions/extension_unittest.cc b/chrome/browser/extensions/extension_unittest.cc index 0607186..df4c64f 100644 --- a/chrome/browser/extensions/extension_unittest.cc +++ b/chrome/browser/extensions/extension_unittest.cc @@ -254,3 +254,20 @@ TEST(ExtensionTest, GetResourceURLAndPath) { EXPECT_EQ(FilePath().value(), Extension::GetResourcePath(extension.path(), "../baz.js").value()); } + +TEST(ExtensionTest, Location) { + Extension extension; + EXPECT_EQ(Extension::INVALID, extension.location()); + + extension.set_location(Extension::INTERNAL); + EXPECT_EQ(Extension::INTERNAL, extension.location()); + EXPECT_TRUE(extension.is_uninstallable()); + + extension.set_location(Extension::EXTERNAL); + EXPECT_EQ(Extension::EXTERNAL, extension.location()); + EXPECT_FALSE(extension.is_uninstallable()); + + extension.set_location(Extension::LOAD); + EXPECT_EQ(Extension::LOAD, extension.location()); + EXPECT_FALSE(extension.is_uninstallable()); +} |