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

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

Issue 85463002: Web Animations: Remove WebAnimations runtime feature in favor of WebAnimationsCSS (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased. Created 7 years 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 | Annotate | Revision Log
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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 // FIXME: Remove once https://codereview.chromium.org/50603011/ lands. 43 // FIXME: Remove once https://codereview.chromium.org/50603011/ lands.
44 #define EXPECT_REFV_EQ(a, b) EXPECT_EQ(*(a.get()), *(b.get())) 44 #define EXPECT_REFV_EQ(a, b) EXPECT_EQ(*(a.get()), *(b.get()))
45 #define EXPECT_REFV_NE(a, b) EXPECT_NE(*(a.get()), *(b.get())) 45 #define EXPECT_REFV_NE(a, b) EXPECT_NE(*(a.get()), *(b.get()))
46 46
47 namespace { 47 namespace {
48 48
49 using namespace WebCore; 49 using namespace WebCore;
50 50
51 class AnimationCompositorAnimationsTimingFunctionReverserTest : public ::testing ::Test { 51 class AnimationCompositorAnimationsTimingFunctionReverserTest : public ::testing ::Test {
52 protected: 52 protected:
53 bool m_enabled;
54
55 virtual void SetUp()
56 {
57 m_enabled = RuntimeEnabledFeatures::webAnimationsEnabled();
58 // Needed for ChainedTimingFunction support
59 RuntimeEnabledFeatures::setWebAnimationsEnabled(true);
60 }
61
62 virtual void TearDown()
63 {
64 RuntimeEnabledFeatures::setWebAnimationsEnabled(m_enabled);
65 }
66 53
67 public: 54 public:
68 PassRefPtr<TimingFunction> reverse(const RefPtr<TimingFunction>& timefunc) 55 PassRefPtr<TimingFunction> reverse(const RefPtr<TimingFunction>& timefunc)
69 { 56 {
70 return CompositorAnimationsTimingFunctionReverser::reverse(timefunc.get( )); 57 return CompositorAnimationsTimingFunctionReverser::reverse(timefunc.get( ));
71 } 58 }
72 }; 59 };
73 60
74 TEST_F(AnimationCompositorAnimationsTimingFunctionReverserTest, LinearReverse) 61 TEST_F(AnimationCompositorAnimationsTimingFunctionReverserTest, LinearReverse)
75 { 62 {
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 chainedMixed->appendSegment(0.75, chainedLinearSingle.get()); 98 chainedMixed->appendSegment(0.75, chainedLinearSingle.get());
112 chainedMixed->appendSegment(1.0, cubicEaseInTiming.get()); 99 chainedMixed->appendSegment(1.0, cubicEaseInTiming.get());
113 100
114 RefPtr<ChainedTimingFunction> chainedMixedReversed = ChainedTimingFunction:: create(); 101 RefPtr<ChainedTimingFunction> chainedMixedReversed = ChainedTimingFunction:: create();
115 chainedMixedReversed->appendSegment(0.25, cubicEaseOutTiming.get()); 102 chainedMixedReversed->appendSegment(0.25, cubicEaseOutTiming.get());
116 chainedMixedReversed->appendSegment(1.0, chainedLinearSingle.get()); 103 chainedMixedReversed->appendSegment(1.0, chainedLinearSingle.get());
117 EXPECT_REFV_EQ(chainedMixedReversed, reverse(chainedMixed)); 104 EXPECT_REFV_EQ(chainedMixedReversed, reverse(chainedMixed));
118 } 105 }
119 106
120 } // namespace 107 } // namespace
OLDNEW
« no previous file with comments | « Source/core/animation/CompositorAnimationsTestHelper.h ('k') | Source/core/animation/DocumentAnimations.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698