Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(269)

Unified Diff: ui/views/view_unittest.cc

Issue 13725019: Aura: Make views_unittests work with --ui-enable-threaded-compositing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Compile fix and rebase. Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/compositor/layer_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/view_unittest.cc
diff --git a/ui/views/view_unittest.cc b/ui/views/view_unittest.cc
index d20997ff250123bd4bbd6f86d896fa74aa74199a..5e5e6e3efce153bcbdaeb7ae4d223e9e7c6cdf7c 100644
--- a/ui/views/view_unittest.cc
+++ b/ui/views/view_unittest.cc
@@ -3228,19 +3228,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(ui::DrawWaiterForTest::Wait(GetRootLayer()->GetCompositor()));
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(ui::DrawWaiterForTest::Wait(GetRootLayer()->GetCompositor()));
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(ui::DrawWaiterForTest::Wait(GetRootLayer()->GetCompositor()));
EXPECT_TRUE(content_view->painted());
}
« no previous file with comments | « ui/compositor/layer_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698