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

Unified Diff: net/android/javatests/src/org/chromium/net/NetErrorsTest.java

Issue 10912136: Build NetError.java to use in java side tests by preprocessing net_errors.cc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased after conflict with net.gyp Created 8 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/android/java/net_errors_java.template ('k') | net/net.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..266655c93270a498befebade5449544d71f62829
--- /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({"Android-AppBase"})
+ public void testExampleErrorDefined() throws Exception {
+ assertEquals(IO_PENDING_ERROR, NetError.ERR_IO_PENDING);
+ assertEquals(FAILED_ERROR, NetError.ERR_FAILED);
+ }
+}
« no previous file with comments | « net/android/java/net_errors_java.template ('k') | net/net.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698