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

Unified Diff: cc/layers/scrollbar_layer_unittest.cc

Issue 2306833002: cc: Prevent allocating memory buffers too large in tests. (Closed)
Patch Set: scrollbartexsize: . Created 4 years, 3 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/scrollbar_layer_unittest.cc
diff --git a/cc/layers/scrollbar_layer_unittest.cc b/cc/layers/scrollbar_layer_unittest.cc
index 45995fc9fd894706ae74623c85266d0dc80c97a0..54ff4223fd27d9144a781540d73fc9cf778fa552 100644
--- a/cc/layers/scrollbar_layer_unittest.cc
+++ b/cc/layers/scrollbar_layer_unittest.cc
@@ -1007,9 +1007,13 @@ TEST_F(ScaledScrollbarLayerTestResourceCreation, ScaledResourceUpload) {
// Try something extreme to be larger than max texture size, and make it a
// non-integer for funsies.
scoped_refptr<TestContextProvider> context = TestContextProvider::Create();
+ // Keep the max texture size reasonable so we don't OOM on low end devices
+ // (crbug.com/642333).
+ context->UnboundTestContext3d()->set_max_texture_size(512);
context->BindToCurrentThread();
int max_texture_size = 0;
context->ContextGL()->GetIntegerv(GL_MAX_TEXTURE_SIZE, &max_texture_size);
+ EXPECT_EQ(512, max_texture_size);
TestResourceUpload(max_texture_size / 9.9f);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698