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

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

Issue 1420533012: EDK: Make mojo::embedder::AsyncWait (etc.) take an std::function instead of a base::Callback. (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 | « mojo/edk/system/core.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/core_unittest.cc
diff --git a/mojo/edk/system/core_unittest.cc b/mojo/edk/system/core_unittest.cc
index 89f9856a3b6ce0d8c669cc5ae3bf7be0ed89e135..18f3fda72a587368bcbab71067a8624662ad8463 100644
--- a/mojo/edk/system/core_unittest.cc
+++ b/mojo/edk/system/core_unittest.cc
@@ -8,7 +8,6 @@
#include <limits>
-#include "base/bind.h"
#include "mojo/edk/system/awakable.h"
#include "mojo/edk/system/core_test_base.h"
#include "mojo/edk/system/test/sleep.h"
@@ -1292,16 +1291,16 @@ TEST_F(CoreTest, AsyncWait) {
MojoHandle h = CreateMockHandle(&info);
EXPECT_EQ(MOJO_RESULT_FAILED_PRECONDITION,
- core()->AsyncWait(h, MOJO_HANDLE_SIGNAL_READABLE,
- base::Bind(&TestAsyncWaiter::Awake,
- base::Unretained(&waiter))));
+ core()->AsyncWait(
+ h, MOJO_HANDLE_SIGNAL_READABLE,
+ [&waiter](MojoResult result) { waiter.Awake(result); }));
EXPECT_EQ(0u, info.GetAddedAwakableSize());
info.AllowAddAwakable(true);
- EXPECT_EQ(MOJO_RESULT_OK,
- core()->AsyncWait(h, MOJO_HANDLE_SIGNAL_READABLE,
- base::Bind(&TestAsyncWaiter::Awake,
- base::Unretained(&waiter))));
+ EXPECT_EQ(MOJO_RESULT_OK, core()->AsyncWait(h, MOJO_HANDLE_SIGNAL_READABLE,
+ [&waiter](MojoResult result) {
+ waiter.Awake(result);
+ }));
EXPECT_EQ(1u, info.GetAddedAwakableSize());
EXPECT_FALSE(info.GetAddedAwakableAt(0)->Awake(MOJO_RESULT_BUSY, 0));
« no previous file with comments | « mojo/edk/system/core.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698