| EMMA Coverage Report (generated Fri Aug 23 16:39:17 PDT 2013) |
|---|
| [all classes][org.chromium.android_webview.unittest] |
| name | class, % | method, % | block, % | line, % |
|---|---|---|---|---|
| InputStreamUnittest.java | 0% (0/3) | 0% (0/7) | 0% (0/43) | 0% (0/9) |
| name | class, % | method, % | block, % | line, % |
|---|---|---|---|---|
| class InputStreamUnittest | 0% (0/1) | 0% (0/3) | 0% (0/12) | 0% (0/4) |
| InputStreamUnittest (): void | 0% (0/1) | 0% (0/3) | 0% (0/2) | |
| getCountingStream (int): InputStream | 0% (0/1) | 0% (0/5) | 0% (0/1) | |
| getEmptyStream (): InputStream | 0% (0/1) | 0% (0/4) | 0% (0/1) | |
| class InputStreamUnittest$1 | 0% (0/1) | 0% (0/2) | 0% (0/5) | 0% (0/2) |
| InputStreamUnittest$1 (): void | 0% (0/1) | 0% (0/3) | 0% (0/1) | |
| read (): int | 0% (0/1) | 0% (0/2) | 0% (0/1) | |
| class InputStreamUnittest$2 | 0% (0/1) | 0% (0/2) | 0% (0/26) | 0% (0/5) |
| InputStreamUnittest$2 (int): void | 0% (0/1) | 0% (0/9) | 0% (0/2) | |
| read (): int | 0% (0/1) | 0% (0/17) | 0% (0/3) |
| 1 | // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | package org.chromium.android_webview.unittest; |
| 6 | |
| 7 | import org.chromium.base.CalledByNative; |
| 8 | |
| 9 | import java.io.InputStream; |
| 10 | import java.io.IOException; |
| 11 | |
| 12 | class InputStreamUnittest { |
| 13 | private InputStreamUnittest() { |
| 14 | } |
| 15 | |
| 16 | @CalledByNative |
| 17 | static InputStream getEmptyStream() { |
| 18 | return new InputStream() { |
| 19 | @Override |
| 20 | public int read() { |
| 21 | return -1; |
| 22 | } |
| 23 | }; |
| 24 | } |
| 25 | |
| 26 | @CalledByNative |
| 27 | static InputStream getCountingStream(final int size) { |
| 28 | return new InputStream() { |
| 29 | private int count = 0; |
| 30 | |
| 31 | @Override |
| 32 | public int read() { |
| 33 | if (count < size) |
| 34 | return count++ % 256; |
| 35 | else |
| 36 | return -1; |
| 37 | } |
| 38 | }; |
| 39 | } |
| 40 | } |
| [all classes][org.chromium.android_webview.unittest] |
| EMMA 2.0.5312 (C) Vladimir Roubtsov |