diff --git a/tests/reproducers/simple/ExtensionJnlpsInApplet/resources/Helper.jar b/tests/reproducers/simple/ExtensionJnlpsInApplet/resources/Helper.jar new file mode 100644 index 0000000000000000000000000000000000000000..ca3ebb85340e3d8547fc83de52d96f6483f16749 GIT binary patch literal 659 zc$^FHW@Zs#;Nak3Q1ZRx#DD}i8CV#6T|*poJ^kGD|D9rBU}gyLX6FD&F+r6C;M6Pv z#Bj~Nj((nQuE8OCzHXm=&z$!0*44Yn>#eJG?#%hkK?YZhA3QD6^YYd4^u1WRiiLB= zYsn+h651I*#8uUvFVV7iE-v~+Ty+}5)a*}1ABz~lj(D`@xU@6S3KtYdNTE4`2Z%jV za|%+6^pbNDi;H9X&hi}$5NJLBLO%EJF+ZI*QQTtFj<_j_9csF<{Z7Gbt;|!!8z)6n zFz~A`Q=K?t_8jBlPj`2I|GCSa;Y)z&!bLOOPdeOmXkEacqB2?0vG9(lqpYl1Q^34a z9%uZjz$|kArWhHw*O@Vg+c7DB@Mt>Vc=r~g#jaz2m@+Vz#<70kEj48R?)R02dxN- mHd`EVifjTX3XmPfgJQxVv#eJG?#%hkK?YZhA3QD6^YYd4^u1WRiiLB= zYsn+h651I*#8uUvFVV7iE-v~+Ty+}5)a*}1Kh@Hny|j9+A|@WK*}~vkq@!`dQ}^N1 zM^Bl+Zu=}eNj(Z^a}0{xq|n?Z0K_4w#U+jf1v#lDddWG7#l^KjvHHx8BDROv3*gy&@r2yWTkdb@nF4WtaE&Gx7-!-2oLjPHL||gDkO31 zx|{44>E~K@6Q3(i^l{Eo4p=qkZTxBJNZzG8*T~(Dn0-3R>CCn@J!>1vWwt)vb?Yi; z<_njtZ^|}HYVDr3q2|lMV#CMDV#Q2P7jHAv5jYX%uxsap#FP*P&kLoQr71BicBf{P zZ+ws}=*`rcxAVZJB7yRssi(e8Vfi$dFI9b2UDM(FxAx^mUVU&PaJGHd-Nup-+b1T| zj5Tkr;OzOw$i3sN3fIoAq^IwFEvmJ0R?X1fz36bCw)TEu%PFUKd+sxF*(5gaZ%bPmLD^Gbcx5o4D z1MB}EC#PTW-{)U4qmWDaJt)@JMtyrz!N|an!UT#nMkWyk)HDT4ZJ-2+3Q&?Kx>n@G oAcCUJ7DwVlHUX4qkR2v~V!}- + + + + + + + diff --git a/tests/reproducers/simple/ExtensionJnlpsInApplet/resources/applet.jnlp b/tests/reproducers/simple/ExtensionJnlpsInApplet/resources/applet.jnlp new file mode 100644 --- /dev/null +++ b/tests/reproducers/simple/ExtensionJnlpsInApplet/resources/applet.jnlp @@ -0,0 +1,21 @@ + + + + TestApplet + IcedTea + + PR974 Test + + + + + + + + + + diff --git a/tests/reproducers/simple/ExtensionJnlpsInApplet/resources/helper.jnlp b/tests/reproducers/simple/ExtensionJnlpsInApplet/resources/helper.jnlp new file mode 100644 --- /dev/null +++ b/tests/reproducers/simple/ExtensionJnlpsInApplet/resources/helper.jnlp @@ -0,0 +1,15 @@ + + + + Helper + IcedTea + + PR974 Test + + + + + + + + diff --git a/tests/reproducers/simple/ExtensionJnlpsInApplet/srcs/Helper.java b/tests/reproducers/simple/ExtensionJnlpsInApplet/srcs/Helper.java new file mode 100644 --- /dev/null +++ b/tests/reproducers/simple/ExtensionJnlpsInApplet/srcs/Helper.java @@ -0,0 +1,5 @@ +public class Helper { + public static String help() { + return "Helper!"; + } +} \ No newline at end of file diff --git a/tests/reproducers/simple/ExtensionJnlpsInApplet/srcs/TestApplet.java b/tests/reproducers/simple/ExtensionJnlpsInApplet/srcs/TestApplet.java new file mode 100644 --- /dev/null +++ b/tests/reproducers/simple/ExtensionJnlpsInApplet/srcs/TestApplet.java @@ -0,0 +1,13 @@ +import java.applet.Applet; + +public class TestApplet extends Applet { + public static void main(String[] args) { + System.out.println("Application running"); + System.out.println(Helper.help()); + } + + public void run() { + System.out.println("Applet running"); + System.out.println(Helper.help()); + } +} diff --git a/tests/reproducers/simple/ExtensionJnlpsInApplet/testcases/ExtensionJnlpsInAppletTest.java b/tests/reproducers/simple/ExtensionJnlpsInApplet/testcases/ExtensionJnlpsInAppletTest.java new file mode 100644 --- /dev/null +++ b/tests/reproducers/simple/ExtensionJnlpsInApplet/testcases/ExtensionJnlpsInAppletTest.java @@ -0,0 +1,72 @@ +/* StripHttpPathParamsTest.java +Copyright (C) 2011 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 net.sourceforge.jnlp.ProcessResult; +import net.sourceforge.jnlp.ServerAccess.AutoClose; +import net.sourceforge.jnlp.annotations.Bug; +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.closinglisteners.AutoOkClosingListener; + +import org.junit.Assert; +import org.junit.Test; + +public class ExtensionJnlpsInAppletTest extends BrowserTest { + + private static final String appletCloseString = AutoOkClosingListener.MAGICAL_OK_CLOSING_STRING; + + @Test + @NeedsDisplay + @TestInBrowsers(testIn={Browsers.one}) + public void testExtensionJnlpsInAppletLaunch() throws Exception { + ProcessResult pr = server.executeBrowser("/applet.html", AutoClose.CLOSE_ON_BOTH); + Assert.assertTrue("stdout should contain \"Applet test running\" but did not", pr.stdout.contains("Applet test running")); + } + + @Test + @NeedsDisplay + @TestInBrowsers(testIn={Browsers.one}) + @Bug(id="PR974") + public void testExtensionJnlpsInAppletHelper() throws Exception { + ProcessResult pr = server.executeBrowser("/applet.html", AutoClose.CLOSE_ON_BOTH); + Assert.assertTrue("stdout should contain \"Helper!\" but did not", pr.stdout.contains("Helper!")); + } + +} \ No newline at end of file