Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(71)

Unified Diff: content/browser/renderer_host/render_widget_host_view_aura_unittest.cc

Issue 1140813005: Fix RenderWidgetHostViewAuraTest failure on devices with little memory (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unnecessary include Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/browser/renderer_host/renderer_frame_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
diff --git a/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc b/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
index c4f8429deab9f7b40a8ff2ec2b24d9e845c2a803..788d6414d8d4a5aa9a10bc71b1403abcd96e60f2 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
@@ -2048,9 +2048,13 @@ TEST_F(RenderWidgetHostViewAuraTest, DiscardDelegatedFramesWithLocking) {
TEST_F(RenderWidgetHostViewAuraTest, DiscardDelegatedFramesWithMemoryPressure) {
view_->InitAsChild(NULL);
- size_t max_renderer_frames =
- RendererFrameManager::GetInstance()->GetMaxNumberOfSavedFrames();
- ASSERT_LE(2u, max_renderer_frames);
+ // The test logic below relies on having max_renderer_frames > 2. By default,
+ // this value is calculated from total physical memory and causes the test to
+ // fail when run on hardware with < 256MB of RAM.
+ const size_t max_renderer_frames = 5;
danakj 2015/05/18 17:14:50 nit: no const, or kMaxRendererFrames.
+ RendererFrameManager::GetInstance()->set_max_number_of_saved_frames(
+ max_renderer_frames);
+
size_t renderer_count = max_renderer_frames;
gfx::Rect view_rect(100, 100);
gfx::Size frame_size = view_rect.size();
« no previous file with comments | « no previous file | content/browser/renderer_host/renderer_frame_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698