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

Unified Diff: extensions/common/url_pattern_set_unittest.cc

Issue 2950263003: Use ContainsValue() instead of std::find() in extensions/ (Closed)
Patch Set: Rebase patch. Created 3 years, 6 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
« no previous file with comments | « extensions/common/permissions/permissions_data.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/common/url_pattern_set_unittest.cc
diff --git a/extensions/common/url_pattern_set_unittest.cc b/extensions/common/url_pattern_set_unittest.cc
index bbb72aa7c5dc77927a181e128368fddb1280b018..86e4a4ded02d147c9208eac76b4dd76d78106dea 100644
--- a/extensions/common/url_pattern_set_unittest.cc
+++ b/extensions/common/url_pattern_set_unittest.cc
@@ -8,6 +8,7 @@
#include <sstream>
+#include "base/stl_util.h"
#include "base/values.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"
@@ -467,13 +468,8 @@ TEST(URLPatternSetTest, ToStringVector) {
EXPECT_EQ(2UL, string_vector->size());
- const auto begin = string_vector->begin();
- const auto end = string_vector->end();
-
- auto it = std::find(begin, end, "https://google.com/");
- EXPECT_NE(it, end);
- it = std::find(begin, end, "https://yahoo.com/");
- EXPECT_NE(it, end);
+ EXPECT_TRUE(base::ContainsValue(*string_vector, "https://google.com/"));
+ EXPECT_TRUE(base::ContainsValue(*string_vector, "https://yahoo.com/"));
}
} // namespace extensions
« no previous file with comments | « extensions/common/permissions/permissions_data.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698