diff options
author | tommycli@chromium.org <tommycli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-08-21 02:27:26 +0000 |
---|---|---|
committer | tommycli@chromium.org <tommycli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-08-21 02:28:55 +0000 |
commit | fdd2837d51c6446e2c417390374fc328a4d25a31 (patch) | |
tree | 4c645e72d2db435562ec275305a2a4b705859204 /extensions/browser/error_map_unittest.cc | |
parent | 2bfa5cff6b5c3ab9d6ce4380e435b1006c18458e (diff) | |
download | chromium_src-fdd2837d51c6446e2c417390374fc328a4d25a31.zip chromium_src-fdd2837d51c6446e2c417390374fc328a4d25a31.tar.gz chromium_src-fdd2837d51c6446e2c417390374fc328a4d25a31.tar.bz2 |
Extensions: Move id_util functions to crx_file component.
Consolidates id_util functions of extension/app/component ids in the crx_file component.
It belongs there because these types of ids are not exclusive to extensions, but rather, for anything that comes in a crx file.
BUG=371463
TBR=blundell@chromium.org
Review URL: https://codereview.chromium.org/481433005
Cr-Commit-Position: refs/heads/master@{#290971}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@290971 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'extensions/browser/error_map_unittest.cc')
-rw-r--r-- | extensions/browser/error_map_unittest.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/extensions/browser/error_map_unittest.cc b/extensions/browser/error_map_unittest.cc index 8330c6a..32bb8cf 100644 --- a/extensions/browser/error_map_unittest.cc +++ b/extensions/browser/error_map_unittest.cc @@ -7,10 +7,10 @@ #include "base/logging.h" #include "base/memory/scoped_ptr.h" #include "base/strings/string_number_conversions.h" +#include "components/crx_file/id_util.h" #include "extensions/browser/extension_error.h" #include "extensions/browser/extension_error_test_util.h" #include "extensions/common/constants.h" -#include "extensions/common/id_util.h" #include "testing/gtest/include/gtest/gtest.h" namespace extensions { @@ -37,7 +37,7 @@ TEST_F(ErrorMapUnitTest, AddAndRemoveErrors) { const size_t kNumTotalErrors = 6; const size_t kNumNonIncognitoErrors = 3; - const std::string kId = id_util::GenerateId("id"); + const std::string kId = crx_file::id_util::GenerateId("id"); // Populate with both incognito and non-incognito errors (evenly distributed). for (size_t i = 0; i < kNumTotalErrors; ++i) { ASSERT_TRUE(errors_.AddError( @@ -59,7 +59,7 @@ TEST_F(ErrorMapUnitTest, AddAndRemoveErrors) { ASSERT_FALSE(list[i]->from_incognito()); // Add another error for a different extension id. - const std::string kSecondId = id_util::GenerateId("id2"); + const std::string kSecondId = crx_file::id_util::GenerateId("id2"); ASSERT_TRUE(errors_.AddError(CreateNewRuntimeError(kSecondId, "foo"))); // There should be two entries now, one for each id, and there should be one @@ -89,7 +89,7 @@ TEST_F(ErrorMapUnitTest, ExcessiveErrorsGetCropped) { // This constant matches one of the same name in error_console.cc. const size_t kMaxErrorsPerExtension = 100; const size_t kNumExtraErrors = 5; - const std::string kId = id_util::GenerateId("id"); + const std::string kId = crx_file::id_util::GenerateId("id"); // Add new errors, with each error's message set to its number. for (size_t i = 0; i < kMaxErrorsPerExtension + kNumExtraErrors; ++i) { @@ -116,7 +116,7 @@ TEST_F(ErrorMapUnitTest, ExcessiveErrorsGetCropped) { TEST_F(ErrorMapUnitTest, DuplicateErrorsAreReplaced) { ASSERT_EQ(0u, errors_.size()); - const std::string kId = id_util::GenerateId("id"); + const std::string kId = crx_file::id_util::GenerateId("id"); const size_t kNumErrors = 3u; // Report three errors. |