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

Unified Diff: content/child/memory/child_memory_coordinator_impl_unittest.cc

Issue 2739363002: Implement base::MemoryCoordinator for ChildMemoryCoordinatorImpl (Closed)
Patch Set: Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/child/memory/child_memory_coordinator_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/memory/child_memory_coordinator_impl_unittest.cc
diff --git a/content/child/memory/child_memory_coordinator_impl_unittest.cc b/content/child/memory/child_memory_coordinator_impl_unittest.cc
index fe20c0cfa3c579c4bbf61de9a0c924addd2c9551..4a589652b9c00832993ac882e06f79ae3bd82797 100644
--- a/content/child/memory/child_memory_coordinator_impl_unittest.cc
+++ b/content/child/memory/child_memory_coordinator_impl_unittest.cc
@@ -138,18 +138,25 @@ class MemoryCoordinatorTestThread : public base::Thread,
};
TEST_F(ChildMemoryCoordinatorImplTest, SingleClient) {
+ auto* memory_coordinator_proxy = base::MemoryCoordinatorProxy::GetInstance();
MockMemoryCoordinatorClient client;
RegisterClient(&client);
ChangeState(mojom::MemoryState::THROTTLED);
EXPECT_EQ(base::MemoryState::THROTTLED, client.last_state());
+ EXPECT_EQ(base::MemoryState::THROTTLED,
+ memory_coordinator_proxy->GetCurrentMemoryState());
ChangeState(mojom::MemoryState::NORMAL);
EXPECT_EQ(base::MemoryState::NORMAL, client.last_state());
+ EXPECT_EQ(base::MemoryState::NORMAL,
+ memory_coordinator_proxy->GetCurrentMemoryState());
UnregisterClient(&client);
ChangeState(mojom::MemoryState::THROTTLED);
EXPECT_TRUE(base::MemoryState::THROTTLED != client.last_state());
+ EXPECT_EQ(base::MemoryState::THROTTLED,
+ memory_coordinator_proxy->GetCurrentMemoryState());
}
TEST_F(ChildMemoryCoordinatorImplTest, MultipleClients) {
« no previous file with comments | « content/child/memory/child_memory_coordinator_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698