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

Unified Diff: services/view_manager/scheduled_animation_group_unittest.cc

Issue 1375313006: For c++, Generate enum classes instead of enum from mojom. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 3 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
Index: services/view_manager/scheduled_animation_group_unittest.cc
diff --git a/services/view_manager/scheduled_animation_group_unittest.cc b/services/view_manager/scheduled_animation_group_unittest.cc
index 6129b487105fb9787ebbf1c8374da9777389b372..1e18119ee69de015ec5e8c4ec94703c6ce2ae2f3 100644
--- a/services/view_manager/scheduled_animation_group_unittest.cc
+++ b/services/view_manager/scheduled_animation_group_unittest.cc
@@ -10,10 +10,8 @@
#include "services/view_manager/test_server_view_delegate.h"
#include "testing/gtest/include/gtest/gtest.h"
-using mojo::ANIMATION_PROPERTY_NONE;
-using mojo::ANIMATION_PROPERTY_OPACITY;
-using mojo::ANIMATION_PROPERTY_TRANSFORM;
-using mojo::ANIMATION_TWEEN_TYPE_LINEAR;
+using mojo::AnimationProperty;
+using mojo::AnimationTweenType;
using mojo::AnimationGroup;
using mojo::AnimationSequence;
using mojo::AnimationElement;
@@ -46,8 +44,8 @@ TEST(ScheduledAnimationGroupTest, IsAnimationGroupValid) {
AnimationSequence& sequence = *(group.sequences[0]);
sequence.elements.push_back(AnimationElement::New());
AnimationElement& element = *(sequence.elements[0]);
- element.property = ANIMATION_PROPERTY_OPACITY;
- element.tween_type = ANIMATION_TWEEN_TYPE_LINEAR;
+ element.property = AnimationProperty::OPACITY;
+ element.tween_type = AnimationTweenType::LINEAR;
// Element with no target_value is not valid.
EXPECT_FALSE(IsAnimationGroupValid(group));
@@ -69,7 +67,7 @@ TEST(ScheduledAnimationGroupTest, IsAnimationGroupValid) {
EXPECT_TRUE(IsAnimationGroupValid(group));
// Bogus transform.
- element.property = ANIMATION_PROPERTY_TRANSFORM;
+ element.property = AnimationProperty::TRANSFORM;
EXPECT_FALSE(IsAnimationGroupValid(group));
element.start_value->transform = mojo::Transform::From(gfx::Transform());
EXPECT_FALSE(IsAnimationGroupValid(group));
@@ -83,13 +81,13 @@ TEST(ScheduledAnimationGroupTest, IsAnimationGroupValid) {
AnimationSequence& sequence2 = *(group.sequences[1]);
sequence2.elements.push_back(AnimationElement::New());
AnimationElement& element2 = *(sequence2.elements[0]);
- element2.property = ANIMATION_PROPERTY_OPACITY;
- element2.tween_type = ANIMATION_TWEEN_TYPE_LINEAR;
+ element2.property = AnimationProperty::OPACITY;
+ element2.tween_type = AnimationTweenType::LINEAR;
// Element with no target_value is not valid.
EXPECT_FALSE(IsAnimationGroupValid(group));
- element2.property = ANIMATION_PROPERTY_NONE;
+ element2.property = AnimationProperty::NONE;
EXPECT_TRUE(IsAnimationGroupValid(group));
}

Powered by Google App Engine
This is Rietveld 408576698