diff options
author | mmocny@chromium.org <mmocny@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-20 19:22:27 +0000 |
---|---|---|
committer | mmocny@chromium.org <mmocny@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-20 19:22:27 +0000 |
commit | 340298ae4a1c27e26d9af08929e28c5504e498e2 (patch) | |
tree | 87c8be0d2eddd5d171758e959bffd07be2e706ca /content | |
parent | b7cdac611e08b20d4f3afd3f125c03b242d61163 (diff) | |
download | chromium_src-340298ae4a1c27e26d9af08929e28c5504e498e2.zip chromium_src-340298ae4a1c27e26d9af08929e28c5504e498e2.tar.gz chromium_src-340298ae4a1c27e26d9af08929e28c5504e498e2.tar.bz2 |
Fix failing GpuMemoryManagerTest.StubMemoryStatsForLastManageTests on Android.
BUG=138138
TEST=GpuMemoryManagerTest.StubMemoryStatsForLastManageTests
Review URL: https://chromiumcodereview.appspot.com/10808049
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147695 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r-- | content/common/gpu/gpu_memory_manager_unittest.cc | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/content/common/gpu/gpu_memory_manager_unittest.cc b/content/common/gpu/gpu_memory_manager_unittest.cc index 3181e07..1a09167 100644 --- a/content/common/gpu/gpu_memory_manager_unittest.cc +++ b/content/common/gpu/gpu_memory_manager_unittest.cc @@ -604,6 +604,12 @@ TEST_F(GpuMemoryManagerTest, GpuMemoryAllocationCompareTests) { // Creats various surface/non-surface stubs and switches stub visibility and // tests to see that stats data structure values are correct. TEST_F(GpuMemoryManagerTest, StubMemoryStatsForLastManageTests) { +#if !defined(OS_ANDROID) + const bool compositors_get_bonus_allocation = true; +#else + const bool compositors_get_bonus_allocation = false; +#endif + GpuMemoryManager::StubMemoryStatMap stats; Manage(); @@ -633,7 +639,8 @@ TEST_F(GpuMemoryManagerTest, StubMemoryStatsForLastManageTests) { EXPECT_TRUE(stats[&stub2].visible); EXPECT_GT(stub1allocation2, 0ul); EXPECT_GT(stub2allocation2, 0ul); - EXPECT_LT(stub1allocation2, stub1allocation1); + if (compositors_get_bonus_allocation) + EXPECT_LT(stub1allocation2, stub1allocation1); FakeCommandBufferStub stub3(GenerateUniqueSurfaceId(), true, older_); client_.stubs_.push_back(&stub3); @@ -650,7 +657,8 @@ TEST_F(GpuMemoryManagerTest, StubMemoryStatsForLastManageTests) { EXPECT_GT(stub1allocation3, 0ul); EXPECT_GT(stub2allocation3, 0ul); EXPECT_GT(stub3allocation3, 0ul); - EXPECT_LT(stub1allocation3, stub1allocation2); + if (compositors_get_bonus_allocation) + EXPECT_LT(stub1allocation3, stub1allocation2); stub1.surface_state_.visible = false; Manage(); @@ -666,5 +674,6 @@ TEST_F(GpuMemoryManagerTest, StubMemoryStatsForLastManageTests) { EXPECT_EQ(stub1allocation4, 0ul); EXPECT_GE(stub2allocation4, 0ul); EXPECT_GT(stub3allocation4, 0ul); - EXPECT_GT(stub3allocation4, stub3allocation3); + if (compositors_get_bonus_allocation) + EXPECT_GT(stub3allocation4, stub3allocation3); } |