diff options
author | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-18 19:20:09 +0000 |
---|---|---|
committer | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-18 19:20:09 +0000 |
commit | 907cb093c66b8953d4ee8d1993c7985515e89da7 (patch) | |
tree | 9df05d5e0f7eb77a5ffac25f020d344479019940 /cc/trees/layer_tree_host_unittest.cc | |
parent | 0575fe97208d5d54fd6b5bec9c0a33b18dc816ac (diff) | |
download | chromium_src-907cb093c66b8953d4ee8d1993c7985515e89da7.zip chromium_src-907cb093c66b8953d4ee8d1993c7985515e89da7.tar.gz chromium_src-907cb093c66b8953d4ee8d1993c7985515e89da7.tar.bz2 |
cc: Attempt to de-flake test by preventing commit to start before draw.
The draw code checks that only 2 textures are used. However if a
BeginMainFrame occurs before draw and we upload textures for the next
frame, it would mess up the counting by the time we draw. Instead of
posting a commit for the next frame after activate, do it after we
have checked the number of textures used and drawn.
R=brianderson@chromium.org, enne@chromium.org, enne
BUG=352730
Review URL: https://codereview.chromium.org/198173004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257712 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/trees/layer_tree_host_unittest.cc')
-rw-r--r-- | cc/trees/layer_tree_host_unittest.cc | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/cc/trees/layer_tree_host_unittest.cc b/cc/trees/layer_tree_host_unittest.cc index 18e117a..316c021 100644 --- a/cc/trees/layer_tree_host_unittest.cc +++ b/cc/trees/layer_tree_host_unittest.cc @@ -1562,7 +1562,6 @@ class LayerTreeHostTestDirectRendererAtomicCommit : public LayerTreeHostTest { EXPECT_TRUE(context->UsedTexture(context->TextureAt(1))); context->ResetUsedTextures(); - PostSetNeedsCommitToMainThread(); break; case 1: // Number of textures should be one for scrollbar layer since it was @@ -1578,7 +1577,6 @@ class LayerTreeHostTestDirectRendererAtomicCommit : public LayerTreeHostTest { // New textures should have been used. EXPECT_TRUE(context->UsedTexture(context->TextureAt(2))); context->ResetUsedTextures(); - PostSetNeedsCommitToMainThread(); break; case 2: EndTest(); @@ -1601,6 +1599,9 @@ class LayerTreeHostTestDirectRendererAtomicCommit : public LayerTreeHostTest { // We draw/ship one texture each frame for each layer. EXPECT_EQ(2u, context->NumUsedTextures()); context->ResetUsedTextures(); + + if (!TestEnded()) + PostSetNeedsCommitToMainThread(); } virtual void Layout() OVERRIDE { @@ -1638,7 +1639,6 @@ class LayerTreeHostTestDelegatingRendererAtomicCommit EXPECT_TRUE(context->UsedTexture(context->TextureAt(0))); EXPECT_TRUE(context->UsedTexture(context->TextureAt(1))); context->ResetUsedTextures(); - PostSetNeedsCommitToMainThread(); break; case 1: // Number of textures should be doubled as the first context layer @@ -1657,7 +1657,6 @@ class LayerTreeHostTestDelegatingRendererAtomicCommit EXPECT_TRUE(context->UsedTexture(context->TextureAt(2))); EXPECT_TRUE(context->UsedTexture(context->TextureAt(3))); context->ResetUsedTextures(); - PostSetNeedsCommitToMainThread(); break; case 2: EndTest(); @@ -1669,9 +1668,8 @@ class LayerTreeHostTestDelegatingRendererAtomicCommit } }; -// Failing flakily http://crbug.com/352797 -// MULTI_THREAD_DELEGATING_RENDERER_NOIMPL_TEST_F( -// LayerTreeHostTestDelegatingRendererAtomicCommit); +MULTI_THREAD_DELEGATING_RENDERER_NOIMPL_TEST_F( + LayerTreeHostTestDelegatingRendererAtomicCommit); static void SetLayerPropertiesForTesting(Layer* layer, Layer* parent, |