Chromium Code Reviews| Index: ui/compositor/layer_unittest.cc |
| diff --git a/ui/compositor/layer_unittest.cc b/ui/compositor/layer_unittest.cc |
| index 71aa73f28773d705542e1d51bc954f2ae09f70f1..83ccb2c15233d919a616f6da7cfe111b854bfda4 100644 |
| --- a/ui/compositor/layer_unittest.cc |
| +++ b/ui/compositor/layer_unittest.cc |
| @@ -87,8 +87,8 @@ class LayerWithRealCompositorTest : public testing::Test { |
| // Overridden from testing::Test: |
| virtual void SetUp() OVERRIDE { |
| - bool allow_test_contexts = false; |
| - InitializeContextFactoryForTests(allow_test_contexts); |
| + bool enable_pixel_output = true; |
| + InitializeContextFactoryForTests(enable_pixel_output); |
| Compositor::Initialize(); |
| const gfx::Rect host_bounds(10, 10, 500, 500); |
| @@ -354,20 +354,22 @@ class LayerWithDelegateTest : public testing::Test { |
| // Overridden from testing::Test: |
| virtual void SetUp() OVERRIDE { |
| - bool allow_test_contexts = true; |
| - InitializeContextFactoryForTests(allow_test_contexts); |
| + bool enable_pixel_output = false; |
| + InitializeContextFactoryForTests(enable_pixel_output); |
| Compositor::Initialize(); |
| - compositor_.reset(new Compositor(gfx::kNullAcceleratedWidget)); |
| - compositor_->SetScaleAndSize(1.0f, gfx::Size(1000, 1000)); |
| + |
| + const gfx::Rect host_bounds(1000, 1000); |
| + window_.reset(TestCompositorHost::Create(host_bounds)); |
|
piman
2014/01/29 01:40:17
nit: s/window_/compositor_host_/ ?
danakj
2014/01/29 20:19:00
Done.
|
| + window_->Show(); |
| } |
| virtual void TearDown() OVERRIDE { |
| - compositor_.reset(); |
| + window_.reset(); |
| TerminateContextFactoryForTests(); |
| Compositor::Terminate(); |
| } |
| - Compositor* compositor() { return compositor_.get(); } |
| + Compositor* compositor() { return window_->GetCompositor(); } |
| virtual Layer* CreateLayer(LayerType type) { |
| return new Layer(type); |
| @@ -411,7 +413,7 @@ class LayerWithDelegateTest : public testing::Test { |
| } |
| private: |
| - scoped_ptr<Compositor> compositor_; |
| + scoped_ptr<TestCompositorHost> window_; |
| DISALLOW_COPY_AND_ASSIGN(LayerWithDelegateTest); |
| }; |