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

Side by Side Diff: Source/core/animation/interpolation/DeferredLegacyStyleInterpolationTest.cpp

Issue 292173009: Web Animations - responsive interpolation (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@0519_MySeparation
Patch Set: zeroLengthArray not needed Created 6 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "config.h"
6 #include "core/animation/interpolation/DeferredLegacyStyleInterpolation.h"
7
8 #include "core/css/CSSInheritedValue.h"
9 #include "core/css/CSSPrimitiveValue.h"
10 #include "core/css/CSSValueList.h"
11 #include "core/css/StylePropertySet.h"
12
13 #include <gtest/gtest.h>
14
15 namespace WebCore {
16
17 TEST(AnimationDeferredLegacyStyleInterpolationTest, Inherit)
18 {
19 RefPtr<CSSValue> value = CSSInheritedValue::create();
20 EXPECT_TRUE(DeferredLegacyStyleInterpolation::interpolationRequiresStyleReso lve(*value));
21 }
22
23 TEST(AnimationDeferredLegacyStyleInterpolationTest, Color)
24 {
25 RefPtr<CSSValue> value = CSSPrimitiveValue::createIdentifier(CSSValueLime);
26 EXPECT_FALSE(DeferredLegacyStyleInterpolation::interpolationRequiresStyleRes olve(*value));
27
28 value = CSSPrimitiveValue::createIdentifier(CSSValueCurrentcolor);
29 EXPECT_TRUE(DeferredLegacyStyleInterpolation::interpolationRequiresStyleReso lve(*value));
30 }
31
32 TEST(AnimationDeferredLegacyStyleInterpolationTest, Length)
33 {
34 RefPtr<CSSValue> value = CSSPrimitiveValue::create(10, CSSPrimitiveValue::CS S_PX);
35 EXPECT_FALSE(DeferredLegacyStyleInterpolation::interpolationRequiresStyleRes olve(*value));
36
37 value = CSSPrimitiveValue::create(10, CSSPrimitiveValue::CSS_EMS);
38 EXPECT_TRUE(DeferredLegacyStyleInterpolation::interpolationRequiresStyleReso lve(*value));
39
40 value = CSSPrimitiveValue::create(10, CSSPrimitiveValue::CSS_VH);
41 EXPECT_TRUE(DeferredLegacyStyleInterpolation::interpolationRequiresStyleReso lve(*value));
42 }
43
44 TEST(AnimationDeferredLegacyStyleInterpolationTest, List)
45 {
46 RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
47 RefPtr<CSSValue> value = CSSPrimitiveValue::create(10, CSSPrimitiveValue::CS S_PX);
48 list->append(value);
49 list->append(value);
50 EXPECT_FALSE(DeferredLegacyStyleInterpolation::interpolationRequiresStyleRes olve(*list));
51
52 value = CSSPrimitiveValue::create(10, CSSPrimitiveValue::CSS_EMS);
53 list->append(value);
54 EXPECT_TRUE(DeferredLegacyStyleInterpolation::interpolationRequiresStyleReso lve(*list));
55 }
56
57 }
58
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698