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

Unified Diff: ui/accessibility/ax_tree_unittest.cc

Issue 2930273002: Use ContainsValue() instead of std::find() in ui/accessibility, ui/gl and ui/ozone (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 | « ui/accessibility/ax_position.h ('k') | ui/gl/gl_implementation.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/accessibility/ax_tree_unittest.cc
diff --git a/ui/accessibility/ax_tree_unittest.cc b/ui/accessibility/ax_tree_unittest.cc
index c915a5f3bd192696d4c55af635c1d4845f7c4a3e..07beed6d4ab72e9da95e503c9a65fb7c73cb4002 100644
--- a/ui/accessibility/ax_tree_unittest.cc
+++ b/ui/accessibility/ax_tree_unittest.cc
@@ -10,6 +10,7 @@
#include <memory>
#include "base/memory/ptr_util.h"
+#include "base/stl_util.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/stringprintf.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -523,11 +524,9 @@ TEST(AXTreeTest, ReparentingDoesNotTriggerNodeCreated) {
fake_delegate.subtree_reparented_finished_ids();
std::vector<int> node_reparented =
fake_delegate.node_reparented_finished_ids();
- ASSERT_EQ(std::find(created.begin(), created.end(), 3), created.end());
- ASSERT_NE(std::find(subtree_reparented.begin(), subtree_reparented.end(), 3),
- subtree_reparented.end());
- ASSERT_EQ(std::find(node_reparented.begin(), node_reparented.end(), 3),
- node_reparented.end());
+ ASSERT_FALSE(base::ContainsValue(created, 3));
+ ASSERT_TRUE(base::ContainsValue(subtree_reparented, 3));
+ ASSERT_FALSE(base::ContainsValue(node_reparented, 3));
}
TEST(AXTreeTest, TreeDelegateIsNotCalledForReparenting) {
« no previous file with comments | « ui/accessibility/ax_position.h ('k') | ui/gl/gl_implementation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698