summaryrefslogtreecommitdiffstats
path: root/extensions/browser/error_map_unittest.cc
diff options
context:
space:
mode:
authorricea <ricea@chromium.org>2015-09-25 11:45:13 -0700
committerCommit bot <commit-bot@chromium.org>2015-09-25 18:46:07 +0000
commitc700927282ae201df4e0938cfbaeefa4a96bfc80 (patch)
tree2eb3e9ad671e2b9c1aaa53de210c568ffe2301c8 /extensions/browser/error_map_unittest.cc
parent1c5d55a1edfc5da9f019e866ab426064ea292d40 (diff)
downloadchromium_src-c700927282ae201df4e0938cfbaeefa4a96bfc80.zip
chromium_src-c700927282ae201df4e0938cfbaeefa4a96bfc80.tar.gz
chromium_src-c700927282ae201df4e0938cfbaeefa4a96bfc80.tar.bz2
Use the appropriate variant of IntToString in //extensions
Using the wrong variant of IntToString() can lead to unexpected behaviour and bugs. Use the appropriate variant for the type being converted. No behaviour change intended. BUG=505479 TEST=compiled Review URL: https://codereview.chromium.org/1352893003 Cr-Commit-Position: refs/heads/master@{#350874}
Diffstat (limited to 'extensions/browser/error_map_unittest.cc')
-rw-r--r--extensions/browser/error_map_unittest.cc15
1 files changed, 7 insertions, 8 deletions
diff --git a/extensions/browser/error_map_unittest.cc b/extensions/browser/error_map_unittest.cc
index f3880c6..07c6f58 100644
--- a/extensions/browser/error_map_unittest.cc
+++ b/extensions/browser/error_map_unittest.cc
@@ -40,7 +40,7 @@ TEST_F(ErrorMapUnitTest, AddAndRemoveErrors) {
// Populate with both incognito and non-incognito errors (evenly distributed).
for (size_t i = 0; i < kNumTotalErrors; ++i) {
ASSERT_TRUE(errors_.AddError(
- CreateNewRuntimeError(kId, base::UintToString(i), i % 2 == 0)));
+ CreateNewRuntimeError(kId, base::SizeTToString(i), i % 2 == 0)));
}
// There should only be one entry in the map, since errors are stored in lists
@@ -114,8 +114,8 @@ TEST_F(ErrorMapUnitTest, ExcessiveErrorsGetCropped) {
// Add new errors, with each error's message set to its number.
for (size_t i = 0; i < kMaxErrorsPerExtension + kNumExtraErrors; ++i) {
- ASSERT_TRUE(errors_.AddError(
- CreateNewRuntimeError(kId, base::UintToString(i))));
+ ASSERT_TRUE(
+ errors_.AddError(CreateNewRuntimeError(kId, base::SizeTToString(i))));
}
ASSERT_EQ(1u, errors_.size());
@@ -125,10 +125,9 @@ TEST_F(ErrorMapUnitTest, ExcessiveErrorsGetCropped) {
// We should have popped off errors in the order they arrived, so the
// first stored error should be the 6th reported (zero-based)...
- ASSERT_EQ(base::UintToString16(kNumExtraErrors),
- list.front()->message());
+ ASSERT_EQ(base::SizeTToString16(kNumExtraErrors), list.front()->message());
// ..and the last stored should be the 105th reported.
- ASSERT_EQ(base::UintToString16(kMaxErrorsPerExtension + kNumExtraErrors - 1),
+ ASSERT_EQ(base::SizeTToString16(kMaxErrorsPerExtension + kNumExtraErrors - 1),
list.back()->message());
}
@@ -142,8 +141,8 @@ TEST_F(ErrorMapUnitTest, DuplicateErrorsAreReplaced) {
// Report three errors.
for (size_t i = 0; i < kNumErrors; ++i) {
- ASSERT_TRUE(errors_.AddError(
- CreateNewRuntimeError(kId, base::UintToString(i))));
+ ASSERT_TRUE(
+ errors_.AddError(CreateNewRuntimeError(kId, base::SizeTToString(i))));
}
// Create an error identical to the second error reported, save its