| Index: ui/views/view_unittest.cc
|
| diff --git a/ui/views/view_unittest.cc b/ui/views/view_unittest.cc
|
| index a8c1f56b2cef9137adadfed7bfc8ec28df48d714..724dd07d1830669ec6479e34ecf011e87f7f496a 100644
|
| --- a/ui/views/view_unittest.cc
|
| +++ b/ui/views/view_unittest.cc
|
| @@ -19,6 +19,7 @@
|
| #include "ui/compositor/compositor.h"
|
| #include "ui/compositor/layer.h"
|
| #include "ui/compositor/layer_animator.h"
|
| +#include "ui/compositor/test/test_utils.h"
|
| #include "ui/gfx/canvas.h"
|
| #include "ui/gfx/path.h"
|
| #include "ui/gfx/transform.h"
|
| @@ -3256,19 +3257,21 @@ TEST_F(ViewLayerTest, DontPaintChildrenWithLayers) {
|
| PaintTrackingView* content_view = new PaintTrackingView;
|
| widget()->SetContentsView(content_view);
|
| content_view->SetPaintToLayer(true);
|
| - // TODO(piman): Compositor::Draw() won't work for the threaded compositor.
|
| - GetRootLayer()->GetCompositor()->Draw(false);
|
| + GetRootLayer()->GetCompositor()->ScheduleDraw();
|
| + EXPECT_TRUE(GetRootLayer()->GetCompositor()->WaitForDraw());
|
| GetRootLayer()->SchedulePaint(gfx::Rect(0, 0, 10, 10));
|
| content_view->set_painted(false);
|
| // content_view no longer has a dirty rect. Paint from the root and make sure
|
| // PaintTrackingView isn't painted.
|
| - GetRootLayer()->GetCompositor()->Draw(false);
|
| + GetRootLayer()->GetCompositor()->ScheduleDraw();
|
| + EXPECT_TRUE(GetRootLayer()->GetCompositor()->WaitForDraw());
|
| EXPECT_FALSE(content_view->painted());
|
|
|
| // Make content_view have a dirty rect, paint the layers and make sure
|
| // PaintTrackingView is painted.
|
| content_view->layer()->SchedulePaint(gfx::Rect(0, 0, 10, 10));
|
| - GetRootLayer()->GetCompositor()->Draw(false);
|
| + GetRootLayer()->GetCompositor()->ScheduleDraw();
|
| + EXPECT_TRUE(GetRootLayer()->GetCompositor()->WaitForDraw());
|
| EXPECT_TRUE(content_view->painted());
|
| }
|
|
|
|
|