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

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

Issue 11275088: Remove implicit scoped_refptr operator T* Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 8 years, 2 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_file_util_unittest.cc
diff --git a/chrome/common/extensions/extension_file_util_unittest.cc b/chrome/common/extensions/extension_file_util_unittest.cc
index 6ce5c89475f0fd2dfe2ad6b8c01f99cb2046c9c2..3e4f9d42233cd35e4cfaae1cc66a0513caf49a46 100644
--- a/chrome/common/extensions/extension_file_util_unittest.cc
+++ b/chrome/common/extensions/extension_file_util_unittest.cc
@@ -91,7 +91,7 @@ TEST(ExtensionFileUtil, LoadExtensionWithValidLocales) {
std::string error;
scoped_refptr<Extension> extension(extension_file_util::LoadExtension(
install_dir, Extension::LOAD, Extension::NO_FLAGS, &error));
- ASSERT_TRUE(extension != NULL);
+ ASSERT_TRUE(extension.get() != NULL);
EXPECT_EQ("The first extension that I made.", extension->description());
}
@@ -107,7 +107,7 @@ TEST(ExtensionFileUtil, LoadExtensionWithoutLocalesFolder) {
std::string error;
scoped_refptr<Extension> extension(extension_file_util::LoadExtension(
install_dir, Extension::LOAD, Extension::NO_FLAGS, &error));
- ASSERT_FALSE(extension == NULL);
+ ASSERT_FALSE(extension.get() == NULL);
EXPECT_TRUE(error.empty());
}
@@ -180,7 +180,7 @@ TEST(ExtensionFileUtil, LoadExtensionGivesHelpfullErrorOnMissingManifest) {
std::string error;
scoped_refptr<Extension> extension(extension_file_util::LoadExtension(
install_dir, Extension::LOAD, Extension::NO_FLAGS, &error));
- ASSERT_TRUE(extension == NULL);
+ ASSERT_TRUE(extension.get() == NULL);
ASSERT_FALSE(error.empty());
ASSERT_STREQ("Manifest file is missing or unreadable.", error.c_str());
}
@@ -197,7 +197,7 @@ TEST(ExtensionFileUtil, LoadExtensionGivesHelpfullErrorOnBadManifest) {
std::string error;
scoped_refptr<Extension> extension(extension_file_util::LoadExtension(
install_dir, Extension::LOAD, Extension::NO_FLAGS, &error));
- ASSERT_TRUE(extension == NULL);
+ ASSERT_TRUE(extension.get() == NULL);
ASSERT_FALSE(error.empty());
ASSERT_STREQ("Manifest is not valid JSON. "
"Line: 2, column: 16, Syntax error.", error.c_str());
@@ -213,7 +213,7 @@ TEST(ExtensionFileUtil, FailLoadingNonUTF8Scripts) {
std::string error;
scoped_refptr<Extension> extension(extension_file_util::LoadExtension(
install_dir, Extension::LOAD, Extension::NO_FLAGS, &error));
- ASSERT_TRUE(extension == NULL);
+ ASSERT_TRUE(extension.get() == NULL);
ASSERT_STREQ("Could not load file 'bad_encoding.js' for content script. "
"It isn't UTF-8 encoded.", error.c_str());
}
@@ -384,7 +384,7 @@ TEST(ExtensionFileUtil, ValidateThemeUTF8) {
ASSERT_TRUE(extension.get()) << error;
Extension::InstallWarningVector warnings;
- EXPECT_TRUE(extension_file_util::ValidateExtension(extension,
+ EXPECT_TRUE(extension_file_util::ValidateExtension(extension.get(),
&error, &warnings)) <<
error;
EXPECT_EQ(0U, warnings.size());
@@ -415,7 +415,7 @@ TEST(ExtensionFileUtil, MAYBE_BackgroundScriptsMustExist) {
value.get(), temp.path(), Extension::LOAD, 0, &error);
ASSERT_TRUE(extension.get()) << error;
- EXPECT_FALSE(extension_file_util::ValidateExtension(extension,
+ EXPECT_FALSE(extension_file_util::ValidateExtension(extension.get(),
&error, &warnings));
EXPECT_EQ(l10n_util::GetStringFUTF8(
IDS_EXTENSION_LOAD_BACKGROUND_SCRIPT_FAILED, ASCIIToUTF16("foo.js")),
@@ -430,7 +430,7 @@ TEST(ExtensionFileUtil, MAYBE_BackgroundScriptsMustExist) {
ASSERT_TRUE(extension.get()) << error;
warnings.clear();
- EXPECT_FALSE(extension_file_util::ValidateExtension(extension,
+ EXPECT_FALSE(extension_file_util::ValidateExtension(extension.get(),
&error, &warnings));
EXPECT_EQ(l10n_util::GetStringFUTF8(
IDS_EXTENSION_LOAD_BACKGROUND_SCRIPT_FAILED,
@@ -541,7 +541,7 @@ TEST(ExtensionFileUtil, CheckZeroLengthImageFile) {
std::string error;
scoped_refptr<Extension> extension(extension_file_util::LoadExtension(
ext_dir, Extension::LOAD, Extension::NO_FLAGS, &error));
- ASSERT_TRUE(extension == NULL);
+ ASSERT_TRUE(extension.get() == NULL);
ASSERT_STREQ("Could not load extension icon 'icon.png'.",
error.c_str());
@@ -553,7 +553,7 @@ TEST(ExtensionFileUtil, CheckZeroLengthImageFile) {
scoped_refptr<Extension> extension2(extension_file_util::LoadExtension(
ext_dir, Extension::LOAD, Extension::NO_FLAGS, &error));
- ASSERT_TRUE(extension2 == NULL);
+ ASSERT_TRUE(extension2.get() == NULL);
ASSERT_STREQ("Could not load icon 'icon.png' for browser action.",
error.c_str());
@@ -565,7 +565,7 @@ TEST(ExtensionFileUtil, CheckZeroLengthImageFile) {
scoped_refptr<Extension> extension3(extension_file_util::LoadExtension(
ext_dir, Extension::LOAD, Extension::NO_FLAGS, &error));
- ASSERT_TRUE(extension3 == NULL);
+ ASSERT_TRUE(extension3.get() == NULL);
ASSERT_STREQ("Could not load icon 'icon.png' for page action.",
error.c_str());
}

Powered by Google App Engine
This is Rietveld 408576698