diff options
author | Jiri Vanek <[email protected]> | 2013-06-10 13:22:53 +0200 |
---|---|---|
committer | Jiri Vanek <[email protected]> | 2013-06-10 13:22:53 +0200 |
commit | faffea863331de3cb97e5654313922fafd61745c (patch) | |
tree | c7f73df08ef79b55c657c7ec2e4854ef9e27b8fc /tests/reproducers | |
parent | 1de22aca7c4d0627a8fbbec23fffd4ca463969ea (diff) |
Handled semicolon in internal server (with reproducers)
Diffstat (limited to 'tests/reproducers')
4 files changed, 220 insertions, 0 deletions
diff --git a/tests/reproducers/simple/StripHttpPathParams/resources/StripHttpPathParams.html b/tests/reproducers/simple/StripHttpPathParams/resources/StripHttpPathParams.html new file mode 100644 index 0000000..028ae1a --- /dev/null +++ b/tests/reproducers/simple/StripHttpPathParams/resources/StripHttpPathParams.html @@ -0,0 +1,48 @@ +<!-- + +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. + + --> +<html> + <head></head> + <body> + <applet code="StripHttpPathParams.class" + archive="StripHttpPathParams.jar;foo_bar" + codebase="." + width="800" + height="600"> + </applet> + </body> +</html> diff --git a/tests/reproducers/simple/StripHttpPathParams/resources/StripHttpPathParams.jnlp b/tests/reproducers/simple/StripHttpPathParams/resources/StripHttpPathParams.jnlp new file mode 100644 index 0000000..ef4374d --- /dev/null +++ b/tests/reproducers/simple/StripHttpPathParams/resources/StripHttpPathParams.jnlp @@ -0,0 +1,53 @@ +<!-- + +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="StripHttpPathParams.jnlp" codebase="."> + <information> + <title>StripHttpPathParams</title> + <vendor>IcedTea</vendor> + <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/> + <description>Remove HTTP Path Parameters from JAR URLs</description> + <offline/> + </information> + <resources> + <j2se version="1.4+"/> + <jar href="StripHttpPathParams.jar;foo_bar"/> + </resources> + <application-desc main-class="StripHttpPathParams"> + </application-desc> +</jnlp> diff --git a/tests/reproducers/simple/StripHttpPathParams/srcs/StripHttpPathParams.java b/tests/reproducers/simple/StripHttpPathParams/srcs/StripHttpPathParams.java new file mode 100644 index 0000000..535366e --- /dev/null +++ b/tests/reproducers/simple/StripHttpPathParams/srcs/StripHttpPathParams.java @@ -0,0 +1,51 @@ +/* StripHttpPathParams.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 java.applet.Applet; + +public class StripHttpPathParams extends Applet { + private static final String appletCloseString = "*** APPLET FINISHED ***"; + + public static void main(String[] args) { + System.out.println("running"); + } + + @Override + public void init() { + System.out.println(appletCloseString); + } +} diff --git a/tests/reproducers/simple/StripHttpPathParams/testcases/StripHttpPathParamsTest.java b/tests/reproducers/simple/StripHttpPathParams/testcases/StripHttpPathParamsTest.java new file mode 100644 index 0000000..b036faa --- /dev/null +++ b/tests/reproducers/simple/StripHttpPathParams/testcases/StripHttpPathParamsTest.java @@ -0,0 +1,68 @@ +/* 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.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 StripHttpPathParamsTest extends BrowserTest { + + private static final String appletCloseString = AutoOkClosingListener.MAGICAL_OK_CLOSING_STRING; + + @Test + public void testStripHttpPathParamsLaunch() throws Exception { + ProcessResult pr = server.executeJavawsHeadless("/StripHttpPathParams.jnlp"); + Assert.assertTrue("stdout should contain \"running\" but did not", pr.stdout.contains("running")); + } + + @NeedsDisplay + @Test + @TestInBrowsers(testIn={Browsers.one}) + public void testStripHttpPathParamsApplet() throws Exception { + ProcessResult pr = server.executeBrowser("/StripHttpPathParams.html", AutoClose.CLOSE_ON_BOTH); + Assert.assertTrue("stdout should contain " + appletCloseString + " but did not", pr.stdout.contains(appletCloseString)); + } + +} |