diff options
author | limasdf <limasdf@gmail.com> | 2014-09-18 13:17:37 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-09-18 20:17:48 +0000 |
commit | f0dcf2f802455adebc73eca469d222d18e5560f9 (patch) | |
tree | df941f2f09e9dc519bd4e543e0da5e6890aa7c40 /extensions/browser/runtime_data_unittest.cc | |
parent | 291fd86a7aabd22fb27409a56b34055e02ee0c62 (diff) | |
download | chromium_src-f0dcf2f802455adebc73eca469d222d18e5560f9.zip chromium_src-f0dcf2f802455adebc73eca469d222d18e5560f9.tar.gz chromium_src-f0dcf2f802455adebc73eca469d222d18e5560f9.tar.bz2 |
Remove CreateEmptyExtension from extension_function_test_utils
because "extensions/common/test_util.h" has duplicate function.
BUG=394840
Review URL: https://codereview.chromium.org/569493003
Cr-Commit-Position: refs/heads/master@{#295541}
Diffstat (limited to 'extensions/browser/runtime_data_unittest.cc')
-rw-r--r-- | extensions/browser/runtime_data_unittest.cc | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/extensions/browser/runtime_data_unittest.cc b/extensions/browser/runtime_data_unittest.cc index 23b8098..6253f80 100644 --- a/extensions/browser/runtime_data_unittest.cc +++ b/extensions/browser/runtime_data_unittest.cc @@ -10,21 +10,13 @@ #include "extensions/browser/extension_registry.h" #include "extensions/common/extension.h" #include "extensions/common/extension_builder.h" +#include "extensions/common/test_util.h" #include "extensions/common/value_builder.h" #include "testing/gtest/include/gtest/gtest.h" namespace extensions { namespace { -// Creates a very simple extension. -scoped_refptr<Extension> CreateExtension() { - return ExtensionBuilder() - .SetManifest( - DictionaryBuilder().Set("name", "test").Set("version", "0.1")) - .SetID("id1") - .Build(); -} - // Creates a very simple extension with a background page. scoped_refptr<Extension> CreateExtensionWithBackgroundPage() { return ExtensionBuilder() @@ -52,7 +44,7 @@ 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(); + scoped_refptr<Extension> no_background = test_util::CreateEmptyExtension(); EXPECT_TRUE(runtime_data_.IsBackgroundPageReady(no_background.get())); // An extension with a background page is not ready until the flag is set. @@ -68,7 +60,7 @@ TEST_F(RuntimeDataTest, IsBackgroundPageReady) { } TEST_F(RuntimeDataTest, IsBeingUpgraded) { - scoped_refptr<Extension> extension = CreateExtension(); + scoped_refptr<Extension> extension = test_util::CreateEmptyExtension(); // An extension is not being upgraded until the flag is set. EXPECT_FALSE(runtime_data_.IsBeingUpgraded(extension.get())); @@ -81,7 +73,7 @@ TEST_F(RuntimeDataTest, IsBeingUpgraded) { } TEST_F(RuntimeDataTest, HasUsedWebRequest) { - scoped_refptr<Extension> extension = CreateExtension(); + scoped_refptr<Extension> extension = test_util::CreateEmptyExtension(); // An extension has not used web request until the flag is set. EXPECT_FALSE(runtime_data_.HasUsedWebRequest(extension.get())); |