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

Unified Diff: content/browser/memory/memory_monitor_android_unittest.cc

Issue 2340293003: Add MemoryMonitorAndroid (Closed)
Patch Set: rebase 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 | « content/browser/memory/memory_monitor_android.cc ('k') | content/public/android/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/memory/memory_monitor_android_unittest.cc
diff --git a/content/browser/memory/memory_monitor_android_unittest.cc b/content/browser/memory/memory_monitor_android_unittest.cc
new file mode 100644
index 0000000000000000000000000000000000000000..bb6e85c2da73469e6c8f4719864959e5f92923b0
--- /dev/null
+++ b/content/browser/memory/memory_monitor_android_unittest.cc
@@ -0,0 +1,27 @@
+// Copyright (c) 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "content/browser/memory/memory_monitor_android.h"
+
+#include "testing/gtest/include/gtest/gtest.h"
+
+namespace content {
+
+class MemoryMonitorAndroidTest : public testing::Test {
+ public:
+ MemoryMonitorAndroidTest() : monitor_(MemoryMonitorAndroid::Create()) {}
+
+ protected:
+ std::unique_ptr<MemoryMonitorAndroid> monitor_;
+};
+
+TEST_F(MemoryMonitorAndroidTest, GetMemoryInfo) {
+ MemoryMonitorAndroid::MemoryInfo info;
+ monitor_->GetMemoryInfo(&info);
+ EXPECT_GT(info.avail_mem, 0);
+ EXPECT_GT(info.threshold, 0);
+ EXPECT_GT(info.total_mem, 0);
+}
+
+} // namespace content
« no previous file with comments | « content/browser/memory/memory_monitor_android.cc ('k') | content/public/android/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698