/hg/icedtea-web: Added signed jnlp file tests
smohammad at icedtea.classpath.org
smohammad at icedtea.classpath.org
Mon Jun 4 10:57:35 PDT 2012
changeset 011d695afb1e in /hg/icedtea-web
details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=011d695afb1e
author: Saad Mohammad <smohammad at redhat.com>
date: Mon Jun 04 13:55:16 2012 -0400
Added signed jnlp file tests
diffstat:
ChangeLog | 78 ++++++++++
tests/jnlp_tests/signed/SignedJnlpApplication/resources/SignedJnlpApplication1.jnlp | 62 +++++++
tests/jnlp_tests/signed/SignedJnlpApplication/resources/SignedJnlpApplication2.jnlp | 65 ++++++++
tests/jnlp_tests/signed/SignedJnlpApplication/resources/SignedJnlpApplication3.jnlp | 61 +++++++
tests/jnlp_tests/signed/SignedJnlpApplication/srcs/JNLP-INF/APPLICATION.jnlp | 62 +++++++
tests/jnlp_tests/signed/SignedJnlpApplication/srcs/SignedJnlpApplication.java | 43 +++++
tests/jnlp_tests/signed/SignedJnlpApplication/testcases/SignedJnlpApplicationTest.java | 77 +++++++++
tests/jnlp_tests/signed/SignedJnlpCaseTestOne/resources/SignedJnlpCaseTestOne1.jnlp | 62 +++++++
tests/jnlp_tests/signed/SignedJnlpCaseTestOne/resources/SignedJnlpCaseTestOne2.jnlp | 62 +++++++
tests/jnlp_tests/signed/SignedJnlpCaseTestOne/srcs/JNLP-INF/aPpLiCaTioN.jnlp | 62 +++++++
tests/jnlp_tests/signed/SignedJnlpCaseTestOne/srcs/SignedJnlpCase.java | 43 +++++
tests/jnlp_tests/signed/SignedJnlpCaseTestOne/testcases/SignedJnlpCaseOneTest.java | 65 ++++++++
tests/jnlp_tests/signed/SignedJnlpCaseTestTwo/resources/SignedJnlpCaseTestTwo1.jnlp | 62 +++++++
tests/jnlp_tests/signed/SignedJnlpCaseTestTwo/resources/SignedJnlpCaseTestTwo2.jnlp | 62 +++++++
tests/jnlp_tests/signed/SignedJnlpCaseTestTwo/srcs/JNLP-INF/aPpLiCaTiOn_tEmPlAte.jnlp | 62 +++++++
tests/jnlp_tests/signed/SignedJnlpCaseTestTwo/srcs/SignedJnlpCase.java | 43 +++++
tests/jnlp_tests/signed/SignedJnlpCaseTestTwo/testcases/SignedJnlpCaseTwoTest.java | 65 ++++++++
tests/jnlp_tests/signed/SignedJnlpTemplate/resources/SignedJnlpTemplate1.jnlp | 66 ++++++++
tests/jnlp_tests/signed/SignedJnlpTemplate/resources/SignedJnlpTemplate2.jnlp | 64 ++++++++
tests/jnlp_tests/signed/SignedJnlpTemplate/resources/SignedJnlpTemplate3.jnlp | 71 +++++++++
tests/jnlp_tests/signed/SignedJnlpTemplate/srcs/JNLP-INF/APPLICATION_TEMPLATE.jnlp | 62 +++++++
tests/jnlp_tests/signed/SignedJnlpTemplate/srcs/SignedJnlpTemplate.java | 43 +++++
tests/jnlp_tests/signed/SignedJnlpTemplate/testcases/SignedJnlpTemplateTest.java | 77 +++++++++
tests/jnlp_tests/simple/UnsignedJnlpApplication/resources/UnsignedJnlpApplication1.jnlp | 54 ++++++
tests/jnlp_tests/simple/UnsignedJnlpApplication/resources/UnsignedJnlpApplication2.jnlp | 56 +++++++
tests/jnlp_tests/simple/UnsignedJnlpApplication/resources/UnsignedJnlpApplication3.jnlp | 57 +++++++
tests/jnlp_tests/simple/UnsignedJnlpApplication/srcs/JNLP-INF/APPLICATION.jnlp | 62 +++++++
tests/jnlp_tests/simple/UnsignedJnlpApplication/srcs/UnsignedJnlpApplication.java | 43 +++++
tests/jnlp_tests/simple/UnsignedJnlpApplication/testcases/UnsignedJnlpApplicationTest.java | 68 ++++++++
tests/jnlp_tests/simple/UnsignedJnlpTemplate/resources/UnsignedJnlpTemplate1.jnlp | 54 ++++++
tests/jnlp_tests/simple/UnsignedJnlpTemplate/resources/UnsignedJnlpTemplate2.jnlp | 56 +++++++
tests/jnlp_tests/simple/UnsignedJnlpTemplate/resources/UnsignedJnlpTemplate3.jnlp | 57 +++++++
tests/jnlp_tests/simple/UnsignedJnlpTemplate/srcs/JNLP-INF/APPLICATION_TEMPLATE.jnlp | 62 +++++++
tests/jnlp_tests/simple/UnsignedJnlpTemplate/srcs/UnsignedJnlpTemplate.java | 43 +++++
tests/jnlp_tests/simple/UnsignedJnlpTemplate/testcases/UnsignedJnlpTemplateTest.java | 68 ++++++++
35 files changed, 2099 insertions(+), 0 deletions(-)
diffs (truncated from 2245 to 500 lines):
diff -r c2396c2ee991 -r 011d695afb1e ChangeLog
--- a/ChangeLog Mon Jun 04 13:35:25 2012 -0400
+++ b/ChangeLog Mon Jun 04 13:55:16 2012 -0400
@@ -1,3 +1,81 @@
+2012-06-04 Saad Mohammad <smohammad at redhat.com>
+
+ Added signed jnlp file tests.
+ * tests/jnlp_tests/signed/SignedJnlpApplication/resources/SignedJnlpApplication1.jnlp:
+ Launching jnlp file that matches the signed jnlp application file.
+ * tests/jnlp_tests/signed/SignedJnlpApplication/resources/SignedJnlpApplication2.jnlp:
+ * tests/jnlp_tests/signed/SignedJnlpApplication/resources/SignedJnlpApplication3.jnlp:
+ Launching jnlp file that does not match the signed jnlp application file.
+ * tests/jnlp_tests/signed/SignedJnlpApplication/srcs/JNLP-INF/APPLICATION.jnlp:
+ Signed jnlp application file.
+ * tests/jnlp_tests/signed/SignedJnlpApplication/srcs/SignedJnlpApplication.java:
+ A simple java class that outputs a string.
+ * tests/jnlp_tests/signed/SignedJnlpApplication/testcases/SignedJnlpApplicationTest.java:
+ Testcase that tests the launching of applications with a signed jnlp
+ application file.
+ * tests/jnlp_tests/signed/SignedJnlpTemplate/resources/SignedJnlpTemplate1.jnlp:
+ Launching jnlp file that matches the signed jnlp application template file.
+ * tests/jnlp_tests/signed/SignedJnlpTemplate/resources/SignedJnlpTemplate2.jnlp:
+ * tests/jnlp_tests/signed/SignedJnlpTemplate/resources/SignedJnlpTemplate3.jnlp:
+ Launching jnlp file that does not match the signed jnlp application
+ template file.
+ * tests/jnlp_tests/signed/SignedJnlpTemplate/srcs/JNLP-INF/APPLICATION_TEMPLATE.jnlp:
+ Signed jnlp application template file.
+ * tests/jnlp_tests/signed/SignedJnlpTemplate/srcs/SignedJnlpTemplate.java:
+ A simple java class that outputs a string.
+ * tests/jnlp_tests/signed/SignedJnlpTemplate/testcases/SignedJnlpTemplateTest.java:
+ Testcase that tests the launching of applications with a signed jnlp
+ application template file.
+ * tests/jnlp_tests/simple/UnsignedJnlpApplication/resources/UnsignedJnlpApplication1.jnlp:
+ Launching jnlp file that matches the unsigned jnlp application file.
+ * tests/jnlp_tests/simple/UnsignedJnlpApplication/resources/UnsignedJnlpApplication2.jnlp:
+ * tests/jnlp_tests/simple/UnsignedJnlpApplication/resources/UnsignedJnlpApplication3.jnlp:
+ Launching jnlp file that does not match the unsigned jnlp application file.
+ * tests/jnlp_tests/simple/UnsignedJnlpApplication/srcs/JNLP-INF/APPLICATION.jnlp:
+ Unsigned jnlp application file.
+ * tests/jnlp_tests/simple/UnsignedJnlpApplication/srcs/UnsignedJnlpApplication.java:
+ A simple java class that outputs a string.
+ * tests/jnlp_tests/simple/UnsignedJnlpApplication/testcases/UnsignedJnlpApplicationTest.java:
+ Testcase that tests the launching of applications with an unsigned jnlp
+ application file.
+ * tests/jnlp_tests/simple/UnsignedJnlpTemplate/resources/UnsignedJnlpTemplate1.jnlp:
+ Launching jnlp file that matches the unsigned jnlp application
+ template file.
+ * tests/jnlp_tests/simple/UnsignedJnlpTemplate/resources/UnsignedJnlpTemplate2.jnlp:
+ * tests/jnlp_tests/simple/UnsignedJnlpTemplate/resources/UnsignedJnlpTemplate3.jnlp:
+ Launching jnlp file that does not match the unsigned jnlp application
+ template file.
+ * tests/jnlp_tests/simple/UnsignedJnlpTemplate/srcs/JNLP-INF/APPLICATION_TEMPLATE.jnlp:
+ Unsigned jnlp application template file.
+ * tests/jnlp_tests/simple/UnsignedJnlpTemplate/srcs/UnsignedJnlpTemplate.java:
+ A simple java class that outputs a string.
+ * tests/jnlp_tests/simple/UnsignedJnlpTemplate/testcases/UnsignedJnlpTemplateTest.java:
+ Testcase that tests the launching of applications with an unsigned jnlp
+ application template file.
+ * tests/jnlp_tests/signed/SignedJnlpCaseTestOne/resources/SignedJnlpCaseTestOne1.jnlp:
+ Launching jnlp file that matches the signed jnlp application file.
+ * tests/jnlp_tests/signed/SignedJnlpCaseTestOne/resources/SignedJnlpCaseTestOne2.jnlp:
+ Launching jnlp file that does not match the signed jnlp application file.
+ * tests/jnlp_tests/signed/SignedJnlpCaseTestOne/srcs/JNLP-INF/aPpLiCaTioN.jnlp:
+ Signed jnlp application file.
+ * tests/jnlp_tests/signed/SignedJnlpCaseTestOne/srcs/SignedJnlpCase.java:
+ A simple java class that outputs a string.
+ * tests/jnlp_tests/signed/SignedJnlpCaseTestOne/testcases/SignedJnlpCaseOneTest.java:
+ Testcase that tests the case-sensitivity of the signed jnlp application's
+ filename.
+ * tests/jnlp_tests/signed/SignedJnlpCaseTestTwo/resources/SignedJnlpCaseTestTwo1.jnlp:
+ Launching jnlp file that matches the signed jnlp application template file.
+ * tests/jnlp_tests/signed/SignedJnlpCaseTestTwo/resources/SignedJnlpCaseTestTwo2.jnlp:
+ Launching jnlp file that does not match the signed jnlp application
+ template file.
+ * tests/jnlp_tests/signed/SignedJnlpCaseTestTwo/srcs/JNLP-INF/aPpLiCaTiOn_tEmPlAte.jnlp:
+ Signed jnlp application template file.
+ * tests/jnlp_tests/signed/SignedJnlpCaseTestTwo/srcs/SignedJnlpCase.java:
+ A simple java class that outputs a string.
+ * tests/jnlp_tests/signed/SignedJnlpCaseTestTwo/testcases/SignedJnlpCaseTwoTest.java:
+ Testcase that tests the case-sensitivity of the signed jnlp application
+ template's filename.
+
2012-06-04 Danesh Dadachanji <ddadacha at redhat.com>
Fix to handle absolute paths passed into jnlp_href's value.
diff -r c2396c2ee991 -r 011d695afb1e tests/jnlp_tests/signed/SignedJnlpApplication/resources/SignedJnlpApplication1.jnlp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/jnlp_tests/signed/SignedJnlpApplication/resources/SignedJnlpApplication1.jnlp Mon Jun 04 13:55:16 2012 -0400
@@ -0,0 +1,62 @@
+<!--
+
+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; either version 2, or (at your option)
+any later version.
+
+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.
+
+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.
+
+ -->
+<?xml version="1.0" encoding="utf-8"?>
+<jnlp spec="1.0" href="SignedJnlpApplication1.jnlp" codebase=".">
+ <information>
+ <title>SignedJnlpApplication</title>
+ <vendor>IcedTea</vendor>
+ <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+ <description>SignedJnlpApplication</description>
+ <offline/>
+ </information>
+
+ <security>
+ <all-permissions/>
+ </security>
+
+ <resources>
+ <property name="specialProperty" value="icedtea"/>
+ </resources>
+
+ <resources>
+ <j2se version="1.6+"/>
+ <jar href="SignedJnlpApplication.jar"/>
+ </resources>
+ <application-desc main-class="SignedJnlpApplication">
+ </application-desc>
+</jnlp>
diff -r c2396c2ee991 -r 011d695afb1e tests/jnlp_tests/signed/SignedJnlpApplication/resources/SignedJnlpApplication2.jnlp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/jnlp_tests/signed/SignedJnlpApplication/resources/SignedJnlpApplication2.jnlp Mon Jun 04 13:55:16 2012 -0400
@@ -0,0 +1,65 @@
+<!--
+
+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; either version 2, or (at your option)
+any later version.
+
+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-1201 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.
+
+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.
+
+*****************************************************************
+* Using a different value of name within the 'property' element in the launching JNLP file *
+*****************************************************************
+ -->
+<?xml version="1.0" encoding="utf-8"?>
+<jnlp spec="1.0" href="SignedJnlpApplication2.jnlp" codebase=".">
+ <information>
+ <title>SignedJnlpApplication</title>
+ <vendor>IcedTea</vendor>
+ <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+ <description>SignedJnlpApplication</description>
+ <offline/>
+ </information>
+
+ <security>
+ <all-permissions/>
+ </security>
+
+ <resources>
+ <property name="DIFFERENT PROPERTY NAME" value="icedtea"/>
+ </resources>
+
+ <resources>
+ <j2se version="1.6+"/>
+ <jar href="SignedJnlpApplication.jar"/>
+ </resources>
+ <application-desc main-class="SignedJnlpApplication">
+ </application-desc>
+</jnlp>
diff -r c2396c2ee991 -r 011d695afb1e tests/jnlp_tests/signed/SignedJnlpApplication/resources/SignedJnlpApplication3.jnlp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/jnlp_tests/signed/SignedJnlpApplication/resources/SignedJnlpApplication3.jnlp Mon Jun 04 13:55:16 2012 -0400
@@ -0,0 +1,61 @@
+<!--
+
+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; either version 2, or (at your option)
+any later version.
+
+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.
+
+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.
+
+*********************************************************
+* Missing 'property' child element within 'resource' in the launching JNLP file *
+*********************************************************
+ -->
+<?xml version="1.0" encoding="utf-8"?>
+<jnlp spec="1.0" href="SignedJnlpApplication3.jnlp" codebase=".">
+ <information>
+ <title>SignedJnlpApplication</title>
+ <vendor>IcedTea</vendor>
+ <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+ <description>SignedJnlpApplication</description>
+ <offline/>
+ </information>
+
+ <resources>
+
+ </resources>
+
+ <resources>
+ <j2se version="1.6+"/>
+ <jar href="SignedJnlpApplication.jar"/>
+ </resources>
+ <application-desc main-class="SignedJnlpApplication">
+ </application-desc>
+</jnlp>
diff -r c2396c2ee991 -r 011d695afb1e tests/jnlp_tests/signed/SignedJnlpApplication/srcs/JNLP-INF/APPLICATION.jnlp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/jnlp_tests/signed/SignedJnlpApplication/srcs/JNLP-INF/APPLICATION.jnlp Mon Jun 04 13:55:16 2012 -0400
@@ -0,0 +1,62 @@
+<!--
+
+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; either version 2, or (at your option)
+any later version.
+
+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.
+
+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.
+
+ -->
+<?xml version="1.0" encoding="utf-8"?>
+<jnlp spec="1.0" href="SignedJnlpApplication1.jnlp" codebase=".">
+ <information>
+ <title>SignedJnlpApplication</title>
+ <vendor>IcedTea</vendor>
+ <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+ <description>SignedJnlpApplication</description>
+ <offline/>
+ </information>
+
+ <security>
+ <all-permissions/>
+ </security>
+
+ <resources>
+ <property name="specialProperty" value="icedtea"/>
+ </resources>
+
+ <resources>
+ <j2se version="1.6+"/>
+ <jar href="SignedJnlpApplication.jar"/>
+ </resources>
+ <application-desc main-class="SignedJnlpApplication">
+ </application-desc>
+</jnlp>
diff -r c2396c2ee991 -r 011d695afb1e tests/jnlp_tests/signed/SignedJnlpApplication/srcs/SignedJnlpApplication.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/jnlp_tests/signed/SignedJnlpApplication/srcs/SignedJnlpApplication.java Mon Jun 04 13:55:16 2012 -0400
@@ -0,0 +1,43 @@
+/* SignedJnlpApplication.java
+Copyright (C) 2012 Red Hat, Inc.
+
+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 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.
+
+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.
+ */
+
+public class SignedJnlpApplication {
+
+ public static void main(String[] args) {
+ System.out.println("Running signed application in main");
+ }
+}
diff -r c2396c2ee991 -r 011d695afb1e tests/jnlp_tests/signed/SignedJnlpApplication/testcases/SignedJnlpApplicationTest.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/jnlp_tests/signed/SignedJnlpApplication/testcases/SignedJnlpApplicationTest.java Mon Jun 04 13:55:16 2012 -0400
@@ -0,0 +1,77 @@
+/* SignedJnlpApplicationTest.java
+Copyright (C) 2012 Red Hat, Inc.
+
+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 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.
+
+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.
+ */
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+import net.sourceforge.jnlp.ServerAccess;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class SignedJnlpApplicationTest {
+
+ private static ServerAccess server = new ServerAccess();
+ private final List<String> l = Collections.unmodifiableList(Arrays.asList(new String[] { "-Xtrustall" }));
+ private final String signedException = "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";
+
+ @Test
+ public void launchingFileMatchesSignedApplication1() throws Exception {
+ ServerAccess.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));
+ }
+
+ /**
+ * Using a different value of name within the 'property' element in the launching JNLP file
+ */
+ @Test
+ public void launchingFileDoesNotMatchSignedApplication1() throws Exception {
+ ServerAccess.ProcessResult pr = server.executeJavawsHeadless(l, "/SignedJnlpApplication2.jnlp");
+ Assert.assertTrue("Stderr should contains " + signedException + " but did not", pr.stderr.contains(signedException));
+ }
+
+ /**
+ * Missing 'property' child element within 'resource' in the launching JNLP file
+ */
+ @Test
+ public void launchingFileDoesNotMatchSignedApplication2() throws Exception {
+ ServerAccess.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 c2396c2ee991 -r 011d695afb1e tests/jnlp_tests/signed/SignedJnlpCaseTestOne/resources/SignedJnlpCaseTestOne1.jnlp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/jnlp_tests/signed/SignedJnlpCaseTestOne/resources/SignedJnlpCaseTestOne1.jnlp Mon Jun 04 13:55:16 2012 -0400
@@ -0,0 +1,62 @@
+<!--
+
+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; either version 2, or (at your option)
+any later version.
+
+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
More information about the distro-pkg-dev
mailing list