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

Side by Side Diff: android_webview/unittestjava/src/org/chromium/android_webview/unittest/InputStreamUnittest.java

Issue 1054203002: Enable NeedsBraces check and fix some checkstyle issues. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added if checks Created 5 years, 8 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
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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.android_webview.unittest; 5 package org.chromium.android_webview.unittest;
6 6
7 import org.chromium.base.CalledByNative; 7 import org.chromium.base.CalledByNative;
8 8
9 import java.io.IOException; 9 import java.io.IOException;
10 import java.io.InputStream; 10 import java.io.InputStream;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 }; 48 };
49 } 49 }
50 50
51 @CalledByNative 51 @CalledByNative
52 static InputStream getCountingStream(final int size) { 52 static InputStream getCountingStream(final int size) {
53 return new InputStream() { 53 return new InputStream() {
54 private int mCount = 0; 54 private int mCount = 0;
55 55
56 @Override 56 @Override
57 public int read() { 57 public int read() {
58 if (mCount < size) 58 if (mCount < size) {
59 return mCount++ % 256; 59 return mCount++ % 256;
60 else 60 } else {
61 return -1; 61 return -1;
62 }
62 } 63 }
63 }; 64 };
64 } 65 }
65 } 66 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698