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

Side by Side Diff: Source/core/animation/AnimatableUnknownTest.cpp

Issue 27664002: Web Animations: Regularise unit test names (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Updated to head Created 7 years, 2 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 unified diff | Download patch
OLDNEW
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
33 33
34 #include "core/animation/AnimatableNeutral.h" 34 #include "core/animation/AnimatableNeutral.h"
35 #include "core/css/CSSArrayFunctionValue.h" 35 #include "core/css/CSSArrayFunctionValue.h"
36 36
37 #include <gtest/gtest.h> 37 #include <gtest/gtest.h>
38 38
39 using namespace WebCore; 39 using namespace WebCore;
40 40
41 namespace { 41 namespace {
42 42
43 class AnimatableUnknownTest : public ::testing::Test { 43 class CoreAnimationAnimatableUnknownTest : public ::testing::Test {
44 protected: 44 protected:
45 virtual void SetUp() 45 virtual void SetUp()
46 { 46 {
47 cssValue = CSSArrayFunctionValue::create(); 47 cssValue = CSSArrayFunctionValue::create();
48 animatableUnknown = AnimatableUnknown::create(cssValue); 48 animatableUnknown = AnimatableUnknown::create(cssValue);
49 49
50 otherCSSValue = CSSArrayFunctionValue::create(); 50 otherCSSValue = CSSArrayFunctionValue::create();
51 otherAnimatableUnknown = AnimatableUnknown::create(otherCSSValue); 51 otherAnimatableUnknown = AnimatableUnknown::create(otherCSSValue);
52 } 52 }
53 53
54 RefPtr<CSSValue> cssValue; 54 RefPtr<CSSValue> cssValue;
55 RefPtr<AnimatableValue> animatableUnknown; 55 RefPtr<AnimatableValue> animatableUnknown;
56 56
57 RefPtr<CSSValue> otherCSSValue; 57 RefPtr<CSSValue> otherCSSValue;
58 RefPtr<AnimatableValue> otherAnimatableUnknown; 58 RefPtr<AnimatableValue> otherAnimatableUnknown;
59 }; 59 };
60 60
61 TEST_F(AnimatableUnknownTest, Create) 61 TEST_F(CoreAnimationAnimatableUnknownTest, Create)
62 { 62 {
63 EXPECT_TRUE(animatableUnknown); 63 EXPECT_TRUE(animatableUnknown);
64 } 64 }
65 65
66 TEST_F(AnimatableUnknownTest, ToCSSValue) 66 TEST_F(CoreAnimationAnimatableUnknownTest, ToCSSValue)
67 { 67 {
68 EXPECT_EQ(cssValue, toAnimatableUnknown(animatableUnknown.get())->toCSSValue ()); 68 EXPECT_EQ(cssValue, toAnimatableUnknown(animatableUnknown.get())->toCSSValue ());
69 } 69 }
70 70
71 TEST_F(AnimatableUnknownTest, Interpolate) 71 TEST_F(CoreAnimationAnimatableUnknownTest, Interpolate)
72 { 72 {
73 EXPECT_EQ(cssValue, toAnimatableUnknown(AnimatableValue::interpolate(animata bleUnknown.get(), otherAnimatableUnknown.get(), 0).get())->toCSSValue()); 73 EXPECT_EQ(cssValue, toAnimatableUnknown(AnimatableValue::interpolate(animata bleUnknown.get(), otherAnimatableUnknown.get(), 0).get())->toCSSValue());
74 EXPECT_EQ(cssValue, toAnimatableUnknown(AnimatableValue::interpolate(animata bleUnknown.get(), otherAnimatableUnknown.get(), 0.4).get())->toCSSValue()); 74 EXPECT_EQ(cssValue, toAnimatableUnknown(AnimatableValue::interpolate(animata bleUnknown.get(), otherAnimatableUnknown.get(), 0.4).get())->toCSSValue());
75 EXPECT_EQ(otherCSSValue, toAnimatableUnknown(AnimatableValue::interpolate(an imatableUnknown.get(), otherAnimatableUnknown.get(), 0.5).get())->toCSSValue()); 75 EXPECT_EQ(otherCSSValue, toAnimatableUnknown(AnimatableValue::interpolate(an imatableUnknown.get(), otherAnimatableUnknown.get(), 0.5).get())->toCSSValue());
76 EXPECT_EQ(otherCSSValue, toAnimatableUnknown(AnimatableValue::interpolate(an imatableUnknown.get(), otherAnimatableUnknown.get(), 0.6).get())->toCSSValue()); 76 EXPECT_EQ(otherCSSValue, toAnimatableUnknown(AnimatableValue::interpolate(an imatableUnknown.get(), otherAnimatableUnknown.get(), 0.6).get())->toCSSValue());
77 EXPECT_EQ(otherCSSValue, toAnimatableUnknown(AnimatableValue::interpolate(an imatableUnknown.get(), otherAnimatableUnknown.get(), 1).get())->toCSSValue()); 77 EXPECT_EQ(otherCSSValue, toAnimatableUnknown(AnimatableValue::interpolate(an imatableUnknown.get(), otherAnimatableUnknown.get(), 1).get())->toCSSValue());
78 78
79 EXPECT_EQ(otherCSSValue, toAnimatableUnknown(AnimatableValue::interpolate(ot herAnimatableUnknown.get(), animatableUnknown.get(), 0).get())->toCSSValue()); 79 EXPECT_EQ(otherCSSValue, toAnimatableUnknown(AnimatableValue::interpolate(ot herAnimatableUnknown.get(), animatableUnknown.get(), 0).get())->toCSSValue());
80 EXPECT_EQ(otherCSSValue, toAnimatableUnknown(AnimatableValue::interpolate(ot herAnimatableUnknown.get(), animatableUnknown.get(), 0.4).get())->toCSSValue()); 80 EXPECT_EQ(otherCSSValue, toAnimatableUnknown(AnimatableValue::interpolate(ot herAnimatableUnknown.get(), animatableUnknown.get(), 0.4).get())->toCSSValue());
81 EXPECT_EQ(cssValue, toAnimatableUnknown(AnimatableValue::interpolate(otherAn imatableUnknown.get(), animatableUnknown.get(), 0.5).get())->toCSSValue()); 81 EXPECT_EQ(cssValue, toAnimatableUnknown(AnimatableValue::interpolate(otherAn imatableUnknown.get(), animatableUnknown.get(), 0.5).get())->toCSSValue());
82 EXPECT_EQ(cssValue, toAnimatableUnknown(AnimatableValue::interpolate(otherAn imatableUnknown.get(), animatableUnknown.get(), 0.6).get())->toCSSValue()); 82 EXPECT_EQ(cssValue, toAnimatableUnknown(AnimatableValue::interpolate(otherAn imatableUnknown.get(), animatableUnknown.get(), 0.6).get())->toCSSValue());
83 EXPECT_EQ(cssValue, toAnimatableUnknown(AnimatableValue::interpolate(otherAn imatableUnknown.get(), animatableUnknown.get(), 1).get())->toCSSValue()); 83 EXPECT_EQ(cssValue, toAnimatableUnknown(AnimatableValue::interpolate(otherAn imatableUnknown.get(), animatableUnknown.get(), 1).get())->toCSSValue());
84 } 84 }
85 85
86 TEST_F(AnimatableUnknownTest, Add) 86 TEST_F(CoreAnimationAnimatableUnknownTest, Add)
87 { 87 {
88 EXPECT_EQ(otherCSSValue, toAnimatableUnknown(AnimatableValue::add(animatable Unknown.get(), otherAnimatableUnknown.get()).get())->toCSSValue()); 88 EXPECT_EQ(otherCSSValue, toAnimatableUnknown(AnimatableValue::add(animatable Unknown.get(), otherAnimatableUnknown.get()).get())->toCSSValue());
89 EXPECT_EQ(cssValue, toAnimatableUnknown(AnimatableValue::add(otherAnimatable Unknown.get(), animatableUnknown.get()).get())->toCSSValue()); 89 EXPECT_EQ(cssValue, toAnimatableUnknown(AnimatableValue::add(otherAnimatable Unknown.get(), animatableUnknown.get()).get())->toCSSValue());
90 } 90 }
91 91
92 } 92 }
OLDNEW
« no previous file with comments | « Source/core/animation/AnimatableNeutralTest.cpp ('k') | Source/core/animation/AnimatableValueTestHelperTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698