/hg/icedtea-web: PR909: Unit test fix
smohammad at icedtea.classpath.org
smohammad at icedtea.classpath.org
Thu Dec 20 12:52:12 PST 2012
changeset 4d294d8ea881 in /hg/icedtea-web
details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=4d294d8ea881
author: Saad Mohammad <smohammad at redhat.com>
date: Thu Dec 20 15:51:45 2012 -0500
PR909: Unit test fix
diffstat:
ChangeLog | 5 ++++
tests/netx/unit/net/sourceforge/jnlp/cache/ResourceTrackerTest.java | 12 +++++----
2 files changed, 12 insertions(+), 5 deletions(-)
diffs (60 lines):
diff -r 95fc28e972ad -r 4d294d8ea881 ChangeLog
--- a/ChangeLog Thu Dec 20 15:46:26 2012 -0500
+++ b/ChangeLog Thu Dec 20 15:51:45 2012 -0500
@@ -1,3 +1,8 @@
+2012-12-20 Saad Mohammad <smohammad at redhat.com>
+
+ * tests/netx/unit/net/sourceforge/jnlp/cache/ResourceTrackerTest.java:
+ Added test and changes to work better with PR909 fix.
+
2012-12-20 Saad Mohammad <smohammad at redhat.com>
Fix PR909 - URL is invalid after normalization.
diff -r 95fc28e972ad -r 4d294d8ea881 tests/netx/unit/net/sourceforge/jnlp/cache/ResourceTrackerTest.java
--- a/tests/netx/unit/net/sourceforge/jnlp/cache/ResourceTrackerTest.java Thu Dec 20 15:46:26 2012 -0500
+++ b/tests/netx/unit/net/sourceforge/jnlp/cache/ResourceTrackerTest.java Thu Dec 20 15:51:45 2012 -0500
@@ -38,6 +38,7 @@
import java.io.UnsupportedEncodingException;
import java.net.MalformedURLException;
+import java.net.URISyntaxException;
import java.net.URL;
import org.junit.Assert;
import org.junit.Test;
@@ -61,22 +62,23 @@
}
}
- private static URL normalizeUrl(URL uRL) throws MalformedURLException, UnsupportedEncodingException {
+ private static URL normalizeUrl(URL uRL) throws MalformedURLException, UnsupportedEncodingException, URISyntaxException {
return ResourceTracker.normalizeUrl(uRL, false);
}
- public static final int CHANGE_BORDER = 7;
+ public static final int CHANGE_BORDER = 6;
public static URL[] getUrls() throws MalformedURLException {
URL[] u = {
/*constant*/
null,
- new URL("http://localhost:44321/Spaces%20Can%20Be%20Everyw%2Fhere1.jnlp"),
new URL("file:///home/jvanek/Desktop/icedtea-web/tests.build/jnlp_test_server/Spaces%20can%20be%20everywhere2.jnlp"),
- new URL("http://localhost/Spaces+Can+Be+Everywhere1.jnlp"),
new URL("http://localhost:44321/SpacesCanBeEverywhere1.jnlp"),
new URL("http:///SpacesCanBeEverywhere1.jnlp"),
new URL("file://localhost/home/jvanek/Desktop/icedtea-web/tests.build/jnlp_test_server/Spaces can be everywhere2.jnlp"),
+ new URL("http://localhost:44321/testpage.jnlp?applicationID=25"),
/*changing*/
+ new URL("http://localhost:44321/Spaces%20Can%20Be%20Everyw%2Fhere1.jnlp"),
+ new URL("http://localhost/Spaces+Can+Be+Everywhere1.jnlp"),
new URL("http://localhost/SpacesC anBeEverywhere1.jnlp?a=5&b=10#df"),
new URL("http:///oook.jnlp?a=5&b=ahoj šš dd#df"),
new URL("http://localhost/SpacesÄÄšžšÅýžÄÅú can !@^*(){}[].jnlp?a=5&ahoj šš dd#df"),
@@ -85,7 +87,7 @@
return u;
}
- public static URL[] getNormalizedUrls() throws MalformedURLException, UnsupportedEncodingException {
+ public static URL[] getNormalizedUrls() throws MalformedURLException, UnsupportedEncodingException, URISyntaxException {
URL[] u = getUrls();
URL[] n = new URL[u.length];
More information about the distro-pkg-dev
mailing list