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

Unified Diff: content/browser/memory/memory_coordinator_impl_unittest.cc

Issue 2741883004: Remove MemoryCoordinatorProxy::SetCurrentMemoryStateForTesting (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/browser/memory/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/browser/memory/memory_coordinator_impl_unittest.cc
diff --git a/content/browser/memory/memory_coordinator_impl_unittest.cc b/content/browser/memory/memory_coordinator_impl_unittest.cc
index 9158668f7419f992b420d049524e71d55e288a79..34e81aa5a781db5c844455305b2db920d246d49e 100644
--- a/content/browser/memory/memory_coordinator_impl_unittest.cc
+++ b/content/browser/memory/memory_coordinator_impl_unittest.cc
@@ -449,28 +449,6 @@ TEST_F(MemoryCoordinatorImplTest, UpdateCondition) {
}
}
-TEST_F(MemoryCoordinatorImplTest, SetMemoryStateForTesting) {
- MockMemoryCoordinatorClient client;
- base::MemoryCoordinatorClientRegistry::GetInstance()->Register(&client);
- EXPECT_EQ(base::MemoryState::NORMAL, coordinator_->GetCurrentMemoryState());
- EXPECT_EQ(base::MemoryState::NORMAL,
- base::MemoryCoordinatorProxy::GetInstance()->
- GetCurrentMemoryState());
- EXPECT_EQ(base::MemoryState::NORMAL, client.state());
-
- base::MemoryCoordinatorProxy::GetInstance()->SetCurrentMemoryStateForTesting(
- base::MemoryState::THROTTLED);
- EXPECT_EQ(base::MemoryState::THROTTLED,
- coordinator_->GetCurrentMemoryState());
- EXPECT_EQ(base::MemoryState::THROTTLED,
- base::MemoryCoordinatorProxy::GetInstance()->
- GetCurrentMemoryState());
- RunUntilIdle();
- EXPECT_TRUE(client.did_state_changed());
- EXPECT_EQ(base::MemoryState::THROTTLED, client.state());
- base::MemoryCoordinatorClientRegistry::GetInstance()->Unregister(&client);
-}
-
TEST_F(MemoryCoordinatorImplTest, ForceSetMemoryCondition) {
auto* condition_observer = coordinator_->condition_observer_.get();
condition_observer->expected_renderer_size_ = 10;
« no previous file with comments | « content/browser/memory/memory_coordinator_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698