Chromium Code Reviews| 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..3b6c55941d0a36f69e404f872f17c71f395b8a54 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()); |
| @@ -186,10 +181,7 @@ TEST_F(WindowAnimationsTest, HideAnimationDetachLayers) { |
| // Animating layer must be gone |
| animating_layer->GetAnimator()->StopAnimating(); |
| EXPECT_TRUE( |
|
Daniel Erat
2017/06/07 14:43:09
nit: make this EXPECT_FALSE(base::ContainsValue(..
Tripta
2017/06/08 03:49:41
Done.
|
| - std::find(parent->layer()->children().begin(), |
| - parent->layer()->children().end(), |
| - animating_layer) == |
| - parent->layer()->children().end()); |
| + !base::ContainsValue(parent->layer()->children(), animating_layer)); |
| } |
| } |