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

Side by Side Diff: Source/core/platform/animation/TimingFunctionTestHelperTest.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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 << "\n"; \ 63 << "\n"; \
64 } \ 64 } \
65 } 65 }
66 66
67 namespace { 67 namespace {
68 68
69 using namespace WebCore; 69 using namespace WebCore;
70 70
71 class TimingFunctionTestHelperTest : public ::testing::Test { 71 class TimingFunctionTestHelperTest : public ::testing::Test {
72 72
73 protected:
74 bool m_enabled;
75
76 virtual void SetUp()
77 {
78 m_enabled = RuntimeEnabledFeatures::webAnimationsEnabled();
79 // Needed for ChainedTimingFunction support
80 RuntimeEnabledFeatures::setWebAnimationsEnabled(true);
81 }
82
83 virtual void TearDown()
84 {
85 RuntimeEnabledFeatures::setWebAnimationsEnabled(m_enabled);
86 }
87
88 public: 73 public:
89 // Make sure that the CubicBezierTimingFunction call goes via the generic 74 // Make sure that the CubicBezierTimingFunction call goes via the generic
90 // TimingFunction PrintTo. 75 // TimingFunction PrintTo.
91 ::std::string PrintToString(RefPtr<CubicBezierTimingFunction> timing) 76 ::std::string PrintToString(RefPtr<CubicBezierTimingFunction> timing)
92 { 77 {
93 RefPtr<TimingFunction> generic = timing; 78 RefPtr<TimingFunction> generic = timing;
94 return PrintToString(generic.get()); 79 return PrintToString(generic.get());
95 } 80 }
96 81
97 ::std::string PrintToString(RefPtr<TimingFunction> timing) 82 ::std::string PrintToString(RefPtr<TimingFunction> timing)
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 EXPECT_REFV_NE(chainedMixed1, chainedSingleCubic1); 317 EXPECT_REFV_NE(chainedMixed1, chainedSingleCubic1);
333 EXPECT_REFV_NE(chainedMixed1, chainedSingleLinear1); 318 EXPECT_REFV_NE(chainedMixed1, chainedSingleLinear1);
334 319
335 RefPtr<ChainedTimingFunction> chainedMixed4 = ChainedTimingFunction::create( ); 320 RefPtr<ChainedTimingFunction> chainedMixed4 = ChainedTimingFunction::create( );
336 chainedMixed4->appendSegment(0.20, chainedSingleLinear1.get()); // Different offset 321 chainedMixed4->appendSegment(0.20, chainedSingleLinear1.get()); // Different offset
337 chainedMixed4->appendSegment(1.0, cubicTiming1.get()); 322 chainedMixed4->appendSegment(1.0, cubicTiming1.get());
338 EXPECT_REFV_NE(chainedMixed1, chainedMixed4); 323 EXPECT_REFV_NE(chainedMixed1, chainedMixed4);
339 } 324 }
340 325
341 } // namespace 326 } // namespace
OLDNEW
« no previous file with comments | « Source/core/platform/animation/TimingFunction.h ('k') | Source/core/rendering/CompositedLayerMapping.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698