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

Unified Diff: ui/base/ime/chromeos/character_composer_unittest.cc

Issue 2930573005: Use ContainsValue() instead of std::find() in ui/android, ui/base and ui/views (Closed)
Patch Set: Changed EXPECT_FALSE to EXPECT_TRUE 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 | « ui/base/clipboard/clipboard.cc ('k') | ui/base/models/list_selection_model.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/ime/chromeos/character_composer_unittest.cc
diff --git a/ui/base/ime/chromeos/character_composer_unittest.cc b/ui/base/ime/chromeos/character_composer_unittest.cc
index 50bd466436cf417dcca7c627bd21741c30e802ee..e9bef9b85363cda478afda982987cb23840842c0 100644
--- a/ui/base/ime/chromeos/character_composer_unittest.cc
+++ b/ui/base/ime/chromeos/character_composer_unittest.cc
@@ -9,6 +9,7 @@
#include <memory>
#include "base/macros.h"
+#include "base/stl_util.h"
#include "base/strings/utf_string_conversions.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/events/event.h"
@@ -249,8 +250,7 @@ TEST_F(CharacterComposerTest, MainTableIsCorrectlyOrdered) {
EXPECT_LT(previous_key, key) << index;
previous_key = key;
// Verify that the internal link is valid.
- const auto it = std::find(subtrees.begin(), subtrees.end(), value);
- EXPECT_FALSE(subtrees.end() == it) << index;
+ EXPECT_TRUE(base::ContainsValue(subtrees, value)) << index;
index += 2;
}
// Check the leaf subtable.
« no previous file with comments | « ui/base/clipboard/clipboard.cc ('k') | ui/base/models/list_selection_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698