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

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: 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..556afe77ab2505a7ed4e9ed1382d9382cf608ab7
--- /dev/null
+++ b/net/android/javatests/src/org/chromium/net/NetErrorsTest.java
@@ -0,0 +1,39 @@
+// 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.
+
+/**
+ * Test suite for Android's default ProxySelector implementation. The purpose of these tests
Yaron 2012/09/07 01:05:44 This whole comment seems misplaced
+ * is to check that the behaviour of the ProxySelector implementation matches what we have
+ * implemented in net/proxy/proxy_config_service_android.cc.
+ *
+ * IMPORTANT: These test cases are generated from net/android/tools/proxy_test_cases.py, so if any
+ * of these tests fail, please be sure to edit that file and regenerate the test cases here and also
+ * in net/proxy/proxy_config_service_android_unittests.cc if required.
+ */
+
+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 {
+ private static int IO_PENDING_ERROR = -1;
+ private static int FAILED_ERROR = -2;
joth 2012/09/07 21:45:46 comment these are copied from net_error_list.h and
+
+ /**
+ * Test whether we can include NetError.java and call to static integers defined in the file.
+ *
+ * @throws Exception
+ */
+ @SmallTest
+ @Feature({"Android-WebView"})
Yaron 2012/09/07 01:05:44 This isn't true.
+ 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