From fa9a830d064c639117c09ee9387f460ba9c9ffc7 Mon Sep 17 00:00:00 2001 From: "danakj@chromium.org" Date: Tue, 10 Jun 2014 21:24:52 +0000 Subject: Fix flaky test LayerTreeHostTestMaxTransferBufferUsageBytes. This test wants to ensure we don't use more than N bytes of transfer buffer. But it does this by querying the current number of bytes at some time. As we mark any uploads as complete we could end up with less bytes in use at the time of the query, so this could be flaky. Instead, track the max number of bytes ever used in the context to get the real value that this test is looking for. And re-enable the test. R=enne, jamesr BUG=380662 Review URL: https://codereview.chromium.org/326733002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@276155 0039d316-1c4b-4281-b951-d872f2087c98 --- cc/test/test_web_graphics_context_3d.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'cc/test/test_web_graphics_context_3d.h') diff --git a/cc/test/test_web_graphics_context_3d.h b/cc/test/test_web_graphics_context_3d.h index 3ce3ddd..3cbe9ca 100644 --- a/cc/test/test_web_graphics_context_3d.h +++ b/cc/test/test_web_graphics_context_3d.h @@ -323,8 +323,10 @@ class TestWebGraphicsContext3D { virtual GLuint NextImageId(); virtual void RetireImageId(GLuint id); - size_t GetTransferBufferMemoryUsedBytes() const; void SetMaxTransferBufferUsageBytes(size_t max_transfer_buffer_usage_bytes); + size_t max_used_transfer_buffer_usage_bytes() const { + return max_used_transfer_buffer_usage_bytes_; + } void set_test_support(TestContextSupport* test_support) { test_support_ = test_support; @@ -415,6 +417,8 @@ class TestWebGraphicsContext3D { bool context_lost_; int times_map_image_chromium_succeeds_; int times_map_buffer_chromium_succeeds_; + int current_used_transfer_buffer_usage_bytes_; + int max_used_transfer_buffer_usage_bytes_; base::Closure context_lost_callback_; base::hash_set used_textures_; unsigned next_program_id_; -- cgit v1.1