Commit 6a75e23e authored by Yi Gu's avatar Yi Gu Committed by Commit Bot

Only test the renderer process when recording GPU memory cost

In non-single-process tests, there's a good chance that two unit tests
running in the same process need to set different client names.
Currently whichever comes second cannot set the client name correctly.

However, there is no ideal way to test both processes. Resetting the
client names in the test doesn't work because the histogram has static
client name which invalidates the name resetting. To fix, it requires
confusing work-around in the code therefore we prefer to test only one
process after all the logic is almost identical.

Bug: 749366
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Iebd312e1138292754f4aa2aa1875b13365e5602f
Reviewed-on: https://chromium-review.googlesource.com/590172Reviewed-by: default avatarVladimir Levin <vmpstr@chromium.org>
Commit-Queue: Yi Gu <yigu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#490778}
parent 55d5a79a
...@@ -946,17 +946,16 @@ TEST_F(LayerTreeHostImplTest, GPUMemoryForSmallLayerHistogramTest) { ...@@ -946,17 +946,16 @@ TEST_F(LayerTreeHostImplTest, GPUMemoryForSmallLayerHistogramTest) {
"Compositing.Renderer.GPUMemoryForTilingsInKb", 1); "Compositing.Renderer.GPUMemoryForTilingsInKb", 1);
} }
// Flaky: http://crbug.com/750377 TEST_F(LayerTreeHostImplTest, GPUMemoryForLargeLayerHistogramTest) {
TEST_F(LayerTreeHostImplTest, DISABLED_GPUMemoryForLargeLayerHistogramTest) {
base::HistogramTester histogram_tester; base::HistogramTester histogram_tester;
SetClientNameForMetrics("Browser"); SetClientNameForMetrics("Renderer");
// With default tile size being set to 256 * 256, the following layer needs // With default tile size being set to 256 * 256, the following layer needs
// 4 tiles which cost 256 * 256 * 4 * 4 / 1024 = 1024KB memory. // 4 tiles which cost 256 * 256 * 4 * 4 / 1024 = 1024KB memory.
TestGPUMemoryForTilings(gfx::Size(500, 500)); TestGPUMemoryForTilings(gfx::Size(500, 500));
histogram_tester.ExpectBucketCount( histogram_tester.ExpectBucketCount(
"Compositing.Browser.GPUMemoryForTilingsInKb", 1024, 1); "Compositing.Renderer.GPUMemoryForTilingsInKb", 1024, 1);
histogram_tester.ExpectTotalCount( histogram_tester.ExpectTotalCount(
"Compositing.Browser.GPUMemoryForTilingsInKb", 1); "Compositing.Renderer.GPUMemoryForTilingsInKb", 1);
} }
TEST_F(LayerTreeHostImplTest, ScrollRootCallsCommitAndRedraw) { TEST_F(LayerTreeHostImplTest, ScrollRootCallsCommitAndRedraw) {
......
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