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

Unified Diff: base/observer_list_unittest.cc

Issue 2419673003: Remove base::ObserverList<T>::Iter::GetNext(). (Closed)
Patch Set: Created 4 years, 2 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 | « base/observer_list_threadsafe.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/observer_list_unittest.cc
diff --git a/base/observer_list_unittest.cc b/base/observer_list_unittest.cc
index 299a33f2e896053bf452887191559944c3c53334..c942cef95e080077b3a9cb43aa288a48ecc6c95c 100644
--- a/base/observer_list_unittest.cc
+++ b/base/observer_list_unittest.cc
@@ -895,22 +895,4 @@ TEST(ObserverListTest, BecomesEmptyThanNonEmpty) {
EXPECT_EQ(-12, b.total);
}
-TEST(ObserverListTest, AddObserverInTheLastObserve) {
danakj 2016/10/13 19:38:13 Why kill the test?
loyso (OOO) 2016/10/13 23:33:52 +1. Even without GetNext a user is able to write G
- using FooList = ObserverList<Foo>;
- FooList observer_list;
-
- AddInObserve<FooList> a(&observer_list);
- Adder b(-1);
-
- a.SetToAdd(&b);
- observer_list.AddObserver(&a);
-
- FooList::Iterator it(&observer_list);
- Foo* foo;
- while ((foo = it.GetNext()) != nullptr)
- foo->Observe(10);
-
- EXPECT_EQ(-10, b.total);
-}
-
} // namespace base
« no previous file with comments | « base/observer_list_threadsafe.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698