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

Unified Diff: cc/contents_scaling_layer_unittest.cc

Issue 11264056: cc: Use gfx:: Geometry types for positions, bounds, and related things. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ScaleAsVector Created 8 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/contents_scaling_layer.cc ('k') | cc/damage_tracker.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/contents_scaling_layer_unittest.cc
diff --git a/cc/contents_scaling_layer_unittest.cc b/cc/contents_scaling_layer_unittest.cc
index 4c79a90f2d729d21f86f048d4d99a3912183c650..e05d762d7007e934da77096c35a439a538e42467 100644
--- a/cc/contents_scaling_layer_unittest.cc
+++ b/cc/contents_scaling_layer_unittest.cc
@@ -17,7 +17,7 @@ class MockContentsScalingLayer : public ContentsScalingLayer {
: ContentsScalingLayer() {
}
- virtual void setNeedsDisplayRect(const FloatRect& dirtyRect) OVERRIDE {
+ virtual void setNeedsDisplayRect(const gfx::RectF& dirtyRect) OVERRIDE {
m_lastNeedsDisplayRect = dirtyRect;
ContentsScalingLayer::setNeedsDisplayRect(dirtyRect);
}
@@ -26,7 +26,7 @@ class MockContentsScalingLayer : public ContentsScalingLayer {
m_needsDisplay = false;
}
- const FloatRect& lastNeedsDisplayRect() const {
+ const gfx::RectF& lastNeedsDisplayRect() const {
return m_lastNeedsDisplayRect;
}
@@ -34,14 +34,14 @@ class MockContentsScalingLayer : public ContentsScalingLayer {
virtual ~MockContentsScalingLayer() {
}
- FloatRect m_lastNeedsDisplayRect;
+ gfx::RectF m_lastNeedsDisplayRect;
};
TEST(ContentsScalingLayerTest, checkContentsBounds) {
scoped_refptr<MockContentsScalingLayer> testLayer =
make_scoped_refptr(new MockContentsScalingLayer());
- testLayer->setBounds(IntSize(320, 240));
+ testLayer->setBounds(gfx::Size(320, 240));
EXPECT_FLOAT_EQ(1.0, testLayer->contentsScaleX());
EXPECT_FLOAT_EQ(1.0, testLayer->contentsScaleY());
EXPECT_EQ(320, testLayer->contentBounds().width());
@@ -51,7 +51,7 @@ TEST(ContentsScalingLayerTest, checkContentsBounds) {
EXPECT_EQ(640, testLayer->contentBounds().width());
EXPECT_EQ(480, testLayer->contentBounds().height());
- testLayer->setBounds(IntSize(10, 20));
+ testLayer->setBounds(gfx::Size(10, 20));
EXPECT_EQ(20, testLayer->contentBounds().width());
EXPECT_EQ(40, testLayer->contentBounds().height());
@@ -64,13 +64,13 @@ TEST(ContentsScalingLayerTest, checkContentsScaleChangeTriggersNeedsDisplay) {
scoped_refptr<MockContentsScalingLayer> testLayer =
make_scoped_refptr(new MockContentsScalingLayer());
- testLayer->setBounds(IntSize(320, 240));
+ testLayer->setBounds(gfx::Size(320, 240));
testLayer->resetNeedsDisplay();
EXPECT_FALSE(testLayer->needsDisplay());
testLayer->setContentsScale(testLayer->contentsScaleX() + 1.f);
EXPECT_TRUE(testLayer->needsDisplay());
- EXPECT_FLOAT_RECT_EQ(FloatRect(0, 0, 320, 240),
+ EXPECT_FLOAT_RECT_EQ(gfx::RectF(0, 0, 320, 240),
testLayer->lastNeedsDisplayRect());
}
« no previous file with comments | « cc/contents_scaling_layer.cc ('k') | cc/damage_tracker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698