Chromium Code Reviews| Index: net/android/javatests/src/org/chromium/net/NetErrorsTest.java |
| diff --git a/net/android/javatests/src/org/chromium/net/NetErrorsTest.java b/net/android/javatests/src/org/chromium/net/NetErrorsTest.java |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..dc1abd564793be68f01d7ef261909461d023d513 |
| --- /dev/null |
| +++ b/net/android/javatests/src/org/chromium/net/NetErrorsTest.java |
| @@ -0,0 +1,34 @@ |
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +/** |
| + * Tests to verify that NetError.java is created succesfully. |
| + */ |
| + |
| +package org.chromium.net; |
| + |
| +import android.test.InstrumentationTestCase; |
| +import android.test.suitebuilder.annotation.SmallTest; |
| + |
| +import org.chromium.net.NetError; |
| + |
| +import org.chromium.base.test.Feature; |
| + |
| +public class NetErrorsTest extends InstrumentationTestCase { |
| + // These are manually copied and should be kept in sync with net_error_list.h. |
| + private static int IO_PENDING_ERROR = -1; |
| + private static int FAILED_ERROR = -2; |
| + |
| + /** |
| + * Test whether we can include NetError.java and call to static integers defined in the file. |
| + * |
| + * @throws Exception |
| + */ |
| + @SmallTest |
| + @Feature({"TabContents"}) |
|
Yaron
2012/09/07 22:49:06
Doesn't seem like a "TabContents" test. For lack o
|
| + public void testExampleErrorDefined() throws Exception { |
| + assertEquals(IO_PENDING_ERROR, NetError.ERR_IO_PENDING); |
| + assertEquals(FAILED_ERROR, NetError.ERR_FAILED); |
| + } |
| +} |