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

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

Issue 782693004: Update mojo sdk to rev f6c8ec07c01deebc13178d516225fd12695c3dc2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: hack mojo_system_impl gypi for android :| Created 6 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
Index: mojo/edk/system/dispatcher_unittest.cc
diff --git a/mojo/edk/system/dispatcher_unittest.cc b/mojo/edk/system/dispatcher_unittest.cc
index 0b15436db71614f8ed89c11c125a9beb05f9b38f..97e2eed9c6b1016555c4b7d4eea9e72fb099426c 100644
--- a/mojo/edk/system/dispatcher_unittest.cc
+++ b/mojo/edk/system/dispatcher_unittest.cc
@@ -67,16 +67,16 @@ TEST(DispatcherTest, Basic) {
w.Init();
HandleSignalsState hss;
EXPECT_EQ(MOJO_RESULT_FAILED_PRECONDITION,
- d->AddWaiter(&w, ~MOJO_HANDLE_SIGNAL_NONE, 0, &hss));
+ d->AddAwakable(&w, ~MOJO_HANDLE_SIGNAL_NONE, 0, &hss));
EXPECT_EQ(0u, hss.satisfied_signals);
EXPECT_EQ(0u, hss.satisfiable_signals);
// Okay to remove even if it wasn't added (or was already removed).
hss = HandleSignalsState();
- d->RemoveWaiter(&w, &hss);
+ d->RemoveAwakable(&w, &hss);
EXPECT_EQ(0u, hss.satisfied_signals);
EXPECT_EQ(0u, hss.satisfiable_signals);
hss = HandleSignalsState();
- d->RemoveWaiter(&w, &hss);
+ d->RemoveAwakable(&w, &hss);
EXPECT_EQ(0u, hss.satisfied_signals);
EXPECT_EQ(0u, hss.satisfiable_signals);
@@ -104,11 +104,11 @@ TEST(DispatcherTest, Basic) {
EXPECT_EQ(MOJO_RESULT_INVALID_ARGUMENT, d->EndReadData(0));
hss = HandleSignalsState();
EXPECT_EQ(MOJO_RESULT_INVALID_ARGUMENT,
- d->AddWaiter(&w, ~MOJO_HANDLE_SIGNAL_NONE, 0, &hss));
+ d->AddAwakable(&w, ~MOJO_HANDLE_SIGNAL_NONE, 0, &hss));
EXPECT_EQ(0u, hss.satisfied_signals);
EXPECT_EQ(0u, hss.satisfiable_signals);
hss = HandleSignalsState();
- d->RemoveWaiter(&w, &hss);
+ d->RemoveAwakable(&w, &hss);
EXPECT_EQ(0u, hss.satisfied_signals);
EXPECT_EQ(0u, hss.satisfiable_signals);
}
@@ -212,8 +212,8 @@ class ThreadSafetyStressThread : public base::SimpleThread {
}
case ADD_WAITER: {
HandleSignalsState hss;
- MojoResult r =
- dispatcher_->AddWaiter(&waiter_, ~MOJO_HANDLE_SIGNAL_NONE, 0, &hss);
+ MojoResult r = dispatcher_->AddAwakable(
+ &waiter_, ~MOJO_HANDLE_SIGNAL_NONE, 0, &hss);
EXPECT_TRUE(r == MOJO_RESULT_FAILED_PRECONDITION ||
r == MOJO_RESULT_INVALID_ARGUMENT);
EXPECT_EQ(0u, hss.satisfied_signals);
@@ -222,7 +222,7 @@ class ThreadSafetyStressThread : public base::SimpleThread {
}
case REMOVE_WAITER: {
HandleSignalsState hss;
- dispatcher_->RemoveWaiter(&waiter_, &hss);
+ dispatcher_->RemoveAwakable(&waiter_, &hss);
EXPECT_EQ(0u, hss.satisfied_signals);
EXPECT_EQ(0u, hss.satisfiable_signals);
break;
@@ -234,7 +234,7 @@ class ThreadSafetyStressThread : public base::SimpleThread {
// Always try to remove the waiter, in case we added it.
HandleSignalsState hss;
- dispatcher_->RemoveWaiter(&waiter_, &hss);
+ dispatcher_->RemoveAwakable(&waiter_, &hss);
EXPECT_EQ(0u, hss.satisfied_signals);
EXPECT_EQ(0u, hss.satisfiable_signals);
}

Powered by Google App Engine
This is Rietveld 408576698