OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013, Google Inc. All rights reserved. | 2 * Copyright (c) 2013, Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 22 matching lines...) Expand all Loading... |
33 #include "core/animation/animatable/AnimatableNeutral.h" | 33 #include "core/animation/animatable/AnimatableNeutral.h" |
34 #include "core/css/CSSPrimitiveValue.h" | 34 #include "core/css/CSSPrimitiveValue.h" |
35 #include "testing/gtest/include/gtest/gtest.h" | 35 #include "testing/gtest/include/gtest/gtest.h" |
36 | 36 |
37 namespace blink { | 37 namespace blink { |
38 | 38 |
39 class AnimationAnimatableUnknownTest : public ::testing::Test { | 39 class AnimationAnimatableUnknownTest : public ::testing::Test { |
40 protected: | 40 protected: |
41 virtual void SetUp() | 41 virtual void SetUp() |
42 { | 42 { |
43 cssValue = CSSPrimitiveValue::createIdentifier(CSSValueYellow); | 43 cssValue = CSSIdentifierValue::create(CSSValueYellow); |
44 animatableUnknown = AnimatableUnknown::create(cssValue); | 44 animatableUnknown = AnimatableUnknown::create(cssValue); |
45 | 45 |
46 otherCSSValue = CSSPrimitiveValue::createIdentifier(CSSValueOrange); | 46 otherCSSValue = CSSIdentifierValue::create(CSSValueOrange); |
47 otherAnimatableUnknown = AnimatableUnknown::create(otherCSSValue); | 47 otherAnimatableUnknown = AnimatableUnknown::create(otherCSSValue); |
48 } | 48 } |
49 | 49 |
50 Persistent<CSSValue> cssValue; | 50 Persistent<CSSValue> cssValue; |
51 RefPtr<AnimatableValue> animatableUnknown; | 51 RefPtr<AnimatableValue> animatableUnknown; |
52 Persistent<CSSValue> otherCSSValue; | 52 Persistent<CSSValue> otherCSSValue; |
53 RefPtr<AnimatableValue> otherAnimatableUnknown; | 53 RefPtr<AnimatableValue> otherAnimatableUnknown; |
54 }; | 54 }; |
55 | 55 |
56 TEST_F(AnimationAnimatableUnknownTest, Create) | 56 TEST_F(AnimationAnimatableUnknownTest, Create) |
(...skipping 15 matching lines...) Expand all Loading... |
72 EXPECT_EQ(otherCSSValue, toAnimatableUnknown(AnimatableValue::interpolate(an
imatableUnknown.get(), otherAnimatableUnknown.get(), 1).get())->toCSSValue()); | 72 EXPECT_EQ(otherCSSValue, toAnimatableUnknown(AnimatableValue::interpolate(an
imatableUnknown.get(), otherAnimatableUnknown.get(), 1).get())->toCSSValue()); |
73 | 73 |
74 EXPECT_EQ(otherCSSValue, toAnimatableUnknown(AnimatableValue::interpolate(ot
herAnimatableUnknown.get(), animatableUnknown.get(), 0).get())->toCSSValue()); | 74 EXPECT_EQ(otherCSSValue, toAnimatableUnknown(AnimatableValue::interpolate(ot
herAnimatableUnknown.get(), animatableUnknown.get(), 0).get())->toCSSValue()); |
75 EXPECT_EQ(otherCSSValue, toAnimatableUnknown(AnimatableValue::interpolate(ot
herAnimatableUnknown.get(), animatableUnknown.get(), 0.4).get())->toCSSValue()); | 75 EXPECT_EQ(otherCSSValue, toAnimatableUnknown(AnimatableValue::interpolate(ot
herAnimatableUnknown.get(), animatableUnknown.get(), 0.4).get())->toCSSValue()); |
76 EXPECT_EQ(cssValue, toAnimatableUnknown(AnimatableValue::interpolate(otherAn
imatableUnknown.get(), animatableUnknown.get(), 0.5).get())->toCSSValue()); | 76 EXPECT_EQ(cssValue, toAnimatableUnknown(AnimatableValue::interpolate(otherAn
imatableUnknown.get(), animatableUnknown.get(), 0.5).get())->toCSSValue()); |
77 EXPECT_EQ(cssValue, toAnimatableUnknown(AnimatableValue::interpolate(otherAn
imatableUnknown.get(), animatableUnknown.get(), 0.6).get())->toCSSValue()); | 77 EXPECT_EQ(cssValue, toAnimatableUnknown(AnimatableValue::interpolate(otherAn
imatableUnknown.get(), animatableUnknown.get(), 0.6).get())->toCSSValue()); |
78 EXPECT_EQ(cssValue, toAnimatableUnknown(AnimatableValue::interpolate(otherAn
imatableUnknown.get(), animatableUnknown.get(), 1).get())->toCSSValue()); | 78 EXPECT_EQ(cssValue, toAnimatableUnknown(AnimatableValue::interpolate(otherAn
imatableUnknown.get(), animatableUnknown.get(), 1).get())->toCSSValue()); |
79 } | 79 } |
80 | 80 |
81 } // namespace blink | 81 } // namespace blink |
OLD | NEW |