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

Side by Side Diff: Source/platform/graphics/GraphicsLayerTest.cpp

Issue 470443002: Revert of Rename WebAnimation to WebCompositorAnimation (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 OwnPtr<WebLayerTreeView> m_layerTreeView; 94 OwnPtr<WebLayerTreeView> m_layerTreeView;
95 MockGraphicsLayerClient m_client; 95 MockGraphicsLayerClient m_client;
96 }; 96 };
97 97
98 TEST_F(GraphicsLayerTest, updateLayerShouldFlattenTransformWithAnimations) 98 TEST_F(GraphicsLayerTest, updateLayerShouldFlattenTransformWithAnimations)
99 { 99 {
100 ASSERT_FALSE(m_platformLayer->hasActiveAnimation()); 100 ASSERT_FALSE(m_platformLayer->hasActiveAnimation());
101 101
102 OwnPtr<WebFloatAnimationCurve> curve = adoptPtr(Platform::current()->composi torSupport()->createFloatAnimationCurve()); 102 OwnPtr<WebFloatAnimationCurve> curve = adoptPtr(Platform::current()->composi torSupport()->createFloatAnimationCurve());
103 curve->add(WebFloatKeyframe(0.0, 0.0)); 103 curve->add(WebFloatKeyframe(0.0, 0.0));
104 OwnPtr<WebCompositorAnimation> floatAnimation(adoptPtr(Platform::current()-> compositorSupport()->createAnimation(*curve, WebCompositorAnimation::TargetPrope rtyOpacity))); 104 OwnPtr<WebAnimation> floatAnimation(adoptPtr(Platform::current()->compositor Support()->createAnimation(*curve, WebAnimation::TargetPropertyOpacity)));
105 int animationId = floatAnimation->id(); 105 int animationId = floatAnimation->id();
106 ASSERT_TRUE(m_platformLayer->addAnimation(floatAnimation.leakPtr())); 106 ASSERT_TRUE(m_platformLayer->addAnimation(floatAnimation.leakPtr()));
107 107
108 ASSERT_TRUE(m_platformLayer->hasActiveAnimation()); 108 ASSERT_TRUE(m_platformLayer->hasActiveAnimation());
109 109
110 m_graphicsLayer->setShouldFlattenTransform(false); 110 m_graphicsLayer->setShouldFlattenTransform(false);
111 111
112 m_platformLayer = m_graphicsLayer->platformLayer(); 112 m_platformLayer = m_graphicsLayer->platformLayer();
113 ASSERT_TRUE(m_platformLayer); 113 ASSERT_TRUE(m_platformLayer);
114 114
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 m_graphicsLayer->setScrollableArea(&scrollableArea, false); 159 m_graphicsLayer->setScrollableArea(&scrollableArea, false);
160 160
161 WebPoint scrollPosition(7, 9); 161 WebPoint scrollPosition(7, 9);
162 m_platformLayer->setScrollPosition(scrollPosition); 162 m_platformLayer->setScrollPosition(scrollPosition);
163 m_graphicsLayer->didScroll(); 163 m_graphicsLayer->didScroll();
164 164
165 EXPECT_EQ(scrollPosition, WebPoint(scrollableArea.scrollPosition())); 165 EXPECT_EQ(scrollPosition, WebPoint(scrollableArea.scrollPosition()));
166 } 166 }
167 167
168 } // namespace 168 } // namespace
OLDNEW
« no previous file with comments | « Source/platform/graphics/GraphicsLayer.cpp ('k') | Source/platform/scroll/ProgrammaticScrollAnimator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698