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

Unified Diff: mojo/android/javatests/src/org/chromium/mojo/bindings/test/mojom/mojo/IntegrationTestInterface2TestHelper.java

Issue 522353003: mojo: Run validation tests on java (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move backward compatibility test o its own package. Created 6 years, 3 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/test/mojom/mojo/IntegrationTestInterface2TestHelper.java
diff --git a/mojo/android/javatests/src/org/chromium/mojo/bindings/test/mojom/mojo/IntegrationTestInterface2TestHelper.java b/mojo/android/javatests/src/org/chromium/mojo/bindings/test/mojom/mojo/IntegrationTestInterface2TestHelper.java
new file mode 100644
index 0000000000000000000000000000000000000000..2a2b6b8d239829f10baaa30753150d1d613e509c
--- /dev/null
+++ b/mojo/android/javatests/src/org/chromium/mojo/bindings/test/mojom/mojo/IntegrationTestInterface2TestHelper.java
@@ -0,0 +1,31 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+package org.chromium.mojo.bindings.test.mojom.mojo;
+
+import org.chromium.mojo.bindings.MessageReceiver;
+import org.chromium.mojo.bindings.test.mojom.mojo.IntegrationTestInterface2.Method0Response;
+import org.chromium.mojo.bindings.test.mojom.mojo.IntegrationTestInterface2_Internal.IntegrationTestInterface2Method0ResponseParamsForwardToCallback;
+
+/**
+ * Helper class to access {@link IntegrationTestInterface2_Internal} package protected method for
+ * tests.
+ */
+public class IntegrationTestInterface2TestHelper {
+
+ private static final class SinkMethod0Response implements Method0Response {
+ @Override
+ public void call(byte[] arg1) {
+ }
+ }
+
+ /**
+ * Creates a new {@link MessageReceiver} to use for the callback of
+ * |IntegrationTestInterface2#method0(Method0Response)|.
+ */
+ public static MessageReceiver newIntegrationTestInterface2MethodCallback() {
+ return new IntegrationTestInterface2Method0ResponseParamsForwardToCallback(
+ new SinkMethod0Response());
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698