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

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

Issue 526303003: mojo: java bindings rename Message subclasses. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebasing 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 unified diff | Download patch
« no previous file with comments | « no previous file | mojo/android/javatests/src/org/chromium/mojo/bindings/ConnectorTest.java » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.mojo.bindings; 5 package org.chromium.mojo.bindings;
6 6
7 import org.chromium.mojo.TestUtils; 7 import org.chromium.mojo.TestUtils;
8 import org.chromium.mojo.system.Handle; 8 import org.chromium.mojo.system.Handle;
9 import org.chromium.mojo.system.MojoException; 9 import org.chromium.mojo.system.MojoException;
10 import org.chromium.mojo.system.Pair; 10 import org.chromium.mojo.system.Pair;
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 */ 75 */
76 public MojoException getLastMojoException() { 76 public MojoException getLastMojoException() {
77 return mLastMojoException; 77 return mLastMojoException;
78 } 78 }
79 79
80 } 80 }
81 81
82 /** 82 /**
83 * Creates a new valid {@link Message}. The message will have a valid header . 83 * Creates a new valid {@link Message}. The message will have a valid header .
84 */ 84 */
85 public static Message newRandomMessageWithHeader(int size) { 85 public static Message newRandomMessage(int size) {
86 assert size > 16; 86 assert size > 16;
87 ByteBuffer message = TestUtils.newRandomBuffer(size); 87 ByteBuffer message = TestUtils.newRandomBuffer(size);
88 int[] headerAsInts = { 16, 2, 0, 0 }; 88 int[] headerAsInts = { 16, 2, 0, 0 };
89 for (int i = 0; i < 4; ++i) { 89 for (int i = 0; i < 4; ++i) {
90 message.putInt(4 * i, headerAsInts[i]); 90 message.putInt(4 * i, headerAsInts[i]);
91 } 91 }
92 message.position(0); 92 message.position(0);
93 return new SimpleMessage(message, new ArrayList<Handle>()); 93 return new Message(message, new ArrayList<Handle>());
94 } 94 }
95 } 95 }
OLDNEW
« no previous file with comments | « no previous file | 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