commit | d1e773cb28798b8ab070cd62e56dd0e5b6b3b274 | [log] [tgz] |
---|---|---|
author | Alexander Timin <[email protected]> | Fri Oct 26 14:19:03 2018 |
committer | Commit Bot <[email protected]> | Fri Oct 26 14:19:03 2018 |
tree | 392521ddee353ba42e52b79159a0d515b63d5bac | |
parent | 02fa0b9bc00c36c50dd504fa35423aaab4e21781 [diff] [blame] |
[scheduler] Add MessageLoopCurrent::IsBoundToCurrentThread. Address a common pattern of usage by replacing MessageLoopCurrent comparison with explicit method call. [email protected] [email protected] CC=[email protected] BUG=891670 Change-Id: I0f6a7f2c65c9f39dd26abf592dc59efc14b07f57 Reviewed-on: https://chromium-review.googlesource.com/c/1296499 Commit-Queue: Alexander Timin <[email protected]> Reviewed-by: Alexander Timin <[email protected]> Reviewed-by: Gabriel Charette <[email protected]> Cr-Commit-Position: refs/heads/master@{#603080}
diff --git a/base/observer_list_threadsafe_unittest.cc b/base/observer_list_threadsafe_unittest.cc index 821315b2b..3134fca7 100644 --- a/base/observer_list_threadsafe_unittest.cc +++ b/base/observer_list_threadsafe_unittest.cc
@@ -136,10 +136,10 @@ // If we're getting called after we removed ourselves from the list, that is // very bad! - DCHECK(in_list_); + EXPECT_TRUE(in_list_); // This callback should fire on the appropriate thread - EXPECT_EQ(loop_, MessageLoop::current()); + EXPECT_TRUE(loop_->IsBoundToCurrentThread()); list_->RemoveObserver(this); in_list_ = false;