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

Unified Diff: mojo/edk/system/channel_endpoint_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/channel.cc ('k') | mojo/edk/system/channel_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/channel_endpoint_unittest.cc
diff --git a/mojo/edk/system/channel_endpoint_unittest.cc b/mojo/edk/system/channel_endpoint_unittest.cc
index 5b1fd46b2fb93a204509d252d229027cae9ed359..01199bd7dec47b449ce3b993524232a2e30e2273 100644
--- a/mojo/edk/system/channel_endpoint_unittest.cc
+++ b/mojo/edk/system/channel_endpoint_unittest.cc
@@ -31,17 +31,17 @@ class ChannelEndpointTest : public test::ChannelTestBase {
void SetUp() override {
test::ChannelTestBase::SetUp();
- PostMethodToIOThreadAndWait(
- &ChannelEndpointTest::CreateAndInitChannelOnIOThread, 0);
- PostMethodToIOThreadAndWait(
- &ChannelEndpointTest::CreateAndInitChannelOnIOThread, 1);
+ io_thread()->PostTaskAndWait([this]() {
+ CreateAndInitChannelOnIOThread(0);
+ CreateAndInitChannelOnIOThread(1);
+ });
}
void TearDown() override {
- PostMethodToIOThreadAndWait(&ChannelEndpointTest::ShutdownChannelOnIOThread,
- 0);
- PostMethodToIOThreadAndWait(&ChannelEndpointTest::ShutdownChannelOnIOThread,
- 1);
+ io_thread()->PostTaskAndWait([this]() {
+ ShutdownChannelOnIOThread(0);
+ ShutdownChannelOnIOThread(1);
+ });
test::ChannelTestBase::TearDown();
}
« no previous file with comments | « mojo/edk/system/channel.cc ('k') | mojo/edk/system/channel_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698