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

Unified Diff: mojo/edk/embedder/simple_platform_shared_buffer_unittest.cc

Issue 1494863002: Fix the new Mojo EDK's mojo_system_unittests to pass in release builds and also on Linux. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 | mojo/edk/system/handle_table.cc » ('j') | mojo/edk/system/handle_table.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/embedder/simple_platform_shared_buffer_unittest.cc
diff --git a/mojo/edk/embedder/simple_platform_shared_buffer_unittest.cc b/mojo/edk/embedder/simple_platform_shared_buffer_unittest.cc
index 27c3bf5b02ad6573a43068efcad69d5a0bf8743d..f8b0d2d2df8955d3a11679715688eccd299fb97b 100644
--- a/mojo/edk/embedder/simple_platform_shared_buffer_unittest.cc
+++ b/mojo/edk/embedder/simple_platform_shared_buffer_unittest.cc
@@ -134,7 +134,8 @@ TEST(SimplePlatformSharedBufferTest, TooBig) {
// If |size_t| is 32-bit, it's quite possible/likely that |Create()| succeeds
// (since it only involves creating a 4 GB file).
size_t max_size = std::numeric_limits<size_t>::max();
- if (max_size > static_cast<size_t>(base::SysInfo::AmountOfVirtualMemory()))
+ if (base::SysInfo::AmountOfVirtualMemory() &&
jam 2015/12/03 03:42:36 I added this recently to make the test pass on Win
yzshen1 2015/12/03 18:04:33 nit: please consider adding the reason as a commen
+ max_size > static_cast<size_t>(base::SysInfo::AmountOfVirtualMemory()))
max_size = static_cast<size_t>(base::SysInfo::AmountOfVirtualMemory());
scoped_refptr<SimplePlatformSharedBuffer> buffer(
SimplePlatformSharedBuffer::Create(max_size));
« no previous file with comments | « no previous file | mojo/edk/system/handle_table.cc » ('j') | mojo/edk/system/handle_table.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698