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

Unified Diff: ui/wm/core/window_animations_unittest.cc

Issue 2926793002: Use ContainsValue() instead of std::find() in ui/wm and ui/message_center (Closed)
Patch Set: Changed EXPECT_TRUE to EXPECT_FALSE 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/wm/core/transient_window_manager.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/wm/core/window_animations_unittest.cc
diff --git a/ui/wm/core/window_animations_unittest.cc b/ui/wm/core/window_animations_unittest.cc
index 507a7e793210abdc10ca6668336435540d66f924..1cad6cfb5a5eed92125b981cc7aa27210b89d7a3 100644
--- a/ui/wm/core/window_animations_unittest.cc
+++ b/ui/wm/core/window_animations_unittest.cc
@@ -7,6 +7,7 @@
#include <memory>
#include "base/macros.h"
+#include "base/stl_util.h"
#include "base/time/time.h"
#include "ui/aura/test/aura_test_base.h"
#include "ui/aura/test/test_windows.h"
@@ -158,15 +159,9 @@ TEST_F(WindowAnimationsTest, HideAnimationDetachLayers) {
// the parent layer.
EXPECT_NE(animating_window->layer(), animating_layer);
EXPECT_TRUE(
- std::find(parent->layer()->children().begin(),
- parent->layer()->children().end(),
- animating_layer) !=
- parent->layer()->children().end());
- EXPECT_TRUE(
- std::find(parent->layer()->children().begin(),
- parent->layer()->children().end(),
- animating_window->layer()) !=
- parent->layer()->children().end());
+ base::ContainsValue(parent->layer()->children(), animating_layer));
+ EXPECT_TRUE(base::ContainsValue(parent->layer()->children(),
+ animating_window->layer()));
// Current layer must be already hidden.
EXPECT_FALSE(animating_window->layer()->visible());
@@ -185,11 +180,8 @@ TEST_F(WindowAnimationsTest, HideAnimationDetachLayers) {
// Animating layer must be gone
animating_layer->GetAnimator()->StopAnimating();
- EXPECT_TRUE(
- std::find(parent->layer()->children().begin(),
- parent->layer()->children().end(),
- animating_layer) ==
- parent->layer()->children().end());
+ EXPECT_FALSE(
+ base::ContainsValue(parent->layer()->children(), animating_layer));
}
}
« no previous file with comments | « ui/wm/core/transient_window_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698