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

Side by Side Diff: third_party/WebKit/Source/core/animation/animatable/AnimatableValueTestHelperTest.cpp

Issue 1858753003: Remove RawPtr from core/css (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 protected: 46 protected:
47 ::std::string PrintToString(PassRefPtr<AnimatableValue> animValue) 47 ::std::string PrintToString(PassRefPtr<AnimatableValue> animValue)
48 { 48 {
49 return ::testing::PrintToString(*animValue.get()); 49 return ::testing::PrintToString(*animValue.get());
50 } 50 }
51 }; 51 };
52 52
53 TEST_F(AnimationAnimatableValueTestHelperTest, PrintTo) 53 TEST_F(AnimationAnimatableValueTestHelperTest, PrintTo)
54 { 54 {
55 EXPECT_THAT( 55 EXPECT_THAT(
56 PrintToString(AnimatableClipPathOperation::create(ShapeClipPathOperation ::create(BasicShapeCircle::create().get()).get())), 56 PrintToString(AnimatableClipPathOperation::create(ShapeClipPathOperation ::create(BasicShapeCircle::create()).get())),
57 testing::StartsWith("AnimatableClipPathOperation") 57 testing::StartsWith("AnimatableClipPathOperation")
58 ); 58 );
59 59
60 EXPECT_EQ( 60 EXPECT_EQ(
61 ::std::string("AnimatableColor(rgba(0, 0, 0, 0), #ff0000)"), 61 ::std::string("AnimatableColor(rgba(0, 0, 0, 0), #ff0000)"),
62 PrintToString(AnimatableColor::create(Color(0x000000FF), Color(0xFFFF000 0)))); 62 PrintToString(AnimatableColor::create(Color(0x000000FF), Color(0xFFFF000 0))));
63 63
64 EXPECT_THAT( 64 EXPECT_THAT(
65 PrintToString(AnimatableValue::neutralValue().get()), 65 PrintToString(AnimatableValue::neutralValue().get()),
66 testing::StartsWith("AnimatableNeutral@")); 66 testing::StartsWith("AnimatableNeutral@"));
67 67
68 EXPECT_THAT( 68 EXPECT_THAT(
69 PrintToString(AnimatableShapeValue::create(ShapeValue::createShapeValue( BasicShapeCircle::create().get(), ContentBox))), 69 PrintToString(AnimatableShapeValue::create(ShapeValue::createShapeValue( BasicShapeCircle::create(), ContentBox))),
70 testing::StartsWith("AnimatableShapeValue@")); 70 testing::StartsWith("AnimatableShapeValue@"));
71 71
72 RefPtr<SVGDashArray> l2 = SVGDashArray::create(); 72 RefPtr<SVGDashArray> l2 = SVGDashArray::create();
73 l2->append(Length(1, blink::Fixed)); 73 l2->append(Length(1, blink::Fixed));
74 l2->append(Length(2, blink::Percent)); 74 l2->append(Length(2, blink::Percent));
75 EXPECT_EQ( 75 EXPECT_EQ(
76 ::std::string("AnimatableStrokeDasharrayList(1+0%, 0+2%)"), 76 ::std::string("AnimatableStrokeDasharrayList(1+0%, 0+2%)"),
77 PrintToString(AnimatableStrokeDasharrayList::create(l2, 1))); 77 PrintToString(AnimatableStrokeDasharrayList::create(l2, 1)));
78 78
79 EXPECT_EQ( 79 EXPECT_EQ(
80 ::std::string("AnimatableUnknown(none)"), 80 ::std::string("AnimatableUnknown(none)"),
81 PrintToString(AnimatableUnknown::create(CSSPrimitiveValue::createIdentif ier(CSSValueNone).get()))); 81 PrintToString(AnimatableUnknown::create(CSSPrimitiveValue::createIdentif ier(CSSValueNone))));
82 82
83 EXPECT_EQ( 83 EXPECT_EQ(
84 ::std::string("AnimatableVisibility(VISIBLE)"), 84 ::std::string("AnimatableVisibility(VISIBLE)"),
85 PrintToString(AnimatableVisibility::create(VISIBLE))); 85 PrintToString(AnimatableVisibility::create(VISIBLE)));
86 } 86 }
87 87
88 } // namespace blink 88 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698