/hg/release/icedtea-web-1.6: 2 new changesets

jvanek at icedtea.classpath.org jvanek at icedtea.classpath.org
Wed Jan 27 16:04:47 UTC 2016


changeset 24ae6bdef1fb in /hg/release/icedtea-web-1.6
details: http://icedtea.classpath.org/hg/release/icedtea-web-1.6?cmd=changeset;node=24ae6bdef1fb
author: Jiri Vanek <jvanek at redhat.com>
date: Tue Jan 26 14:20:39 2016 +0100

	Revisited some jnlp_href tests.


changeset 263e152a6084 in /hg/release/icedtea-web-1.6
details: http://icedtea.classpath.org/hg/release/icedtea-web-1.6?cmd=changeset;node=263e152a6084
author: Jiri Vanek <jvanek at redhat.com>
date: Tue Jan 26 15:18:30 2016 +0100

	Messages for Invalid JDK dialog improved a bit.


diffstat:

 ChangeLog                                                                                                            |   25 +
 netx/net/sourceforge/jnlp/resources/Messages.properties                                                              |    4 +-
 netx/net/sourceforge/jnlp/resources/Messages_cs.properties                                                           |    4 +-
 netx/net/sourceforge/jnlp/resources/Messages_de.properties                                                           |    4 +-
 netx/net/sourceforge/jnlp/resources/Messages_pl.properties                                                           |    4 +-
 tests/reproducers/signed/ClasspathManifestTest/testcases/ClasspathManifestTest.java                                  |  190 +++++++--
 tests/reproducers/signed/CodeBaseManifestEntrySignedMatching/testcases/CodeBaseManifestEntrySignedMatching.java      |    2 -
 tests/reproducers/signed/CodeBaseManifestEntrySignedMatching/testcases/CodeBaseManifestEntrySignedNotMatching.java   |   10 +-
 tests/reproducers/signed/CodeBaseManifestEntrySignedMatching/testcases/CodeBaseManifestEntryUnsignedMatching.java    |   10 +-
 tests/reproducers/signed/CodeBaseManifestEntrySignedMatching/testcases/CodeBaseManifestEntryUnsignedNotMatching.java |   10 +-
 tests/reproducers/simple/SingleInstanceServiceTest/testcases/SingleInstanceTest.java                                 |   14 +
 11 files changed, 204 insertions(+), 73 deletions(-)

diffs (truncated from 552 to 500 lines):

diff -r 530bb97e9f08 -r 263e152a6084 ChangeLog
--- a/ChangeLog	Wed Jan 27 17:03:41 2016 +0100
+++ b/ChangeLog	Tue Jan 26 15:18:30 2016 +0100
@@ -1,3 +1,28 @@
+2016-01-26  Jiri Vanek <jvanek at redhat.com>
+
+	Messages for Invalid JDK dialog improved a bit.
+	* netx/net/sourceforge/jnlp/resources/Messages.properties:
+	* netx/net/sourceforge/jnlp/resources/Messages_cs.properties:
+	* netx/net/sourceforge/jnlp/resources/Messages_de.properties:
+	* netx/net/sourceforge/jnlp/resources/Messages_pl.properties:
+
+2016-01-26  Jiri Vanek <jvanek at redhat.com>
+
+	Revisited some jnlp_href tests. 
+	* tests/reproducers/signed/ClasspathManifestTest/testcases/ClasspathManifestTest.java:
+	explained why localtests on "." are passing (removed KnownToFail) and added
+	(correctly failing) tests in various dirs
+	* tests/reproducers/signed/CodeBaseManifestEntrySignedMatching/testcases/CodeBaseManifestEntrySignedMatching.java:
+	used diamond
+	* tests/reproducers/signed/CodeBaseManifestEntrySignedMatching/testcases/CodeBaseManifestEntrySignedNotMatching.java:
+	same
+	* tests/reproducers/signed/CodeBaseManifestEntrySignedMatching/testcases/CodeBaseManifestEntryUnsignedMatching.java:
+	same
+	* tests/reproducers/signed/CodeBaseManifestEntrySignedMatching/testcases/CodeBaseManifestEntryUnsignedNotMatching.java:
+	same
+	* tests/reproducers/simple/SingleInstanceServiceTest/testcases/SingleInstanceTest.java:
+	fixed midori incompatible tests
+
 2016-01-25  Jiri Vanek <jvanek at redhat.com>
 
 	Fixed various cosmetic NPEs when codebase is null (+tests)
diff -r 530bb97e9f08 -r 263e152a6084 netx/net/sourceforge/jnlp/resources/Messages.properties
--- a/netx/net/sourceforge/jnlp/resources/Messages.properties	Wed Jan 27 17:03:41 2016 +0100
+++ b/netx/net/sourceforge/jnlp/resources/Messages.properties	Tue Jan 26 15:18:30 2016 +0100
@@ -582,8 +582,8 @@
 CPJVMnoRtJar=Error, the directory you chose does not contain lib/rt.jar
 CPJVMrtJar=Ok, the directory you chose contains lib/rt.jar.
 CPJVMPluginAllowTTValidation=Validate JRE immediately
-CPJVMNotokMessage1=You have entered invalid JDK value <u>({0})</u> with following error message:
-CPJVMNotokMessage2=You might be seeing this message because: <blockquote> * Some validity tests have not been passed<br/> * Non-OpenJDK is detected</blockquote>With invalid JDK IcedTea-Web will probably not be able to start.<br/>You will have to modify or remove <u>{0}</u> property in your configuration file <u>{1}</u>. <br/>You should try to search for OpenJDK in your system or be sure you know what you are doing.
+CPJVMNotokMessage1=You have entered invalid JDK value: <ul><li><span color=''purple''>{0}</span></li></ul> with following error message:
+CPJVMNotokMessage2=You might be seeing this message because: <blockquote> * Some validity tests have not been passed<br/> * Non-OpenJDK is detected</blockquote>With invalid JDK IcedTea-Web will probably not be able to start.<br/><span color=''orange''>If it will break</span>, you have to modify or remove <u>{0}</u> property in your configuration file:  <ul><li><span color=''blue''>{1}</span></li></ul> You should  <span color=''green''><i>trust yours admin</i></span> or at least try to search for OpenJDK in your system or be sure you know what you are doing.
 CPJVMconfirmInvalidJdkTitle=Confirm invalid JDK
 CPJVMconfirmReset=Reset to default?
 CPPolicyDetail=View or edit your user-level Java Policy File. This allows you to grant or deny runtime permissions to applets regardless of the standard security sandboxing rules.
diff -r 530bb97e9f08 -r 263e152a6084 netx/net/sourceforge/jnlp/resources/Messages_cs.properties
--- a/netx/net/sourceforge/jnlp/resources/Messages_cs.properties	Wed Jan 27 17:03:41 2016 +0100
+++ b/netx/net/sourceforge/jnlp/resources/Messages_cs.properties	Tue Jan 26 15:18:30 2016 +0100
@@ -537,8 +537,8 @@
 CPJVMnoRtJar=Chyba: adres\u00e1\u0159, kter\u00fd jste vybrali, neobsahuje podadres\u00e1\u0159 a soubor \u201elib/rt.jar\u201c.
 CPJVMrtJar=OK, adres\u00e1\u0159, kter\u00fd jste vybrali, obsahuje podadres\u00e1\u0159 a soubor \u201elib/rt.jar\u201c.
 CPJVMPluginAllowTTValidation=Ov\u011b\u0159it prost\u0159ed\u00ed JRE ihned
-CPJVMNotokMessage1=Zadali jste neplatnou hodnotu <u>({0})</u> prost\u0159ed\u00ed JDK. Chybov\u00e1 zpr\u00e1va:
-CPJVMNotokMessage2=Tuto zpr\u00e1vu vid\u00edte pravd\u011bpodobn\u011b proto\u017ee: <blockquote> * V\u00e1\u0161 syst\u00e9m nepro\u0161el n\u011bkter\u00fdm z ov\u011b\u0159ovac\u00edch test\u016f<br/> * Bylo detekov\u00e1no jin\u00e9 prost\u0159ed\u00ed ne\u017e OpenJDK</blockquote>S neplatn\u00fdm prost\u0159ed\u00edm JDK nebude se pravd\u011bpodobn\u011b nebude aplikace IcedTea-Web schopna spustit.<br/>Budete muset upravit nebo odstranit vlastnost <u>{0}</u> ve va\u0161em konfigura\u010dn\u00edm souboru <u>{1}</u>. <br/> M\u011bli byste ve sv\u00e9m syst\u00e9mu nal\u00e9zt prost\u0159ed\u00ed OpenJDK, nebo byste m\u011bli dob\u0159e v\u011bd\u011bt, co d\u011bl\u00e1te.
+CPJVMNotokMessage1=Zadali jste neplatnou hodnotu: <ul><li><span color=''purple''>{0}</span></li></ul>  prost\u0159ed\u00ed JDK. Chybov\u00e1 zpr\u00e1va:
+CPJVMNotokMessage2=Tuto zpr\u00e1vu vid\u00edte pravd\u011bpodobn\u011b proto\u017ee: <blockquote> * V\u00e1\u0161 syst\u00e9m nepro\u0161el n\u011bkter\u00fdm z ov\u011b\u0159ovac\u00edch test\u016f<br/> * Bylo detekov\u00e1no jin\u00e9 prost\u0159ed\u00ed ne\u017e OpenJDK</blockquote>S neplatn\u00fdm prost\u0159ed\u00edm JDK nebude se pravd\u011bpodobn\u011b nebude aplikace IcedTea-Web schopna spustit.<br/><span color=''orange''>Pokud se ITW rozbije</span>, pudete muset upravit nebo odstranit vlastnost  <ul><li><span color=''blue''>{1}</span></li></ul> ve va\u0161em konfigura\u010dn\u00edm souboru <u>{1}</u>. <br/> <span color=''green''><i>Rad\u011bji v\u011b\u0159te sv\u00e9mu adminovi, </i></span> nebo aleso\u0148 ve sv\u00e9m syst\u00e9mu najd\u011bte prost\u0159ed\u00ed OpenJDK, nebo byste m\u011bli dob\u0159e v\u011bd\u011bt, co d\u011bl\u00e1te.
 CPJVMconfirmInvalidJdkTitle=Potvrzen\u00ed neplatn\u00e9ho prost\u0159ed\u00ed JDK
 CPJVMconfirmReset=Obnovit v\u00fdchoz\u00ed nastaven\u00ed?
 CPPolicyDetail=Zobrazen\u00ed nebo upravov\u00e1n\u00ed va\u0161eho u\u017eivatelsk\u00e9ho souboru se z\u00e1sadami prost\u0159ed\u00ed Java: Toto nastaven\u00ed v\u00e1m umo\u017en\u00ed ud\u011blit nebo odep\u0159\u00edt opr\u00e1vn\u011bn\u00ed modulu runtime pro aplet bez ohledu na standardn\u00ed bezpe\u010dnostn\u00ed pravidla pro pr\u00e1ci v izolovan\u00e9m prostoru (sandbox).
diff -r 530bb97e9f08 -r 263e152a6084 netx/net/sourceforge/jnlp/resources/Messages_de.properties
--- a/netx/net/sourceforge/jnlp/resources/Messages_de.properties	Wed Jan 27 17:03:41 2016 +0100
+++ b/netx/net/sourceforge/jnlp/resources/Messages_de.properties	Tue Jan 26 15:18:30 2016 +0100
@@ -578,8 +578,8 @@
 CPJVMnoRtJar=Fehler: Das gew\u00e4hlte Verzeichnis enth\u00e4lt lib/rt.jar nicht.
 CPJVMrtJar=Das Verzeichnis enth\u00e4lt lib/rt.jar.
 CPJVMPluginAllowTTValidation=JRE sofort pr\u00fcfen
-CPJVMNotokMessage1=Es wurde der ung\u00fcltige JDK-Wert <u>({0})</u> mit folgender Fehlermeldung eingegeben:
-CPJVMNotokMessage2=M\u00f6gliche Gr\u00fcnde f\u00fcr diese Meldung sind:<blockquote> * Einige Pr\u00fcftests wurden nicht bestanden<br/> * Es wurde kein OpenJDK erkannt</blockquote>Wegen eines ungeeigneten JDKs wird IcedTea-Web wahrscheinlich nicht starten k\u00f6nnen.<br/>Die Eigenschaft <u>{0}</u> in der Konfigurationsdatei <u>{1}</u> m\u00fcsste angepasst oder entfernt werden.<br/>Es wird empfohlen nach OpenJDK auf diesem System zu suchen.
+CPJVMNotokMessage1=Es wurde der ung\u00fcltige JDK-Wert  <ul><li><span color=''purple''>{0}</span></li></ul> mit folgender Fehlermeldung eingegeben:
+CPJVMNotokMessage2=M\u00f6gliche Gr\u00fcnde f\u00fcr diese Meldung sind:<blockquote> * Einige Pr\u00fcftests wurden nicht bestanden<br/> * Es wurde kein OpenJDK erkannt</blockquote>Wegen eines ungeeigneten JDKs wird IcedTea-Web wahrscheinlich nicht starten k\u00f6nnen.<br/>Die Eigenschaft <u>{0}</u> in der Konfigurationsdatei  <ul><li><span color=''blue''>{1}</span></li></ul> m\u00fcsste angepasst oder entfernt werden.<br/>Es wird empfohlen nach OpenJDK auf diesem System zu suchen.
 CPJVMconfirmInvalidJdkTitle=Ungeeignetes JDK
 CPJVMconfirmReset=Auf Standard zur\u00fccksetzen?
 CPPolicyDetail=Die Java-Richtliniendatei des aktuellen Benutzers anschauen und bearbeiten.<br/>Dies erlaubt Laufzeitberechtigungen an Applets zu gew\u00e4hren oder abzulehnen, unabh\u00e4ngig von den Sandbox-Standardsicherheitsregeln.
diff -r 530bb97e9f08 -r 263e152a6084 netx/net/sourceforge/jnlp/resources/Messages_pl.properties
--- a/netx/net/sourceforge/jnlp/resources/Messages_pl.properties	Wed Jan 27 17:03:41 2016 +0100
+++ b/netx/net/sourceforge/jnlp/resources/Messages_pl.properties	Tue Jan 26 15:18:30 2016 +0100
@@ -423,8 +423,8 @@
 CPJVMnoRtJar=B\u0142\u0105d: Wybrana \u015bcie\u017cka nie zawiera lib/rt.jar.
 CPJVMrtJar=Wybrana \u015bcie\u017cka zawiera lib/rt.jar.
 CPJVMPluginAllowTTValidation=Sprawd\u017a JRE bezzw\u0142ocznie
-CPJVMNotokMessage1=Wprowadzono nieprawid\u0142ow\u0105 warto\u015b\u0107 JDK <u>({0})</u> z nast\u0119puj\u0105cym komunikatem o b\u0142\u0119dzie:
-CPJVMNotokMessage2=Przyczyn\u0105 tego komunikatu mog\u0105 by\u0107:<blockquote> * Nie zaliczono niekt\u00f3rych sprawdzian\u00f3w<br/> * Wykryto inny ni\u017c OpenJDK</blockquote>Ze wzgl\u0119du na nieprawid\u0142owy JDK IcedTea-Web prawdopodobnie nie b\u0119dzie w stanie wystartowa\u0107.<br/>Trzeba b\u0119dzie dostosowa\u0107 lub usun\u0105\u0107 w\u0142a\u015bciwo\u015b\u0107 \u201e<u>{0}</u>\u201d w pliku konfiguracyjnym \u201e<u>{1}</u>\u201d.<br/>Przeszukaj system za OpenJDK.
+CPJVMNotokMessage1=Wprowadzono nieprawid\u0142ow\u0105 warto\u015b\u0107 JDK  <ul><li><span color=''purple''>{0}</span></li></ul> z nast\u0119puj\u0105cym komunikatem o b\u0142\u0119dzie:
+CPJVMNotokMessage2=Przyczyn\u0105 tego komunikatu mog\u0105 by\u0107:<blockquote> * Nie zaliczono niekt\u00f3rych sprawdzian\u00f3w<br/> * Wykryto inny ni\u017c OpenJDK</blockquote>Ze wzgl\u0119du na nieprawid\u0142owy JDK IcedTea-Web prawdopodobnie nie b\u0119dzie w stanie wystartowa\u0107.<br/>Trzeba b\u0119dzie dostosowa\u0107 lub usun\u0105\u0107 w\u0142a\u015bciwo\u015b\u0107 \u201e<u>{0}</u>\u201d w pliku konfiguracyjnym  <ul><li><span color=''blue''>{1}</span></li></ul><br/>Przeszukaj system za OpenJDK.
 CPJVMconfirmInvalidJdkTitle=Nieprawid\u0142owy JDK
 CPJVMconfirmReset=Przywr\u00f3ci\u0107 stan domy\u015blny?
 CPPolicyDetail=Przegl\u0105daj i edytuj plik u\u017cytkownika wytycznej Java. Pozwala na udzielanie lub odmawianie praw applet-om, niezale\u017cnie od standardowych regu\u0142 bezpiecze\u0144stwa piaskownicy.
diff -r 530bb97e9f08 -r 263e152a6084 tests/reproducers/signed/ClasspathManifestTest/testcases/ClasspathManifestTest.java
--- a/tests/reproducers/signed/ClasspathManifestTest/testcases/ClasspathManifestTest.java	Wed Jan 27 17:03:41 2016 +0100
+++ b/tests/reproducers/signed/ClasspathManifestTest/testcases/ClasspathManifestTest.java	Tue Jan 26 15:18:30 2016 +0100
@@ -1,59 +1,74 @@
 /* ClasspathManifestTest.java
-Copyright (C) 2012 Red Hat, Inc.
+ Copyright (C) 2012 Red Hat, Inc.
 
-This file is part of IcedTea.
+ This file is part of IcedTea.
 
-IcedTea is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License as published by
-the Free Software Foundation, version 2.
+ IcedTea is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, version 2.
 
-IcedTea is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-General Public License for more details.
+ IcedTea is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ General Public License for more details.
 
-You should have received a copy of the GNU General Public License
-along with IcedTea; see the file COPYING.  If not, write to
-the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-02110-1301 USA.
+ You should have received a copy of the GNU General Public License
+ along with IcedTea; see the file COPYING.  If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301 USA.
 
-Linking this library statically or dynamically with other modules is
-making a combined work based on this library.  Thus, the terms and
-conditions of the GNU General Public License cover the whole
-combination.
+ Linking this library statically or dynamically with other modules is
+ making a combined work based on this library.  Thus, the terms and
+ conditions of the GNU General Public License cover the whole
+ combination.
 
-As a special exception, the copyright holders of this library give you
-permission to link this library with independent modules to produce an
-executable, regardless of the license terms of these independent
-modules, and to copy and distribute the resulting executable under
-terms of your choice, provided that you also meet, for each linked
-independent module, the terms and conditions of the license of that
-module.  An independent module is a module which is not derived from
-or based on this library.  If you modify this library, you may extend
-this exception to your version of the library, but you are not
-obligated to do so.  If you do not wish to do so, delete this
-exception statement from your version.
+ As a special exception, the copyright holders of this library give you
+ permission to link this library with independent modules to produce an
+ executable, regardless of the license terms of these independent
+ modules, and to copy and distribute the resulting executable under
+ terms of your choice, provided that you also meet, for each linked
+ independent module, the terms and conditions of the license of that
+ module.  An independent module is a module which is not derived from
+ or based on this library.  If you modify this library, you may extend
+ this exception to your version of the library, but you are not
+ obligated to do so.  If you do not wish to do so, delete this
+ exception statement from your version.
  */
 
+import java.io.File;
+import java.io.IOException;
 import java.util.ArrayList;
 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.TestInBrowsers;
 import net.sourceforge.jnlp.browsertesting.BrowserTest;
 import net.sourceforge.jnlp.browsertesting.Browsers;
+import net.sourceforge.jnlp.browsertesting.browsers.firefox.FirefoxProfilesOperator;
+import net.sourceforge.jnlp.util.FileUtils;
+import org.junit.AfterClass;
 
 import org.junit.Assert;
+import org.junit.BeforeClass;
 import org.junit.Test;
 
 public class ClasspathManifestTest extends BrowserTest {
 
-    private static String s1 = "Searching for CheckForClasspath.";
-    private static String s2 = "CheckForClasspath found on classpath.";
-    private static String ss = "xception";
+    private static final String s1 = "Searching for CheckForClasspath.";
+    private static final String s2 = "CheckForClasspath found on classpath.";
+    private static final String ss = "xception";
+
+    private static final String n1 = "ClasspathManifestJNLPHrefTest.html";
+    private static final String n4 = "ClasspathManifestApplicationTest.jnlp";
+    private static final String n2 = "ClasspathManifestAppletTest.jnlp";
+    private static final String n3 = "ClasspathManifestAppletTest.html";
+    private static final String[] ns = new String[]{n1, n2, n3, n4};
+    private static final String n0 = "ClasspathManifestTest.jar";
+
+    private static File newRoot;
+    private static File newRoot1;
 
     public void checkAppFails(ProcessResult pr, String testName) {
         Assert.assertTrue("ClasspathManifest." + testName + " stdout should contain " + s1 + " but didn't", pr.stdout.contains(s1));
@@ -61,69 +76,148 @@
         Assert.assertTrue("ClasspathManifest." + testName + " stderr should contain " + ss + " but didn't", pr.stderr.contains(ss));
     }
 
+    public void checkAppPass(ProcessResult pr, String testName) {
+        Assert.assertTrue("ClasspathManifest." + testName + " stdout should contain " + s1 + " but didn't", pr.stdout.contains(s1));
+        Assert.assertTrue("ClasspathManifest." + testName + " stdout should not contain " + s2 + " but did", pr.stdout.contains(s2));
+        Assert.assertFalse("ClasspathManifest." + testName + " stderr should contain " + ss + " but didn't", pr.stderr.contains(ss));
+    }
+
+    @AfterClass
+    public static void removeAlternativeLocalDirs() throws IOException {
+        FirefoxProfilesOperator.deleteRecursively(newRoot);
+    }
+
+    @BeforeClass
+    public static void createAlternativeLocalDirs() throws IOException {
+        newRoot = File.createTempFile("itw", "ClasspathManifestTest");
+        newRoot.delete();
+        newRoot.mkdirs();
+        newRoot.deleteOnExit();
+        newRoot1 = new File(newRoot, "r1");
+        newRoot1.mkdir();
+        FirefoxProfilesOperator.copyRecursively(new File(server.getDir(), "Classpath"), newRoot);
+
+        for (String n : ns) {
+            copyTextFile(new File(server.getDir(), n), new File(newRoot, n));
+        }
+        FirefoxProfilesOperator.copyFile(new File(server.getDir(), n0), new File(newRoot1, n0));
+    }
+
+    public static void copyTextFile(File from, File to) throws IOException {
+        String s = FileUtils.loadFileAsString(from);
+//        for (String n : ns) {
+//            s = s.replaceAll(n, newRoot1.getName()+"/" + n);
+//        }
+        s = s.replaceAll(n0, newRoot1.getName() + "/" + n0);
+        FileUtils.saveFile(s, to);
+    }
+
     @NeedsDisplay
     @Test
     public void ApplicationJNLPRemoteTest() throws Exception {
-        ProcessResult pr = server.executeJavawsHeadless(null, "/ClasspathManifestApplicationTest.jnlp");
+        ProcessResult pr = server.executeJavawsHeadless(null, "/" + n4);
         checkAppFails(pr, "ApplicationJNLPRemoteTest");
     }
 
+    /**
+     * See the difference between *LocalTest() and *LocalTest_differentDir().
+     *
+     * Itw always have "." on classpath. So
+     *
+     * ./jnlp or ./html (calling to jar.jar) + ./jar.jar +
+     * ./Codebase/../second.jar are all on classapth but ./jnlp or ./html
+     * (calling to someDir/jar.jar)+ ./someDir/jar.jar +
+     * ./Codebase/../second.jar Is making the jar.jar laodable for startup, but
+     * diapearing after encauntering Class-Path: in Manifest.mf
+     *
+     * @throws Exception
+     */
     @NeedsDisplay
-    @KnownToFail
     @Test
     public void ApplicationJNLPLocalTest() throws Exception {
-        List<String> commands=new ArrayList<String>(3);
+        List<String> commands = new ArrayList<>(3);
         commands.add(server.getJavawsLocation());
         commands.add(ServerAccess.HEADLES_OPTION);
-        commands.add("ClasspathManifestApplicationTest.jnlp");
+        commands.add(n4);
         ProcessResult pr = ServerAccess.executeProcess(commands, server.getDir());
-        checkAppFails(pr, "ApplicationJNLPLocalTest");
+        checkAppPass(pr, "ApplicationJNLPLocalTest");
+    }
+
+    @NeedsDisplay
+    @Test
+    public void ApplicationJNLPLocalTest_differentDir() throws Exception {
+        List<String> commands = new ArrayList<>(3);
+        commands.add(server.getJavawsLocation());
+        commands.add(ServerAccess.HEADLES_OPTION);
+        commands.add(n4);
+        ProcessResult pr = ServerAccess.executeProcess(commands, newRoot);
+        checkAppFails(pr, "ApplicationJNLPLocalTest_differentDir");
     }
 
     @NeedsDisplay
     @Test
     public void AppletJNLPRemoteTest() throws Exception {
-        ProcessResult pr = server.executeJavawsHeadless(null, "/ClasspathManifestAppletTest.jnlp");
+        ProcessResult pr = server.executeJavawsHeadless(null, "/" + n2);
         checkAppFails(pr, "AppletJNLPRemoteTest");
     }
 
     @NeedsDisplay
-    @KnownToFail
     @Test
     public void AppletJNLPRLocalTest() throws Exception {
-        List<String> commands=new ArrayList<String>(3);
+        List<String> commands = new ArrayList<>(3);
         commands.add(server.getJavawsLocation());
         commands.add(ServerAccess.HEADLES_OPTION);
-        commands.add("ClasspathManifestAppletTest.jnlp");
+        commands.add(n2);
         ProcessResult pr = ServerAccess.executeProcess(commands, server.getDir());
-        checkAppFails(pr, "AppletJNLPRLocalTest");
+        checkAppPass(pr, "AppletJNLPRLocalTest");
+    }
+
+    @NeedsDisplay
+    @Test
+    public void AppletJNLPRLocalTest_differentDir() throws Exception {
+        List<String> commands = new ArrayList<>(3);
+        commands.add(server.getJavawsLocation());
+        commands.add(ServerAccess.HEADLES_OPTION);
+        commands.add(n2);
+        ProcessResult pr = ServerAccess.executeProcess(commands, newRoot);
+        checkAppFails(pr, "AppletJNLPRLocalTest_differentDir");
     }
 
     @NeedsDisplay
     @TestInBrowsers(testIn = {Browsers.one})
     @Test
     public void BrowserJNLPHrefRemoteTest() throws Exception {
-        ProcessResult pr = server.executeBrowser("/ClasspathManifestJNLPHrefTest.html");
+        ProcessResult pr = server.executeBrowser("/" + n1);
         checkAppFails(pr, "BrowserJNLPHrefRemoteTest");
     }
 
     @NeedsDisplay
     @TestInBrowsers(testIn = {Browsers.one})
-    @KnownToFail
     @Test
     public void BrowserJNLPHrefLocalTest() throws Exception {
-        List<String> commands=new ArrayList<String>(2);
+        List<String> commands = new ArrayList<>(2);
         commands.add(server.getBrowserLocation());
-        commands.add("ClasspathManifestJNLPHrefTest.html");
+        commands.add(n1);
         ProcessResult pr = ServerAccess.executeProcess(commands, server.getDir());
-        checkAppFails(pr, "BrowserJNLPHrefLocalTest");
+        checkAppPass(pr, "BrowserJNLPHrefLocalTest");
+    }
+
+    @NeedsDisplay
+    @TestInBrowsers(testIn = {Browsers.one})
+    @Test
+    public void BrowserJNLPHrefLocalTest_differentDir() throws Exception {
+        List<String> commands = new ArrayList<>(2);
+        commands.add(server.getBrowserLocation());
+        commands.add(n1);
+        ProcessResult pr = ServerAccess.executeProcess(commands, newRoot);
+        checkAppFails(pr, "BrowserJNLPHrefLocalTest_differentDir");
     }
 
     @NeedsDisplay
     @TestInBrowsers(testIn = {Browsers.one})
     @Test
     public void BrowserAppletRemoteTest() throws Exception {
-        ProcessResult pr = server.executeBrowser("/ClasspathManifestAppletTest.html");
+        ProcessResult pr = server.executeBrowser("/" + n3);
         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 530bb97e9f08 -r 263e152a6084 tests/reproducers/signed/CodeBaseManifestEntrySignedMatching/testcases/CodeBaseManifestEntrySignedMatching.java
--- a/tests/reproducers/signed/CodeBaseManifestEntrySignedMatching/testcases/CodeBaseManifestEntrySignedMatching.java	Wed Jan 27 17:03:41 2016 +0100
+++ b/tests/reproducers/signed/CodeBaseManifestEntrySignedMatching/testcases/CodeBaseManifestEntrySignedMatching.java	Tue Jan 26 15:18:30 2016 +0100
@@ -37,10 +37,8 @@
 
 import java.io.File;
 import java.io.IOException;
-import java.text.MessageFormat;
 import java.util.ArrayList;
 import java.util.List;
-import java.util.PropertyResourceBundle;
 import net.sourceforge.jnlp.ProcessResult;
 import net.sourceforge.jnlp.ServerAccess;
 import net.sourceforge.jnlp.annotations.NeedsDisplay;
diff -r 530bb97e9f08 -r 263e152a6084 tests/reproducers/signed/CodeBaseManifestEntrySignedMatching/testcases/CodeBaseManifestEntrySignedNotMatching.java
--- a/tests/reproducers/signed/CodeBaseManifestEntrySignedMatching/testcases/CodeBaseManifestEntrySignedNotMatching.java	Wed Jan 27 17:03:41 2016 +0100
+++ b/tests/reproducers/signed/CodeBaseManifestEntrySignedMatching/testcases/CodeBaseManifestEntrySignedNotMatching.java	Tue Jan 26 15:18:30 2016 +0100
@@ -74,7 +74,7 @@
     @NeedsDisplay
     @Test
     public void ApplicationJNLPLocalTest() throws Exception {
-        List<String> commands = new ArrayList<String>(3);
+        List<String> commands = new ArrayList<>(3);
         commands.add(server.getJavawsLocation());
         commands.add(ServerAccess.HEADLES_OPTION);
         commands.add(GENERAL_NAME + SIGNATURE + ".jnlp");
@@ -90,7 +90,7 @@
     @Test
     public void ApplicationJNLPLocalTestWithRemoteCodebase() throws Exception {
         prepareCopyFile();
-        List<String> commands = new ArrayList<String>(3);
+        List<String> commands = new ArrayList<>(3);
         commands.add(server.getJavawsLocation());
         commands.add(ServerAccess.HEADLES_OPTION);
         commands.add(GENERAL_NAME + SIGNATURE + "_copy.jnlp");
@@ -109,7 +109,7 @@
     @NeedsDisplay
     @Test
     public void AppletJNLPRLocalTest() throws Exception {
-        List<String> commands = new ArrayList<String>(3);
+        List<String> commands = new ArrayList<>(3);
         commands.add(server.getJavawsLocation());
         commands.add(ServerAccess.HEADLES_OPTION);
         commands.add(GENERAL_NAME + SIGNATURE + "Applet.jnlp");
@@ -132,7 +132,7 @@
     @TestInBrowsers(testIn = {Browsers.one})
     @Test
     public void BrowserJNLPHrefLocalTest() throws Exception {
-        List<String> commands = new ArrayList<String>(2);
+        List<String> commands = new ArrayList<>(2);
         commands.add(server.getBrowserLocation());
         commands.add(GENERAL_NAME + SIGNATURE + "Jnlp.html");
         ProcessResult pr = ServerAccess.executeProcess(commands, server.getDir(), new AutoOkClosingListener(), null);
@@ -144,7 +144,7 @@
     @TestInBrowsers(testIn = {Browsers.one})
     @Test
     public void BrowserAppletLocalTest() throws Exception {
-        List<String> commands = new ArrayList<String>(2);
+        List<String> commands = new ArrayList<>(2);
         commands.add(server.getBrowserLocation());
         commands.add(GENERAL_NAME + SIGNATURE + ".html");
         ProcessResult pr = ServerAccess.executeProcess(commands, server.getDir(), new AutoOkClosingListener(), null);
diff -r 530bb97e9f08 -r 263e152a6084 tests/reproducers/signed/CodeBaseManifestEntrySignedMatching/testcases/CodeBaseManifestEntryUnsignedMatching.java
--- a/tests/reproducers/signed/CodeBaseManifestEntrySignedMatching/testcases/CodeBaseManifestEntryUnsignedMatching.java	Wed Jan 27 17:03:41 2016 +0100
+++ b/tests/reproducers/signed/CodeBaseManifestEntrySignedMatching/testcases/CodeBaseManifestEntryUnsignedMatching.java	Tue Jan 26 15:18:30 2016 +0100
@@ -71,7 +71,7 @@
 
     @Test
     public void ApplicationJNLPLocalTest() throws Exception {
-        List<String> commands = new ArrayList<String>(3);
+        List<String> commands = new ArrayList<>(3);
         commands.add(server.getJavawsLocation());
         commands.add(ServerAccess.HEADLES_OPTION);
         commands.add(GENERAL_NAME + SIGNATURE + ".jnlp");
@@ -86,7 +86,7 @@
     @Test
     public void ApplicationJNLPLocalTestWithRemoteCodebase() throws Exception {
         prepareCopyFile();
-        List<String> commands = new ArrayList<String>(3);
+        List<String> commands = new ArrayList<>(3);
         commands.add(server.getJavawsLocation());
         commands.add(ServerAccess.HEADLES_OPTION);
         commands.add(GENERAL_NAME + SIGNATURE + "_copy.jnlp");
@@ -106,7 +106,7 @@
     @NeedsDisplay
     @Test
     public void AppletJNLPRLocalTest() throws Exception {
-        List<String> commands = new ArrayList<String>(3);
+        List<String> commands = new ArrayList<>(3);
         commands.add(server.getJavawsLocation());
         commands.add(ServerAccess.HEADLES_OPTION);
         commands.add(GENERAL_NAME + SIGNATURE + "Applet.jnlp");
@@ -128,7 +128,7 @@
     @TestInBrowsers(testIn = {Browsers.one})
     @Test
     public void BrowserJNLPHrefLocalTest() throws Exception {
-        List<String> commands = new ArrayList<String>(2);
+        List<String> commands = new ArrayList<>(2);
         commands.add(server.getBrowserLocation());
         commands.add(GENERAL_NAME + SIGNATURE + "Jnlp.html");
         ProcessResult pr = ServerAccess.executeProcess(commands, server.getDir(), new AutoOkClosingListener(), null);
@@ -140,7 +140,7 @@
     @TestInBrowsers(testIn = {Browsers.one})
     @Test
     public void BrowserAppletLocalTest() throws Exception {
-        List<String> commands = new ArrayList<String>(2);
+        List<String> commands = new ArrayList<>(2);
         commands.add(server.getBrowserLocation());
         commands.add(GENERAL_NAME + SIGNATURE + ".html");
         ProcessResult pr = ServerAccess.executeProcess(commands, server.getDir(), new AutoOkClosingListener(), null);
diff -r 530bb97e9f08 -r 263e152a6084 tests/reproducers/signed/CodeBaseManifestEntrySignedMatching/testcases/CodeBaseManifestEntryUnsignedNotMatching.java
--- a/tests/reproducers/signed/CodeBaseManifestEntrySignedMatching/testcases/CodeBaseManifestEntryUnsignedNotMatching.java	Wed Jan 27 17:03:41 2016 +0100
+++ b/tests/reproducers/signed/CodeBaseManifestEntrySignedMatching/testcases/CodeBaseManifestEntryUnsignedNotMatching.java	Tue Jan 26 15:18:30 2016 +0100
@@ -73,7 +73,7 @@
 
     @Test
     public void ApplicationJNLPLocalTest() throws Exception {
-        List<String> commands = new ArrayList<String>(3);
+        List<String> commands = new ArrayList<>(3);
         commands.add(server.getJavawsLocation());
         commands.add(ServerAccess.HEADLES_OPTION);
         commands.add(GENERAL_NAME + SIGNATURE + ".jnlp");
@@ -88,7 +88,7 @@
     @Test
     public void ApplicationJNLPLocalTestWithRemoteCodebase() throws Exception {
         prepareCopyFile();
-        List<String> commands = new ArrayList<String>(3);
+        List<String> commands = new ArrayList<>(3);
         commands.add(server.getJavawsLocation());
         commands.add(ServerAccess.HEADLES_OPTION);
         commands.add(GENERAL_NAME + SIGNATURE + "_copy.jnlp");
@@ -108,7 +108,7 @@
     @NeedsDisplay
     @Test
     public void AppletJNLPRLocalTest() throws Exception {
-        List<String> commands = new ArrayList<String>(3);
+        List<String> commands = new ArrayList<>(3);


More information about the distro-pkg-dev mailing list