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

Unified Diff: third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/ServiceTest.java

Issue 2495533002: third_party/protobuf: Update to HEAD (83d681ee2c) (Closed)
Patch Set: Make chrome settings proto generated file a component Created 4 years 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: third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/ServiceTest.java
diff --git a/third_party/protobuf/java/core/src/test/java/com/google/protobuf/ServiceTest.java b/third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/ServiceTest.java
similarity index 96%
copy from third_party/protobuf/java/core/src/test/java/com/google/protobuf/ServiceTest.java
copy to third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/ServiceTest.java
index b902737ded9e90a565153b64f9aaffb22f010ecd..4c7f751c0a963c167f8c8ddc12d8850a9d272f0c 100644
--- a/third_party/protobuf/java/core/src/test/java/com/google/protobuf/ServiceTest.java
+++ b/third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/ServiceTest.java
@@ -1,6 +1,6 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
+// http://code.google.com/p/protobuf/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
@@ -28,29 +28,30 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-package com.google.protobuf;
+package com.google.protobuf.test;
+import com.google.protobuf.*;
import com.google.protobuf.Descriptors.FileDescriptor;
import com.google.protobuf.Descriptors.MethodDescriptor;
import google.protobuf.no_generic_services_test.UnittestNoGenericServices;
import protobuf_unittest.MessageWithNoOuter;
import protobuf_unittest.ServiceWithNoOuter;
-import protobuf_unittest.UnittestProto.BarRequest;
-import protobuf_unittest.UnittestProto.BarResponse;
-import protobuf_unittest.UnittestProto.FooRequest;
-import protobuf_unittest.UnittestProto.FooResponse;
import protobuf_unittest.UnittestProto.TestAllTypes;
import protobuf_unittest.UnittestProto.TestService;
-
-import junit.framework.TestCase;
+import protobuf_unittest.UnittestProto.FooRequest;
+import protobuf_unittest.UnittestProto.FooResponse;
+import protobuf_unittest.UnittestProto.BarRequest;
+import protobuf_unittest.UnittestProto.BarResponse;
import org.easymock.classextension.EasyMock;
-import org.easymock.IArgumentMatcher;
import org.easymock.classextension.IMocksControl;
+import org.easymock.IArgumentMatcher;
import java.util.HashSet;
import java.util.Set;
+import junit.framework.TestCase;
+
/**
* Tests services and stubs.
*
@@ -175,14 +176,12 @@ public class ServiceTest extends TestCase {
MethodDescriptor fooMethod =
ServiceWithNoOuter.getDescriptor().findMethodByName("Foo");
MessageWithNoOuter request = MessageWithNoOuter.getDefaultInstance();
- RpcCallback<Message> callback =
- new RpcCallback<Message>() {
- @Override
- public void run(Message parameter) {
- // No reason this should be run.
- fail();
- }
- };
+ RpcCallback<Message> callback = new RpcCallback<Message>() {
+ public void run(Message parameter) {
+ // No reason this should be run.
+ fail();
+ }
+ };
RpcCallback<TestAllTypes> specializedCallback =
RpcUtil.specializeCallback(callback);
@@ -292,9 +291,7 @@ public class ServiceTest extends TestCase {
public boolean isCalled() { return called; }
public void reset() { called = false; }
- @Override
- public void run(Type message) {
- called = true; }
+ public void run(Type message) { called = true; }
}
/** Implementation of the wrapsCallback() argument matcher. */
@@ -305,7 +302,6 @@ public class ServiceTest extends TestCase {
this.callback = callback;
}
- @Override
@SuppressWarnings("unchecked")
public boolean matches(Object actual) {
if (!(actual instanceof RpcCallback)) {
@@ -318,7 +314,6 @@ public class ServiceTest extends TestCase {
return callback.isCalled();
}
- @Override
public void appendTo(StringBuffer buffer) {
buffer.append("wrapsCallback(mockCallback)");
}

Powered by Google App Engine
This is Rietveld 408576698