Chromium Code Reviews| Index: ui/compositor/layer_animation_sequence_unittest.cc |
| diff --git a/ui/compositor/layer_animation_sequence_unittest.cc b/ui/compositor/layer_animation_sequence_unittest.cc |
| index 3b4591762b09b5be4acf8001fa31a6b8156c40af..1396bdf57db787fe1a9ddb0c835342ce234c00ee 100644 |
| --- a/ui/compositor/layer_animation_sequence_unittest.cc |
| +++ b/ui/compositor/layer_animation_sequence_unittest.cc |
| @@ -28,9 +28,8 @@ TEST(LayerAnimationSequenceTest, NoElement) { |
| start_time += base::TimeDelta::FromSeconds(1); |
| sequence.set_start_time(start_time); |
| EXPECT_TRUE(sequence.IsFinished(start_time)); |
| - EXPECT_TRUE(sequence.properties().size() == 0); |
| - LayerAnimationElement::AnimatableProperties properties; |
| - EXPECT_FALSE(sequence.HasConflictingProperty(properties)); |
| + EXPECT_TRUE(sequence.properties() == LayerAnimationElement::UNKNOWN); |
|
sky
2014/01/13 14:26:42
EXPECT_EQ (here and similar places in this file).
Ian Vollick
2014/01/13 19:03:59
Done.
|
| + EXPECT_FALSE(sequence.HasConflictingProperty(LayerAnimationElement::UNKNOWN)); |
| } |
| // Check that the sequences progresses the delegate as expected when it contains |
| @@ -62,9 +61,7 @@ TEST(LayerAnimationSequenceTest, SingleElement) { |
| EXPECT_FLOAT_EQ(target, delegate.GetBrightnessForAnimation()); |
| } |
| - EXPECT_TRUE(sequence.properties().size() == 1); |
| - EXPECT_TRUE(sequence.properties().find(LayerAnimationElement::BRIGHTNESS) != |
| - sequence.properties().end()); |
| + EXPECT_TRUE(sequence.properties() == LayerAnimationElement::BRIGHTNESS); |
| } |
| // Check that the sequences progresses the delegate as expected when it contains |
| @@ -105,9 +102,7 @@ TEST(LayerAnimationSequenceTest, SingleThreadedElement) { |
| EXPECT_FLOAT_EQ(target, delegate.GetOpacityForAnimation()); |
| } |
| - EXPECT_TRUE(sequence.properties().size() == 1); |
| - EXPECT_TRUE(sequence.properties().find(LayerAnimationElement::OPACITY) != |
| - sequence.properties().end()); |
| + EXPECT_TRUE(sequence.properties() == LayerAnimationElement::OPACITY); |
| } |
| // Check that the sequences progresses the delegate as expected when it contains |
| @@ -125,11 +120,8 @@ TEST(LayerAnimationSequenceTest, MultipleElement) { |
| LayerAnimationElement::CreateOpacityElement(target_opacity, delta)); |
| // Pause bounds for a second. |
| - LayerAnimationElement::AnimatableProperties properties; |
| - properties.insert(LayerAnimationElement::BOUNDS); |
| - |
| - sequence.AddElement( |
| - LayerAnimationElement::CreatePauseElement(properties, delta)); |
| + sequence.AddElement(LayerAnimationElement::CreatePauseElement( |
| + LayerAnimationElement::BOUNDS, delta)); |
| gfx::Transform start_transform, target_transform, middle_transform; |
| start_transform.Rotate(-30.0); |
| @@ -196,13 +188,9 @@ TEST(LayerAnimationSequenceTest, MultipleElement) { |
| delegate.GetTransformForAnimation()); |
| } |
| - EXPECT_TRUE(sequence.properties().size() == 3); |
| - EXPECT_TRUE(sequence.properties().find(LayerAnimationElement::OPACITY) != |
| - sequence.properties().end()); |
| - EXPECT_TRUE(sequence.properties().find(LayerAnimationElement::TRANSFORM) != |
| - sequence.properties().end()); |
| - EXPECT_TRUE(sequence.properties().find(LayerAnimationElement::BOUNDS) != |
| - sequence.properties().end()); |
| + EXPECT_TRUE(sequence.properties() == (LayerAnimationElement::OPACITY | |
| + LayerAnimationElement::TRANSFORM | |
| + LayerAnimationElement::BOUNDS)); |
| } |
| // Check that a sequence can still be aborted if it has cycled many times. |