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

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: Fixed to net.gyp and fixed comments 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
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);
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698