Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorspingel2011-01-23 00:02:17 +0000
committerspingel2011-01-23 00:02:17 +0000
commit57fd58d61b8654dcfab567bd75826fe339e8136d (patch)
tree76f7c52e3a2249a5d30b50bb4395f680b5027076
parent89b46745c8fa7eab189036c9f521a73041d5a6fa (diff)
downloadorg.eclipse.mylyn.tasks-57fd58d61b8654dcfab567bd75826fe339e8136d.tar.gz
org.eclipse.mylyn.tasks-57fd58d61b8654dcfab567bd75826fe339e8136d.tar.xz
org.eclipse.mylyn.tasks-57fd58d61b8654dcfab567bd75826fe339e8136d.zip
NEW - bug 266256: WebUtil.getProxy() should return Java system proxy if platform is not running
https://bugs.eclipse.org/bugs/show_bug.cgi?id=266256
-rw-r--r--org.eclipse.mylyn.trac.tests/META-INF/MANIFEST.MF3
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TracFixture.java11
2 files changed, 10 insertions, 4 deletions
diff --git a/org.eclipse.mylyn.trac.tests/META-INF/MANIFEST.MF b/org.eclipse.mylyn.trac.tests/META-INF/MANIFEST.MF
index 814d12ac0..2ee1a14d4 100644
--- a/org.eclipse.mylyn.trac.tests/META-INF/MANIFEST.MF
+++ b/org.eclipse.mylyn.trac.tests/META-INF/MANIFEST.MF
@@ -16,7 +16,8 @@ Require-Bundle: org.apache.xmlrpc;bundle-version="3.0.0",
org.eclipse.mylyn.tasks.core,
org.eclipse.mylyn.tests.util,
org.eclipse.mylyn.trac.ui,
- org.eclipse.mylyn.trac.core
+ org.eclipse.mylyn.trac.core,
+ org.apache.ws.commons.util;bundle-version="1.0.0"
Export-Package: org.eclipse.mylyn.internal.trac.ui;x-internal:=true,
org.eclipse.mylyn.trac.tests;x-internal:=true,
org.eclipse.mylyn.trac.tests.client;x-internal:=true,
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TracFixture.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TracFixture.java
index 01554e426..646ddbe73 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TracFixture.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TracFixture.java
@@ -15,6 +15,7 @@ import java.net.Proxy;
import org.eclipse.mylyn.commons.net.IProxyProvider;
import org.eclipse.mylyn.commons.net.WebLocation;
+import org.eclipse.mylyn.commons.net.WebUtil;
import org.eclipse.mylyn.internal.trac.core.TracClientFactory;
import org.eclipse.mylyn.internal.trac.core.TracCorePlugin;
import org.eclipse.mylyn.internal.trac.core.TracRepositoryConnector;
@@ -178,11 +179,15 @@ public class TracFixture extends TestFixture {
}
public ITracClient connect(PrivilegeLevel level) throws Exception {
- return connect(repositoryUrl, Proxy.NO_PROXY, level);
+ return connect(repositoryUrl, getDefaultProxy(repositoryUrl), level);
+ }
+
+ private Proxy getDefaultProxy(String url) {
+ return WebUtil.getProxyForUrl(url);
}
public ITracClient connect(String url) throws Exception {
- return connect(url, Proxy.NO_PROXY, PrivilegeLevel.USER);
+ return connect(url, getDefaultProxy(url), PrivilegeLevel.USER);
}
public ITracClient connect(String url, Proxy proxy, PrivilegeLevel level) throws Exception {
@@ -191,7 +196,7 @@ public class TracFixture extends TestFixture {
}
public ITracClient connect(String url, String username, String password) throws Exception {
- return connect(url, username, password, Proxy.NO_PROXY);
+ return connect(url, username, password, getDefaultProxy(url));
}
public ITracClient connect(String url, String username, String password, Proxy proxy) throws Exception {

Back to the top