diff options
author | Adam Domurad <[email protected]> | 2012-08-28 14:32:12 -0400 |
---|---|---|
committer | Adam Domurad <[email protected]> | 2012-08-28 14:32:12 -0400 |
commit | d42871f429d191632bf54457b8ff13389e19763c (patch) | |
tree | 5980c8d8f74a49506dfa6669f5a9e13cb709d059 /tests/reproducers/custom/AppletExtendsFromOutsideJar/testcases/AppletExtendsFromOutsideJarTests.java | |
parent | d06355b4ad5a98172533762870d0ceb55f9f048d (diff) |
Reproducer for PR920, linkage error sometimes occurs
Diffstat (limited to 'tests/reproducers/custom/AppletExtendsFromOutsideJar/testcases/AppletExtendsFromOutsideJarTests.java')
-rw-r--r-- | tests/reproducers/custom/AppletExtendsFromOutsideJar/testcases/AppletExtendsFromOutsideJarTests.java | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/tests/reproducers/custom/AppletExtendsFromOutsideJar/testcases/AppletExtendsFromOutsideJarTests.java b/tests/reproducers/custom/AppletExtendsFromOutsideJar/testcases/AppletExtendsFromOutsideJarTests.java new file mode 100644 index 0000000..30d0421 --- /dev/null +++ b/tests/reproducers/custom/AppletExtendsFromOutsideJar/testcases/AppletExtendsFromOutsideJarTests.java @@ -0,0 +1,63 @@ +/* AppletExtendsFromOutsideJarTests.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.annotations.Bug; +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 org.junit.Assert; +import org.junit.Test; + +public class AppletExtendsFromOutsideJarTests extends BrowserTest { + + private static final String LINKAGE_ERROR_OCCURRENCE = "java.lang.LinkageError: "; + private static final String APPLET_RUNNING = "My simple applet is running."; + + @NeedsDisplay + @Test + @TestInBrowsers(testIn = { Browsers.one }) + @Bug(id = "PR920") + public void testClassInAppletFolder() throws Exception { + ProcessResult pr = server.executeBrowser("/AppletExtendsFromOutsideJar.html"); + + Assert.assertFalse("Linkage error should not occur but did!", pr.stderr.contains(LINKAGE_ERROR_OCCURRENCE)); + Assert.assertTrue("Expected '" + APPLET_RUNNING + "', stdout was: " + pr.stdout, pr.stdout.contains(APPLET_RUNNING)); + } +} |