Commit 6c3b950f authored by enne@chromium.org's avatar enne@chromium.org

Fix LayerTreeHostTestUndrawnLayersDamageLater flakiness

Use the frame number from the active tree rather than LTH, since LTH is
on a different thread.

R=danakj@chromium.org
BUG=380895

Review URL: https://codereview.chromium.org/317013008

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275602 0039d316-1c4b-4281-b951-d872f2087c98
parent 7803664a
...@@ -574,15 +574,13 @@ class LayerTreeHostTestUndrawnLayersDamageLater : public LayerTreeHostTest { ...@@ -574,15 +574,13 @@ class LayerTreeHostTestUndrawnLayersDamageLater : public LayerTreeHostTest {
// and each damage should be the bounding box of it and its child. If this // and each damage should be the bounding box of it and its child. If this
// was working improperly, the damage might not include its childs bounding // was working improperly, the damage might not include its childs bounding
// box. // box.
// TODO(enne): This compositor thread function is asking for the switch (host_impl->active_tree()->source_frame_number()) {
// frame number from the layer tree host on the main thread. :( case 0:
switch (layer_tree_host()->source_frame_number()) {
case 1:
EXPECT_RECT_EQ(gfx::Rect(root_layer_->bounds()), root_damage_rect); EXPECT_RECT_EQ(gfx::Rect(root_layer_->bounds()), root_damage_rect);
break; break;
case 1:
case 2: case 2:
case 3: case 3:
case 4:
EXPECT_RECT_EQ(gfx::Rect(child_layer_->bounds()), root_damage_rect); EXPECT_RECT_EQ(gfx::Rect(child_layer_->bounds()), root_damage_rect);
break; break;
default: default:
...@@ -623,8 +621,7 @@ class LayerTreeHostTestUndrawnLayersDamageLater : public LayerTreeHostTest { ...@@ -623,8 +621,7 @@ class LayerTreeHostTestUndrawnLayersDamageLater : public LayerTreeHostTest {
scoped_refptr<FakeContentLayer> child_layer_; scoped_refptr<FakeContentLayer> child_layer_;
}; };
// TODO(enne): http://crbug.com/380895 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostTestUndrawnLayersDamageLater);
// SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostTestUndrawnLayersDamageLater);
// Tests that if a layer is not drawn because of some reason in the parent, // Tests that if a layer is not drawn because of some reason in the parent,
// causing its content bounds to not be computed, then when it is later drawn, // causing its content bounds to not be computed, then when it is later drawn,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment