Index: ui/gfx/compositor/layer_unittest.cc |
diff --git a/ui/gfx/compositor/layer_unittest.cc b/ui/gfx/compositor/layer_unittest.cc |
index 253683cb3fa69a4968d0912bb7cbf3f00b1e1741..e7fabc842dc0b6c536a305653ccd076c02d0f594 100644 |
--- a/ui/gfx/compositor/layer_unittest.cc |
+++ b/ui/gfx/compositor/layer_unittest.cc |
@@ -13,9 +13,9 @@ |
#include "ui/gfx/canvas_skia.h" |
#include "ui/gfx/codec/png_codec.h" |
#include "ui/gfx/compositor/compositor_observer.h" |
+#include "ui/gfx/compositor/compositor_setup.h" |
#include "ui/gfx/compositor/layer.h" |
#include "ui/gfx/compositor/layer_animation_sequence.h" |
-#include "ui/gfx/compositor/test/test_compositor.h" |
#include "ui/gfx/compositor/test/test_compositor_host.h" |
#include "ui/gfx/gfx_paths.h" |
@@ -106,10 +106,9 @@ std::string GetLayerChildrenNames(const Layer& layer) { |
// There are three test classes in here that configure the Compositor and |
// Layer's slightly differently: |
-// - LayerWithNullDelegateTest uses TestCompositor and NullLayerDelegate as the |
-// LayerDelegate. This is typically the base class you want to use. |
-// - LayerWithDelegateTest uses TestCompositor and does not set a LayerDelegate |
-// on the delegates. |
+// - LayerWithNullDelegateTest uses NullLayerDelegate as the LayerDelegate. This |
+// is typically the base class you want to use. |
+// - LayerWithDelegateTest uses LayerDelegate on the delegates. |
// - LayerWithRealCompositorTest when a real compositor is required for testing. |
// - Slow because they bring up a window and run the real compositor. This |
// is typically not what you want. |
@@ -146,6 +145,7 @@ class LayerWithRealCompositorTest : public testing::Test { |
// Overridden from testing::Test: |
virtual void SetUp() OVERRIDE { |
+ ui::DisableTestCompositor(); |
const gfx::Rect host_bounds(10, 10, 500, 500); |
window_.reset(TestCompositorHost::Create(host_bounds)); |
window_->Show(); |
@@ -359,7 +359,8 @@ class LayerWithDelegateTest : public testing::Test, public CompositorDelegate { |
// Overridden from testing::Test: |
virtual void SetUp() OVERRIDE { |
- compositor_ = new TestCompositor(this); |
+ ui::SetupTestCompositor(); |
+ compositor_ = ui::Compositor::Create(this, NULL, gfx::Size(1000, 1000)); |
} |
virtual void TearDown() OVERRIDE { |
@@ -413,7 +414,7 @@ class LayerWithDelegateTest : public testing::Test, public CompositorDelegate { |
bool schedule_draw_invoked_; |
private: |
- scoped_refptr<TestCompositor> compositor_; |
+ scoped_refptr<ui::Compositor> compositor_; |
DISALLOW_COPY_AND_ASSIGN(LayerWithDelegateTest); |
}; |