OLD | NEW |
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 /** | 5 /** |
6 * Tests to verify that NetError.java is created succesfully. | 6 * Tests to verify that NetError.java is created succesfully. |
7 */ | 7 */ |
8 | 8 |
9 package org.chromium.net; | 9 package org.chromium.net; |
10 | 10 |
| 11 import android.support.test.filters.SmallTest; |
11 import android.test.InstrumentationTestCase; | 12 import android.test.InstrumentationTestCase; |
12 import android.test.suitebuilder.annotation.SmallTest; | |
13 | 13 |
14 import org.chromium.base.test.util.Feature; | 14 import org.chromium.base.test.util.Feature; |
15 | 15 |
16 public class NetErrorsTest extends InstrumentationTestCase { | 16 public class NetErrorsTest extends InstrumentationTestCase { |
17 // These are manually copied and should be kept in sync with net_error_list.
h. | 17 // These are manually copied and should be kept in sync with net_error_list.
h. |
18 private static final int IO_PENDING_ERROR = -1; | 18 private static final int IO_PENDING_ERROR = -1; |
19 private static final int FAILED_ERROR = -2; | 19 private static final int FAILED_ERROR = -2; |
20 | 20 |
21 /** | 21 /** |
22 * Test whether we can include NetError.java and call to static integers def
ined in the file. | 22 * Test whether we can include NetError.java and call to static integers def
ined in the file. |
23 * | 23 * |
24 * @throws Exception | 24 * @throws Exception |
25 */ | 25 */ |
26 @SmallTest | 26 @SmallTest |
27 @Feature({"Android-AppBase"}) | 27 @Feature({"Android-AppBase"}) |
28 public void testExampleErrorDefined() throws Exception { | 28 public void testExampleErrorDefined() throws Exception { |
29 assertEquals(IO_PENDING_ERROR, NetError.ERR_IO_PENDING); | 29 assertEquals(IO_PENDING_ERROR, NetError.ERR_IO_PENDING); |
30 assertEquals(FAILED_ERROR, NetError.ERR_FAILED); | 30 assertEquals(FAILED_ERROR, NetError.ERR_FAILED); |
31 } | 31 } |
32 } | 32 } |
OLD | NEW |