/hg/icedtea-web: 3 new changesets
jvanek at icedtea.classpath.org
jvanek at icedtea.classpath.org
Fri Feb 27 14:17:17 UTC 2015
changeset 70a2fa4989be in /hg/icedtea-web
details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=70a2fa4989be
author: Jiri Vanek <jvanek at redhat.com>
date: Fri Feb 27 14:59:53 2015 +0100
Fixed third party tests.
* netx/net/sourceforge/jnlp/resources/Messages.properties: (JREversionDontMatch) don't changed to does not. The aposthrophe was causing last variable to not expanding.
* netx/net/sourceforge/jnlp/runtime/ManifestAttributesChecker.java: shared string moved to constant of MANIFEST_CHECK_DISABLED_MESSAGE
* tests/reproducers/custom/remote/testcases/RemoteApplicationSettings.java: adapted to current state
* tests/reproducers/custom/remote/testcases/RemoteApplicationTests.java: same
changeset 5efce17cc54c in /hg/icedtea-web
details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=5efce17cc54c
author: Jiri Vanek <jvanek at redhat.com>
date: Fri Feb 27 15:05:42 2015 +0100
All manifests in reproducers' jars have now Application-Name attribute
* Makefile.am: (stamps/netx-dist-tests-prepare-reproducers.stamp) added logic to include Application-Name: $reproducerName key: value to each non-custom manifest file
* tests/reproducers/*/MANIFEST.MF*: all custom manifests enhanced by the same key: value. They do not relay on it.
changeset 716ea0c2ec19 in /hg/icedtea-web
details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=716ea0c2ec19
author: Jiri Vanek <jvanek at redhat.com>
date: Fri Feb 27 15:09:18 2015 +0100
Silenced to verbose unittests
* netx/net/sourceforge/jnlp/cache/ResourceDownloader.java: refactored to use try-with-resources
* tests/netx/unit/net/sourceforge/jnlp/PluginBridgeTest.java: become NoStdOutErrTest
* tests/netx/unit/net/sourceforge/jnlp/cache/ResourceDownloaderTest.java: same
* tests/netx/unit/net/sourceforge/jnlp/cache/ResourceTrackerTest.java: same
* tests/netx/unit/net/sourceforge/jnlp/cache/ResourceUrlCreatorTest.java: same
diffstat:
ChangeLog | 30 ++++
Makefile.am | 10 +
netx/net/sourceforge/jnlp/cache/ResourceDownloader.java | 66 +++++-----
netx/net/sourceforge/jnlp/resources/Messages.properties | 2 +-
netx/net/sourceforge/jnlp/runtime/ManifestAttributesChecker.java | 3 +-
tests/netx/unit/net/sourceforge/jnlp/PluginBridgeTest.java | 3 +-
tests/netx/unit/net/sourceforge/jnlp/cache/ResourceDownloaderTest.java | 13 +-
tests/netx/unit/net/sourceforge/jnlp/cache/ResourceTrackerTest.java | 3 +-
tests/netx/unit/net/sourceforge/jnlp/cache/ResourceUrlCreatorTest.java | 5 +-
tests/reproducers/custom/PartiallySignedAppletManifestSpecifiesSandbox/srcs/MANIFEST.MF.1 | 2 +
tests/reproducers/custom/PartiallySignedAppletManifestSpecifiesSandbox/srcs/MANIFEST.MF.2 | 2 +
tests/reproducers/custom/TrustedOnlyAttribute/srcs/MANIFEST.MF | 2 +
tests/reproducers/custom/remote/testcases/RemoteApplicationSettings.java | 65 +++++++++-
tests/reproducers/custom/remote/testcases/RemoteApplicationTests.java | 5 +-
tests/reproducers/signed/ClasspathManifestTest/srcs/META-INF/MANIFEST.MF | 1 +
tests/reproducers/signed/CodeBaseManifestEntrySignedMatching/srcs/META-INF/MANIFEST.MF | 1 +
tests/reproducers/signed/CodeBaseManifestEntrySignedNotMatching/srcs/META-INF/MANIFEST.MF | 1 +
tests/reproducers/signed/SignedAppletManifestSpecifiesSandbox/srcs/META-INF/MANIFEST.MF | 2 +
tests/reproducers/simple/CodeBaseManifestEntryUnsignedMatching/srcs/META-INF/MANIFEST.MF | 1 +
tests/reproducers/simple/CodeBaseManifestEntryUnsignedNotMatching/srcs/META-INF/MANIFEST.MF | 1 +
tests/reproducers/simple/ManifestedJar1/srcs/META-INF/MANIFEST.MF | 1 +
tests/reproducers/simple/ManifestedJar2/srcs/META-INF/MANIFEST.MF | 1 +
22 files changed, 161 insertions(+), 59 deletions(-)
diffs (truncated from 532 to 500 lines):
diff -r b053e7638d7f -r 716ea0c2ec19 ChangeLog
--- a/ChangeLog Wed Feb 25 15:40:44 2015 +0100
+++ b/ChangeLog Fri Feb 27 15:09:18 2015 +0100
@@ -1,3 +1,33 @@
+2015-02-27 Jiri Vanek <jvanek at redhat.com>
+
+ Silenced to verbose unittests
+ * netx/net/sourceforge/jnlp/cache/ResourceDownloader.java: refactored to use
+ try-with-resources
+ * tests/netx/unit/net/sourceforge/jnlp/PluginBridgeTest.java: become NoStdOutErrTest
+ * tests/netx/unit/net/sourceforge/jnlp/cache/ResourceDownloaderTest.java: same
+ * tests/netx/unit/net/sourceforge/jnlp/cache/ResourceTrackerTest.java: same
+ * tests/netx/unit/net/sourceforge/jnlp/cache/ResourceUrlCreatorTest.java: same
+
+2015-02-27 Jiri Vanek <jvanek at redhat.com>
+
+ All manifests in reproducers' jars have now Application-Name attribute
+ * Makefile.am: (stamps/netx-dist-tests-prepare-reproducers.stamp) added logic
+ to include Application-Name: $reproducerName key: value to each non-custom
+ manifest file
+ * tests/reproducers/*/MANIFEST.MF*: all custom manifests enhanced by the same
+ key: value. They do not relay on it.
+
+2015-02-27 Jiri Vanek <jvanek at redhat.com>
+
+ Fixed third party tests.
+ * netx/net/sourceforge/jnlp/resources/Messages.properties: (JREversionDontMatch)
+ don't changed to does not. The apostrophe was causing last variable to not expanding.
+ * netx/net/sourceforge/jnlp/runtime/ManifestAttributesChecker.java: shared
+ string moved to constant of MANIFEST_CHECK_DISABLED_MESSAGE
+ * tests/reproducers/custom/remote/testcases/RemoteApplicationSettings.java:
+ adapted to current state
+ * tests/reproducers/custom/remote/testcases/RemoteApplicationTests.java: same
+
2015-02-25 Jiri Vanek <jvanek at redhat.com>
* Makefile.am: netx-dist-tests-whitelist mad mandatory and will be removed
diff -r b053e7638d7f -r 716ea0c2ec19 Makefile.am
--- a/Makefile.am Wed Feb 25 15:40:44 2015 +0100
+++ b/Makefile.am Fri Feb 27 15:09:18 2015 +0100
@@ -771,6 +771,16 @@
else \
$(SYSTEM_JDK_DIR)/bin/jar cf "$(REPRODUCERS_TESTS_SERVER_DEPLOYDIR)/$$dir.jar" * ; \
fi; \
+ AN="Application-Name:" ; \
+ grep $$AN $(META_MANIFEST) 2>/dev/null >/dev/null ; \
+ GREP_R=$$?; \
+ if [ ! -f $(META_MANIFEST) -o $$GREP_R -ne 0 ]; \
+ then \
+ TMP_MANIFEST=`mktemp` ; \
+ echo "$$AN $$dir" > $$TMP_MANIFEST ; \
+ $(SYSTEM_JDK_DIR)/bin/jar ufm "$(REPRODUCERS_TESTS_SERVER_DEPLOYDIR)/$$dir.jar" $$TMP_MANIFEST ; \
+ rm -f $$TMP_MANIFEST ; \
+ fi ; \
cd "$$d" ; \
fi; \
done ; \
diff -r b053e7638d7f -r 716ea0c2ec19 netx/net/sourceforge/jnlp/cache/ResourceDownloader.java
--- a/netx/net/sourceforge/jnlp/cache/ResourceDownloader.java Wed Feb 25 15:40:44 2015 +0100
+++ b/netx/net/sourceforge/jnlp/cache/ResourceDownloader.java Fri Feb 27 15:09:18 2015 +0100
@@ -375,14 +375,14 @@
private void writeDownloadToFile(Resource resource, URL downloadLocation, InputStream in) throws IOException {
byte buf[] = new byte[1024];
int rlen;
- OutputStream out = CacheUtil.getOutputStream(downloadLocation, resource.getDownloadVersion());
- while (-1 != (rlen = in.read(buf))) {
- resource.incrementTransferred(rlen);
- out.write(buf, 0, rlen);
+ try (OutputStream out = CacheUtil.getOutputStream(downloadLocation, resource.getDownloadVersion())) {
+ while (-1 != (rlen = in.read(buf))) {
+ resource.incrementTransferred(rlen);
+ out.write(buf, 0, rlen);
+ }
+
+ in.close();
}
-
- in.close();
- out.close();
}
private void uncompressGzip(URL compressedLocation, URL uncompressedLocation, Version version) throws IOException {
@@ -390,38 +390,38 @@
byte buf[] = new byte[1024];
int rlen;
- GZIPInputStream gzInputStream = new GZIPInputStream(new FileInputStream(CacheUtil
- .getCacheFile(compressedLocation, version)));
- InputStream inputStream = new BufferedInputStream(gzInputStream);
-
- BufferedOutputStream outputStream = new BufferedOutputStream(new FileOutputStream(CacheUtil
- .getCacheFile(uncompressedLocation, version)));
-
- while (-1 != (rlen = inputStream.read(buf))) {
- outputStream.write(buf, 0, rlen);
+ try (GZIPInputStream gzInputStream = new GZIPInputStream(new FileInputStream(CacheUtil
+ .getCacheFile(compressedLocation, version)))) {
+ InputStream inputStream = new BufferedInputStream(gzInputStream);
+
+ BufferedOutputStream outputStream = new BufferedOutputStream(new FileOutputStream(CacheUtil
+ .getCacheFile(uncompressedLocation, version)));
+
+ while (-1 != (rlen = inputStream.read(buf))) {
+ outputStream.write(buf, 0, rlen);
+ }
+
+ outputStream.close();
+ inputStream.close();
}
-
- outputStream.close();
- inputStream.close();
- gzInputStream.close();
}
private void uncompressPackGz(URL compressedLocation, URL uncompressedLocation, Version version) throws IOException {
OutputController.getLogger().log(OutputController.Level.ERROR_DEBUG, "Extracting packgz: " + compressedLocation + " to " + uncompressedLocation);
- GZIPInputStream gzInputStream = new GZIPInputStream(new FileInputStream(CacheUtil
- .getCacheFile(compressedLocation, version)));
- InputStream inputStream = new BufferedInputStream(gzInputStream);
-
- JarOutputStream outputStream = new JarOutputStream(new FileOutputStream(CacheUtil
- .getCacheFile(uncompressedLocation, version)));
-
- Pack200.Unpacker unpacker = Pack200.newUnpacker();
- unpacker.unpack(inputStream, outputStream);
-
- outputStream.close();
- inputStream.close();
- gzInputStream.close();
+ try (GZIPInputStream gzInputStream = new GZIPInputStream(new FileInputStream(CacheUtil
+ .getCacheFile(compressedLocation, version)))) {
+ InputStream inputStream = new BufferedInputStream(gzInputStream);
+
+ JarOutputStream outputStream = new JarOutputStream(new FileOutputStream(CacheUtil
+ .getCacheFile(uncompressedLocation, version)));
+
+ Pack200.Unpacker unpacker = Pack200.newUnpacker();
+ unpacker.unpack(inputStream, outputStream);
+
+ outputStream.close();
+ inputStream.close();
+ }
}
/**
diff -r b053e7638d7f -r 716ea0c2ec19 netx/net/sourceforge/jnlp/resources/Messages.properties
--- a/netx/net/sourceforge/jnlp/resources/Messages.properties Wed Feb 25 15:40:44 2015 +0100
+++ b/netx/net/sourceforge/jnlp/resources/Messages.properties Fri Feb 27 15:09:18 2015 +0100
@@ -55,7 +55,7 @@
AboutDialogueTabGPLv2=GPLv2
# version check minidialogue
-JREversionDontMatch=Warning - your JRE - {0} - don't match requested JRE - {1}
+JREversionDontMatch=Warning - your JRE - {0} - does not match requested JRE - {1}
JREContinueDialogSentence2=Do you wont to continue in running?
JREContinueDialogSentenceTitle=Incompatible JRE
diff -r b053e7638d7f -r 716ea0c2ec19 netx/net/sourceforge/jnlp/runtime/ManifestAttributesChecker.java
--- a/netx/net/sourceforge/jnlp/runtime/ManifestAttributesChecker.java Wed Feb 25 15:40:44 2015 +0100
+++ b/netx/net/sourceforge/jnlp/runtime/ManifestAttributesChecker.java Fri Feb 27 15:09:18 2015 +0100
@@ -65,6 +65,7 @@
private final JNLPFile file;
private final SigningState signing;
private final SecurityDelegate securityDelegate;
+ public static final String MANIFEST_CHECK_DISABLED_MESSAGE = "Manifest attribute checks are disabled.";
public ManifestAttributesChecker(final SecurityDesc security, final JNLPFile file,
final SigningState signing, final SecurityDelegate securityDelegate) throws LaunchException {
@@ -82,7 +83,7 @@
checkPermissionsAttribute();
checkApplicationLibraryAllowableCodebaseAttribute();
} else {
- OutputController.getLogger().log(OutputController.Level.WARNING_ALL, "Manifest attribute checks are disabled.");
+ OutputController.getLogger().log(OutputController.Level.WARNING_ALL, MANIFEST_CHECK_DISABLED_MESSAGE);
}
}
diff -r b053e7638d7f -r 716ea0c2ec19 tests/netx/unit/net/sourceforge/jnlp/PluginBridgeTest.java
--- a/tests/netx/unit/net/sourceforge/jnlp/PluginBridgeTest.java Wed Feb 25 15:40:44 2015 +0100
+++ b/tests/netx/unit/net/sourceforge/jnlp/PluginBridgeTest.java Fri Feb 27 15:09:18 2015 +0100
@@ -33,12 +33,13 @@
import java.util.List;
import net.sourceforge.jnlp.cache.UpdatePolicy;
+import net.sourceforge.jnlp.util.logging.NoStdOutErrTest;
import net.sourceforge.jnlp.util.replacements.BASE64Encoder;
import org.junit.Assert;
import org.junit.Test;
-public class PluginBridgeTest {
+public class PluginBridgeTest extends NoStdOutErrTest{
private class MockJNLPCreator extends JNLPCreator {
private URL JNLPHref;
diff -r b053e7638d7f -r 716ea0c2ec19 tests/netx/unit/net/sourceforge/jnlp/cache/ResourceDownloaderTest.java
--- a/tests/netx/unit/net/sourceforge/jnlp/cache/ResourceDownloaderTest.java Wed Feb 25 15:40:44 2015 +0100
+++ b/tests/netx/unit/net/sourceforge/jnlp/cache/ResourceDownloaderTest.java Fri Feb 27 15:09:18 2015 +0100
@@ -3,15 +3,10 @@
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
-import java.io.BufferedInputStream;
-import java.io.BufferedOutputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
-import java.io.InputStream;
import java.io.PrintStream;
import java.net.HttpURLConnection;
import java.net.URL;
@@ -19,14 +14,11 @@
import java.util.EnumSet;
import java.util.HashMap;
import java.util.jar.Attributes;
-import java.util.jar.JarInputStream;
import java.util.jar.JarOutputStream;
import java.util.jar.Manifest;
import java.util.jar.Pack200;
-import java.util.zip.GZIPInputStream;
import java.util.zip.GZIPOutputStream;
-import javax.smartcardio.ATR;
import org.junit.AfterClass;
import org.junit.Assert;
@@ -40,9 +32,10 @@
import net.sourceforge.jnlp.config.DeploymentConfiguration;
import net.sourceforge.jnlp.runtime.JNLPRuntime;
import net.sourceforge.jnlp.util.JarFile;
+import net.sourceforge.jnlp.util.logging.NoStdOutErrTest;
import net.sourceforge.jnlp.util.logging.OutputController;
-public class ResourceDownloaderTest {
+public class ResourceDownloaderTest extends NoStdOutErrTest{
public static ServerLauncher testServer;
public static ServerLauncher testServerWithBrokenHead;
@@ -342,8 +335,6 @@
private Resource setupResource(String fileName, String text) throws IOException {
File f = setupFile(fileName, text);
URL url = downloadServer.getUrl(fileName);
- System.out.println(url);
-
Resource resource = Resource.getResource(url, null, UpdatePolicy.NEVER);
return resource;
}
diff -r b053e7638d7f -r 716ea0c2ec19 tests/netx/unit/net/sourceforge/jnlp/cache/ResourceTrackerTest.java
--- a/tests/netx/unit/net/sourceforge/jnlp/cache/ResourceTrackerTest.java Wed Feb 25 15:40:44 2015 +0100
+++ b/tests/netx/unit/net/sourceforge/jnlp/cache/ResourceTrackerTest.java Fri Feb 27 15:09:18 2015 +0100
@@ -66,9 +66,10 @@
import net.sourceforge.jnlp.config.DeploymentConfiguration;
import net.sourceforge.jnlp.runtime.JNLPRuntime;
import net.sourceforge.jnlp.util.UrlUtils;
+import net.sourceforge.jnlp.util.logging.NoStdOutErrTest;
import net.sourceforge.jnlp.util.logging.OutputController;
-public class ResourceTrackerTest {
+public class ResourceTrackerTest extends NoStdOutErrTest{
public static ServerLauncher downloadServer;
private static final PrintStream[] backedUpStream = new PrintStream[4];
diff -r b053e7638d7f -r 716ea0c2ec19 tests/netx/unit/net/sourceforge/jnlp/cache/ResourceUrlCreatorTest.java
--- a/tests/netx/unit/net/sourceforge/jnlp/cache/ResourceUrlCreatorTest.java Wed Feb 25 15:40:44 2015 +0100
+++ b/tests/netx/unit/net/sourceforge/jnlp/cache/ResourceUrlCreatorTest.java Fri Feb 27 15:09:18 2015 +0100
@@ -1,18 +1,17 @@
package net.sourceforge.jnlp.cache;
import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.assertFalse;
import java.net.MalformedURLException;
import java.net.URL;
import net.sourceforge.jnlp.DownloadOptions;
import net.sourceforge.jnlp.Version;
+import net.sourceforge.jnlp.util.logging.NoStdOutErrTest;
import org.junit.Test;
-public class ResourceUrlCreatorTest {
+public class ResourceUrlCreatorTest extends NoStdOutErrTest{
private static final Version VERSION_11 = new Version("1.1");
private static final Version VERSION_20 = new Version("2.0");
diff -r b053e7638d7f -r 716ea0c2ec19 tests/reproducers/custom/PartiallySignedAppletManifestSpecifiesSandbox/srcs/MANIFEST.MF.1
--- a/tests/reproducers/custom/PartiallySignedAppletManifestSpecifiesSandbox/srcs/MANIFEST.MF.1 Wed Feb 25 15:40:44 2015 +0100
+++ b/tests/reproducers/custom/PartiallySignedAppletManifestSpecifiesSandbox/srcs/MANIFEST.MF.1 Fri Feb 27 15:09:18 2015 +0100
@@ -1,2 +1,4 @@
Permissions: sandbox
Application-Library-Allowable-Codebase: http://localhost
+Application-Name: PartiallySignedAppletManifestSpecifiesSandbox
+
diff -r b053e7638d7f -r 716ea0c2ec19 tests/reproducers/custom/PartiallySignedAppletManifestSpecifiesSandbox/srcs/MANIFEST.MF.2
--- a/tests/reproducers/custom/PartiallySignedAppletManifestSpecifiesSandbox/srcs/MANIFEST.MF.2 Wed Feb 25 15:40:44 2015 +0100
+++ b/tests/reproducers/custom/PartiallySignedAppletManifestSpecifiesSandbox/srcs/MANIFEST.MF.2 Fri Feb 27 15:09:18 2015 +0100
@@ -1,2 +1,4 @@
Permissions: all-permissions
Application-Library-Allowable-Codebase: http://localhost
+Application-Name: PartiallySignedAppletManifestSpecifiesSandbox
+
diff -r b053e7638d7f -r 716ea0c2ec19 tests/reproducers/custom/TrustedOnlyAttribute/srcs/MANIFEST.MF
--- a/tests/reproducers/custom/TrustedOnlyAttribute/srcs/MANIFEST.MF Wed Feb 25 15:40:44 2015 +0100
+++ b/tests/reproducers/custom/TrustedOnlyAttribute/srcs/MANIFEST.MF Fri Feb 27 15:09:18 2015 +0100
@@ -1,1 +1,3 @@
Trusted-only: true
+Application-Name: TrustedOnlyAttribute
+
diff -r b053e7638d7f -r 716ea0c2ec19 tests/reproducers/custom/remote/testcases/RemoteApplicationSettings.java
--- a/tests/reproducers/custom/remote/testcases/RemoteApplicationSettings.java Wed Feb 25 15:40:44 2015 +0100
+++ b/tests/reproducers/custom/remote/testcases/RemoteApplicationSettings.java Fri Feb 27 15:09:18 2015 +0100
@@ -37,8 +37,12 @@
import java.net.MalformedURLException;
import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
import net.sourceforge.jnlp.JNLPFile;
import net.sourceforge.jnlp.ProcessResult;
+import net.sourceforge.jnlp.runtime.ManifestAttributesChecker;
+import net.sourceforge.jnlp.runtime.Translator;
import org.junit.Assert;
import org.junit.Test;
@@ -65,6 +69,8 @@
public URL getUrl();
public void evaluate(ProcessResult pr);
+
+ public List<String> modifyParams(List<String> global);
}
public static abstract class StringBasedURL implements RemoteApplicationTestcaseSettings {
@@ -72,7 +78,11 @@
URL u;
public String clean(String s){
- return s.replaceAll("\\s*" + JNLPFile.TITLE_NOT_FOUND + "\\s*", "").trim();
+ s = s.replace(ManifestAttributesChecker.MANIFEST_CHECK_DISABLED_MESSAGE,"");
+ s = s.replace(JNLPFile.TITLE_NOT_FOUND, "");
+ s = s.replaceAll("Fontconfig warning.*", "");
+ return s.replaceAll("\\s*" + JNLPFile.TITLE_NOT_FOUND + "\\s*", "").trim();
+
}
@Override
public URL getUrl() {
@@ -82,6 +92,13 @@
public StringBasedURL(String r) {
this.u = createCatchedUrl(r);
}
+
+ @Override
+ public List<String> modifyParams(List<String> global) {
+ return global;
+ }
+
+
}
public static class FourierTransform extends StringBasedURL {
@@ -110,6 +127,14 @@
Assert.assertTrue(clean(pr.stderr).length() == 0 || pr.stderr.contains("Cannot grant permissions to unsigned jars. Application requested security permissions, but jars are not signed"));
}
+
+ @Override
+ public List<String> modifyParams(List<String> global) {
+ List l = new ArrayList(global);
+ l.add("-J-Dhttps.protocols=TLSv1,SSLv3,SSLv2Hello");
+ return l;
+ }
+
}
public static class GnattProject extends StringBasedURL {
@@ -135,8 +160,9 @@
@Override
public void evaluate(ProcessResult pr) {
- Assert.assertTrue(pr.stdout.length() == 0);
- Assert.assertTrue(pr.stderr.length() == 0);
+ //some debug coords are appearing
+ Assert.assertTrue(pr.stdout.toLowerCase().contains("geogebra"));
+ Assert.assertFalse(pr.stderr.toLowerCase().contains("exception"));
}
}
@@ -168,8 +194,37 @@
}
}
+
+ public abstract static class NearlyNoOutputsOnWrongJRE extends NearlyNoOutputs {
- public static class Arbores extends NearlyNoOutputs {
+ public NearlyNoOutputsOnWrongJRE(String r) {
+ super(r);
+ }
+
+
+
+ @Override
+ public void evaluate(ProcessResult pr) {
+ Assert.assertTrue(stdoutEmpty, removeJreVersionWarning(clean(pr.stdout)).length() == 0);
+ Assert.assertTrue(stderrEmpty, removeJreVersionWarning(clean(pr.stderr)).length() == 0);
+
+ }
+
+ }
+
+ private static final String pattern = ".*" + Translator.R("JREversionDontMatch", ".*", ".*") + ".*";
+
+
+ private static String removeJreVersionWarning(String clean) {
+ return clean.replaceAll(pattern, "");
+ }
+
+ @Test
+ public void testJREversionDontMatchRemoval(){
+ Assert.assertTrue(removeJreVersionWarning("Warning - your JRE - 1.8 - do not match requested JRE - {0}").isEmpty());
+ }
+
+ public static class Arbores extends NearlyNoOutputsOnWrongJRE {
public Arbores() {
super("http://www.arbores.ca/AnnuityCalc.jnlp");
@@ -197,7 +252,7 @@
}
}
- public static class ArboresDeposit extends NearlyNoOutputs {
+ public static class ArboresDeposit extends NearlyNoOutputsOnWrongJRE {
public ArboresDeposit() throws MalformedURLException {
super("http://www.arbores.ca/Deposit.jnlp");
diff -r b053e7638d7f -r 716ea0c2ec19 tests/reproducers/custom/remote/testcases/RemoteApplicationTests.java
--- a/tests/reproducers/custom/remote/testcases/RemoteApplicationTests.java Wed Feb 25 15:40:44 2015 +0100
+++ b/tests/reproducers/custom/remote/testcases/RemoteApplicationTests.java Fri Feb 27 15:09:18 2015 +0100
@@ -1,4 +1,4 @@
-/* RemoteApplicationTests.java
+/*
Copyright (C) 2011 Red Hat, Inc.
This file is part of IcedTea.
@@ -40,7 +40,6 @@
import java.util.List;
import net.sourceforge.jnlp.ProcessResult;
import net.sourceforge.jnlp.ServerAccess;
-import net.sourceforge.jnlp.annotations.KnownToFail;
import net.sourceforge.jnlp.annotations.NeedsDisplay;
import net.sourceforge.jnlp.annotations.Remote;
import org.junit.Test;
@@ -106,7 +105,7 @@
@NeedsDisplay
public void orawebCernChRemoteTest() throws Exception {
RemoteApplicationSettings.RemoteApplicationTestcaseSettings settings = new RemoteApplicationSettings.OrawebCernCh();
- ProcessResult pr = server.executeJavawsUponUrl(ll, settings.getUrl());
+ ProcessResult pr = server.executeJavawsUponUrl(settings.modifyParams(ll), settings.getUrl());
settings.evaluate(pr);
}
diff -r b053e7638d7f -r 716ea0c2ec19 tests/reproducers/signed/ClasspathManifestTest/srcs/META-INF/MANIFEST.MF
--- a/tests/reproducers/signed/ClasspathManifestTest/srcs/META-INF/MANIFEST.MF Wed Feb 25 15:40:44 2015 +0100
+++ b/tests/reproducers/signed/ClasspathManifestTest/srcs/META-INF/MANIFEST.MF Fri Feb 27 15:09:18 2015 +0100
@@ -1,3 +1,4 @@
Manifest-Version: 1.0
Class-Path: Classpath/Manifest/Test/Helper.jar
+Application-Name: ClasspathManifestTest
diff -r b053e7638d7f -r 716ea0c2ec19 tests/reproducers/signed/CodeBaseManifestEntrySignedMatching/srcs/META-INF/MANIFEST.MF
--- a/tests/reproducers/signed/CodeBaseManifestEntrySignedMatching/srcs/META-INF/MANIFEST.MF Wed Feb 25 15:40:44 2015 +0100
+++ b/tests/reproducers/signed/CodeBaseManifestEntrySignedMatching/srcs/META-INF/MANIFEST.MF Fri Feb 27 15:09:18 2015 +0100
@@ -1,3 +1,4 @@
Manifest-Version: 1.0
Codebase: http://localhost https://localhost
+Application-Name: CodeBaseManifestEntrySignedMatching
diff -r b053e7638d7f -r 716ea0c2ec19 tests/reproducers/signed/CodeBaseManifestEntrySignedNotMatching/srcs/META-INF/MANIFEST.MF
--- a/tests/reproducers/signed/CodeBaseManifestEntrySignedNotMatching/srcs/META-INF/MANIFEST.MF Wed Feb 25 15:40:44 2015 +0100
+++ b/tests/reproducers/signed/CodeBaseManifestEntrySignedNotMatching/srcs/META-INF/MANIFEST.MF Fri Feb 27 15:09:18 2015 +0100
@@ -1,3 +1,4 @@
Manifest-Version: 1.0
Codebase: somthingWhatShould mustNeverMatch
+Application-Name: CodeBaseManifestEntrySignedNotMatching
diff -r b053e7638d7f -r 716ea0c2ec19 tests/reproducers/signed/SignedAppletManifestSpecifiesSandbox/srcs/META-INF/MANIFEST.MF
--- a/tests/reproducers/signed/SignedAppletManifestSpecifiesSandbox/srcs/META-INF/MANIFEST.MF Wed Feb 25 15:40:44 2015 +0100
+++ b/tests/reproducers/signed/SignedAppletManifestSpecifiesSandbox/srcs/META-INF/MANIFEST.MF Fri Feb 27 15:09:18 2015 +0100
@@ -1,3 +1,5 @@
Manifest-Version: 1.0
Permissions: sandbox
Application-Library-Allowable-Codebase: http://localhost
+Application-Name: SignedAppletManifestSpecifiesSandbox
+
More information about the distro-pkg-dev
mailing list