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

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

Issue 1127293003: Update mojo sdk to rev f84766d3b6420b7cf6a113d9d65d73cb5fe18d90 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: formatting Created 5 years, 7 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/InterfacesTest.java
diff --git a/mojo/android/javatests/src/org/chromium/mojo/bindings/InterfacesTest.java b/mojo/android/javatests/src/org/chromium/mojo/bindings/InterfacesTest.java
index 58e2351073f6f550c6bea340b96dffd195b502b6..cb4b8a2dbf7ca5fe0b303f1373c6671625948702 100644
--- a/mojo/android/javatests/src/org/chromium/mojo/bindings/InterfacesTest.java
+++ b/mojo/android/javatests/src/org/chromium/mojo/bindings/InterfacesTest.java
@@ -175,16 +175,6 @@ public class InterfacesTest extends MojoTestCase {
super.tearDown();
}
- private <I extends Interface, P extends Interface.Proxy> P newProxyOverPipe(
- Interface.Manager<I, P> manager, I impl) {
- Pair<MessagePipeHandle, MessagePipeHandle> handles =
- CoreImpl.getInstance().createMessagePipe(null);
- P proxy = manager.attachProxy(handles.first);
- mCloseablesToClose.add(proxy);
- manager.bind(impl, handles.second);
- return proxy;
- }
-
/**
* Check that the given proxy receives the calls. If |impl| is not null, also check that the
* calls are forwared to |impl|.
@@ -241,14 +231,16 @@ public class InterfacesTest extends MojoTestCase {
@SmallTest
public void testProxyAndStubOverPipe() {
MockNamedObjectImpl impl = new MockNamedObjectImpl();
- NamedObject.Proxy proxy = newProxyOverPipe(NamedObject.MANAGER, impl);
+ NamedObject.Proxy proxy =
+ BindingsTestUtils.newProxyOverPipe(NamedObject.MANAGER, impl, mCloseablesToClose);
checkProxy(proxy, impl);
}
@SmallTest
public void testFactoryOverPipe() {
- Factory.Proxy proxy = newProxyOverPipe(Factory.MANAGER, new MockFactoryImpl());
+ Factory.Proxy proxy = BindingsTestUtils.newProxyOverPipe(
+ Factory.MANAGER, new MockFactoryImpl(), mCloseablesToClose);
Pair<NamedObject.Proxy, InterfaceRequest<NamedObject>> request =
NamedObject.MANAGER.getInterfaceRequest(CoreImpl.getInstance());
mCloseablesToClose.add(request.first);
@@ -260,7 +252,8 @@ public class InterfacesTest extends MojoTestCase {
@SmallTest
public void testInterfaceClosing() {
MockFactoryImpl impl = new MockFactoryImpl();
- Factory.Proxy proxy = newProxyOverPipe(Factory.MANAGER, impl);
+ Factory.Proxy proxy =
+ BindingsTestUtils.newProxyOverPipe(Factory.MANAGER, impl, mCloseablesToClose);
assertFalse(impl.isClosed());
@@ -273,7 +266,8 @@ public class InterfacesTest extends MojoTestCase {
@SmallTest
public void testResponse() {
MockFactoryImpl impl = new MockFactoryImpl();
- Factory.Proxy proxy = newProxyOverPipe(Factory.MANAGER, impl);
+ Factory.Proxy proxy =
+ BindingsTestUtils.newProxyOverPipe(Factory.MANAGER, impl, mCloseablesToClose);
Request request = new Request();
request.x = 42;
Pair<MessagePipeHandle, MessagePipeHandle> handles =

Powered by Google App Engine
This is Rietveld 408576698