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

Unified Diff: mojo/android/javatests/src/org/chromium/mojo/system/impl/WatcherImplTest.java

Issue 2750373002: Revert of Mojo: Armed Watchers (Closed)
Patch Set: Created 3 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
« no previous file with comments | « media/remoting/demuxer_stream_adapter.cc ('k') | mojo/android/system/watcher_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/android/javatests/src/org/chromium/mojo/system/impl/WatcherImplTest.java
diff --git a/mojo/android/javatests/src/org/chromium/mojo/system/impl/WatcherImplTest.java b/mojo/android/javatests/src/org/chromium/mojo/system/impl/WatcherImplTest.java
index e14adb1160a9b580ba80d253785480063918689e..6a99fe155f47e0e5b1f52403d04275d183a85405 100644
--- a/mojo/android/javatests/src/org/chromium/mojo/system/impl/WatcherImplTest.java
+++ b/mojo/android/javatests/src/org/chromium/mojo/system/impl/WatcherImplTest.java
@@ -68,17 +68,6 @@
private static class WatcherResult implements Callback {
private int mResult = Integer.MIN_VALUE;
- private MessagePipeHandle mReadPipe;
-
- /**
- * @param readPipe A MessagePipeHandle to read from when onResult triggers success.
- */
- public WatcherResult(MessagePipeHandle readPipe) {
- mReadPipe = readPipe;
- }
- public WatcherResult() {
- this(null);
- }
/**
* @see Callback#onResult(int)
@@ -86,11 +75,6 @@
@Override
public void onResult(int result) {
this.mResult = result;
-
- if (result == MojoResult.OK && mReadPipe != null) {
- mReadPipe.readMessage(
- null, 0, MessagePipeHandle.ReadFlags.none().setMayDiscard(true));
- }
}
/**
@@ -109,7 +93,7 @@
// Checking a correct result.
Pair<MessagePipeHandle, MessagePipeHandle> handles = mCore.createMessagePipe(null);
addHandlePairToClose(handles);
- final WatcherResult watcherResult = new WatcherResult(handles.first);
+ final WatcherResult watcherResult = new WatcherResult();
assertEquals(Integer.MIN_VALUE, watcherResult.getResult());
mWatcher.start(handles.first, Core.HandleSignals.READABLE, watcherResult);
« no previous file with comments | « media/remoting/demuxer_stream_adapter.cc ('k') | mojo/android/system/watcher_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698