summaryrefslogtreecommitdiff
path: root/chromium/net/android/javatests/src/org/chromium/net/NetErrorsTest.java
blob: 57885b2efe099aae7573c6318eff7d4958243f3c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// 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.base.test.util.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({"Android-AppBase"})
    public void testExampleErrorDefined() throws Exception {
        assertEquals(IO_PENDING_ERROR, NetError.ERR_IO_PENDING);
        assertEquals(FAILED_ERROR, NetError.ERR_FAILED);
    }
}