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

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

Issue 1811433002: [mojo-edk] Expose notification source to MojoWatch callbacks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months 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/watch_unittest.cc
diff --git a/mojo/edk/system/watch_unittest.cc b/mojo/edk/system/watch_unittest.cc
index f60c8a8ebd883258aed7fff26cddd42a0f8f87d6..f6a748bb2aa65312d638bb16c67f35b2e166f8ef 100644
--- a/mojo/edk/system/watch_unittest.cc
+++ b/mojo/edk/system/watch_unittest.cc
@@ -17,7 +17,8 @@ namespace {
void IgnoreResult(uintptr_t context,
MojoResult result,
- MojoHandleSignalsState signals) {
+ MojoHandleSignalsState signals,
+ MojoWatchNotificationFlags flags) {
}
// A test helper class for watching a handle. The WatchHelper instance is used
@@ -56,11 +57,13 @@ class WatchHelper {
private:
static void OnNotify(uintptr_t context,
MojoResult result,
- MojoHandleSignalsState state) {
+ MojoHandleSignalsState state,
+ MojoWatchNotificationFlags flags) {
WatchHelper* watcher = reinterpret_cast<WatchHelper*>(context);
CHECK(watcher->watching_);
if (result == MOJO_RESULT_CANCELLED)
watcher->watching_ = false;
+ CHECK_EQ(flags, MOJO_WATCH_NOTIFICATION_FLAG_NONE);
watcher->callback_(result, state);
}

Powered by Google App Engine
This is Rietveld 408576698