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

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

Issue 1496663002: EDK: Make mojo::platform::TaskRunner's PostTask() take an std::function<void()>. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years 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 | « mojo/edk/system/data_pipe_impl_unittest.cc ('k') | mojo/edk/system/ipc_support_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/endpoint_relayer_unittest.cc
diff --git a/mojo/edk/system/endpoint_relayer_unittest.cc b/mojo/edk/system/endpoint_relayer_unittest.cc
index 5a4f813ec9fe0f089fca07dbb25852aee2c35ca0..57c3d9a7016943c9f9373b7b3cc701f5f38938f4 100644
--- a/mojo/edk/system/endpoint_relayer_unittest.cc
+++ b/mojo/edk/system/endpoint_relayer_unittest.cc
@@ -33,10 +33,10 @@ class EndpointRelayerTest : public test::ChannelTestBase {
void SetUp() override {
test::ChannelTestBase::SetUp();
- PostMethodToIOThreadAndWait(
- &EndpointRelayerTest::CreateAndInitChannelOnIOThread, 0);
- PostMethodToIOThreadAndWait(
- &EndpointRelayerTest::CreateAndInitChannelOnIOThread, 1);
+ io_thread()->PostTaskAndWait([this]() {
+ CreateAndInitChannelOnIOThread(0);
+ CreateAndInitChannelOnIOThread(1);
+ });
// The set up:
// * Across the pair of channels, we'll have a pair of connections (call
@@ -67,10 +67,10 @@ class EndpointRelayerTest : public test::ChannelTestBase {
}
void TearDown() override {
- PostMethodToIOThreadAndWait(&EndpointRelayerTest::ShutdownChannelOnIOThread,
- 0);
- PostMethodToIOThreadAndWait(&EndpointRelayerTest::ShutdownChannelOnIOThread,
- 1);
+ io_thread()->PostTaskAndWait([this]() {
+ ShutdownChannelOnIOThread(0);
+ ShutdownChannelOnIOThread(1);
+ });
test::ChannelTestBase::TearDown();
}
« no previous file with comments | « mojo/edk/system/data_pipe_impl_unittest.cc ('k') | mojo/edk/system/ipc_support_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698