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

Unified Diff: trunk/src/base/memory/discardable_memory_unittest.cc

Issue 100103003: Revert 239763 "Add DiscardableMemoryAllocator to minimize use of..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 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 | « trunk/src/base/memory/discardable_memory_android.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/base/memory/discardable_memory_unittest.cc
===================================================================
--- trunk/src/base/memory/discardable_memory_unittest.cc (revision 239774)
+++ trunk/src/base/memory/discardable_memory_unittest.cc (working copy)
@@ -3,27 +3,12 @@
// found in the LICENSE file.
#include "base/memory/discardable_memory.h"
-
-#include <limits>
-
#include "testing/gtest/include/gtest/gtest.h"
namespace base {
const size_t kSize = 1024;
-TEST(DiscardableMemoryTest, TooLargeAllocationFails) {
- const size_t kPageSize = 4096;
- const size_t max_allowed_allocation_size =
- std::numeric_limits<size_t>::max() - kPageSize + 1;
- scoped_ptr<DiscardableMemory> memory(
- DiscardableMemory::CreateLockedMemory(max_allowed_allocation_size + 1));
- // On certain platforms (e.g. Android), page-alignment would have caused an
- // overflow resulting in a small allocation if the input size wasn't checked
- // correctly.
- ASSERT_FALSE(memory);
-}
-
TEST(DiscardableMemoryTest, SupportedNatively) {
#if defined(DISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY)
ASSERT_TRUE(DiscardableMemory::SupportedNatively());
« no previous file with comments | « trunk/src/base/memory/discardable_memory_android.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698