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

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

Issue 954643002: Update mojo sdk to rev 3d23dae011859a2aae49f1d1adde705c8e85d819 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: use run_renderer_in_process() Created 5 years, 10 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/android/javatests/src/org/chromium/mojo/bindings/ValidationTest.java
diff --git a/mojo/android/javatests/src/org/chromium/mojo/bindings/ValidationTest.java b/mojo/android/javatests/src/org/chromium/mojo/bindings/ValidationTest.java
index 076c94ba8d66cdc0f6b22f414a54485dfdbd287b..7942be61bfa81506a3aeb764c4ed3b52bcc20113 100644
--- a/mojo/android/javatests/src/org/chromium/mojo/bindings/ValidationTest.java
+++ b/mojo/android/javatests/src/org/chromium/mojo/bindings/ValidationTest.java
@@ -11,8 +11,7 @@ import org.chromium.base.test.util.UrlUtils;
import org.chromium.mojo.HandleMock;
import org.chromium.mojo.MojoTestCase;
import org.chromium.mojo.bindings.test.mojom.mojo.ConformanceTestInterface;
-import org.chromium.mojo.bindings.test.mojom.mojo.IntegrationTestInterface1;
-import org.chromium.mojo.bindings.test.mojom.mojo.IntegrationTestInterface2TestHelper;
+import org.chromium.mojo.bindings.test.mojom.mojo.IntegrationTestInterface;
import org.chromium.mojo.system.Handle;
import java.io.File;
@@ -119,41 +118,6 @@ public class ValidationTest extends MojoTestCase {
}
}
- private static class RoutingMessageReceiver implements MessageReceiver {
- private final MessageReceiver mRequest;
- private final MessageReceiver mResponse;
-
- private RoutingMessageReceiver(MessageReceiver request, MessageReceiver response) {
- this.mRequest = request;
- this.mResponse = response;
- }
-
- /**
- * @see MessageReceiver#accept(Message)
- */
- @Override
- public boolean accept(Message message) {
- try {
- MessageHeader header = message.asServiceMessage().getHeader();
- if (header.hasFlag(MessageHeader.MESSAGE_IS_RESPONSE_FLAG)) {
- return mResponse.accept(message);
- } else {
- return mRequest.accept(message);
- }
- } catch (DeserializationException e) {
- return false;
- }
- }
-
- /**
- * @see MessageReceiver#close()
- */
- @Override
- public void close() {
- }
-
- }
-
/**
* A trivial message receiver that refuses all messages it receives.
*/
@@ -188,11 +152,7 @@ public class ValidationTest extends MojoTestCase {
*/
@SmallTest
public void testIntegration() throws FileNotFoundException {
- runTest("integration_",
- new RoutingMessageReceiver(IntegrationTestInterface1.MANAGER.buildStub(null,
- IntegrationTestInterface1.MANAGER.buildProxy(null,
- new SinkMessageReceiver())),
- IntegrationTestInterface2TestHelper
- .newIntegrationTestInterface2MethodCallback()));
+ runTest("integration_", IntegrationTestInterface.MANAGER.buildStub(null,
+ IntegrationTestInterface.MANAGER.buildProxy(null, new SinkMessageReceiver())));
}
}

Powered by Google App Engine
This is Rietveld 408576698