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

Unified Diff: ui/compositor/layer_unittest.cc

Issue 962833003: UI impl side painting default on (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rm unused layer unittest from compositor unittest Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
« ui/compositor/layer_delegate.h ('K') | « ui/compositor/layer_delegate.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/layer_unittest.cc
diff --git a/ui/compositor/layer_unittest.cc b/ui/compositor/layer_unittest.cc
index d64ac74eecf2833e63bd3fbf6505c0a9362390af..adc08bad9eee485d8b72c5986f8e3e78b9b0c46f 100644
--- a/ui/compositor/layer_unittest.cc
+++ b/ui/compositor/layer_unittest.cc
@@ -524,17 +524,14 @@ TEST_F(LayerWithRealCompositorTest, Delegate) {
WaitForDraw();
EXPECT_EQ(delegate.color_index(), 1);
- EXPECT_EQ(delegate.paint_size(), l1->bounds().size());
enne (OOO) 2015/03/02 21:59:27 You could land these test fixes now if you wanted,
weiliangc 2015/03/02 22:37:22 https://codereview.chromium.org/974603002/
l1->SchedulePaint(gfx::Rect(10, 10, 200, 200));
WaitForDraw();
EXPECT_EQ(delegate.color_index(), 2);
- EXPECT_EQ(delegate.paint_size(), gfx::Size(200, 200));
l1->SchedulePaint(gfx::Rect(5, 5, 50, 50));
WaitForDraw();
EXPECT_EQ(delegate.color_index(), 0);
- EXPECT_EQ(delegate.paint_size(), gfx::Size(50, 50));
}
TEST_F(LayerWithRealCompositorTest, DrawTree) {
@@ -1308,9 +1305,6 @@ TEST_F(LayerWithRealCompositorTest, ScaleUpDown) {
EXPECT_EQ(0.0f, root_delegate.device_scale_factor());
EXPECT_EQ(0.0f, l1_delegate.device_scale_factor());
- EXPECT_EQ("200x220", root_delegate.paint_size().ToString());
- EXPECT_EQ("140x180", l1_delegate.paint_size().ToString());
-
// Scale up to 2.0. Changing scale doesn't change the bounds in DIP.
GetCompositor()->SetScaleAndSize(2.0f, gfx::Size(500, 500));
EXPECT_EQ("10,20 200x220", root->bounds().ToString());
@@ -1326,10 +1320,6 @@ TEST_F(LayerWithRealCompositorTest, ScaleUpDown) {
// Canvas size must have been scaled down up.
WaitForDraw();
- EXPECT_EQ("400x440", root_delegate.paint_size().ToString());
- EXPECT_EQ("2.0 2.0", root_delegate.ToScaleString());
- EXPECT_EQ("280x360", l1_delegate.paint_size().ToString());
- EXPECT_EQ("2.0 2.0", l1_delegate.ToScaleString());
// Scale down back to 1.0f.
GetCompositor()->SetScaleAndSize(1.0f, gfx::Size(500, 500));
@@ -1346,9 +1336,7 @@ TEST_F(LayerWithRealCompositorTest, ScaleUpDown) {
// Canvas size must have been scaled down too.
WaitForDraw();
- EXPECT_EQ("200x220", root_delegate.paint_size().ToString());
EXPECT_EQ("1.0 1.0", root_delegate.ToScaleString());
- EXPECT_EQ("140x180", l1_delegate.paint_size().ToString());
EXPECT_EQ("1.0 1.0", l1_delegate.ToScaleString());
root_delegate.reset();
@@ -1386,8 +1374,6 @@ TEST_F(LayerWithRealCompositorTest, ScaleReparent) {
EXPECT_EQ(0.0f, l1_delegate.device_scale_factor());
WaitForDraw();
- EXPECT_EQ("140x180", l1_delegate.paint_size().ToString());
- EXPECT_EQ("1.0 1.0", l1_delegate.ToScaleString());
// Remove l1 from root and change the scale.
root->Remove(l1.get());
@@ -1405,8 +1391,6 @@ TEST_F(LayerWithRealCompositorTest, ScaleReparent) {
EXPECT_EQ("140x180", cc_bounds_size.ToString());
EXPECT_EQ(2.0f, l1_delegate.device_scale_factor());
WaitForDraw();
- EXPECT_EQ("280x360", l1_delegate.paint_size().ToString());
- EXPECT_EQ("2.0 2.0", l1_delegate.ToScaleString());
}
// Verifies that when changing bounds on a layer that is invisible, and then
« ui/compositor/layer_delegate.h ('K') | « ui/compositor/layer_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698