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

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

Issue 2735993002: memory_coordinator: Discard tabs under critical memory condition (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
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 7104ef938c235f568ba886436bce832b6234d004..fbb41af30418fdc8ab8bee3a4eb15bb94b583d44 100644
--- a/content/browser/memory/memory_coordinator_impl_unittest.cc
+++ b/content/browser/memory/memory_coordinator_impl_unittest.cc
@@ -101,7 +101,10 @@ class TestMemoryCoordinatorDelegate : public MemoryCoordinatorDelegate {
return true;
}
- void DiscardTab() override { discard_tab_called_ = true; }
+ bool DiscardTab() override {
+ discard_tab_called_ = true;
+ return true;
+ }
bool discard_tab_called() const { return discard_tab_called_; }
@@ -514,7 +517,7 @@ TEST_F(MemoryCoordinatorImplTest, ForceSetMemoryCondition) {
}
TEST_F(MemoryCoordinatorImplTest, DiscardTab) {
- coordinator_->DiscardTab();
+ EXPECT_TRUE(coordinator_->DiscardTab());
EXPECT_TRUE(coordinator_->GetDelegate()->discard_tab_called());
}

Powered by Google App Engine
This is Rietveld 408576698