diff options
author | dcheng <dcheng@chromium.org> | 2014-08-25 15:20:01 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-08-25 22:30:35 +0000 |
commit | 7921e3faac8556ad9e24c533b8019f85b99e6911 (patch) | |
tree | bdb12163f695a2513b627378f43a1f6ff4803990 /extensions/browser/runtime_data_unittest.cc | |
parent | 4dfe65941a184aee51c4540f0f0fed7d03b9ba8a (diff) | |
download | chromium_src-7921e3faac8556ad9e24c533b8019f85b99e6911.zip chromium_src-7921e3faac8556ad9e24c533b8019f85b99e6911.tar.gz chromium_src-7921e3faac8556ad9e24c533b8019f85b99e6911.tar.bz2 |
Remove implicit conversions from scoped_refptr to T* in extensions/
This patch was generated by running the rewrite_scoped_refptr clang tool
on a Linux build.
BUG=110610
Review URL: https://codereview.chromium.org/503873002
Cr-Commit-Position: refs/heads/master@{#291770}
Diffstat (limited to 'extensions/browser/runtime_data_unittest.cc')
-rw-r--r-- | extensions/browser/runtime_data_unittest.cc | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/extensions/browser/runtime_data_unittest.cc b/extensions/browser/runtime_data_unittest.cc index 913aed3..23b8098 100644 --- a/extensions/browser/runtime_data_unittest.cc +++ b/extensions/browser/runtime_data_unittest.cc @@ -53,55 +53,55 @@ class RuntimeDataTest : public testing::Test { TEST_F(RuntimeDataTest, IsBackgroundPageReady) { // An extension without a background page is always considered ready. scoped_refptr<Extension> no_background = CreateExtension(); - EXPECT_TRUE(runtime_data_.IsBackgroundPageReady(no_background)); + EXPECT_TRUE(runtime_data_.IsBackgroundPageReady(no_background.get())); // An extension with a background page is not ready until the flag is set. scoped_refptr<Extension> with_background = CreateExtensionWithBackgroundPage(); - EXPECT_FALSE(runtime_data_.IsBackgroundPageReady(with_background)); + EXPECT_FALSE(runtime_data_.IsBackgroundPageReady(with_background.get())); // The flag can be toggled. - runtime_data_.SetBackgroundPageReady(with_background, true); - EXPECT_TRUE(runtime_data_.IsBackgroundPageReady(with_background)); - runtime_data_.SetBackgroundPageReady(with_background, false); - EXPECT_FALSE(runtime_data_.IsBackgroundPageReady(with_background)); + runtime_data_.SetBackgroundPageReady(with_background.get(), true); + EXPECT_TRUE(runtime_data_.IsBackgroundPageReady(with_background.get())); + runtime_data_.SetBackgroundPageReady(with_background.get(), false); + EXPECT_FALSE(runtime_data_.IsBackgroundPageReady(with_background.get())); } TEST_F(RuntimeDataTest, IsBeingUpgraded) { scoped_refptr<Extension> extension = CreateExtension(); // An extension is not being upgraded until the flag is set. - EXPECT_FALSE(runtime_data_.IsBeingUpgraded(extension)); + EXPECT_FALSE(runtime_data_.IsBeingUpgraded(extension.get())); // The flag can be toggled. - runtime_data_.SetBeingUpgraded(extension, true); - EXPECT_TRUE(runtime_data_.IsBeingUpgraded(extension)); - runtime_data_.SetBeingUpgraded(extension, false); - EXPECT_FALSE(runtime_data_.IsBeingUpgraded(extension)); + runtime_data_.SetBeingUpgraded(extension.get(), true); + EXPECT_TRUE(runtime_data_.IsBeingUpgraded(extension.get())); + runtime_data_.SetBeingUpgraded(extension.get(), false); + EXPECT_FALSE(runtime_data_.IsBeingUpgraded(extension.get())); } TEST_F(RuntimeDataTest, HasUsedWebRequest) { scoped_refptr<Extension> extension = CreateExtension(); // An extension has not used web request until the flag is set. - EXPECT_FALSE(runtime_data_.HasUsedWebRequest(extension)); + EXPECT_FALSE(runtime_data_.HasUsedWebRequest(extension.get())); // The flag can be toggled. - runtime_data_.SetHasUsedWebRequest(extension, true); - EXPECT_TRUE(runtime_data_.HasUsedWebRequest(extension)); - runtime_data_.SetHasUsedWebRequest(extension, false); - EXPECT_FALSE(runtime_data_.HasUsedWebRequest(extension)); + runtime_data_.SetHasUsedWebRequest(extension.get(), true); + EXPECT_TRUE(runtime_data_.HasUsedWebRequest(extension.get())); + runtime_data_.SetHasUsedWebRequest(extension.get(), false); + EXPECT_FALSE(runtime_data_.HasUsedWebRequest(extension.get())); } // Unloading an extension stops tracking it. TEST_F(RuntimeDataTest, OnExtensionUnloaded) { scoped_refptr<Extension> extension = CreateExtensionWithBackgroundPage(); - runtime_data_.SetBackgroundPageReady(extension, true); - ASSERT_TRUE(runtime_data_.HasExtensionForTesting(extension)); + runtime_data_.SetBackgroundPageReady(extension.get(), true); + ASSERT_TRUE(runtime_data_.HasExtensionForTesting(extension.get())); runtime_data_.OnExtensionUnloaded( - NULL, extension, UnloadedExtensionInfo::REASON_DISABLE); - EXPECT_FALSE(runtime_data_.HasExtensionForTesting(extension)); + NULL, extension.get(), UnloadedExtensionInfo::REASON_DISABLE); + EXPECT_FALSE(runtime_data_.HasExtensionForTesting(extension.get())); } } // namespace |