/hg/icedtea-web: Reproducer test cleanup to remove deprecation w...
aazores at icedtea.classpath.org
aazores at icedtea.classpath.org
Thu Nov 7 07:03:56 PST 2013
changeset 630384e150d9 in /hg/icedtea-web
details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=630384e150d9
author: Andrew Azores <aazores at redhat.com>
date: Thu Nov 07 09:59:22 2013 -0500
Reproducer test cleanup to remove deprecation warnings and type checking warnings.
ServerAccess.ProcessResult removed and reference replaced with ProcessResult.
junit.framework.assert replaced in favour of org.junit.Assert.
Added parameterized typing to instantiation of several fields and local variables
where the declaration was already parameterized.
diffstat:
ChangeLog | 22 ++++++
tests/reproducers/custom/AppletFolderInArchiveTag/testcases/AppletFolderInArchiveTagTests.java | 4 +-
tests/reproducers/signed/ClasspathManifestTest/testcases/ClasspathManifestTest.java | 14 ++--
tests/reproducers/signed/DownloadService/testcases/DownloadServiceTest.java | 2 +-
tests/reproducers/signed/EmptySignedJar/testcases/EmptySignedJarTest.java | 9 +-
tests/reproducers/signed/ExtensionJnlp/testcases/ExtensionJnlpTest.java | 9 +-
tests/reproducers/signed/InternalClassloaderWithDownloadedResource/testcases/InternalClassloaderWithDownloadedResourceTest.java | 14 ++--
tests/reproducers/signed/MissingJar/testcases/MissingJarTest.java | 14 ++--
tests/reproducers/signed/ReadPropertiesBySignedHack/testcases/ReadPropertiesBySignedHackTest.java | 7 +-
tests/reproducers/signed/ReadPropertiesSigned/testcases/ReadPropertiesSignedTest.java | 12 +-
tests/reproducers/signed/SignedJnlpApplication/testcases/SignedJnlpApplicationTest.java | 10 +-
tests/reproducers/signed/SignedJnlpCaseTestOne/testcases/SignedJnlpCaseOneTest.java | 6 +-
tests/reproducers/signed/SignedJnlpCaseTestTwo/testcases/SignedJnlpCaseTwoTest.java | 5 +-
tests/reproducers/signed/SignedJnlpTemplate/testcases/SignedJnlpTemplateTest.java | 10 +-
tests/reproducers/signed/Spaces can be everywhere signed/testcases/SpacesCanBeEverywhereTestsSigned.java | 28 ++++----
tests/reproducers/simple/AccessClassInPackage/testcases/AccessClassInPackageTest.java | 28 ++++----
tests/reproducers/simple/AllStackTraces/testcases/AllStackTracesTest.java | 3 +-
tests/reproducers/simple/AppletReadsInvalidJar/testcases/AppletReadsInvalidJarTests.java | 7 +-
tests/reproducers/simple/AppletTagWithMissingCodeAttribute/testcases/AppletTagWithMissingCodeAttribute.java | 2 +-
tests/reproducers/simple/AppletTest/testcases/AppletTestTests.java | 2 +-
tests/reproducers/simple/CreateClassLoader/testcases/CreateClassLoaderTest.java | 5 +-
tests/reproducers/simple/EmbeddedJnlpInApplet/testcases/EmbeddedJnlpInAppletTest.java | 2 +-
tests/reproducers/simple/GeneratedId/testcases/GeneratedIdTest.java | 2 +-
tests/reproducers/simple/InformationTitleVendorParser/testcases/InformationTitleVendorParserTest.java | 4 +-
tests/reproducers/simple/LocalesTest/testcases/LocalesTestTest.java | 2 +-
tests/reproducers/simple/LocalisedInformationElement/testcases/LocalisedInformationElementTest.java | 2 +-
tests/reproducers/simple/ManifestedJar1/testcases/ManifestedJar1Test.java | 35 +++++----
tests/reproducers/simple/ReadEnvironment/testcases/ReadEnvironmentTest.java | 4 +-
tests/reproducers/simple/ReadProperties/testcases/ReadPropertiesTest.java | 6 +-
tests/reproducers/simple/RedirectStreams/testcases/RedirectStreamsTest.java | 3 +-
tests/reproducers/simple/ReplaceSecurityManager/testcases/ReplaceSecurityManagerTest.java | 3 +-
tests/reproducers/simple/SetContextClassLoader/testcases/SetContextClassLoaderTest.java | 3 +-
tests/reproducers/simple/Spaces can be everywhere/testcases/SpacesCanBeEverywhereTests.java | 25 +++---
tests/reproducers/simple/UnsignedJnlpApplication/testcases/UnsignedJnlpApplicationTest.java | 7 +-
tests/reproducers/simple/UnsignedJnlpTemplate/testcases/UnsignedJnlpTemplateTest.java | 9 +-
tests/reproducers/simple/VersionedJar__V1/testcases/VersionedJarTest.java | 6 +-
tests/reproducers/simple/deadlocktest/testcases/DeadLockTestTest.java | 8 +-
tests/reproducers/simple/simpletest1/testcases/XDGspecificationTests.java | 8 +-
tests/reproducers/simple/simpletest2/testcases/SimpleTest2Test.java | 6 +-
tests/test-extensions-tests/net/sourceforge/jnlp/ResourcesTest.java | 14 ++--
tests/test-extensions/net/sourceforge/jnlp/ContentReader.java | 2 +-
tests/test-extensions/net/sourceforge/jnlp/ProcessWrapper.java | 14 ++--
tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java | 16 +---
43 files changed, 212 insertions(+), 182 deletions(-)
diffs (truncated from 1751 to 500 lines):
diff -r dcd51951d507 -r 630384e150d9 ChangeLog
--- a/ChangeLog Tue Nov 05 20:07:27 2013 +0100
+++ b/ChangeLog Thu Nov 07 09:59:22 2013 -0500
@@ -1,3 +1,25 @@
+2013-11-07 Andrew Azores <aazores at redhat.com>
+
+ Reproducer test cleanup. Replaced ServerAccess.ProcessResult in favour of
+ ProcessResult, and junit.framework.Assert in favour of org.junit.Assert.
+ Other notable changes below.
+ * tests/reproducers/simple/simpletest1/testcases/XDGspecificationTests.java:
+ (removeXdgValues, setXdgValues) list 'rr' uses parameterized type.
+ (getContentOfDirectory) list 'result' uses parameterized type
+ * tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java:
+ (ProcessResult) inner class removed. (getBrowserParams) list 'l' uses
+ parameterized type
+ * tests/reproducers/simple/LocalesTest/testcases/LocalesTestTest.java:
+ (getChangedLocalesForSubproces) list 'rr' uses parameterized type
+ * tests/reproducers/simple/LocalisedInformationElement/testcases/LocalisedInformationElementTest.java:
+ same
+ * tests/test-extensions/net/sourceforge/jnlp/ProcessWrapper.java:
+ constructor for (String, List<String>, String) lists 'urledArgs' and
+ 'otherArgs' use parameterized type. (stdoutl, stderrl) use parameterized
+ type.
+ * tests/test-extensions/net/sourceforge/jnlp/ContentReader.java:
+ (listeners) use parameterized type
+
2013-11-05 Jiri Vanek <jvanek at redhat.com>
Java console resurrected and connected to new logging.
diff -r dcd51951d507 -r 630384e150d9 tests/reproducers/custom/AppletFolderInArchiveTag/testcases/AppletFolderInArchiveTagTests.java
--- a/tests/reproducers/custom/AppletFolderInArchiveTag/testcases/AppletFolderInArchiveTagTests.java Tue Nov 05 20:07:27 2013 +0100
+++ b/tests/reproducers/custom/AppletFolderInArchiveTag/testcases/AppletFolderInArchiveTagTests.java Thu Nov 07 09:59:22 2013 -0500
@@ -35,7 +35,7 @@
exception statement from your version.
*/
-import net.sourceforge.jnlp.ServerAccess.ProcessResult;
+import net.sourceforge.jnlp.ProcessResult;
import net.sourceforge.jnlp.annotations.Bug;
import net.sourceforge.jnlp.annotations.NeedsDisplay;
import net.sourceforge.jnlp.annotations.TestInBrowsers;
@@ -58,4 +58,4 @@
String s0 = "This was ran from a folder specified in the archive tag.";
Assert.assertTrue("Expected '"+s0+"', stdout was: " + pr.stdout, pr.stdout.contains(s0));
}
-}
\ No newline at end of file
+}
diff -r dcd51951d507 -r 630384e150d9 tests/reproducers/signed/ClasspathManifestTest/testcases/ClasspathManifestTest.java
--- a/tests/reproducers/signed/ClasspathManifestTest/testcases/ClasspathManifestTest.java Tue Nov 05 20:07:27 2013 +0100
+++ b/tests/reproducers/signed/ClasspathManifestTest/testcases/ClasspathManifestTest.java Thu Nov 07 09:59:22 2013 -0500
@@ -38,8 +38,8 @@
import java.util.ArrayList;
import java.util.List;
+import net.sourceforge.jnlp.ProcessResult;
import net.sourceforge.jnlp.ServerAccess;
-import net.sourceforge.jnlp.ServerAccess.ProcessResult;
import net.sourceforge.jnlp.annotations.KnownToFail;
import net.sourceforge.jnlp.annotations.NeedsDisplay;
import net.sourceforge.jnlp.annotations.TestInBrowsers;
@@ -76,14 +76,14 @@
commands.add(server.getJavawsLocation());
commands.add(ServerAccess.HEADLES_OPTION);
commands.add("ClasspathManifestApplicationTest.jnlp");
- ServerAccess.ProcessResult pr = ServerAccess.executeProcess(commands, server.getDir());
+ ProcessResult pr = ServerAccess.executeProcess(commands, server.getDir());
checkAppFails(pr, "ApplicationJNLPLocalTest");
}
@NeedsDisplay
@Test
public void AppletJNLPRemoteTest() throws Exception {
- ServerAccess.ProcessResult pr = server.executeJavawsHeadless(null, "/ClasspathManifestAppletTest.jnlp");
+ ProcessResult pr = server.executeJavawsHeadless(null, "/ClasspathManifestAppletTest.jnlp");
checkAppFails(pr, "AppletJNLPRemoteTest");
}
@@ -95,7 +95,7 @@
commands.add(server.getJavawsLocation());
commands.add(ServerAccess.HEADLES_OPTION);
commands.add("ClasspathManifestAppletTest.jnlp");
- ServerAccess.ProcessResult pr = ServerAccess.executeProcess(commands, server.getDir());
+ ProcessResult pr = ServerAccess.executeProcess(commands, server.getDir());
checkAppFails(pr, "AppletJNLPRLocalTest");
}
@@ -103,7 +103,7 @@
@TestInBrowsers(testIn = {Browsers.one})
@Test
public void BrowserJNLPHrefRemoteTest() throws Exception {
- ServerAccess.ProcessResult pr = server.executeBrowser("/ClasspathManifestJNLPHrefTest.html");
+ ProcessResult pr = server.executeBrowser("/ClasspathManifestJNLPHrefTest.html");
checkAppFails(pr, "BrowserJNLPHrefRemoteTest");
}
@@ -115,7 +115,7 @@
List<String> commands=new ArrayList<String>(2);
commands.add(server.getBrowserLocation());
commands.add("ClasspathManifestJNLPHrefTest.html");
- ServerAccess.ProcessResult pr = ServerAccess.executeProcess(commands, server.getDir());
+ ProcessResult pr = ServerAccess.executeProcess(commands, server.getDir());
checkAppFails(pr, "BrowserJNLPHrefLocalTest");
}
@@ -123,7 +123,7 @@
@TestInBrowsers(testIn = {Browsers.one})
@Test
public void BrowserAppletRemoteTest() throws Exception {
- ServerAccess.ProcessResult pr = server.executeBrowser("/ClasspathManifestAppletTest.html");
+ ProcessResult pr = server.executeBrowser("/ClasspathManifestAppletTest.html");
Assert.assertTrue("ClasspathManifest.BrowserAppletRemoteTest stdout should contain " + s1 + " but didn't", pr.stdout.contains(s1));
// Should be the only one to search manifest for classpath.
Assert.assertTrue("ClasspathManifest.BrowserAppletRemoteTest stdout should contain " + s2 + " but didn't", pr.stdout.contains(s2));
diff -r dcd51951d507 -r 630384e150d9 tests/reproducers/signed/DownloadService/testcases/DownloadServiceTest.java
--- a/tests/reproducers/signed/DownloadService/testcases/DownloadServiceTest.java Tue Nov 05 20:07:27 2013 +0100
+++ b/tests/reproducers/signed/DownloadService/testcases/DownloadServiceTest.java Thu Nov 07 09:59:22 2013 -0500
@@ -40,10 +40,10 @@
import java.util.ArrayList;
import java.util.List;
-import junit.framework.Assert;
import net.sourceforge.jnlp.ProcessResult;
import net.sourceforge.jnlp.ServerAccess;
+import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;
diff -r dcd51951d507 -r 630384e150d9 tests/reproducers/signed/EmptySignedJar/testcases/EmptySignedJarTest.java
--- a/tests/reproducers/signed/EmptySignedJar/testcases/EmptySignedJarTest.java Tue Nov 05 20:07:27 2013 +0100
+++ b/tests/reproducers/signed/EmptySignedJar/testcases/EmptySignedJarTest.java Thu Nov 07 09:59:22 2013 -0500
@@ -1,4 +1,4 @@
-/* EmptySignedJar.java
+/* EmptySignedJarTest.java
Copyright (C) 2012 Red Hat, Inc.
This file is part of IcedTea.
@@ -38,6 +38,7 @@
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
+import net.sourceforge.jnlp.ProcessResult;
import net.sourceforge.jnlp.ServerAccess;
import net.sourceforge.jnlp.annotations.Bug;
@@ -53,21 +54,21 @@
@Test
public void checkingForRequiredResources() throws Exception {
String s = "Running SignedJarResource..";
- ServerAccess.ProcessResult pr = server.executeJavawsHeadless(l, "/SignedJarResource.jnlp");
+ ProcessResult pr = server.executeJavawsHeadless(l, "/SignedJarResource.jnlp");
Assert.assertTrue("Could not locate SignedJarResource class within SignedJarResource jar", pr.stdout.contains(s));
}
@Bug(id = "PR1049")
@Test
public void usingExtensionWithEmptyJar() throws Exception {
- ServerAccess.ProcessResult pr = server.executeJavawsHeadless(l, "/EmptySignedJarInExtensionJnlp.jnlp");
+ ProcessResult pr = server.executeJavawsHeadless(l, "/EmptySignedJarInExtensionJnlp.jnlp");
Assert.assertTrue("Stdout should contain " + jarOutput + " but did not", pr.stdout.contains(jarOutput));
}
@Bug(id = "PR1049")
@Test
public void usingLauncherWithEmptyJar() throws Exception {
- ServerAccess.ProcessResult pr = server.executeJavawsHeadless(l, "/EmptySignedJarInLaunchingJnlp.jnlp");
+ ProcessResult pr = server.executeJavawsHeadless(l, "/EmptySignedJarInLaunchingJnlp.jnlp");
Assert.assertTrue("Stdout should contain " + jarOutput + " but did not", pr.stdout.contains(jarOutput));
}
}
diff -r dcd51951d507 -r 630384e150d9 tests/reproducers/signed/ExtensionJnlp/testcases/ExtensionJnlpTest.java
--- a/tests/reproducers/signed/ExtensionJnlp/testcases/ExtensionJnlpTest.java Tue Nov 05 20:07:27 2013 +0100
+++ b/tests/reproducers/signed/ExtensionJnlp/testcases/ExtensionJnlpTest.java Thu Nov 07 09:59:22 2013 -0500
@@ -38,6 +38,7 @@
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
+import net.sourceforge.jnlp.ProcessResult;
import net.sourceforge.jnlp.ServerAccess;
import net.sourceforge.jnlp.annotations.Bug;
@@ -55,7 +56,7 @@
@Test
public void checkingForRequiredResources() throws Exception {
- ServerAccess.ProcessResult pr = server.executeJavawsHeadless(l, "/UsesSignedJar.jnlp");
+ ProcessResult pr = server.executeJavawsHeadless(l, "/UsesSignedJar.jnlp");
Assert.assertTrue("Could not locate SignedJarResource class within SignedJarResource jar", pr.stdout.contains(jarOutput));
String s = "Running SignedJnlpResource..";
@@ -66,21 +67,21 @@
@Bug(id = "PR1040")
@Test
public void usingSignedExtension() throws Exception {
- ServerAccess.ProcessResult pr = server.executeJavawsHeadless(l, "/UsesSignedJarExtension.jnlp");
+ ProcessResult pr = server.executeJavawsHeadless(l, "/UsesSignedJarExtension.jnlp");
Assert.assertTrue("Stdout should contain " + jarOutput + " but did not", pr.stdout.contains(jarOutput));
}
@Bug(id = "PR1041")
@Test
public void mainJarInExtension() throws Exception {
- ServerAccess.ProcessResult pr = server.executeJavawsHeadless(l, "/UsesSignedJnlpJarAndSignedJarExtension.jnlp");
+ ProcessResult pr = server.executeJavawsHeadless(l, "/UsesSignedJnlpJarAndSignedJarExtension.jnlp");
Assert.assertTrue("Stdout should contain " + jarOutput + " but did not", pr.stdout.contains(jarOutput));
}
@Bug(id = "PR1042")
@Test
public void checkingSignedJnlpInExtension() throws Exception {
- ServerAccess.ProcessResult pr = server.executeJavawsHeadless(l, "/UsesSignedJnlpExtension.jnlp");
+ ProcessResult pr = server.executeJavawsHeadless(l, "/UsesSignedJnlpExtension.jnlp");
Assert.assertTrue("Stdout should contain " + signedJnlpException + " but did not", pr.stderr.contains(signedJnlpException));
}
}
diff -r dcd51951d507 -r 630384e150d9 tests/reproducers/signed/InternalClassloaderWithDownloadedResource/testcases/InternalClassloaderWithDownloadedResourceTest.java
--- a/tests/reproducers/signed/InternalClassloaderWithDownloadedResource/testcases/InternalClassloaderWithDownloadedResourceTest.java Tue Nov 05 20:07:27 2013 +0100
+++ b/tests/reproducers/signed/InternalClassloaderWithDownloadedResource/testcases/InternalClassloaderWithDownloadedResourceTest.java Thu Nov 07 09:59:22 2013 -0500
@@ -39,8 +39,8 @@
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
+import net.sourceforge.jnlp.ProcessResult;
import net.sourceforge.jnlp.ServerAccess;
-import net.sourceforge.jnlp.ServerAccess.ProcessResult;
import net.sourceforge.jnlp.annotations.Bug;
import net.sourceforge.jnlp.annotations.NeedsDisplay;
import net.sourceforge.jnlp.annotations.TestInBrowsers;
@@ -78,7 +78,7 @@
@Test
@Bug(id = {"RH816592","PR858"})
public void launchInternalClassloaderWithDownloadedResourceAsJnlpApplication() throws Exception {
- ServerAccess.ProcessResult pr = server.executeJavawsHeadless(l, "/InternalClassloaderWithDownloadedResource-new.jnlp");
+ ProcessResult pr = server.executeJavawsHeadless(l, "/InternalClassloaderWithDownloadedResource-new.jnlp");
evaluate(pr);
Assert.assertFalse("should not be terminated but was", pr.wasTerminated);
Assert.assertEquals((Integer) 0, pr.returnValue);
@@ -94,7 +94,7 @@
@Test
@Bug(id = {"RH816592","PR858"})
public void launchInternalClassloaderWithDownloadedResourceAsJnlpApplet() throws Exception {
- ServerAccess.ProcessResult pr = server.executeJavawsHeadless(l, "/InternalClassloaderWithDownloadedResource-applet-new.jnlp");
+ ProcessResult pr = server.executeJavawsHeadless(l, "/InternalClassloaderWithDownloadedResource-applet-new.jnlp");
evaluate(pr);
Assert.assertFalse("should not be terminated but was", pr.wasTerminated);
Assert.assertEquals((Integer) 0, pr.returnValue);
@@ -105,7 +105,7 @@
@NeedsDisplay
@TestInBrowsers(testIn={Browsers.all})
public void launchInternalClassloaderWithDownloadedResourceAsHtmlApplet() throws Exception {
- ServerAccess.ProcessResult pr = server.executeBrowser("/InternalClassloaderWithDownloadedResource-new.html");
+ ProcessResult pr = server.executeBrowser("/InternalClassloaderWithDownloadedResource-new.html");
evaluate(pr);
Assert.assertTrue("should be terminated but was not", pr.wasTerminated);
}
@@ -113,7 +113,7 @@
@Test
@Bug(id = {"http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2012-May/018737.html"})
public void launchInternalClassloaderWithDownloadedResourceAsJnlpApplicationHack() throws Exception {
- ServerAccess.ProcessResult pr = server.executeJavawsHeadless(l, "/InternalClassloaderWithDownloadedResource-hack.jnlp");
+ ProcessResult pr = server.executeJavawsHeadless(l, "/InternalClassloaderWithDownloadedResource-hack.jnlp");
evaluate(pr);
Assert.assertFalse("should not be terminated but was", pr.wasTerminated);
Assert.assertEquals((Integer) 0, pr.returnValue);
@@ -122,7 +122,7 @@
@Test
@Bug(id = {"http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2012-May/018737.html"})
public void launchInternalClassloaderWithDownloadedResourceAsJnlpAppletHack() throws Exception {
- ServerAccess.ProcessResult pr = server.executeJavawsHeadless(l, "/InternalClassloaderWithDownloadedResource-applet-hack.jnlp");
+ ProcessResult pr = server.executeJavawsHeadless(l, "/InternalClassloaderWithDownloadedResource-applet-hack.jnlp");
evaluate(pr);
Assert.assertFalse("should not be terminated but was", pr.wasTerminated);
Assert.assertEquals((Integer) 0, pr.returnValue);
@@ -133,7 +133,7 @@
@Bug(id = {"http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2012-May/018737.html"})
@TestInBrowsers(testIn={Browsers.all})
public void launchInternalClassloaderWithDownloadedResourceAsHtmlAppletHack() throws Exception {
- ServerAccess.ProcessResult pr = server.executeBrowser("/InternalClassloaderWithDownloadedResource-hack.html");
+ ProcessResult pr = server.executeBrowser("/InternalClassloaderWithDownloadedResource-hack.html");
evaluate(pr);
Assert.assertTrue("should be terminated but was not", pr.wasTerminated);
}
diff -r dcd51951d507 -r 630384e150d9 tests/reproducers/signed/MissingJar/testcases/MissingJarTest.java
--- a/tests/reproducers/signed/MissingJar/testcases/MissingJarTest.java Tue Nov 05 20:07:27 2013 +0100
+++ b/tests/reproducers/signed/MissingJar/testcases/MissingJarTest.java Thu Nov 07 09:59:22 2013 -0500
@@ -1,4 +1,4 @@
-/* MissingJar.java
+/* MissingJarTest.java
Copyright (C) 2011 Red Hat, Inc.
This file is part of IcedTea.
@@ -38,10 +38,10 @@
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
+import net.sourceforge.jnlp.ProcessResult;
import net.sourceforge.jnlp.ServerAccess;
-import net.sourceforge.jnlp.ServerAccess.ProcessResult;
+
import org.junit.Assert;
-
import org.junit.Test;
public class MissingJarTest {
@@ -60,25 +60,25 @@
@Test
public void MissingJarTest1() throws Exception {
- ServerAccess.ProcessResult pr = server.executeJavawsHeadless(l, "/MissingJar.jnlp");
+ ProcessResult pr = server.executeJavawsHeadless(l, "/MissingJar.jnlp");
evaluateResult(pr);
}
@Test
public void MissingJarTest2() throws Exception {
- ServerAccess.ProcessResult pr = server.executeJavawsHeadless(l, "/MissingJar2.jnlp");
+ ProcessResult pr = server.executeJavawsHeadless(l, "/MissingJar2.jnlp");
evaluateResult(pr);
}
@Test
public void MissingJarTest3() throws Exception {
- ServerAccess.ProcessResult pr = server.executeJavawsHeadless(l, "/MissingJar3.jnlp");
+ ProcessResult pr = server.executeJavawsHeadless(l, "/MissingJar3.jnlp");
evaluateResult(pr);
}
@Test
public void MissingJarTest4() throws Exception {
- ServerAccess.ProcessResult pr = server.executeJavawsHeadless(l, "/MissingJar4.jnlp");
+ ProcessResult pr = server.executeJavawsHeadless(l, "/MissingJar4.jnlp");
evaluateResult(pr);
}
}
diff -r dcd51951d507 -r 630384e150d9 tests/reproducers/signed/ReadPropertiesBySignedHack/testcases/ReadPropertiesBySignedHackTest.java
--- a/tests/reproducers/signed/ReadPropertiesBySignedHack/testcases/ReadPropertiesBySignedHackTest.java Tue Nov 05 20:07:27 2013 +0100
+++ b/tests/reproducers/signed/ReadPropertiesBySignedHack/testcases/ReadPropertiesBySignedHackTest.java Thu Nov 07 09:59:22 2013 -0500
@@ -1,4 +1,4 @@
-/* ReadPropertiesSignedTest.java
+/* ReadPropertiesBySignedHackTest.java
Copyright (C) 2011 Red Hat, Inc.
This file is part of IcedTea.
@@ -35,11 +35,12 @@
exception statement from your version.
*/
-
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
+import net.sourceforge.jnlp.ProcessResult;
import net.sourceforge.jnlp.ServerAccess;
+
import org.junit.Assert;
import org.junit.Test;
@@ -52,7 +53,7 @@
@Test
public void ReadPropertiesBySignedHackWithjoutXtrustAll() throws Exception {
//no request for permissions
- ServerAccess.ProcessResult pr=server.executeJavawsHeadless(l,"/ReadPropertiesBySignedHack.jnlp");
+ ProcessResult pr=server.executeJavawsHeadless(l,"/ReadPropertiesBySignedHack.jnlp");
String s="java.lang.SecurityException: class \"ReadProperties\"'s signer information does not match signer information of other classes in the same package";
Assert.assertTrue("Stderr should contains "+s+" but did not",pr.stderr.contains(s));
String ss="ClassNotFoundException";
diff -r dcd51951d507 -r 630384e150d9 tests/reproducers/signed/ReadPropertiesSigned/testcases/ReadPropertiesSignedTest.java
--- a/tests/reproducers/signed/ReadPropertiesSigned/testcases/ReadPropertiesSignedTest.java Tue Nov 05 20:07:27 2013 +0100
+++ b/tests/reproducers/signed/ReadPropertiesSigned/testcases/ReadPropertiesSignedTest.java Thu Nov 07 09:59:22 2013 -0500
@@ -35,11 +35,12 @@
exception statement from your version.
*/
-
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
+import net.sourceforge.jnlp.ProcessResult;
import net.sourceforge.jnlp.ServerAccess;
+
import org.junit.Assert;
import org.junit.Test;
@@ -53,7 +54,7 @@
@Test
public void ReadSignedPropertiesWithoutPermissionsWithXtrustAll() throws Exception {
//no request for permissions
- ServerAccess.ProcessResult pr=server.executeJavawsHeadless(l,"/ReadPropertiesSigned1.jnlp");
+ ProcessResult pr=server.executeJavawsHeadless(l,"/ReadPropertiesSigned1.jnlp");
Assert.assertTrue("Stderr should match "+accessMatcher+" but did not",pr.stderr.matches(accessMatcher));
String ss="ClassNotFoundException";
Assert.assertFalse("Stderr should not contains "+ss+" but did",pr.stderr.contains(ss));
@@ -65,7 +66,7 @@
@Test
public void ReadSignedPropertiesWithPermissionsWithXtrustAll() throws Exception {
//request for allpermissions
- ServerAccess.ProcessResult pr=server.executeJavawsHeadless(l,"/ReadPropertiesSigned2.jnlp");
+ ProcessResult pr=server.executeJavawsHeadless(l,"/ReadPropertiesSigned2.jnlp");
Assert.assertFalse("Stderr should NOT match "+accessMatcher+" but did",pr.stderr.matches(accessMatcher));
String ss="ClassNotFoundException";
Assert.assertFalse("Stderr should not contains "+ss+" but did",pr.stderr.contains(ss));
@@ -76,16 +77,15 @@
@Test
public void EnsureXtrustallNotAffectingUnsignedBehaviour() throws Exception {
- ServerAccess.ProcessResult pr=server.executeJavawsHeadless(l,"/ReadProperties1.jnlp");
+ ProcessResult pr=server.executeJavawsHeadless(l,"/ReadProperties1.jnlp");
Assert.assertTrue("Stderr should match "+accessMatcher+" but did not",pr.stderr.matches(accessMatcher));
String ss="ClassNotFoundException";
Assert.assertFalse("Stderr should not contains "+ss+" but did",pr.stderr.contains(ss));
Assert.assertFalse("stdout lenght should not be >2 but was "+pr.stdout.length(),pr.stdout.length()>2);
Assert.assertFalse("should not be terminated but was",pr.wasTerminated);
Assert.assertEquals((Integer)0, pr.returnValue);
- ServerAccess.ProcessResult pr2=server.executeJavawsHeadless(null,"/ReadProperties1.jnlp");
+ ProcessResult pr2=server.executeJavawsHeadless(null,"/ReadProperties1.jnlp");
Assert.assertEquals(pr.stderr, pr2.stderr);
Assert.assertEquals(pr.stdout, pr2.stdout);
-
}
}
diff -r dcd51951d507 -r 630384e150d9 tests/reproducers/signed/SignedJnlpApplication/testcases/SignedJnlpApplicationTest.java
--- a/tests/reproducers/signed/SignedJnlpApplication/testcases/SignedJnlpApplicationTest.java Tue Nov 05 20:07:27 2013 +0100
+++ b/tests/reproducers/signed/SignedJnlpApplication/testcases/SignedJnlpApplicationTest.java Thu Nov 07 09:59:22 2013 -0500
@@ -38,7 +38,9 @@
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
+import net.sourceforge.jnlp.ProcessResult;
import net.sourceforge.jnlp.ServerAccess;
+
import org.junit.Assert;
import org.junit.Test;
@@ -52,7 +54,7 @@
@Test
public void launchingFileMatchesSignedApplication1() throws Exception {
- ServerAccess.ProcessResult pr = server.executeJavawsHeadless(l, "/SignedJnlpApplication1.jnlp");
+ ProcessResult pr = server.executeJavawsHeadless(l, "/SignedJnlpApplication1.jnlp");
String s = "Running signed application in main";
Assert.assertTrue("Stdout should contains " + s + " but did not", pr.stdout.contains(s));
}
@@ -62,7 +64,7 @@
*/
@Test
public void launchingFileDoesNotMatchSignedApplication1() throws Exception {
- ServerAccess.ProcessResult pr = server.executeJavawsHeadless(l, "/SignedJnlpApplication2.jnlp");
+ ProcessResult pr = server.executeJavawsHeadless(l, "/SignedJnlpApplication2.jnlp");
Assert.assertTrue("Stderr should contains " + signedException + " but did not", pr.stderr.contains(signedException));
}
@@ -71,7 +73,7 @@
*/
@Test
public void launchingFileDoesNotMatchSignedApplication2() throws Exception {
- ServerAccess.ProcessResult pr = server.executeJavawsHeadless(l, "/SignedJnlpApplication3.jnlp");
+ ProcessResult pr = server.executeJavawsHeadless(l, "/SignedJnlpApplication3.jnlp");
Assert.assertTrue("Stderr should contains " + signedException + " but did not", pr.stderr.contains(signedException));
}
-}
\ No newline at end of file
+}
diff -r dcd51951d507 -r 630384e150d9 tests/reproducers/signed/SignedJnlpCaseTestOne/testcases/SignedJnlpCaseOneTest.java
--- a/tests/reproducers/signed/SignedJnlpCaseTestOne/testcases/SignedJnlpCaseOneTest.java Tue Nov 05 20:07:27 2013 +0100
+++ b/tests/reproducers/signed/SignedJnlpCaseTestOne/testcases/SignedJnlpCaseOneTest.java Thu Nov 07 09:59:22 2013 -0500
@@ -38,7 +38,9 @@
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
+import net.sourceforge.jnlp.ProcessResult;
import net.sourceforge.jnlp.ServerAccess;
+
import org.junit.Assert;
import org.junit.Test;
@@ -49,14 +51,14 @@
@Test
public void launchingFileMatchesSigned() throws Exception {
- ServerAccess.ProcessResult pr = server.executeJavawsHeadless(l, "/SignedJnlpCaseTestOne1.jnlp");
+ ProcessResult pr = server.executeJavawsHeadless(l, "/SignedJnlpCaseTestOne1.jnlp");
String s = "Running signed application in main";
Assert.assertTrue("Stdout should contains " + s + " but did not", pr.stdout.contains(s));
}
@Test
public void launchingFileDoesNotMatchSigned() throws Exception {
- ServerAccess.ProcessResult pr = server.executeJavawsHeadless(l, "/SignedJnlpCaseTestOne2.jnlp");
+ ProcessResult pr = server.executeJavawsHeadless(l, "/SignedJnlpCaseTestOne2.jnlp");
String s = "net.sourceforge.jnlp.LaunchException: Fatal: Application Error: The signed " +
"JNLP file did not match the launching JNLP file. Missing Resource: Signed Application did not match " +
"launching JNLP File";
diff -r dcd51951d507 -r 630384e150d9 tests/reproducers/signed/SignedJnlpCaseTestTwo/testcases/SignedJnlpCaseTwoTest.java
--- a/tests/reproducers/signed/SignedJnlpCaseTestTwo/testcases/SignedJnlpCaseTwoTest.java Tue Nov 05 20:07:27 2013 +0100
+++ b/tests/reproducers/signed/SignedJnlpCaseTestTwo/testcases/SignedJnlpCaseTwoTest.java Thu Nov 07 09:59:22 2013 -0500
@@ -38,6 +38,7 @@
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
More information about the distro-pkg-dev
mailing list