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

Unified Diff: mojo/android/javatests/src/org/chromium/mojo/bindings/BindingsTestUtils.java

Issue 411913002: mojo: generate Proxies and Stubs for java bindings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update landmines Created 6 years, 4 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 | « build/get_landmines.py ('k') | mojo/android/javatests/src/org/chromium/mojo/bindings/ConnectorTest.java » ('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/bindings/BindingsTestUtils.java
diff --git a/mojo/android/javatests/src/org/chromium/mojo/bindings/BindingsTestUtils.java b/mojo/android/javatests/src/org/chromium/mojo/bindings/BindingsTestUtils.java
index fa93d376cb392edb6eaee778adb015989a684fd5..c9ffa028ba77786e091efccea9d0210c09c11987 100644
--- a/mojo/android/javatests/src/org/chromium/mojo/bindings/BindingsTestUtils.java
+++ b/mojo/android/javatests/src/org/chromium/mojo/bindings/BindingsTestUtils.java
@@ -21,7 +21,8 @@ public class BindingsTestUtils {
/**
* {@link MessageReceiver} that records any message it receives.
*/
- public static class RecordingMessageReceiver implements MessageReceiver {
+ public static class RecordingMessageReceiver extends SideEffectFreeCloseable
+ implements MessageReceiver {
public final List<MessageWithHeader> messages = new ArrayList<MessageWithHeader>();
@@ -60,15 +61,23 @@ public class BindingsTestUtils {
*/
public static class CapturingErrorHandler implements ConnectionErrorHandler {
- public MojoException exception = null;
+ private MojoException mLastMojoException = null;
/**
* @see ConnectionErrorHandler#onConnectionError(MojoException)
*/
@Override
public void onConnectionError(MojoException e) {
- exception = e;
+ mLastMojoException = e;
}
+
+ /**
+ * Returns the last recorded exception.
+ */
+ public MojoException getLastMojoException() {
+ return mLastMojoException;
+ }
+
}
/**
« no previous file with comments | « build/get_landmines.py ('k') | mojo/android/javatests/src/org/chromium/mojo/bindings/ConnectorTest.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698