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

Side by Side Diff: content/child/child_discardable_shared_memory_manager_browsertest.cc

Issue 1033553003: content: Re-enable ChildDiscardableSharedMemoryManagerBrowserTest.LockMemory test. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/bind.h" 5 #include "base/bind.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/memory/discardable_memory.h" 7 #include "base/memory/discardable_memory.h"
8 #include "content/child/child_discardable_shared_memory_manager.h" 8 #include "content/child/child_discardable_shared_memory_manager.h"
9 #include "content/child/child_thread_impl.h" 9 #include "content/child/child_thread_impl.h"
10 #include "content/common/host_discardable_shared_memory_manager.h" 10 #include "content/common/host_discardable_shared_memory_manager.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 } 42 }
43 43
44 static void UnlockMemory(base::DiscardableMemory* memory) { 44 static void UnlockMemory(base::DiscardableMemory* memory) {
45 memory->Unlock(); 45 memory->Unlock();
46 } 46 }
47 47
48 static void FreeMemory(scoped_ptr<base::DiscardableMemory> memory) {} 48 static void FreeMemory(scoped_ptr<base::DiscardableMemory> memory) {}
49 }; 49 };
50 50
51 IN_PROC_BROWSER_TEST_F(ChildDiscardableSharedMemoryManagerBrowserTest, 51 IN_PROC_BROWSER_TEST_F(ChildDiscardableSharedMemoryManagerBrowserTest,
52 DISABLED_LockMemory) { 52 LockMemory) {
53 const size_t kSize = 1024 * 1024; // 1MiB. 53 const size_t kSize = 1024 * 1024; // 1MiB.
54 54
55 NavigateToURL(shell(), GURL(url::kAboutBlankURL)); 55 NavigateToURL(shell(), GURL(url::kAboutBlankURL));
56 56
57 scoped_ptr<base::DiscardableMemory> memory; 57 scoped_ptr<base::DiscardableMemory> memory;
58 PostTaskToInProcessRendererAndWait(base::Bind( 58 PostTaskToInProcessRendererAndWait(base::Bind(
59 &ChildDiscardableSharedMemoryManagerBrowserTest::AllocateLockedMemory, 59 &ChildDiscardableSharedMemoryManagerBrowserTest::AllocateLockedMemory,
60 kSize, &memory)); 60 kSize, &memory));
61 61
62 ASSERT_TRUE(memory); 62 ASSERT_TRUE(memory);
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 kSize); 131 kSize);
132 132
133 PostTaskToInProcessRendererAndWait(base::Bind( 133 PostTaskToInProcessRendererAndWait(base::Bind(
134 &ChildDiscardableSharedMemoryManagerBrowserTest::ReleaseFreeMemory)); 134 &ChildDiscardableSharedMemoryManagerBrowserTest::ReleaseFreeMemory));
135 135
136 EXPECT_EQ(HostDiscardableSharedMemoryManager::current()->GetBytesAllocated(), 136 EXPECT_EQ(HostDiscardableSharedMemoryManager::current()->GetBytesAllocated(),
137 0u); 137 0u);
138 } 138 }
139 139
140 } // content 140 } // content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698