aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/reproducers/signed/AppletTestSigned/testcases/AppletTestSignedTests.java8
-rw-r--r--tests/reproducers/signed/ClasspathManifestTest/testcases/ClasspathManifestTest.java1
-rw-r--r--tests/reproducers/signed/ClipboardContentSigned/testcases/ClipboardContentSignedTests.java5
-rw-r--r--tests/reproducers/signed/InternalClassloaderWithDownloadedResource/testcases/InternalClassloaderWithDownloadedResourceTest.java2
-rw-r--r--tests/reproducers/signed/Spaces can be everywhere signed/testcases/SpacesCanBeEverywhereTestsSigned.java6
-rw-r--r--tests/reproducers/signed2/MultipleSignaturesTest/testcases/MultipleSignaturesTestTests.java5
-rw-r--r--tests/reproducers/simple/AppletTest/testcases/AppletTestTests.java5
-rw-r--r--tests/reproducers/simple/JSToJSet/testcases/JSToJSetTest.java5
-rw-r--r--tests/reproducers/simple/LocalisedInformationElement/testcases/LocalisedInformationElementTest.java3
-rw-r--r--tests/reproducers/simple/ParametrizedJarUrl/testcases/ParametrizedJarUrlTests.java26
-rw-r--r--tests/reproducers/simple/Spaces can be everywhere/testcases/SpacesCanBeEverywhereTests.java25
-rw-r--r--tests/reproducers/simple/deadlocktest/testcases/DeadLockTestTest.java2
-rw-r--r--tests/reproducers/simple/encodingTestsĚŠČŘŽÝÁÍÉĚÉŘŤÝÚŮÍÓÁŠĎŽŹŇ/testcases/EncodingTestTest.java10
-rw-r--r--tests/reproducers/simple/simpletest1/testcases/SimpleTest1Test.java3
14 files changed, 10 insertions, 96 deletions
diff --git a/tests/reproducers/signed/AppletTestSigned/testcases/AppletTestSignedTests.java b/tests/reproducers/signed/AppletTestSigned/testcases/AppletTestSignedTests.java
index c7227e7..f75f64f 100644
--- a/tests/reproducers/signed/AppletTestSigned/testcases/AppletTestSignedTests.java
+++ b/tests/reproducers/signed/AppletTestSigned/testcases/AppletTestSignedTests.java
@@ -53,20 +53,17 @@ import org.junit.Test;
public class AppletTestSignedTests extends BrowserTest {
private final List<String> l = Collections.unmodifiableList(Arrays.asList(new String[]{"-Xtrustall"}));
- private static final String ss = "xception";
private static final String s0 = "AppletTestSigned was started";
private static final String s1 = "value1";
private static final String s2 = "value2";
private static final String s3 = "AppletTestSigned was initialised";
private static final String s7 = "AppletTestSigned killing himself after 2000 ms of life";
- private static final ContainsRule exceptionRule = new ContainsRule(ss);
private static final ContainsRule startedRule = new ContainsRule(s0);
private static final ContainsRule variable1Rule = new ContainsRule(s1);
private static final ContainsRule variable2Rule = new ContainsRule(s2);
private static final ContainsRule initialisedRule = new ContainsRule(s3);
private static final ContainsRule killedRule = new ContainsRule(s7);
private static final RulesFolowingClosingListener okListener=new RulesFolowingClosingListener(startedRule, variable1Rule, variable2Rule, initialisedRule, killedRule);
- private static final RulesFolowingClosingListener errorListener=new RulesFolowingClosingListener(exceptionRule);
// @Test
public void AppletTestSignedTest() throws Exception {
@@ -81,7 +78,6 @@ public class AppletTestSignedTests extends BrowserTest {
Assert.assertTrue("AppletTestSigned stdout " + startedRule.toPassingString() + " but didn't", startedRule.evaluate(pr.stdout));
Assert.assertTrue("AppletTestSigned stdout " + variable1Rule.toPassingString() + " but didn't", variable1Rule.evaluate(pr.stdout));
Assert.assertTrue("AppletTestSigned stdout " + variable2Rule.toPassingString() + " but didn't", variable2Rule.evaluate(pr.stdout));
- Assert.assertFalse("AppletTestSigned stderr " + exceptionRule.toFailingString() + " but did", exceptionRule.evaluate(pr.stderr));
Assert.assertTrue("AppletTestSigned stdout " + killedRule.toPassingString() + " but didn't", killedRule.evaluate(pr.stdout));
if (!javawsApplet) {
/*this is working correctly in most browser, but not in all. temporarily disabling
@@ -98,7 +94,7 @@ public class AppletTestSignedTests extends BrowserTest {
public void AppletTestSignedFirefoxTestXslowX() throws Exception {
ServerAccess.PROCESS_TIMEOUT = 30 * 1000;
try {
- ProcessResult pr = server.executeBrowser("/AppletTestSigned2.html", okListener, errorListener);
+ ProcessResult pr = server.executeBrowser("/AppletTestSigned2.html", okListener, null);
evaluateSignedApplet(pr, false);
//Assert.assertTrue(pr.wasTerminated);
//Assert.assertEquals((Integer) 0, pr.returnValue); due to destroy is null
@@ -110,7 +106,7 @@ public class AppletTestSignedTests extends BrowserTest {
@Test
@TestInBrowsers(testIn = {Browsers.all})
public void AppletTestSignedFirefoxTest() throws Exception {
- ProcessResult pr = server.executeBrowser("/AppletTestSigned.html", ServerAccess.AutoClose.CLOSE_ON_BOTH);
+ ProcessResult pr = server.executeBrowser("/AppletTestSigned.html", ServerAccess.AutoClose.CLOSE_ON_CORRECT_END);
evaluateSignedApplet(pr, false);
//Assert.assertTrue(pr.wasTerminated);
//Assert.assertEquals((Integer) 0, pr.returnValue); due to destroy is null
diff --git a/tests/reproducers/signed/ClasspathManifestTest/testcases/ClasspathManifestTest.java b/tests/reproducers/signed/ClasspathManifestTest/testcases/ClasspathManifestTest.java
index e14c174..b9aac4c 100644
--- a/tests/reproducers/signed/ClasspathManifestTest/testcases/ClasspathManifestTest.java
+++ b/tests/reproducers/signed/ClasspathManifestTest/testcases/ClasspathManifestTest.java
@@ -127,6 +127,5 @@ public class ClasspathManifestTest extends BrowserTest {
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));
- Assert.assertFalse("ClasspathManifest.BrowserAppletRemoteTest stderr should not contain " + ss + " but did", pr.stderr.contains(ss));
}
}
diff --git a/tests/reproducers/signed/ClipboardContentSigned/testcases/ClipboardContentSignedTests.java b/tests/reproducers/signed/ClipboardContentSigned/testcases/ClipboardContentSignedTests.java
index 13099c7..0eb960c 100644
--- a/tests/reproducers/signed/ClipboardContentSigned/testcases/ClipboardContentSignedTests.java
+++ b/tests/reproducers/signed/ClipboardContentSigned/testcases/ClipboardContentSignedTests.java
@@ -53,7 +53,6 @@ import org.junit.Test;
@Bug(id = "PR708")
public class ClipboardContentSignedTests {
- private static final String XCEPTION = "xception";
private static final String contentC = "COPY#$REPRODUCER";
private static final String contentP = "PASTE#$REPRODUCER";
private static final String emptyContent = "empty content";
@@ -77,7 +76,6 @@ public class ClipboardContentSignedTests {
wfsp.run();
String ss = pasteFromClipboard();
Assert.assertEquals("Clipboard must contain new value, did not", contentC, ss);
- //Assert.assertFalse("ClipboardContentSignedCopy stderr should not contain " + XCEPTION + " but did ", wfsp.getErr().contains(XCEPTION));
}
@Test
@@ -90,7 +88,6 @@ public class ClipboardContentSignedTests {
wfsp.run();
String ss = pasteFromClipboard();
Assert.assertEquals("Clipboard must contain new value, did not", contentC, ss);
- //Assert.assertFalse("ClipboardContentSignedCopy stderr should not contain " + XCEPTION + " but did ", wfsp.getErr().contains(XCEPTION));
}
@@ -105,7 +102,6 @@ public class ClipboardContentSignedTests {
Assert.assertEquals("Clipboard must contain new value, did not", contentP, pasteFromClipboard());
ProcessResult pr = server.executeJavawsHeadless(javawsTrustArg, "/ClipboardContentSignedPaste1.jnlp");
Assert.assertTrue("ClipboardContentSignedTestPaste stdout should contain " + contentP + " but didn't", pr.stdout.contains(contentP));
- //Assert.assertFalse("ClipboardContentSignedTestPaste stderr should not contain " + XCEPTION + " but did ", pr.stderr.contains(XCEPTION));
}
@Test
@@ -121,6 +117,5 @@ public class ClipboardContentSignedTests {
Assert.assertEquals("Clipboard must contain new value, did not", contentP, pasteFromClipboard());
ProcessResult pr = server.executeJavaws(javawsTrustArg, "/ClipboardContentSignedPaste2.jnlp");
Assert.assertTrue("ClipboardContentSignedTestPaste stdout should contain " + contentP + " but didn't", pr.stdout.contains(contentP));
- //Assert.assertFalse("ClipboardContentSignedTestPaste stderr should not contain " + XCEPTION + " but did ", pr.stderr.contains(XCEPTION));
}
}
diff --git a/tests/reproducers/signed/InternalClassloaderWithDownloadedResource/testcases/InternalClassloaderWithDownloadedResourceTest.java b/tests/reproducers/signed/InternalClassloaderWithDownloadedResource/testcases/InternalClassloaderWithDownloadedResourceTest.java
index 02ffd7b..55e0c49 100644
--- a/tests/reproducers/signed/InternalClassloaderWithDownloadedResource/testcases/InternalClassloaderWithDownloadedResourceTest.java
+++ b/tests/reproducers/signed/InternalClassloaderWithDownloadedResource/testcases/InternalClassloaderWithDownloadedResourceTest.java
@@ -87,8 +87,6 @@ public class InternalClassloaderWithDownloadedResourceTest extends BrowserTest {
private void evaluate(ProcessResult pr) {
String ss = "Good simple javaws exapmle";
Assert.assertTrue("Stdout should contains " + ss + " but didn't", pr.stdout.contains(ss));
- String s = "xception";
- Assert.assertFalse("Stderr should not contains " + s + " but did", pr.stderr.contains(s));
}
@Test
diff --git a/tests/reproducers/signed/Spaces can be everywhere signed/testcases/SpacesCanBeEverywhereTestsSigned.java b/tests/reproducers/signed/Spaces can be everywhere signed/testcases/SpacesCanBeEverywhereTestsSigned.java
index 605646e..e160d65 100644
--- a/tests/reproducers/signed/Spaces can be everywhere signed/testcases/SpacesCanBeEverywhereTestsSigned.java
+++ b/tests/reproducers/signed/Spaces can be everywhere signed/testcases/SpacesCanBeEverywhereTestsSigned.java
@@ -85,8 +85,6 @@ public class SpacesCanBeEverywhereTestsSigned extends BrowserTest {
ProcessResult pr = ServerAccess.executeProcess(commands);
String s="Signed spaces can be everywhere.jsr was launched correctly";
Assert.assertTrue("stdout should contains `"+s+"`, but did not",pr.stdout.contains(s));
- String cc = "xception";
- Assert.assertFalse("stderr should NOT contains `" + cc + "`, but did", pr.stderr.contains(cc));
Assert.assertFalse("should not be terminated, but was", pr.wasTerminated);
Assert.assertEquals((Integer) 0, pr.returnValue);
}
@@ -98,8 +96,6 @@ public class SpacesCanBeEverywhereTestsSigned extends BrowserTest {
ProcessResult pr = server.executeJavaws("/NotOnly%20spaces%20can%20kill%20%C4%9B%C5%A1%C4%8D%C5%99%C5%BE%20too%20signed.jnlp");
String s="Signed spaces can be everywhere.jsr was launched correctly";
Assert.assertTrue("stdout should contains `"+s+"`, but did not",pr.stdout.contains(s));
- String cc = "xception";
- Assert.assertFalse("stderr should NOT contains `" + cc + "`, but did", pr.stderr.contains(cc));
Assert.assertFalse("should NOT be terminated, but was not", pr.wasTerminated);
}
@@ -111,8 +107,6 @@ public class SpacesCanBeEverywhereTestsSigned extends BrowserTest {
ProcessResult pr = server.executeBrowser("/spaces+applet+Tests+signed.html");
String s="Signed spaces can be everywhere.jsr was launched correctly";
Assert.assertTrue("stdout should contains `"+s+"`, but did not",pr.stdout.contains(s));
- String cc = "xception";
- Assert.assertFalse("stderr should NOT contains `" + cc + "`, but did", pr.stderr.contains(cc));
Assert.assertTrue("should be terminated, but was not", pr.wasTerminated);
}
diff --git a/tests/reproducers/signed2/MultipleSignaturesTest/testcases/MultipleSignaturesTestTests.java b/tests/reproducers/signed2/MultipleSignaturesTest/testcases/MultipleSignaturesTestTests.java
index 4adcea3..cd7afca 100644
--- a/tests/reproducers/signed2/MultipleSignaturesTest/testcases/MultipleSignaturesTestTests.java
+++ b/tests/reproducers/signed2/MultipleSignaturesTest/testcases/MultipleSignaturesTestTests.java
@@ -59,8 +59,6 @@ public class MultipleSignaturesTestTests extends BrowserTest{
ProcessResult pr = server.executeJavaws("/MultipleSignaturesTest2.jnlp");
String s = GSJE;
Assert.assertTrue("stdout should contains `" + s + "`, but did not", pr.stdout.contains(s));
- String cc = "xception";
- Assert.assertFalse("stderr should NOT contains `" + cc + "`, but did", pr.stderr.contains(cc));
}
@Test
@@ -93,9 +91,6 @@ public class MultipleSignaturesTestTests extends BrowserTest{
// permissions, but still usage of foreign code is allowed.
String s = GSJE;
Assert.assertTrue("stdout should contains `" + s + "`, but did not", pr.stdout.contains(s));
- String cc = "xception";
- Assert.assertFalse("stderr should NOT contains `" + cc + "`, but did", pr.stderr.contains(cc));
- Assert.assertEquals((Integer) 0, pr.returnValue);
}
@Test
diff --git a/tests/reproducers/simple/AppletTest/testcases/AppletTestTests.java b/tests/reproducers/simple/AppletTest/testcases/AppletTestTests.java
index e1a5f6b..a3b3443 100644
--- a/tests/reproducers/simple/AppletTest/testcases/AppletTestTests.java
+++ b/tests/reproducers/simple/AppletTest/testcases/AppletTestTests.java
@@ -49,7 +49,6 @@ import org.junit.Test;
public class AppletTestTests extends BrowserTest {
private final String s7 = "Aplet killing himself after 2000 ms of life";
- private final String ss = "xception";
private final String s2 = "value2";
private final String s1 = "value1";
private final String s0 = "applet was started";
@@ -59,9 +58,6 @@ public class AppletTestTests extends BrowserTest {
@Override
protected boolean isAlowedToFinish(String s) {
- if (s.contains(ss)) {
- return true;
- }
return (s.contains(s0) && s.contains(s1) && s.contains(s2) && s.contains(s3) && s.contains(s7));
}
}
@@ -109,7 +105,6 @@ public class AppletTestTests extends BrowserTest {
Assert.assertTrue("AppletTest stdout should contains " + s0 + " bud didn't", pr.stdout.contains(s0));
Assert.assertTrue("AppletTest stdout should contains " + s1 + " bud didn't", pr.stdout.contains(s1));
Assert.assertTrue("AppletTest stdout should contains " + s2 + " bud didn't", pr.stdout.contains(s2));
- Assert.assertFalse("AppletTest stderr should not contains " + ss + " but did", pr.stderr.contains(ss));
Assert.assertTrue("AppletTest stdout should contains " + s7 + " bud didn't", pr.stdout.contains(s7));
if (!javawsApplet) {
/*this is working correctly in most browser, but not in all. temporarily disabling
diff --git a/tests/reproducers/simple/JSToJSet/testcases/JSToJSetTest.java b/tests/reproducers/simple/JSToJSet/testcases/JSToJSetTest.java
index 5fd4011..0db4669 100644
--- a/tests/reproducers/simple/JSToJSet/testcases/JSToJSetTest.java
+++ b/tests/reproducers/simple/JSToJSet/testcases/JSToJSetTest.java
@@ -54,8 +54,6 @@ public class JSToJSetTest extends BrowserTest {
//the JS<->J tests tend to make Opera unusable
public final boolean doNotRunInOpera = true;
- private final String exceptionStr = "xception";
- private final String errorStr = "rror";
private final String initStr = "JSToJSet applet initialized.";
private final String afterStr = "afterTests";
@@ -67,9 +65,6 @@ public class JSToJSetTest extends BrowserTest {
@Override
protected boolean isAlowedToFinish(String s) {
- if (s.contains(exceptionStr) || s.contains(errorStr)) {
- return true;
- }
return (s.contains(initStr) && s.contains(afterStr));
}
}
diff --git a/tests/reproducers/simple/LocalisedInformationElement/testcases/LocalisedInformationElementTest.java b/tests/reproducers/simple/LocalisedInformationElement/testcases/LocalisedInformationElementTest.java
index e4ec1f4..99e8784 100644
--- a/tests/reproducers/simple/LocalisedInformationElement/testcases/LocalisedInformationElementTest.java
+++ b/tests/reproducers/simple/LocalisedInformationElement/testcases/LocalisedInformationElementTest.java
@@ -93,9 +93,6 @@ public class LocalisedInformationElementTest {
ProcessResult pr = executeJavaws(verbose, variables, id);
String s = "LocalisedInformationElement launched";
Assert.assertTrue(id + " stdout should contains " + s + " bud didn't", pr.stdout.contains(s));
- //to strict?
- //String ss = "xception";
- //Assert.assertFalse(id + " stderr should not contains " + ss + " but did", pr.stderr.contains(ss));
String locMatch = "(?s).*default locale: \\w{2}.*";
Assert.assertTrue(id + " stdout should match " + locMatch + " bud didn't", pr.stdout.matches(locMatch));
return pr;
diff --git a/tests/reproducers/simple/ParametrizedJarUrl/testcases/ParametrizedJarUrlTests.java b/tests/reproducers/simple/ParametrizedJarUrl/testcases/ParametrizedJarUrlTests.java
index 7d2da42..a9193fd 100644
--- a/tests/reproducers/simple/ParametrizedJarUrl/testcases/ParametrizedJarUrlTests.java
+++ b/tests/reproducers/simple/ParametrizedJarUrl/testcases/ParametrizedJarUrlTests.java
@@ -149,13 +149,6 @@ public class ParametrizedJarUrlTests extends BrowserTest{
Assert.assertTrue("AppletTestSigned stdout should contain " + s1 + " but didn't", pr.stdout.contains(s1));
String s2 = "value2";
Assert.assertTrue("AppletTestSigned stdout should contain " + s2 + " but didn't", pr.stdout.contains(s2));
-// too strict!
-// String s4 = "AppletTestSigned was stopped";
-// Assert.assertFalse("AppletTestSigned stdout shouldn't contains " + s4 + " but did", pr.stdout.contains(s4));
-// String s5 = "AppletTestSigned will be destroyed";
-// Assert.assertFalse("AppletTestSigned stdout shouldn't contains " + s5 + " but did", pr.stdout.contains(s5));
-// String ss = "xception";
-// Assert.assertFalse("AppletTestSigned stderr should not contains " + ss + " but did", pr.stderr.contains(ss));
String s7 = "AppletTestSigned killing himself after 2000 ms of life";
Assert.assertTrue("AppletTestSigned stdout should contain " + s7 + " but didn't", pr.stdout.contains(s7));
}
@@ -166,8 +159,6 @@ public class ParametrizedJarUrlTests extends BrowserTest{
ProcessResult pr = server.executeJavawsHeadless(l, "/ParametrizedJarUrlSigned1.jnlp");
String s = "Good simple javaws exapmle";
Assert.assertTrue("ParametrizedJarUrlSigned1 stdout should contain " + s + " but didn't", pr.stdout.contains(s));
- String ss = "xception";
- Assert.assertFalse("ParametrizedJarUrlSigned1 stderr should not contains " + ss + " but did", pr.stderr.contains(ss));
}
@Test
@@ -175,8 +166,6 @@ public class ParametrizedJarUrlTests extends BrowserTest{
ProcessResult pr = server.executeJavawsHeadless(l, "/ParametrizedJarUrlSigned2.jnlp");
String s = "Good simple javaws exapmle";
Assert.assertTrue("ParametrizedJarUrlSigned2 stdout should contain " + s + " but didn't", pr.stdout.contains(s));
- String ss = "xception";
- Assert.assertFalse("ParametrizedJarUrlSigned2 stderr should not contains " + ss + " but did", pr.stderr.contains(ss));
}
@Test
@@ -184,8 +173,6 @@ public class ParametrizedJarUrlTests extends BrowserTest{
ProcessResult pr = server.executeJavawsHeadless(l, "/ParametrizedJarUrlSigned2.jnlp?test=123456");
String s = "Good simple javaws exapmle";
Assert.assertTrue("ParametrizedJarUrlSigned2 stdout should contain " + s + " but didn't", pr.stdout.contains(s));
- String ss = "xception";
- Assert.assertFalse("ParametrizedJarUrlSigned2 stderr should not contains " + ss + " but did", pr.stderr.contains(ss));
}
@Test
@@ -193,8 +180,6 @@ public class ParametrizedJarUrlTests extends BrowserTest{
ProcessResult pr = server.executeJavawsHeadless(null, "/ParametrizedJarUrl1.jnlp");
String s = "Good simple javaws exapmle";
Assert.assertTrue("ParametrizedJarUrl1 stdout should contain " + s + " but didn't", pr.stdout.contains(s));
- String ss = "xception";
- Assert.assertFalse("ParametrizedJarUrl1 stderr should not contains " + ss + " but did", pr.stderr.contains(ss));
}
@Test
@@ -202,8 +187,6 @@ public class ParametrizedJarUrlTests extends BrowserTest{
ProcessResult pr = server.executeJavawsHeadless(null, "/ParametrizedJarUrl2.jnlp");
String s = "Good simple javaws exapmle";
Assert.assertTrue("ParametrizedJarUrl2 stdout should contain " + s + " but didn't", pr.stdout.contains(s));
- String ss = "xception";
- Assert.assertFalse("ParametrizedJarUrl2 stderr should not contains " + ss + " but did", pr.stderr.contains(ss));
}
@Test
@@ -211,8 +194,6 @@ public class ParametrizedJarUrlTests extends BrowserTest{
ProcessResult pr = server.executeJavawsHeadless(null, "/ParametrizedJarUrl2.jnlp?test=123456");
String s = "Good simple javaws exapmle";
Assert.assertTrue("ParametrizedJarUrl2 stdout should contain " + s + " but didn't", pr.stdout.contains(s));
- String ss = "xception";
- Assert.assertFalse("ParametrizedJarUrl2 stderr should not contains " + ss + " but did", pr.stderr.contains(ss));
;
}
@@ -225,13 +206,6 @@ public class ParametrizedJarUrlTests extends BrowserTest{
Assert.assertTrue("AppletTest stdout should contain " + s1 + " but didn't", pr.stdout.contains(s1));
String s2 = "value2";
Assert.assertTrue("AppletTest stdout should contain " + s2 + " but didn't", pr.stdout.contains(s2));
-// This is to strict, each browser is killing as it wish
-// String s4 = "applet was stopped";
-// Assert.assert("AppletTest stdout shouldn't contains " + s4 + " but did", pr.stdout.contains(s4));
-// String s5 = "applet will be destroyed";
-// Assert.assert("AppletTest stdout shouldn't contains " + s5 + " but did", pr.stdout.contains(s5));
- String ss = "xception";
- Assert.assertFalse("AppletTest stderr should not contains " + ss + " but did", pr.stderr.contains(ss));
String s7 = "Aplet killing himself after 2000 ms of life";
Assert.assertTrue("AppletTest stdout should contain " + s7 + " but didn't", pr.stdout.contains(s7));
}
diff --git a/tests/reproducers/simple/Spaces can be everywhere/testcases/SpacesCanBeEverywhereTests.java b/tests/reproducers/simple/Spaces can be everywhere/testcases/SpacesCanBeEverywhereTests.java
index a3a2b92..be47347 100644
--- a/tests/reproducers/simple/Spaces can be everywhere/testcases/SpacesCanBeEverywhereTests.java
+++ b/tests/reproducers/simple/Spaces can be everywhere/testcases/SpacesCanBeEverywhereTests.java
@@ -36,7 +36,9 @@ exception statement from your version.
*/
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.List;
+import net.sourceforge.jnlp.ContentReaderListener;
import net.sourceforge.jnlp.ProcessResult;
import net.sourceforge.jnlp.ServerAccess;
import net.sourceforge.jnlp.annotations.Bug;
@@ -44,13 +46,14 @@ import net.sourceforge.jnlp.annotations.NeedsDisplay;
import net.sourceforge.jnlp.browsertesting.BrowserTest;
import net.sourceforge.jnlp.browsertesting.Browsers;
import net.sourceforge.jnlp.annotations.TestInBrowsers;
+import net.sourceforge.jnlp.closinglisteners.StringBasedClosingListener;
import org.junit.Assert;
import org.junit.Test;
@Bug(id={"http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2011-October/016127.html","PR804","PR811"})
public class SpacesCanBeEverywhereTests extends BrowserTest {
-
+public static final String s = "Spaces can be everywhere.jsr was launched correctly";
@Bug(id="PR811")
@Test
@NeedsDisplay
@@ -83,10 +86,7 @@ public class SpacesCanBeEverywhereTests extends BrowserTest {
* only on ocal files, and probably only from test run - it can be ignored
*/
ProcessResult pr = ServerAccess.executeProcess(commands);
- String s="Spaces can be everywhere.jsr was launched correctly";
Assert.assertTrue("stdout should contains `"+s+"`, but did not",pr.stdout.contains(s));
- String cc = "xception";
- Assert.assertFalse("stderr should NOT contains `" + cc + "`, but did", pr.stderr.contains(cc));
Assert.assertFalse("should not be terminated, but was", pr.wasTerminated);
Assert.assertEquals((Integer) 0, pr.returnValue);
}
@@ -96,11 +96,8 @@ public class SpacesCanBeEverywhereTests extends BrowserTest {
@NeedsDisplay
public void SpacesCanBeEverywhereRemoteAppletTestsJnlp2() throws Exception {
ProcessResult pr = server.executeJavaws("/NotOnly%20spaces%20can%20kill%20%C4%9B%C5%A1%C4%8D%C5%99%C5%BE%20too.jnlp");
- String s="Spaces can be everywhere.jsr was launched correctly";
Assert.assertTrue("stdout should contains `"+s+"`, but did not",pr.stdout.contains(s));
- String cc = "xception";
- Assert.assertFalse("stderr should NOT contains `" + cc + "`, but did", pr.stderr.contains(cc));
- Assert.assertFalse("should NOT be terminated, but was not", pr.wasTerminated);
+ Assert.assertFalse("should NOT be terminated, but was", pr.wasTerminated);
}
@Bug(id="PR811")
@@ -108,11 +105,8 @@ public class SpacesCanBeEverywhereTests extends BrowserTest {
@NeedsDisplay
@TestInBrowsers(testIn = {Browsers.all})
public void SpacesCanBeEverywhereRemoteAppletTestsHtml2() throws Exception {
- ProcessResult pr = server.executeBrowser("/spaces+applet+Tests.html");
- String s="Spaces can be everywhere.jsr was launched correctly";
+ ProcessResult pr = server.executeBrowser("/spaces+applet+Tests.html", Arrays.asList(new ContentReaderListener[] {new StringBasedClosingListener(s)}), null);
Assert.assertTrue("stdout should contains `"+s+"`, but did not",pr.stdout.contains(s));
- String cc = "xception";
- Assert.assertFalse("stderr should NOT contains `" + cc + "`, but did", pr.stderr.contains(cc));
Assert.assertTrue("should be terminated, but was not", pr.wasTerminated);
}
@@ -133,7 +127,6 @@ public class SpacesCanBeEverywhereTests extends BrowserTest {
@Test
public void SpacesCanBeEverywhereRemoteTests2() throws Exception {
ProcessResult pr = server.executeJavawsHeadless(null, "/Spaces%20can%20be%20everywhere2.jnlp");
- String s="Spaces can be everywhere.jsr was launched correctly";
Assert.assertTrue("stdout should contains `"+s+"`, but did not",pr.stdout.contains(s));
String cc = "ClassNotFoundException";
Assert.assertFalse("stderr should NOT contains `" + cc + "`, but did", pr.stderr.contains(cc));
@@ -145,7 +138,6 @@ public class SpacesCanBeEverywhereTests extends BrowserTest {
@Test
public void SpacesCanBeEverywhereRemoteTests2_withQuery1() throws Exception {
ProcessResult pr = server.executeJavawsHeadless(null, "/Spaces%20can%20be%20everywhere2.jnlp?test=10");
- String s="Spaces can be everywhere.jsr was launched correctly";
Assert.assertTrue("stdout should contains `"+s+"`, but did not",pr.stdout.contains(s));
String cc = "ClassNotFoundException";
Assert.assertFalse("stderr should NOT contains `" + cc + "`, but did", pr.stderr.contains(cc));
@@ -158,7 +150,6 @@ public class SpacesCanBeEverywhereTests extends BrowserTest {
@Test
public void SpacesCanBeEverywhereRemoteTests2_withQuery2() throws Exception {
ProcessResult pr = server.executeJavawsHeadless(null, "/Spaces%20can%20be%20everywhere2.jnlp?test%3D10");
- String s="Spaces can be everywhere.jsr was launched correctly";
Assert.assertTrue("stdout should contains `"+s+"`, but did not",pr.stdout.contains(s));
String cc = "ClassNotFoundException";
Assert.assertFalse("stderr should NOT contains `" + cc + "`, but did", pr.stderr.contains(cc));
@@ -170,7 +161,6 @@ public class SpacesCanBeEverywhereTests extends BrowserTest {
@Test
public void SpacesCanBeEverywhereRemoteTests3() throws Exception {
ProcessResult pr = server.executeJavawsHeadless(null, "/SpacesCanBeEverywhere1.jnlp");
- String s="Spaces can be everywhere.jsr was launched correctly";
Assert.assertTrue("stdout should contains `"+s+"`, but did not",pr.stdout.contains(s));
String cc = "ClassNotFoundException";
Assert.assertFalse("stderr should NOT contains `" + cc + "`, but did", pr.stderr.contains(cc));
@@ -203,7 +193,6 @@ public class SpacesCanBeEverywhereTests extends BrowserTest {
commands.add(ServerAccess.HEADLES_OPTION);
commands.add("Spaces can be everywhere2.jnlp");
ProcessResult pr = ServerAccess.executeProcess(commands,server.getDir());
- String s="Spaces can be everywhere.jsr was launched correctly";
Assert.assertTrue("stdout should contains `"+s+"`, but did not",pr.stdout.contains(s));
String cc = "ClassNotFoundException";
Assert.assertFalse("stderr should NOT contains `" + cc + "`, but did", pr.stderr.contains(cc));
@@ -219,7 +208,6 @@ public class SpacesCanBeEverywhereTests extends BrowserTest {
commands.add(ServerAccess.HEADLES_OPTION);
commands.add(server.getDir()+"/Spaces can be everywhere2.jnlp");
ProcessResult pr = ServerAccess.executeProcess(commands);
- String s="Spaces can be everywhere.jsr was launched correctly";
Assert.assertTrue("stdout should contains `"+s+"`, but did not",pr.stdout.contains(s));
String cc = "ClassNotFoundException";
Assert.assertFalse("stderr should NOT contains `" + cc + "`, but did", pr.stderr.contains(cc));
@@ -235,7 +223,6 @@ public class SpacesCanBeEverywhereTests extends BrowserTest {
commands.add(ServerAccess.HEADLES_OPTION);
commands.add("SpacesCanBeEverywhere1.jnlp");
ProcessResult pr = ServerAccess.executeProcess(commands,server.getDir());
- String s="Spaces can be everywhere.jsr was launched correctly";
Assert.assertTrue("stdout should contains `"+s+"`, but did not",pr.stdout.contains(s));
String cc = "ClassNotFoundException";
Assert.assertFalse("stderr should NOT contains `" + cc + "`, but did", pr.stderr.contains(cc));
diff --git a/tests/reproducers/simple/deadlocktest/testcases/DeadLockTestTest.java b/tests/reproducers/simple/deadlocktest/testcases/DeadLockTestTest.java
index b3445d6..e18a6ba 100644
--- a/tests/reproducers/simple/deadlocktest/testcases/DeadLockTestTest.java
+++ b/tests/reproducers/simple/deadlocktest/testcases/DeadLockTestTest.java
@@ -205,8 +205,6 @@ public class DeadLockTestTest {
private void assertDeadlockTestLaunched(ProcessResult pr) {
String s = "Deadlock test started";
Assert.assertTrue("Deadlock test should print out " + s + ", but did not", pr.stdout.contains(s));
- String ss = "xception";
- Assert.assertFalse("Deadlock test should not stderr " + ss + " but did", pr.stderr.contains(ss));
//each 3500 seconds deadlock test stdout something
//timeout is 20s
//so it should write out FIVE sentences, but is mostly just three or four. Last is nearly always consumed by termination
diff --git a/tests/reproducers/simple/encodingTestsĚŠČŘŽÝÁÍÉĚÉŘŤÝÚŮÍÓÁŠĎŽŹŇ/testcases/EncodingTestTest.java b/tests/reproducers/simple/encodingTestsĚŠČŘŽÝÁÍÉĚÉŘŤÝÚŮÍÓÁŠĎŽŹŇ/testcases/EncodingTestTest.java
index 53b0bbb..7e6a311 100644
--- a/tests/reproducers/simple/encodingTestsĚŠČŘŽÝÁÍÉĚÉŘŤÝÚŮÍÓÁŠĎŽŹŇ/testcases/EncodingTestTest.java
+++ b/tests/reproducers/simple/encodingTestsĚŠČŘŽÝÁÍÉĚÉŘŤÝÚŮÍÓÁŠĎŽŹŇ/testcases/EncodingTestTest.java
@@ -195,8 +195,6 @@ public class EncodingTestTest extends BrowserTest {
ProcessResult pr = server.executeJavawsHeadless(verboseArg, "/encodingTest1-" + encoding + ".jnlp");
String s = "Good simple javaws exapmle";
Assert.assertTrue("encodingTest1 (in " + encoding + ") stdout should contain " + s + " bud didn't", pr.stdout.contains(s));
- String ss = "xception";
- Assert.assertFalse("encodingTest1 (in " + encoding + ") stderr should not contain " + ss + " but did", pr.stderr.contains(ss));
//javaws in verbose mode is printing out readed jnlp. I'm no sure if the following test is relevant
Assert.assertTrue("encodingTest1 (in " + encoding + ") stdout should contain " + arg + " bud didn't", pr.stdout.contains(arg));
}
@@ -208,8 +206,6 @@ public class EncodingTestTest extends BrowserTest {
ProcessResult pr = server.executeJavawsHeadless(verboseArg, "/encodingTest2ĚŠČŘŽÝÁÍÉĚÉŘŤÝÚŮÍÓÁŠĎŽŹŇ-" + encoding + ".jnlp");
String s = "Good simple javaws exapmle";
Assert.assertTrue("encodingTest2ĚŠČŘŽÝÁÍÉĚÉŘŤÝÚŮÍÓÁŠĎŽŹŇ (in " + encoding + ") stdout should contain " + s + " bud didn't", pr.stdout.contains(s));
- String ss = "xception";
- Assert.assertFalse("encodingTest2ĚŠČŘŽÝÁÍÉĚÉŘŤÝÚŮÍÓÁŠĎŽŹŇ (in " + encoding + ") stderr should not contain " + ss + " but did", pr.stderr.contains(ss));
//javaws in verbose mode is printing out readed jnlp. I'm no sure if the following test is relevant
Assert.assertTrue("encodingTest2ĚŠČŘŽÝÁÍÉĚÉŘŤÝÚŮÍÓÁŠĎŽŹŇ (in " + encoding + ") stdout should contain " + arg + " bud didn't", pr.stdout.contains(arg));
}
@@ -223,8 +219,6 @@ public class EncodingTestTest extends BrowserTest {
String s = "Encoded jar decoded correctly";
Assert.assertTrue("encodingTest3 (in " + encoding + ") stdout should contain " + s + " bud didn't", pr.stdout.contains(s));
Assert.assertTrue("encodingTest3 (in " + encoding + ") stdout should contain " + arg + " bud didn't", pr.stdout.contains(arg));
- String ss = "xception";
- Assert.assertFalse("encodingTest3 (in " + encoding + ") stderr should not contain " + ss + " but did", pr.stderr.contains(ss));
}
/**
@@ -237,8 +231,6 @@ public class EncodingTestTest extends BrowserTest {
String s0 = "applet was started";
Assert.assertTrue("encodingTest4 stdout should contains " + s0 + " bud didn't", pr.stdout.contains(s3));
Assert.assertTrue("encodingTest4 (in " + encoding + ") stdout should contain " + arg + " bud didn't", pr.stdout.contains(arg));
- String ss = "xception";
- Assert.assertFalse("encodingTest4 (in " + encoding + ") stderr should not contain " + ss + " but did", pr.stderr.contains(ss));
}
/**
@@ -252,7 +244,5 @@ public class EncodingTestTest extends BrowserTest {
String s0 = "applet was started";
Assert.assertTrue("encodingTest5 stdout should contains " + s0 + " bud didn't", pr.stdout.contains(s3));
Assert.assertTrue("encodingTest5 (in " + encoding + ") stdout should contain " + arg + " bud didn't", pr.stdout.contains(arg));
- String ss = "xception";
- Assert.assertFalse("encodingTest5 (in " + encoding + ") stderr should not contain " + ss + " but did", pr.stderr.contains(ss));
}
}
diff --git a/tests/reproducers/simple/simpletest1/testcases/SimpleTest1Test.java b/tests/reproducers/simple/simpletest1/testcases/SimpleTest1Test.java
index 5cb6974..1c2c494 100644
--- a/tests/reproducers/simple/simpletest1/testcases/SimpleTest1Test.java
+++ b/tests/reproducers/simple/simpletest1/testcases/SimpleTest1Test.java
@@ -68,7 +68,8 @@ public class SimpleTest1Test {
if (negate) {
Assert.assertTrue("testSimpletest1lunchOk stderr should contains " + ss + " but didn't", pr.stderr.contains(ss));
} else {
- Assert.assertFalse("testSimpletest1lunchOk stderr should not contains " + ss + " but did", pr.stderr.contains(ss));
+ //disabled, unnecessary exceptions may occure
+ //Assert.assertFalse("testSimpletest1lunchOk stderr should not contains " + ss + " but did", pr.stderr.contains(ss));
}
Assert.assertFalse(pr.wasTerminated);
Assert.assertEquals((Integer) 0, pr.returnValue);