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

Unified Diff: Source/core/animation/animatable/AnimatableDoubleTest.cpp

Issue 1120003002: [Oilpan] Migrate most classes under core/animations to Oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Resize expect size of Persistent Created 5 years, 7 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: Source/core/animation/animatable/AnimatableDoubleTest.cpp
diff --git a/Source/core/animation/animatable/AnimatableDoubleTest.cpp b/Source/core/animation/animatable/AnimatableDoubleTest.cpp
index 0808838831b1436dfde885020a232fbd32bf71c5..9096ec33f1c21f3c2b017c3fa621fc4b99ea4d85 100644
--- a/Source/core/animation/animatable/AnimatableDoubleTest.cpp
+++ b/Source/core/animation/animatable/AnimatableDoubleTest.cpp
@@ -39,14 +39,14 @@ namespace {
TEST(AnimationAnimatableDoubleTest, Create)
{
- EXPECT_TRUE(static_cast<bool>(AnimatableDouble::create(5).get()));
- EXPECT_TRUE(static_cast<bool>(AnimatableDouble::create(10).get()));
+ EXPECT_TRUE(static_cast<bool>(AnimatableDouble::create(5)));
+ EXPECT_TRUE(static_cast<bool>(AnimatableDouble::create(10)));
}
TEST(AnimationAnimatableDoubleTest, Equal)
{
- EXPECT_TRUE(AnimatableDouble::create(10)->equals(AnimatableDouble::create(10).get()));
- EXPECT_FALSE(AnimatableDouble::create(5)->equals(AnimatableDouble::create(10).get()));
+ EXPECT_TRUE(AnimatableDouble::create(10)->equals(AnimatableDouble::create(10)));
+ EXPECT_FALSE(AnimatableDouble::create(5)->equals(AnimatableDouble::create(10)));
}
TEST(AnimationAnimatableDoubleTest, ToDouble)
@@ -58,15 +58,15 @@ TEST(AnimationAnimatableDoubleTest, ToDouble)
TEST(AnimationAnimatableDoubleTest, Interpolate)
{
- RefPtrWillBeRawPtr<AnimatableDouble> from10 = AnimatableDouble::create(10);
- RefPtrWillBeRawPtr<AnimatableDouble> to20 = AnimatableDouble::create(20);
- EXPECT_EQ(5, toAnimatableDouble(AnimatableValue::interpolate(from10.get(), to20.get(), -0.5).get())->toDouble());
- EXPECT_EQ(10, toAnimatableDouble(AnimatableValue::interpolate(from10.get(), to20.get(), 0).get())->toDouble());
- EXPECT_EQ(14, toAnimatableDouble(AnimatableValue::interpolate(from10.get(), to20.get(), 0.4).get())->toDouble());
- EXPECT_EQ(15, toAnimatableDouble(AnimatableValue::interpolate(from10.get(), to20.get(), 0.5).get())->toDouble());
- EXPECT_EQ(16, toAnimatableDouble(AnimatableValue::interpolate(from10.get(), to20.get(), 0.6).get())->toDouble());
- EXPECT_EQ(20, toAnimatableDouble(AnimatableValue::interpolate(from10.get(), to20.get(), 1).get())->toDouble());
- EXPECT_EQ(25, toAnimatableDouble(AnimatableValue::interpolate(from10.get(), to20.get(), 1.5).get())->toDouble());
+ AnimatableDouble* from10 = AnimatableDouble::create(10);
+ AnimatableDouble* to20 = AnimatableDouble::create(20);
+ EXPECT_EQ(5, toAnimatableDouble(AnimatableValue::interpolate(from10, to20, -0.5))->toDouble());
+ EXPECT_EQ(10, toAnimatableDouble(AnimatableValue::interpolate(from10, to20, 0))->toDouble());
+ EXPECT_EQ(14, toAnimatableDouble(AnimatableValue::interpolate(from10, to20, 0.4))->toDouble());
+ EXPECT_EQ(15, toAnimatableDouble(AnimatableValue::interpolate(from10, to20, 0.5))->toDouble());
+ EXPECT_EQ(16, toAnimatableDouble(AnimatableValue::interpolate(from10, to20, 0.6))->toDouble());
+ EXPECT_EQ(20, toAnimatableDouble(AnimatableValue::interpolate(from10, to20, 1))->toDouble());
+ EXPECT_EQ(25, toAnimatableDouble(AnimatableValue::interpolate(from10, to20, 1.5))->toDouble());
}
}

Powered by Google App Engine
This is Rietveld 408576698