| Index: ui/compositor/layer_unittest.cc
|
| diff --git a/ui/compositor/layer_unittest.cc b/ui/compositor/layer_unittest.cc
|
| index 74b9cfd4e8de21aa1d6fad6d9690e61fe2d52832..ae2ae294112ce7f97f827daf321de3b46b71aab6 100644
|
| --- a/ui/compositor/layer_unittest.cc
|
| +++ b/ui/compositor/layer_unittest.cc
|
| @@ -10,6 +10,7 @@
|
| #include "base/path_service.h"
|
| #include "base/string_util.h"
|
| #include "base/stringprintf.h"
|
| +#include "cc/layer.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
| #include "ui/compositor/compositor_observer.h"
|
| #include "ui/compositor/compositor_setup.h"
|
| @@ -692,9 +693,9 @@ TEST_F(LayerWithNullDelegateTest, Visibility) {
|
| EXPECT_TRUE(l1->IsDrawn());
|
| EXPECT_TRUE(l2->IsDrawn());
|
| EXPECT_TRUE(l3->IsDrawn());
|
| - EXPECT_EQ(1.f, l1->web_layer()->opacity());
|
| - EXPECT_EQ(1.f, l2->web_layer()->opacity());
|
| - EXPECT_EQ(1.f, l3->web_layer()->opacity());
|
| + EXPECT_EQ(1.f, l1->cc_layer()->opacity());
|
| + EXPECT_EQ(1.f, l2->cc_layer()->opacity());
|
| + EXPECT_EQ(1.f, l3->cc_layer()->opacity());
|
|
|
| compositor()->SetRootLayer(l1.get());
|
|
|
| @@ -704,19 +705,19 @@ TEST_F(LayerWithNullDelegateTest, Visibility) {
|
| EXPECT_FALSE(l1->IsDrawn());
|
| EXPECT_FALSE(l2->IsDrawn());
|
| EXPECT_FALSE(l3->IsDrawn());
|
| - EXPECT_EQ(0.f, l1->web_layer()->opacity());
|
| + EXPECT_EQ(0.f, l1->cc_layer()->opacity());
|
|
|
| l3->SetVisible(false);
|
| EXPECT_FALSE(l1->IsDrawn());
|
| EXPECT_FALSE(l2->IsDrawn());
|
| EXPECT_FALSE(l3->IsDrawn());
|
| - EXPECT_EQ(0.f, l3->web_layer()->opacity());
|
| + EXPECT_EQ(0.f, l3->cc_layer()->opacity());
|
|
|
| l1->SetVisible(true);
|
| EXPECT_TRUE(l1->IsDrawn());
|
| EXPECT_TRUE(l2->IsDrawn());
|
| EXPECT_FALSE(l3->IsDrawn());
|
| - EXPECT_EQ(1.f, l1->web_layer()->opacity());
|
| + EXPECT_EQ(1.f, l1->cc_layer()->opacity());
|
| }
|
|
|
| // Checks that stacking-related methods behave as advertised.
|
| @@ -1125,9 +1126,9 @@ TEST_F(LayerWithRealCompositorTest, MAYBE_ScaleUpDown) {
|
|
|
| EXPECT_EQ("10,20 200x220", root->bounds().ToString());
|
| EXPECT_EQ("10,20 140x180", l1->bounds().ToString());
|
| - gfx::Size size_in_pixel = root->web_layer()->bounds();
|
| + gfx::Size size_in_pixel = root->cc_layer()->bounds();
|
| EXPECT_EQ("200x220", size_in_pixel.ToString());
|
| - size_in_pixel = l1->web_layer()->bounds();
|
| + size_in_pixel = l1->cc_layer()->bounds();
|
| EXPECT_EQ("140x180", size_in_pixel.ToString());
|
| // No scale change, so no scale notification.
|
| EXPECT_EQ(0.0f, root_delegate.device_scale_factor());
|
| @@ -1142,9 +1143,9 @@ TEST_F(LayerWithRealCompositorTest, MAYBE_ScaleUpDown) {
|
| EXPECT_EQ("10,20 200x220", root->bounds().ToString());
|
| EXPECT_EQ("10,20 140x180", l1->bounds().ToString());
|
| // Pixel size must have been scaled up.
|
| - size_in_pixel = root->web_layer()->bounds();
|
| + size_in_pixel = root->cc_layer()->bounds();
|
| EXPECT_EQ("400x440", size_in_pixel.ToString());
|
| - size_in_pixel = l1->web_layer()->bounds();
|
| + size_in_pixel = l1->cc_layer()->bounds();
|
| EXPECT_EQ("280x360", size_in_pixel.ToString());
|
| // New scale factor must have been notified.
|
| EXPECT_EQ(2.0f, root_delegate.device_scale_factor());
|
| @@ -1162,9 +1163,9 @@ TEST_F(LayerWithRealCompositorTest, MAYBE_ScaleUpDown) {
|
| EXPECT_EQ("10,20 200x220", root->bounds().ToString());
|
| EXPECT_EQ("10,20 140x180", l1->bounds().ToString());
|
| // Pixel size must have been scaled down.
|
| - size_in_pixel = root->web_layer()->bounds();
|
| + size_in_pixel = root->cc_layer()->bounds();
|
| EXPECT_EQ("200x220", size_in_pixel.ToString());
|
| - size_in_pixel = l1->web_layer()->bounds();
|
| + size_in_pixel = l1->cc_layer()->bounds();
|
| EXPECT_EQ("140x180", size_in_pixel.ToString());
|
| // New scale factor must have been notified.
|
| EXPECT_EQ(1.0f, root_delegate.device_scale_factor());
|
| @@ -1207,7 +1208,7 @@ TEST_F(LayerWithRealCompositorTest, MAYBE_ScaleReparent) {
|
|
|
| root->Add(l1.get());
|
| EXPECT_EQ("10,20 140x180", l1->bounds().ToString());
|
| - gfx::Size size_in_pixel = l1->web_layer()->bounds();
|
| + gfx::Size size_in_pixel = l1->cc_layer()->bounds();
|
| EXPECT_EQ("140x180", size_in_pixel.ToString());
|
| EXPECT_EQ(0.0f, l1_delegate.device_scale_factor());
|
|
|
| @@ -1222,13 +1223,13 @@ TEST_F(LayerWithRealCompositorTest, MAYBE_ScaleReparent) {
|
| GetCompositor()->SetScaleAndSize(2.0f, gfx::Size(500, 500));
|
| // Sanity check on root and l1.
|
| EXPECT_EQ("10,20 200x220", root->bounds().ToString());
|
| - size_in_pixel = l1->web_layer()->bounds();
|
| + size_in_pixel = l1->cc_layer()->bounds();
|
| EXPECT_EQ("140x180", size_in_pixel.ToString());
|
|
|
|
|
| root->Add(l1.get());
|
| EXPECT_EQ("10,20 140x180", l1->bounds().ToString());
|
| - size_in_pixel = l1->web_layer()->bounds();
|
| + size_in_pixel = l1->cc_layer()->bounds();
|
| EXPECT_EQ("280x360", size_in_pixel.ToString());
|
| EXPECT_EQ(2.0f, l1_delegate.device_scale_factor());
|
| RunPendingMessages();
|
|
|