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

Unified Diff: mojo/edk/system/channel_test_base.cc

Issue 1473413002: EDK: Add a TestIOThread::IsCurrentAndRunning(). (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 1 month 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 | « no previous file | mojo/edk/system/data_pipe_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/channel_test_base.cc
diff --git a/mojo/edk/system/channel_test_base.cc b/mojo/edk/system/channel_test_base.cc
index ecb7d1b202b2dcdf394d73b1b034e233034ae3c6..933b5d1ec4dd5a650f4b7f867c4bb8e85cf8dfb5 100644
--- a/mojo/edk/system/channel_test_base.cc
+++ b/mojo/edk/system/channel_test_base.cc
@@ -7,7 +7,6 @@
#include <utility>
#include "base/logging.h"
-#include "base/message_loop/message_loop.h"
#include "mojo/edk/embedder/platform_channel_pair.h"
#include "mojo/edk/system/raw_channel.h"
@@ -28,14 +27,14 @@ void ChannelTestBase::SetUp() {
}
void ChannelTestBase::CreateChannelOnIOThread(unsigned i) {
- CHECK_EQ(base::MessageLoop::current(), io_thread()->message_loop());
+ CHECK(io_thread()->IsCurrentAndRunning());
CHECK(!channels_[i]);
channels_[i] = MakeRefCounted<Channel>(&platform_support_);
}
void ChannelTestBase::InitChannelOnIOThread(unsigned i) {
- CHECK_EQ(base::MessageLoop::current(), io_thread()->message_loop());
+ CHECK(io_thread()->IsCurrentAndRunning());
CHECK(raw_channels_[i]);
CHECK(channels_[i]);
@@ -48,7 +47,7 @@ void ChannelTestBase::CreateAndInitChannelOnIOThread(unsigned i) {
}
void ChannelTestBase::ShutdownChannelOnIOThread(unsigned i) {
- CHECK_EQ(base::MessageLoop::current(), io_thread()->message_loop());
+ CHECK(io_thread()->IsCurrentAndRunning());
CHECK(channels_[i]);
channels_[i]->Shutdown();
@@ -60,7 +59,7 @@ void ChannelTestBase::ShutdownAndReleaseChannelOnIOThread(unsigned i) {
}
void ChannelTestBase::SetUpOnIOThread() {
- CHECK_EQ(base::MessageLoop::current(), io_thread()->message_loop());
+ CHECK(io_thread()->IsCurrentAndRunning());
embedder::PlatformChannelPair channel_pair;
raw_channels_[0] = RawChannel::Create(channel_pair.PassServerHandle());
« no previous file with comments | « no previous file | mojo/edk/system/data_pipe_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698