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

Unified Diff: content/test/blink_test_environment.cc

Issue 1004043002: Re-land: base: Implement browser process support for discardable memory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: set allocator instance for blink tests Created 5 years, 9 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 | « content/renderer/render_thread_impl.cc ('k') | ui/app_list/test/run_all_unittests.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/blink_test_environment.cc
diff --git a/content/test/blink_test_environment.cc b/content/test/blink_test_environment.cc
index 816983c71db0d92216207b7c9d4ed9d202e25ca3..16b35a62c52ea220c704845e487c0ae7987ccc2d 100644
--- a/content/test/blink_test_environment.cc
+++ b/content/test/blink_test_environment.cc
@@ -10,6 +10,7 @@
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
#include "base/strings/string_tokenizer.h"
+#include "base/test/test_discardable_memory_shmem_allocator.h"
#include "base/third_party/dynamic_annotations/dynamic_annotations.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/user_agent.h"
@@ -67,6 +68,9 @@ class TestEnvironment {
// TestBlinkWebUnitTestSupport must be instantiated after MessageLoopType.
blink_test_support_.reset(new TestBlinkWebUnitTestSupport);
content_initializer_.reset(new content::TestContentClientInitializer());
+
+ base::DiscardableMemoryShmemAllocator::SetInstance(
+ &discardable_memory_allocator_);
}
~TestEnvironment() {
@@ -80,6 +84,7 @@ class TestEnvironment {
scoped_ptr<MessageLoopType> main_message_loop_;
scoped_ptr<TestBlinkWebUnitTestSupport> blink_test_support_;
scoped_ptr<TestContentClientInitializer> content_initializer_;
+ base::TestDiscardableMemoryShmemAllocator discardable_memory_allocator_;
};
TestEnvironment* test_environment;
« no previous file with comments | « content/renderer/render_thread_impl.cc ('k') | ui/app_list/test/run_all_unittests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698