summaryrefslogtreecommitdiffstats
path: root/views/view_unittest.cc
diff options
context:
space:
mode:
authorsadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-03 21:21:44 +0000
committersadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-03 21:21:44 +0000
commit18dab373b1ea0cadae9aac8c2406972e26c613dd (patch)
tree889bc71319ab6482bcae32710ef5f65e0a2aea29 /views/view_unittest.cc
parentfa595d186acf2772b515dc1af7f99dcdb0759068 (diff)
downloadchromium_src-18dab373b1ea0cadae9aac8c2406972e26c613dd.zip
chromium_src-18dab373b1ea0cadae9aac8c2406972e26c613dd.tar.gz
chromium_src-18dab373b1ea0cadae9aac8c2406972e26c613dd.tar.bz2
Reland the layer creation change since the touchui issues will be resolved in a follow up CL.
This reverts 103580 - Revert the layer creation change r103338 due to some issues with the keyboard on touch. I'll re-land later once I can get a working linux build.TBR=skyBUG=noneTEST=none Review URL: http://codereview.chromium.org/8100015 TBR=ben@chromium.org Review URL: http://codereview.chromium.org/8115010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103777 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/view_unittest.cc')
-rw-r--r--views/view_unittest.cc17
1 files changed, 4 insertions, 13 deletions
diff --git a/views/view_unittest.cc b/views/view_unittest.cc
index 3527ec2..a778436 100644
--- a/views/view_unittest.cc
+++ b/views/view_unittest.cc
@@ -2453,7 +2453,7 @@ TEST_F(ViewLayerTest, LayerToggling) {
v1->SetPaintToLayer(true);
root_layer->DrawTree();
EXPECT_EQ(1, ui::TestTexture::live_count());
- EXPECT_TRUE(v1->layer() == NULL);
+ EXPECT_TRUE(v1->layer() != NULL);
v1->SetBounds(20, 30, 140, 150);
content_view->AddChildView(v1);
root_layer->DrawTree();
@@ -2627,7 +2627,7 @@ TEST_F(ViewLayerTest, ToggleVisibilityWithLayer) {
EXPECT_TRUE(v1->layer());
v1->SetVisible(false);
- EXPECT_TRUE(v1->layer() == NULL);
+ EXPECT_TRUE(v1->layer());
v1->SetVisible(true);
EXPECT_TRUE(v1->layer());
@@ -2648,24 +2648,15 @@ TEST_F(ViewLayerTest, ToggleOpacityWithLayer) {
child_view->SetBounds(50, 50, 100, 100);
parent_view->AddChildView(child_view);
- // Call SetFillsBoundsOpaquely before layer is created.
ASSERT_TRUE(child_view->layer() == NULL);
- child_view->SetFillsBoundsOpaquely(true);
-
child_view->SetPaintToLayer(true);
+ child_view->SetFillsBoundsOpaquely(true);
ASSERT_TRUE(child_view->layer());
EXPECT_EQ(
gfx::Rect(50, 50, 100, 100), parent_view->layer()->hole_rect());
child_view->SetFillsBoundsOpaquely(false);
EXPECT_TRUE(parent_view->layer()->hole_rect().IsEmpty());
-
- // Call SetFillsBoundsOpaquely after layer is created.
- ASSERT_TRUE(parent_view->layer());
-
- child_view->SetFillsBoundsOpaquely(true);
- EXPECT_EQ(
- gfx::Rect(50, 50, 100, 100), parent_view->layer()->hole_rect());
}
// Test that a hole in a layer always corresponds to the bounds of opaque
@@ -2722,8 +2713,8 @@ TEST_F(ViewLayerTest, ToggleVisibilityWithOpaqueLayer) {
View* child_view = new View;
child_view->SetBounds(50, 50, 100, 100);
- child_view->SetFillsBoundsOpaquely(true);
child_view->SetPaintToLayer(true);
+ child_view->SetFillsBoundsOpaquely(true);
parent_view->AddChildView(child_view);
EXPECT_EQ(
gfx::Rect(50, 50, 100, 100), parent_view->layer()->hole_rect());