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

Side by Side Diff: base/android/sys_utils_unittest.cc

Issue 119493005: Expose a low-end device mode override flags for non-android OSs as well (Closed) Base URL: https://git.chromium.org/chromium/src.git@master
Patch Set: Put low end device detection under the flag for all platforms except android. Created 6 years, 11 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/android/sys_utils.h" 5 #include "base/sys_utils.h"
6 6
7 #include <unistd.h> 7 #include <unistd.h>
8 8
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
11 namespace base { 11 namespace base {
12 namespace android { 12 namespace android {
13 13
14 TEST(SysUtils, AmountOfPhysicalMemory) { 14 TEST(SysUtils, AmountOfPhysicalMemory) {
15 // Check that the RAM size reported by sysconf() matches the one 15 // Check that the RAM size reported by sysconf() matches the one
16 // computed by base::android::SysUtils::AmountOfPhysicalMemory(). 16 // computed by base::android::SysUtils::AmountOfPhysicalMemory().
17 size_t sys_ram_size = 17 size_t sys_ram_size =
18 static_cast<size_t>(sysconf(_SC_PHYS_PAGES) * PAGE_SIZE); 18 static_cast<size_t>(sysconf(_SC_PHYS_PAGES) * PAGE_SIZE);
19 EXPECT_EQ(sys_ram_size, SysUtils::AmountOfPhysicalMemoryKB() * 1024UL); 19 EXPECT_EQ(sys_ram_size, SysUtils::AmountOfPhysicalMemoryKB() * 1024UL);
20 } 20 }
21 21
22 } // namespace android 22 } // namespace android
23 } // namespace base 23 } // namespace base
OLDNEW
« no previous file with comments | « base/android/sys_utils_android.cc ('k') | base/base.gypi » ('j') | base/sys_utils.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698