Index: /branches/vendor/sourceforge/icedtea-web/current/AUTHORS
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/AUTHORS	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/AUTHORS	(revision 416)
@@ -5,14 +5,23 @@
 Deepak Bhole <dbhole@redhat.com>
 Ricardo MartÃ­n Camarero <rickyepoderi@yahoo.es>
+Danesh Dadachanji <ddadacha@redhat.com>
+Adam Domurad <adomurad@redhat.com>
 Thomas Fitzsimmons <fitzsim@redhat.com>
 Mark Greenwood <mark@dcs.shef.ac.uk>
-Andrew John Hughes <gnu_andrew@member.fsf.org, ahughes@redhat.com>
+Peter Hatina <phatina@redhat.com>
+Andrew John Hughes <ahughes@redhat.com>
 Matthias Klose <doko@ubuntu.com>
+MichaÅ GÃ³rny < mgorny@gentoo.org >
 Francis Kung <fkung@redhat.com>
+Denis Lila <dlila@redhat.com>
 DJ Lucas <dj@lucasit.com>
 Omair Majid <omajid@redhat.com>
 Jon A. Maxwell <jmaxwell@users.sourceforge.net>
+Thomas Meyer <thomas@m3y3r.de>
+Saad Mohammad <smohammad@redhat.com>
+Martin Olsson  <martin@minimum.se>
 Andrew Su <asu@redhat.com>
 Joshua Sumali <jsumali@redhat.com>
+Jiri Vanek <jvanek@redhat.com>
 Mark Wielaard <mark@klomp.org>
 Man Lung Wong <mwong@redhat.com>
Index: /branches/vendor/sourceforge/icedtea-web/current/ChangeLog
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/ChangeLog	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/ChangeLog	(revision 416)
@@ -1,6 +1,2285 @@
-2011-08-31  Deepak Bhole <dbhole@redhat.com>
-
-	* NEWS: Prepare for 1.1.2
-	* configure.ac: Same
+2012-08-27  Deepak Bhole <dbhole@redhat.com>
+
+	* configure.ac: Prepare for 1.3
+	* NEWS: Same
+
+2012-08-27  Deepak Bhole <dbhole@redhat.com>
+
+	* netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
+	(getAccessControlContextForClassLoading): Catch ClassCircularityErrors and
+	ignore them (thus denying permission to caller).
+
+2012-08-13  Jiri Vanek  <jvanek@redhat.com>
+
+	* tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java:
+	(executeProcessUponURL)Fixed wrong call in previous commit which was
+	causing null process name.
+	* tests/reproducers/simple/AppletTest/testcases/AppletTestTests.java:
+	Removed unused import.
+
+2012-08-13  Jiri Vanek  <jvanek@redhat.com>
+
+	Reproducers of PR955
+	* tests/reproducers/simple/LocalisedInformationElement/resources/LocalisedInformationElement1.jnlp:
+	* tests/reproducers/simple/LocalisedInformationElement/resources/LocalisedInformationElement2.jnlp:
+	* tests/reproducers/simple/LocalisedInformationElement/resources/LocalisedInformationElement3.jnlp:
+	* tests/reproducers/simple/LocalisedInformationElement/resources/LocalisedInformationElement4.jnlp:
+	Test jnlp files with various combinations of locales, reproducers of PR955.
+	* tests/reproducers/simple/LocalisedInformationElement/resources/LocalisedInformationElement_noLoc.jnlp
+	Jnlp file with which is not affected by PR955 and is helping to catch error in LOCALE changing hack
+	* tests/reproducers/simple/LocalisedInformationElement/srcs/LocalisedInformationElement.java:
+	Reproducer main class, after loading prints out default locale.
+	* tests/reproducers/simple/LocalisedInformationElement/testcases/LocalisedInformationElementTest.java:
+	Testcases launching above jnlps under various locales.
+	* tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java:
+	Added set of methods allowing passing of custom variables to ThreadedProcess.
+	* tests/test-extensions/net/sourceforge/jnlp/ThreadedProcess.java:
+	Added processing of custom variables.
+
+2012-08-22  Danesh Dadachanji  <ddadacha@redhat.com>
+
+	Fix PR955: regression: SweetHome3D fails to run
+	* NEWS: Added entry for PR955
+	* netx/net/sourceforge/jnlp/JNLPFile.java: New enum Match that represents
+	the level of precision to use when matching locales.
+	(localMatches): Renamed to localeMatches, added matchLevel paramater
+	and updated conditionals to handle the level of precision specified by it.
+	(getVendor): New method that returns an information's vendor text.
+	(getInformation): Added override methods for getTitle and getVendor
+	that are used by the anonymous class to filter by locale. All three
+	methods now go through all levels of precision to search for the best
+	fitted locale.
+	(getResources), (getResourcesDescs): Updated to check if any level of
+	precision matches when searching for locales.
+	(parse): Added call to checkForTitleVendor.
+	* netx/net/sourceforge/jnlp/Parser.java
+	(checkForTitleVendor): New method to check for availability of localized
+	title and vendor from the information tags. Throws ParseException.
+	(getInfo): Replace loop with foreach loop.
+	(getInformationDesc): Remove check for present title and vendor.
+	(getLocale): Variant returned can now use everything after the eigth
+	element of the locale's string.
+	* netx/net/sourceforge/jnlp/resources/Messages.properties:
+	Update missing title and vendor messages to mention localization.
+	* tests/reproducers/simple/InformationTitleVendorParser/testcases/InformationTitleVendorParserTest.java:
+	Update output string as per new changes to Messages internationalizations.
+	* tests/netx/unit/net/sourceforge/jnlp/JNLPFileTest.java:
+	New unit test that checks the localesMatches method in JNLPFile.
+	* tests/netx/unit/net/sourceforge/jnlp/MockJNLPFile.java:
+	New class used to create a mock JNLPFile object.
+	* tests/netx/unit/net/sourceforge/jnlp/ParserTest.java:
+	New unit test that checks that the return of getTitle and getVendor
+	have localized information.
+
+2012-08-21  Jiri Vanek  <jvanek@redhat.com>
+
+	* tests/test-extensions/net/sourceforge/jnlp/ProcessAssasin.java:
+	(sigInt), (sigKill), (sigTerm) new methods for various killing of
+	processes by kill.
+	(kill) new method, launching kill process.
+	(destroyProcess	) is now calling sigInt instead of unwrapped sigTerm.
+
+2012-08-21  Jiri Vanek  <jvanek@redhat.com>
+
+	* launcher/javaws.in: java is now launched by exec
+
+2012-08-17  Adam Domurad  <adomurad@redhat.com>
+
+	Fixes PR588, cookies set in the java cookie jar are now stored properly
+	* plugin/icedteanp/IcedTeaNPPlugin.cc
+	(set_cookie_info): New, uses setvalueforurl
+	(consume_plugin_message): Additional message added allowing 
+	set_cookie_info to be used from the java side.
+	* plugin/icedteanp/java/sun/applet/PluginCookieManager.java: Now
+	overrides put method, results in set_cookie_info calls in C++
+	* plugin/icedteanp/java/sun/applet/PluginMain.java: Passes
+	PluginStreamHandler to PluginCookieManager to allow C++ side
+	communication
+
+2012-08-17  Adam Domurad  <adomurad@redhat.com>
+
+	* plugin/icedteanp/IcedTeaNPPlugin.cc
+	(consume_plugin_message): New, called by consume_message, handles
+	cookie and proxy info retrieval, and setting cookie info
+	(consume_message): Call consume_plugin_message for "plugin ..."
+	messages
+
+2012-08-17  Adam Domurad  <adomurad@redhat.com>
+
+	Reproducers for PR588, sets persistent and session cookies in the 
+	cookie jar and tries to read them with various means.
+	* tests/reproducers/signed/SavingCookies/resources/CheckCookie.html:
+	Print the cookie store contents
+	* tests/reproducers/signed/SavingCookies/resources/CheckCookieAndGotoClear.html:
+	Print the cookie store contents, and then go to 
+	ClearPersistentCookie.html with showDocument
+	* tests/reproducers/signed/SavingCookies/resources/ClearPersistentCookie.html:
+	Clear the test cookie so it does not interfere with further tests
+	* tests/reproducers/signed/SavingCookies/resources/SavePersistentCookie.html:
+	Create a persistent cookie
+	* tests/reproducers/signed/SavingCookies/resources/SavePersistentCookieAndGotoCheck.html:
+	Create a persistent cookie and check it with showDocument
+	* tests/reproducers/signed/SavingCookies/resources/SaveSessionCookie.html:
+	Create a session cookie
+	* tests/reproducers/signed/SavingCookies/resources/SaveSessionCookieAndGotoCheck.html:
+	Create a session cookie and check it with showDocument
+	* tests/reproducers/signed/SavingCookies/srcs/CheckingCookies.java:
+	Checks the contents of the cookie store.
+	Depending on the test, this may go to another page upon completion.
+	* tests/reproducers/signed/SavingCookies/srcs/SavingCookies.java:
+	Store cookies in the java cookie store. Depending on the test, this may
+	go to another page upon completion.
+	* tests/reproducers/signed/SavingCookies/testcases/SavingCookiesTests.java
+	Test driver for testing persistent and session cookies in different 
+	ways
+
+2012-08-18  Jiri Vanek  <jvanek@redhat.com>
+
+	* tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java: added 
+	VERBOSE_OPTION constant with -verbose value for javaws launching.
+
+2012-08-17  Jiri Vanek  <jvanek@redhat.com>
+
+	* tests/reproducers/simple/deadlocktest/testcases/DeadLockTestTest.java:
+	(testDeadLockTestTerminatedBody) removed tests for killed-process and
+	termination of remaining javas put on correct place.
+	* tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java:
+	(executeBrowser)  stout and stderr listeners forwarded to next method in
+	correct order.
+
+2012-08-14  Danesh Dadachanji  <ddadacha@redhat.com>
+
+	Small addition to NEWS entry and bug annotation indicating the PR975 fix.
+	* NEWS: Add entry for PR975
+	* tests/reproducers/signed/ClasspathManifestTest/testcases/ClasspathManifestTest.java:
+	Add bug annotation for PR975.
+
+2012-08-14  Danesh Dadachanji  <ddadacha@redhat.com>
+
+	Classpaths in jars' manifests are only considered when the applet is run
+	without using jnlp_href and a JNLP file.
+	* netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java (activateJars):
+	Add conditional check for use of jnlp_href.
+	* tests/reproducers/signed/Classpath.Manifest.Test.Helper/srcs/CheckForClasspath.java:
+	Applet whose jar is stored in a subdir under the test engine server.
+	* tests/reproducers/signed/ClasspathManifestTest/resources/ClasspathManifestAppletTest.html:
+	* tests/reproducers/signed/ClasspathManifestTest/resources/ClasspathManifestAppletTest.jnlp:
+	* tests/reproducers/signed/ClasspathManifestTest/resources/ClasspathManifestApplicationTest.jnlp:
+	* tests/reproducers/signed/ClasspathManifestTest/resources/ClasspathManifestJNLPHrefTest.html:
+	* tests/reproducers/signed/ClasspathManifestTest/srcs/ClasspathManifest.java:
+	* tests/reproducers/signed/ClasspathManifestTest/srcs/META-INF/MANIFEST.MF:
+	* tests/reproducers/signed/ClasspathManifestTest/testcases/ClasspathManifestTest.java:
+	Test if manifest entry is searched for classpath only when in the plugin
+	is run without using jnlp_href.
+
+2012-08-14  Adam Domurad  <adomurad@redhat.com>
+
+	Reproducer for allowing unsigned content in META-INF/ folder. 
+	Derives from ReadPropertiesSigned test's signed jar.
+	* tests/reproducers/custom/UnsignedContentInMETAINF/resources/UnsignedContentInMETAINF.jnlp:
+	New, runs a modified version of ReadPropertiesSigned.jar (UnsignedContentInMETAINF.jar)
+	* tests/reproducers/custom/UnsignedContentInMETAINF/srcs/META-INF/unsigned_file_in_metainf: 
+	New, placed into a modified version of ReadPropertiesSigned.jar 
+	(UnsignedContentInMETAINF.jar) so that there is unsigned content in the
+	META-INF/ folder.
+	* tests/reproducers/custom/UnsignedContentInMETAINF/srcs/Makefile:
+	New, creates a modified version of ReadPropertiesSigned.jar, named 
+	UnsignedContentInMETAINF.jar, and places unsigned content inside its 
+	META-INF/ folder
+	* tests/reproducers/custom/UnsignedContentInMETAINF/testcases/UnsignedContentInMETAINF.java: 
+	Test driver for jnlp file
+
+2012-08-14  Adam Domurad  <adomurad@redhat.com>
+
+	Unit test for method in JCV, isMetaInfFile()
+	* netx/net/sourceforge/jnlp/tools/JarCertVerifier.java: 
+	Made isMetaInfFile package-private for testing purposes.
+	* tests/netx/unit/net/sourceforge/jnlp/tools/JarCertVerifierTest.java:
+	New, tests isMetaInfFile
+
+2012-08-07  Adam Domurad  <adomurad@redhat.com>
+
+	Fixes PR1106, plugin crashing with firefox + archlinux/gentoo
+	* plugin/icedteanp/IcedTeaNPPlugin.cc
+	(initialize_browser_functions): Account for the fact that
+	browserTable->size can be larger than sizeof(NPNetscapeFuncs)
+
+2012-07-31  Jiri Vanek  <jvanek@redhat.com>
+            Peter Hatina  <phatina@redhat.com>
+
+	Introduced configure option --with-gtk=2|3|default to be able
+	to compile against different version of GTK+ (2.x or 3.x).
+	* NEWS: mentioned bug fix
+	* acinclude.m4: (ITW_GTK_CHECK_VERSION) macro for getting GTK+ version
+	(ITW_GTK_CHECK) macro for checking GTK+ version
+
+2012-07-24  Adam Domurad  <adomurad@redhat.com>
+
+	CVE-2012-3422, RH840592: Potential read from an uninitialized
+	memory location.
+	* plugin/icedteanp/IcedTeaNPPlugin.cc
+	(get_cookie_info): Only attempt to perform this operation if there is a
+	valid plugin instance
+	(get_proxy_info): Only attempt to perform this operation if there is a
+	valid plugin instance
+
+2012-07-24  Adam Domurad  <adomurad@redhat.com>
+
+	* plugin/icedteanp/IcedTeaPluginUtils.cc
+	(IcedTeaPluginUtilities::strSplit): Replace usage of " " with proper 
+	delimiter
+
+2012-07-24  Adam Domurad  <adomurad@redhat.com>
+
+	Refactor JNLPFile#launchType into its own interface type (as opposed to
+	Object), LaunchDesc.
+	* netx/net/sourceforge/jnlp/AppletDesc.java: Add override annotation to
+	getMainClass().
+	* netx/net/sourceforge/jnlp/ApplicationDesc.java: Same as above
+	* netx/net/sourceforge/jnlp/InstallerDesc.java: Same as above
+	* netx/net/sourceforge/jnlp/JNLPFile.java: Make launchType a 
+	LaunchDesc object. Update getLaunchInfo() accordingly.
+	* netx/net/sourceforge/jnlp/LaunchDesc.java: New launch description. 
+	* netx/net/sourceforge/jnlp/Parser.java
+	(getLauncher): Return type changed to LaunchDesc
+	* netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java: Replace
+	occurences of instanceof with respect to launchType.
+
+2012-07-18  Danesh Dadachanji  <ddadacha@redhat.com>
+
+	Fix RH838417, Fix RH838559: Disambiguate signed applet security prompt
+	from certificate warning.
+	* NEWS: Added entries for RH838417 and RH838559.
+	* netx/net/sourceforge/jnlp/resources/Messages.properties:
+	Added SWarnFullPermissionsIgnorePolicy and updated SHttpsUnverified.
+	* netx/net/sourceforge/jnlp/security/CertWarningPane.java: Display
+	SWarnFullPermissionsIgnorePolicy if the cert is from a jar and is either
+	unverified or has a signing error. Also added warning.png to HTTPS dialogs.
+
+2012-07-11  Jiri Vanek  <jvanek@redhat.com>
+
+	try to close browser before kill it
+	* tests/reproducers/signed/AppletTestSigned/testcases/AppletTestSignedTests.java:
+	* tests/reproducers/simple/AppletTest/testcases/AppletTestTests.java:
+	* tests/reproducers/simple/CheckServices/testcases/CheckServicesTests.java
+	(evaluateSignedApplet) addapted to properly closed browser
+	* tests/reproducers/simple/CheckServices/srcs/CheckServices.java:
+	removed fixme section as it shuld work now	
+	* tests/test-extensions/net/sourceforge/jnlp/ProcessAssasin.java
+	(destroyProcess) new method, launching kill with SIGTERM before clasical
+	process.destroy()
+	* tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java:
+	removed Set<Thread> terminated, should be removed long ago
+
+2012-07-09  Saad Mohammad  <smohammad@redhat.com>
+
+	* netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java (initializeExtensions):
+	Checks and assigns the main-class name prior to the for loop.
+
+2012-07-09  Martin Olsson  <martin@minimum.se>
+
+	* plugin/icedteanp/IcedTeaPluginUtils.cc: Change calls from g_free
+	to free when allocated with calloc.
+	* plugin/icedteanp/IcedTeaPluginRequestProcessor.cc
+	(PluginRequestProcessor::call): Make sure args_array doesnt hold 
+	garbage when freed.
+	(_loadURL): Change calls from g_free to free when allocated with 
+	calloc.
+
+2012-07-09  Adam Domurad  <adomurad@redhat.com>
+
+	Ignore invalid jar files in applets, like the oracle plugin does.
+	* netx/net/sourceforge/jnlp/cache/IllegalResourceDescriptorException.java:
+	New exception type for ResourceTracker to throw instead of
+	IllegalArgumentException 
+	* netx/net/sourceforge/jnlp/cache/IllegalResourceDescriptorException.java:
+	Throws IllegalArgumentDescriptorException instead of 
+	IllegalArgumentException.
+	* netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java: 
+	(isInvalidJar): New, checks for ZipException in new JarFile(...)
+	(shouldFilterInvalidJars): New, checks if we are in an applet
+	(initializeResources): if 'shouldFilterInvalidJars()' is true and a jar
+	is not a valid jar file, the jar is filtered out and normal execution 
+	continues.
+
+2012-07-03  Saad Mohammad  <smohammad@redhat.com>
+
+	* netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java:
+	(JNLPClassLoader): New constructor that accepts an additional parameter
+	containing the main class name.
+	(getInstance): Accepts mainName as parameter to override application's
+	main class name
+	(initializeExtensions): Passes in the name of the application's main class
+	when creating a new JNLPClassLoader instance.
+	(initializeResources): If the loader owns no jars, it will consider
+	itself as signed if all of the extension loaders are signed. Also, if the
+	extension jars have the main class, it will set foundMainJar to true.
+	(initializeResources): If the main class was not found, check if it was
+	found within the extension jars.
+	(checkForMain): Uses the overwritten main class name (if set) when
+	searching for the main within the jars.
+	(hasMainJar): Returns true if this loader holds the main jar.
+	(hasMainInExtensions): Returns true if extension loaders have the main jar
+	* tests/jnlp_tests/signed/ExtensionJnlp/resources/UsesSignedJarExtension.jnlp:
+	* tests/jnlp_tests/signed/ExtensionJnlp/resources/UsesSignedJnlpExtension.jnlp:
+	* tests/jnlp_tests/signed/ExtensionJnlp/resources/UsesSignedJnlpJarAndSignedJarExtension.jnlp:
+	Launching jnlps that use extension jnlp as its resource.
+	* tests/jnlp_tests/signed/ExtensionJnlp/resources/UsesSignedJar.jnlp:
+	Launching jnlp that directly launches SignedJarResource class.
+	* tests/jnlp_tests/signed/ExtensionJnlp/resources/UsesSignedJnlp.jnlp:
+	Launching jnlp that directly launches SignedJnlpResource class.
+	* tests/jnlp_tests/signed/ExtensionJnlp/testcases/ExtensionJnlpTest.java:
+	Testcase that tests the launching of jnlp files containing extension jnlps
+	as resource.
+	* tests/jnlp_tests/signed/SignedJarResource/resources/SignedJarExtension.jnlp:
+	Component jnlp file that is used as an extension resource.
+	* tests/jnlp_tests/signed/SignedJarResource/srcs/SignedJarResource.java:
+	A simple java class that outputs a string.
+	* tests/jnlp_tests/signed/SignedJnlpResource/resources/UnmatchingSignedJnlpExtension.jnlp:
+	Component jnlp file that is used as an extension resource and does not
+	match the signed jnlp file.
+	* tests/jnlp_tests/signed/SignedJnlpResource/resources/MatchingSignedJnlpExtension.jnlp:
+	Component jnlp file that is used as an extension resource and matches the
+	signed jnlp file.
+	* tests/jnlp_tests/signed/SignedJnlpResource/srcs/JNLP-INF/APPLICATION_TEMPLATE.jnlp:
+	Signed jnlp file.
+	* tests/jnlp_tests/signed/SignedJnlpResource/srcs/SignedJnlpResource.java:
+	A simple java class that outputs a string.
+
+2012-07-02  Jiri Vanek  <jvanek@redhat.com>
+
+	Added missing headers
+	* tests/reproducers/simple/CreateClassLoader/resources/CreateClassLoader.jnlp: 
+	* tests/reproducers/simple/ReadEnvironment/resources/ReadEnvironment.jnlp: 
+	* tests/reproducers/simple/ReadProperties/resources/ReadProperties1.jnlp: 
+	* tests/reproducers/simple/ReadProperties/resources/ReadProperties2.jnlp: 
+	* tests/reproducers/simple/RedirectStreams/resources/RedirectStreams.jnlp: 
+	* tests/reproducers/simple/ReplaceSecurityManager/resources/ReplaceSecurityManager.jnlp: 
+	* tests/reproducers/simple/SetContextClassLoader/resources/SetContextClassLoader.jnlp: 
+	* tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java: 
+	* tests/test-extensions/net/sourceforge/jnlp/annotations/Bug.java: 
+	* tests/test-extensions/net/sourceforge/jnlp/annotations/KnownToFail.java: 
+	* tests/test-extensions/net/sourceforge/jnlp/annotations/NeedsDisplay.java: 
+	* tests/test-extensions/net/sourceforge/jnlp/annotations/TestInBrowsers.java: 
+	* tests/test-extensions/net/sourceforge/jnlp/browsertesting/Browser.java: 
+	* tests/test-extensions/net/sourceforge/jnlp/browsertesting/BrowserFactory.java: 
+	* tests/test-extensions/net/sourceforge/jnlp/browsertesting/BrowserTest.java: 
+	* tests/test-extensions/net/sourceforge/jnlp/browsertesting/BrowserTestRunner.java: 
+	* tests/test-extensions/net/sourceforge/jnlp/browsertesting/Browsers.java: 
+	* tests/test-extensions/net/sourceforge/jnlp/browsertesting/browsers/Chrome.java: 
+	* tests/test-extensions/net/sourceforge/jnlp/browsertesting/browsers/Chromium.java: 
+	* tests/test-extensions/net/sourceforge/jnlp/browsertesting/browsers/Epiphany.java: 
+	* tests/test-extensions/net/sourceforge/jnlp/browsertesting/browsers/Firefox.java: 
+	* tests/test-extensions/net/sourceforge/jnlp/browsertesting/browsers/LinuxBrowser.java: 
+	* tests/test-extensions/net/sourceforge/jnlp/browsertesting/browsers/Midory.java: 
+	* tests/test-extensions/net/sourceforge/jnlp/browsertesting/browsers/MozillaFamilyLinuxBrowser.java: 
+	* tests/test-extensions/net/sourceforge/jnlp/browsertesting/browsers/Opera.java: 
+	added license headers
+
+2012-07-02  Jiri Vanek  <jvanek@redhat.com>
+
+	Makefile adapted to recent (three changelog items) refactoring
+	* Makefile.am: (JNLP_TESTS_ENGINE_SRCDIR) now points correctly to
+	test-extensions. (JNLP_TESTS_ENGINE_TESTS_SRCDIR) new variable for
+	test-extensions-tests. (JNLP_TESTS_SRCDIR) now points to reproducers.
+	(JNLP_TESTS_ENGINE_TESTS_DIR) new variable for built
+	JNLP_TESTS_ENGINE_TESTS_SRCDIR
+	(netx-dist-tests-tests-source-files.txt) new target for list of
+	content of JNLP_TESTS_ENGINE_TESTS_SRCDIR.
+	(stamps/netx-dist-tests-tests-compile.stamp) new target for compiling
+	netx-dist-tests-tests-source-files.txt
+	(netx-dist-tests-source-files.tx) now depends on
+	stamps/netx-dist-tests-tests-compile.stamp
+	($(REPRODUCERS_CLASS_NAMES)) target is now working in JNLP_TESTS_ENGINE_TESTS_DIR
+	instead of JNLP_TESTS_ENGINE_DIR
+	(stamps/run-netx-dist-tests.stamp): added JNLP_TESTS_ENGINE_TESTS_DIR to classpath
+	(stamps/run-unit-test-code-coverage.stamp), (stamps/run-reproducers-test-code-coverage.stamp)
+	added JNLP_TESTS_ENGINE_TESTS_DIR to classpath and
+	JNLP_TESTS_ENGINE_TESTS_SRCDIR to sources path
+
+2012-07-02  Jiri Vanek  <jvanek@redhat.com>
+
+	All tests from test-extensions extracted to test-extensions-tests.
+	All inner classes in test-extensions extracted as outer classes
+	* tests/test-extensions/net/sourceforge/jnlp/ResourcesTest.java:
+	moved to test-extensions-tests
+	* tests/test-extensions-tests/net/sourceforge/jnlp/ResourcesTest.java:
+	new file, copied from test-extensions
+	* tests/test-extensions-tests/net/sourceforge/jnlp/ServerAccessTest.java:
+	all tests from original ServerAccess.java
+	* tests/test-extensions/net/sourceforge/jnlp/ContentReader.java:
+	* tests/test-extensions/net/sourceforge/jnlp/LogItem.java:
+	* tests/test-extensions/net/sourceforge/jnlp/LoggingBottleneck.java:
+	* tests/test-extensions/net/sourceforge/jnlp/ProcessAssasin.java:
+	* tests/test-extensions/net/sourceforge/jnlp/ProcessResult.java:
+	* tests/test-extensions/net/sourceforge/jnlp/ServerLauncher.java:
+	* tests/test-extensions/net/sourceforge/jnlp/TestsLogs.java:
+	* tests/test-extensions/net/sourceforge/jnlp/ThreadedProcess.java:
+	* tests/test-extensions/net/sourceforge/jnlp/TinyHttpdImpl.java:
+	new files, extracted classes from ServerAccess
+	* tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java:
+	extracted tests and inner classes
+
+2012-07-02  Jiri Vanek  <jvanek@redhat.com>
+
+	hg move tests/netx/jnlp_testsengine/ tests/test-extensions
+
+2012-07-02  Jiri Vanek  <jvanek@redhat.com>
+
+	hg move tests/jnlp_tests/ tests/reproducers
+
+2012-06-29  Jiri Vanek  <jvanek@redhat.com>
+
+	Fixed resource tests and Browsers.none behavior
+	* tests/netx/jnlp_testsengine/net/sourceforge/jnlp/ResourcesTest.java:
+	Added slash into all executeBrowsers urls.
+	Added midori and epiphany to simple proxies test.
+	* tests/netx/jnlp_testsengine/net/sourceforge/jnlp/browsertesting/BrowserTestRunner.java:
+	Corrected handling of Browsers.none together with -Dmodified.browsers.run switch
+
+2012-06-28  Omair Majid  <omajid@redhat.com>
+
+	* netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
+	(findClass): Invoke CodeBaseClassLoader.findClass with a flag to avoid
+	infinite recursion.
+	(CodeBaseClassLoader.findClass(String)): Delegate to ...
+	(CodeBaseClassLoader.findClass(String,boolean)): New method.
+	* tests/netx/unit/net/sourceforge/jnlp/runtime/CodeBaseClassLoaderTest.java
+	(testParentClassLoaderIsAskedForClasses): New method.
+
+2012-06-28 Jiri Vanek <jvanek@redhat.com>
+
+	Correctly backup all log files re-writable by emma during code-coverage
+	* Makefile.am: (EMMA_MODIFIED_FILES) new variable with list of files to
+	backup/restore. (stamps/run-unit-test-code-coverage.stamp) and
+	(stamps/run-reproducers-test-code-coverage.stamp) are now iterating over
+	EMMA_MODIFIED_FILES instead of enumerating them
+
+2012-06-28  Jiri Vanek  <jvanek@redhat.com>
+
+	Removed repeated re-runing of tests during coverage, stamped pac tests
+	* Makefile.am: (check-pac-functions) moved to target aliases and replaced
+	by stamps/check-pac-functions.stamp.
+	(clean-netx-unit-tests) added removing of  stamps/check-pac-functions.stamp
+	(stamps/exported-test-certs.stamp): no longer depends on
+	netx-dist-tests-remove-cert-from-public, logic of it have to be
+	copy-pasted from here.
+	(stamps/run-unit-test-code-coverage.stamp): no longer depends on check,
+	but was added direct dependences 
+
+2012-06-28  Adam Domurad  <adomurad@redhat.com>
+
+	Allow for folders in archive tag.
+	* netx/net/sourceforge/jnlp/PluginBridge.java:
+	(PluginBridge) Changes jar -> archive, parse contents with
+	addArchiveEntries.
+	(addArchiveEntries) New method. Adds entries ending with / to the list
+	of folders.
+	(getCodeBaseFolders) Returns the folders collected by addArchiveEntries
+	* netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java:
+	(initializeResources) If ran as plugin, add archive tag folders to the
+	code base loader.
+
+2012-06-27  Adam Domurad  <adomurad@redhat.com>
+
+	Tests folders in archive tag
+	* tests/jnlp_tests/custom/AppletFolderInArchiveTag/testcases/AppletFolderInArchiveTagTests.java:
+	Runs html file in browser
+	* tests/jnlp_tests/custom/AppletFolderInArchiveTag/srcs/Makefile:
+	packages compiled source files in folder
+	* tests/jnlp_tests/custom/AppletFolderInArchiveTag/srcs/AppletFolderInArchiveTag.java:
+	Simple output to confirm it is running
+	* tests/jnlp_tests/custom/AppletFolderInArchiveTag/resources/AppletFolderInArchiveTag.html:
+	Has folder in its archive tag that contains a class file
+
+2012-06-26  Jiri Vanek  <jvanek@redhat.com>
+
+	Added slipped midori and epiphany to recognized browsers.
+	* tests/netx/jnlp_testsengine/net/sourceforge/jnlp/browsertesting/BrowserFactory.java:
+	(BrowserFactory) added slipped cases for creating Epiphany and Midori singletons
+
+2012-06-26  Jiri Vanek  <jvanek@redhat.com>
+
+	* Makefile.am:  Most crucial variables exported to be used by custom Makefiles
+	(CUSTOM_REPRODUCERS): new variable to hold custom name
+	(ALL_NONCUSTOM_REPRODUCERS): new variable for gathering all except custom reproducers
+	(ALL_REPRODUCERS): now contains also custom ones
+	(stamps/junit-jnlp-dist-dirs): now depends also on junit-jnlp-dist-custom.txt
+	(junit-jnlp-dist-custom.txt): new target scanning for directories in jnlp_tests/custom
+	and saving them as list for future purposes.
+	(stamps/netx-dist-tests-prepare-reproducers.stamp): and
+	( stamps/change-dots-to-paths.stamp):iterate through ALL_NONCUSTOM_REPRODUCERS
+	instead of ALL__REPRODUCERS
+	(stamps/process-custom-reproducers.stamp) : new target for iterating by
+	junit-jnlp-dist-custom.txt through  jnlp_tests/custom/srcs* and launching
+	make prepare-reproducer in each.
+	(clean-custom-reproducers): same as above but launching make clean-reproducer
+	(run-netx-dist-tests) now depends on stamps/process-custom-reproducers.stamp
+	(clean-netx-dist-tests): now depends on clean-custom-reproducers and is removing
+	stamps/netx-dist-tests-copy-resources.stamp
+	(stamps/netx-dist-tests-copy-resources.stamp): new target extracting
+	copying of resources from stamps/netx-dist-tests-compile-testcases.stamp
+	* tests/jnlp_tests/README: described this mechanism a bit 
+
+2012-06-26 Jiri Vanek <jvanek@redhat.com>
+
+	Reproducer for classes which should be loaded before verification but are not
+	* tests/jnlp_tests/signed/InternalClassloaderWithDownloadedResource/resources/InternalClassloaderWithDownloadedResource-applet-hack.jnlp
+	jnlp launcher of applet variant with injecting new url to classlaoder
+	* tests/jnlp_tests/signed/InternalClassloaderWithDownloadedResource/resources/InternalClassloaderWithDownloadedResource-applet-new.jnlp
+	jnlp launcher of applet variant with custom classlaoder
+	* tests/jnlp_tests/signed/InternalClassloaderWithDownloadedResource/resources/InternalClassloaderWithDownloadedResource-hack.html
+	html launcher of applet variant with injecting new url to classlaoder
+	* tests/jnlp_tests/signed/InternalClassloaderWithDownloadedResource/resources/InternalClassloaderWithDownloadedResource-hack.jnlp
+	jnlp launcher of application variant with injecting new url to classlaoder
+	* tests/jnlp_tests/signed/InternalClassloaderWithDownloadedResource/resources/InternalClassloaderWithDownloadedResource-new.html
+	html launcher of applet variant with custom classlaoder
+	* tests/jnlp_tests/signed/InternalClassloaderWithDownloadedResource/resources/InternalClassloaderWithDownloadedResource-new.jnlp
+	jnlp launcher of application variant with custom classlaoder
+	* tests/jnlp_tests/signed/InternalClassloaderWithDownloadedResource/srcs/InternalClassloaderWithDownloadedResource.java:
+	Both application and applet reproducing behavior of this bug
+	* tests/jnlp_tests/signed/InternalClassloaderWithDownloadedResource/testcases/InternalClassloaderWithDownloadedResourceTest.java:
+	Testcase launching jnlp application, jnlp applet and html applet 
+
+2012-06-26  Jiri Vanek  <jvanek@redhat.com>
+
+	Last hope for not downloaded resources to be verified
+	* netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java:
+	(getCodeSourceSecurity): will now try to download and verify resource
+	which was downloaded outside of netx.
+	(alreadyTried) set for memory of once tried resources to not try again 
+
+2012-06-25  Adam Domurad  <adomurad@redhat.com>
+
+	Small comment cleanup to classes with missing or wrong descriptions.
+	* plugin/icedteanp/java/sun/applet/PluginMessageHandlerWorker.java: 
+	Comment at top fixed
+	* plugin/icedteanp/java/sun/applet/AppletSecurityContextManager.java: 
+	Same
+	* plugin/icedteanp/java/sun/applet/PluginException.java: Same
+	* plugin/icedteanp/java/sun/applet/PluginCallRequestFactory.java: Same
+	* netx/net/sourceforge/jnlp/PluginBridge.java: Add class description.
+	* plugin/icedteanp/java/sun/applet/PluginCallRequest.java: 
+	Removed FIXME that had already been fixed.
+
+2012-06-25  Adam Domurad  <adomurad@redhat.com>
+
+	Allow passing of plugin tables and browser tables in NP_Initialize that
+	are not the expected length but still large enough for our purposes.
+	* plugin/icedteanp/IcedTeaNPPlugin.cc
+	(initialize_browser_functions): New function to check size of passed
+	browser function table, and initialize 'browser_functions' global
+	variable.
+	(initialize_plugin_table): New function to check size of passed
+	plugin function table, and initialize proper plugin callbacks.
+	(NP_Initialize): Make use of initialization helper functions, get
+	rid of old size tests and error if the helper functions fail.
+
+2012-06-20  Adam Domurad  <adomurad@redhat.com>
+
+	* netx/net/sourceforge/jnlp/tools/JarCertVerifier.java
+	(verifyJar): two for loops made into for-each loops
+
+2012-06-19  Jiri Vanek  <jvanek@redhat.com>
+
+	various test for browser engine
+	* tests/jnlp_tests/simple/AppletTest/resources/appletAutoTests.html:
+	fixed missing parenthesis
+	* tests/jnlp_tests/simple/AppletTest/resources/appletAutoTests2.html:
+	new test excluding XslowX for applets
+	* tests/jnlp_tests/simple/AppletTest/testcases/AppletTestTests:
+	(doubleChrome) test for ensuring that two chrome browsers launched
+	behind themselves will not cause errors as they were without
+	criticalFixes patch
+	(AppletInBrowserTest) and (AppletInBrowserTestXslowX) testing methods
+	for all browser
+	* tests/jnlp_tests/simple/AppletTest/testcases/AppletBaseURLTest:
+	* tests/jnlp_tests/simple/AppletTest/testcases/CheckServicesTests:
+	* tests/jnlp_tests/simple/AppletTest/testcases/AppletReadsInvalidJarTests:
+	Included @TestInBrowser instead of plain executeBrowser
+	* tests/jnlp_tests/simple/deadlocktest/srcs/DeadlockTest.java: improved
+	to print sometimes something out
+	* tests/jnlp_tests/simple/deadlocktest/testcases/DeadLockTestTest.java:
+	(testDeadLockTestTerminatedBody) enhanced to ensure that not so much is
+	lost when process is terminated, but showing that something can be lost
+	(which is correct)
+	* tests/netx/jnlp_testsengine/net/sourceforge/jnlp/ResourcesTest.java:
+	(testNonExisitngBrowserWillNotDeadlock) testing taht when no browser is
+	set, then no deadlock happens as happen before criticalFixes's deadlyException
+	(testUnexistingProcessWillFailRecognizedly)  is actually testing deadlyException
+	(testNonExisitngBrowserWillNotCauseMess) some but with annotation which
+	was also harming output of tool little bit without TestInBrowsersAnnotation fixed.
+	(testBrowsers2) is testing all browsers configuration without annotation
+	and (testBrowser3) do the same configuration tests annotation driven
+	(testBrowser) body of above two methods. Is testing whether used
+	browsers are correctly linked with latest build
+	(testBrowsers1) is testing parsing of -D variable
+	(testListeners) annotated that needs display
+	* tests/netx/unit/net/sourceforge/jnlp/runtime/CodeBaseClassLoaderTest.java:
+	annotated with Bug annotation 
+
+2012-06-19  Jiri Vanek  <jvanek@redhat.com>
+
+	introduced possibility to run comfortably applets+html reproducers
+	* Makefile.am: used BROWSER_TESTS_MODIFICATION variable to pass global
+	switch from configure
+	* acinclude.m4: (IT_SET_GLOBAL_BROWSERTESTS_BHAVIOUR) new method
+	handling --with-browser-tests
+	* configure.ac: used IT_SET_GLOBAL_BROWSERTESTS_BHAVIOUR
+	switch and passing  BROWSER_TESTS_MODIFICATION variable to Makefile.
+	* tests/netx/jnlp_testsengine/net/sourceforge/jnlp/ServerAccess.java:
+	(currentBrowser) variable holding injected browser for ServerAccess instance
+	(loggedBrowser) static variable keeping id of (currentBrowser) for static
+	logging purposes
+	(modifyMethodWithForBrowser) new function changing the name of method to
+	"method - browser" for logging purposes
+	(getBrowserLocation) - returning path to process to be launched when
+	browser requested
+	(getBrowserParams) - gathering set default's browser settings
+	(set/getCurrentBrowsers) - set browser by id/return id of set browser
+	(set/getCurrentBrowser) - set browser instance /returns instance of
+	current browser
+	(executeBrowser) family of methods now cooperate with above methods for
+	default set browser
+	(executeBrowser(Browser) family to work with implicit browser
+	* tests/netx/jnlp_testsengine/net/sourceforge/jnlp/annotations/TestInBrowsers.java:
+	annotation for determining which browser(s) to use with annotated method
+	* tests/netx/jnlp_testsengine/net/sourceforge/jnlp/browsertesting/Browser.java:
+	interface for dealing with various browsers
+	* tests/netx/jnlp_testsengine/net/sourceforge/jnlp/browsertesting/BrowserFactory.java:
+	singleton for mapping configured browsers x requested browser x browsers proxies
+	* tests/netx/jnlp_testsengine/net/sourceforge/jnlp/browsertesting/BrowserTest.java:
+	Forefather of all testcases which have methods to do tests iniside browser.
+	Is allowing correct annotation -> proxy trasnver to VirtualServer for
+	selected method and is requesting custom runner from junit framework
+	* tests/netx/jnlp_testsengine/net/sourceforge/jnlp/browsertesting/BrowserTestRunner.java:
+	custom test Ruuner which is responsible for translating annotation and
+	run the method mutlipletimes for each requested browser and to name it properly
+	* tests/netx/jnlp_testsengine/net/sourceforge/jnlp/browsertesting/Browsers.java:
+	enumeration of abstract browsers and theirs sets or subsets.
+	* tests/netx/jnlp_testsengine/net/sourceforge/jnlp/browsertesting/browsers/*:
+	individual browsers proxies and theirs abstractions,namely:
+	* tests/netx/jnlp_testsengine/net/sourceforge/jnlp/browsertesting/browsers/Opera.java:
+	* tests/netx/jnlp_testsengine/net/sourceforge/jnlp/browsertesting/browsers/Firefox.java:
+	* tests/netx/jnlp_testsengine/net/sourceforge/jnlp/browsertesting/browsers/Chrome.java:
+	* tests/netx/jnlp_testsengine/net/sourceforge/jnlp/browsertesting/browsers/Chromium.java:
+	* tests/netx/jnlp_testsengine/net/sourceforge/jnlp/browsertesting/browsers/Midori.java:
+	* tests/netx/jnlp_testsengine/net/sourceforge/jnlp/browsertesting/browsers/Epiphany.java:
+	proxies for  browsers as name suggests
+	* tests/netx/jnlp_testsengine/net/sourceforge/jnlp/browsertesting/browsers/LinuxBrowser.java:
+	abstract forefather for all browsers implementing Browser interface. Is
+	setting /usr/bin as bin path, libjavaplugin.so as default plugin library name,
+	intorducing stubs for methods (eg 32/64 bit libs)
+	* tests/netx/jnlp_testsengine/net/sourceforge/jnlp/browsertesting/browsers/MozillaFamilyLinuxBrowser:
+	forefather for all browsers except Opera. Is unifying .mozilla/plugins directories
+
+2012-06-15  Jiri Vanek  <jvanek@redhat.com>
+
+	* tests/jnlp_tests/simple/AppletTest/resources/appletAutoTests.html:
+	Added quotes around parameters  of html applet tag.
+	* tests/jnlp_tests/simple/deadlocktest/testcases/DeadLockTestTest.java:
+	Output verification is counting with repeated and probably unfinished outputs.
+	* tests/jnlp_tests/simple/deadlocktest/srcs/DeadlockTest.java
+	Is now printing out sentence in intervals to avoid destroy-consume as much as possible
+	* tests/netx/unit/net/sourceforge/jnlp/runtime/CodeBaseClassLoaderTest.java:
+	Added bug annotation with threads on distro-pkg-dev 
+
+2012-06-15  Adam Domurad  <adomurad@redhat.com>
+
+	Fixed two memory leaks
+	* plugin/icedteanp/IcedTeaNPPlugin.cc
+	(consume_message): Call to g_strsplit matched with call to g_strfreev.
+	* plugin/icedteanp/IcedTeaPluginUtils.cc
+	(post): Removed copy of string, which assumed consumer freed string
+	(which was not true and not always possible)
+
+2012-06-11  Danesh Dadachanji  <ddadacha@redhat.com>
+
+	PR855: AppletStub getDocumentBase() doesn't return full URL
+	* NEWS: Added PR855 entry.
+	* plugin/icedteanp/IcedTeaNPPlugin.cc (plugin_get_documentbase):
+	Assign documentbase_copy directly to href's value instead of iterating
+	through the segments to remove the file from the path.
+	* tests/jnlp_tests/simple/AppletBaseURLTest/srcs/AppletBaseURL.java:
+	* tests/jnlp_tests/simple/AppletBaseURLTest/testcases/AppletBaseURLTest.java:
+	* tests/jnlp_tests/simple/AppletBaseURLTest/resources/AppletBaseURLTest.html:
+	* tests/jnlp_tests/simple/AppletBaseURLTest/resources/AppletBaseURLTest.jnlp:
+	* tests/jnlp_tests/simple/AppletBaseURLTest/resources/AppletJNLPHrefBaseURLTest.html:
+	New reproducer that checks the URLS that document and codebase
+	point are correct.
+
+2012-06-13  Danesh Dadachanji  <ddadacha@redhat.com>
+
+	Update CheckServices reproducer to handle browser testcase.
+	* tests/jnlp_tests/simple/CheckServices/testcases/CheckServicesTests.java:
+	Added browser test and annotation, refactored asserts into helper method.
+	* tests/jnlp_tests/simple/CheckServices/resources/CheckPluginServices.html:
+	New browser test file that runs applet using jnlp_href.
+
+2012-06-13  Jiri Vanek  <jvanek@redhat.com>
+
+	* tests/junit-runner/JunitLikeXmlOutputListener.java:
+	Introduced TEST_IGNORED_ATTRIBUTE to mark test as ignored if should be.
+	* tests/report-styles/jreport.xsl: Applied correct text and style for
+	tests with attribute ignored. 
+
+2012-06-12  Adam Domurad  <adomurad@redhat.com>
+
+	Fixes PR722, javaws failing to run with unsigned content in META-INF/
+	* NEWS: Added entry: Fixes PR722
+	* netx/net/sourceforge/jnlp/tools/JarCertVerifier.java: Changed
+	isSignatureRelated => isMetaInfFile. Now all files under META-INF/ are
+	disregarded in checking the jar signage.
+
+2012-06-11  Jiri Vanek  <jvanek@redhat.com>
+
+	Implemented xml logging backend
+	* Makefile.am: (stamps/run-netx-unit-tests.stamp) and 
+	(stamps/run-netx-dist-tests.stamp) removed redirection of streams as 
+	logging is now done in ServerAccess tests extensions
+	added xsltproc execution above generated xml log
+	xsltproc generating results html files is now receiving result of above 
+	as parameter
+	* tests/report-styles/jreport.xsl: log parameter is now accepted, and 
+	if set, then all tests are linking into specified file to show the log
+	* tests/report-styles/report.css: added styles for new links
+	* tests/report-styles/index.js: new functions to work for result of below sheet
+	* tests/report-styles/logs.xsl: new file, sheet to convert xml log to html file
+	* tests/report-styles/output.css: new file, styles of above html file
+	* tests/jnlp_tests/simple/deadlocktest/testcases/DeadLockTestTest.java:
+	* tests/netx/jnlp_testsengine/net/sourceforge/jnlp/ResourcesTest.java:
+	* tests/netx/jnlp_testsengine/net/sourceforge/jnlp/ServerAccess.java:
+	Tests', server's and ProcessAssasin's logs are now redirected to bottleneck
+	* tests/netx/jnlp_testsengine/net/sourceforge/jnlp/ServerAccess.java:
+	(LOGS_REPRINT) flag for debugging purposes, will enable reprinting to 
+	stdout/err again
+	(DEFAULT_LOG_FILE ) default name of xml output
+	(DEFAULT_STDERR_FILE)(DEFAULT_STDOUT_FILE)(DEFAULT_STDLOGS_FILE) default
+	values of plain text output files
+	(*ELEMENT) and( (*ATTRIBUTE) variables keeping repeated names of xml 
+	output parts
+	(writeXmlLog) method called from Sytsem.hook to save xml log
+	(addToXmlLog) method to record item to xml structure
+	(TestsLogs) and (LogItem) inner classes to keep logging information
+	(log) is now reprinting message with id to std out/err dependently on
+	(LOGS_REPRINT) but always to internal streams, possilbe exception is thrown
+	(logException) new method, shortcut to log exception in same way as message
+	(getTestMethod) now can handle methods inside ServerAccess class too 
+
+2012-06-11  Adam Domurad  <adomurad@redhat.com>
+
+	* NEWS: Added mention of fixing PR518
+
+2012-06-07  Saad Mohammad  <smohammad@redhat.com>
+
+	Allows the user to configure browser paths and/or disable browsers.
+	* acinclude.m4 (IT_FIND_BROWSER): Checks if the browser is set to be 
+	disabled, or if the path provided is valid. Otherwise, it locates the 
+	default path to the browser if found on the system.
+	* configure.ac: Uses IT_FIND_BROWSER to find/configure browsers.
+
+2012-06-06  Deepak Bhole <dbhole@redhat.com>
+
+	* netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
+	(getAccessControlContextForClassLoading): Iterate over codebase URLs only
+	if codeBaseLoader is not null.
+
+2012-06-05  Deepak Bhole <dbhole@redhat.com>
+
+	PR861: Allow loading from non codebase hosts. Allow code to connect to
+	hosting server.
+	* netx/net/sourceforge/jnlp/SecurityDesc.java
+	(getSandBoxPermissions): Only add host if it is not empty.
+	* netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
+	(getPermissions): Add SocketPermission for code source host.
+	(findLoadedClassAll): Call super methods privileged so that connection to
+	non codebase hosts can be made.
+	(findClass): Same.
+	(findResourcesBySearching): Same. Also use privileged context for enum
+	operations because the enum is defined on the fly by URLClassLoader and
+	checks for hosting server connectivity via next().
+	(getAccessControlContextForClassLoading): New method. Returns a control
+	context for classloader operations like find/load/etc.
+	(CodeBaseClassLoader::findClass): Call super methods privileged so that
+	connection to non codebase hosts can be made.
+	(CodeBaseClassLoader::findResource): Same.
+
+2012-06-05  Jiri Vanek  <jvanek@redhat.com>
+
+	* tests/netx/jnlp_testsengine/net/sourceforge/jnlp/annotations/KnownToFail.java
+	New file. Annotation for marking failing tests.
+	* tests/report-styles/jreport.xsl:
+	* tests/junit-runner/LessVerboseTextListener.java:
+	* tests/junit-runner/JunitLikeXmlOutputListener.java:  Added counting
+	and printing of @KnownToFail annotations if presented.
+	* tests/jnlp_tests/simple/Spaces can be everywhere/testcases/SpacesCanBeEverywhereTests.java:
+	(SpacesCanBeEverywhereRemoteTests1) (SpacesCanBeEverywhereRemoteTests2)
+	(SpacesCanBeEverywhereRemoteTests3)
+	* tests/netx/unit/net/sourceforge/jnlp/JNLPMatcherTest.java: (testTemplateCDATA)
+	(testApplicationCDATA)
+	* tests/netx/unit/net/sourceforge/jnlp/ParserCornerCases.java:
+	(testCDataFirstChild) (testCDataSecondChild) (testCommentInAttributes)
+	* tests/netx/unit/net/sourceforge/jnlp/ParserMalformedXml.java:
+	(testMalformedArguments) (testTagNotClosed) (testUnquotedAttributes)
+	marked as KnownToFail 
+
+2012-06-05  Jiri Vanek  <jvanek@redhat.com>
+
+	isDateInRange renamed to isDateInRange_internallForIcedTeaWebTesting
+	* netx/net/sourceforge/jnlp/runtime/pac-funcs.js: and
+	* tests/netx/pac/pac-funcs-test.js: 
+	(isDateInRange): Renamed to isDateInRange_internallForIcedTeaWebTesting.
+	(isDateInRange_internallForIcedTeaWebTesting): New function
+
+2012-06-04  Saad Mohammad <smohammad@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@redhat.com>
+
+	Fix to handle absolute paths passed into jnlp_href's value.
+	* netx/net/sourceforge/jnlp/PluginBridge.java
+	(PluginBridge): Uses context of codebase to evaluate jnlp_href's value.
+	Uses JNLPCreator's create method to make new JNLPFile variables.
+	New constructor that wraps around the original one, creating a new
+	JNLPCreator to use.
+	* netx/net/sourceforge/jnlp/JNLPCreator.java: New strategy pattern class
+	to be used to wrap around the creation of a JNLPFile. Replace this creator
+	when unit testing to skip running parsing code.
+	* tests/netx/unit/net/sourceforge/jnlp/PluginBridgeTest.java:
+	New class to unit test getEvaluatedJNLPHref.
+
+2012-06-04  Adam Domurad  <adomurad@redhat.com>
+
+	Added self to AUTHORS.
+	This patch fixes PR518, ensures null termination of strings based off
+	of NPVariant results.
+	* plugin/icedteanp/IcedTeaPluginUtils.h: Added declaration of
+	NPVariantAsString
+	* plugin/icedteanp/IcedTeaPluginUtils.cc
+	(NPVariantAsString): New. Converts an NPVariant to a
+	std::string, assumes it is a valid NPString.
+	(isObjectJSArray): Now uses NPVariantAsString, minor cleanup.
+	* plugin/icedteanp/IcedTeaJavaRequestProcessor.cc
+	(plugin_get_documentbase): Now uses NPVariantAsString.
+	* plugin/icedteanp/IcedTeaNPPlugin.cc
+	(NPVariantToString): Now uses NPVariantAsString, minor cleanup.
+
+2012-06-01  Deepak Bhole <dbhole@redhat.com>
+
+	PR863: Error passing strings to applet methods in Chromium
+	* plugin/icedteanp/IcedTeaJavaRequestProcessor.cc
+	(createJavaObjectFromVariant): Account for length of the characters.
+	* plugin/icedteanp/IcedTeaNPPlugin.cc (plugin_get_documentbase): Same.
+	* plugin/icedteanp/IcedTeaPluginRequestProcessor.cc (_eval): Print the
+	string's c_str rather than utf8characters.
+	* plugin/icedteanp/IcedTeaPluginUtils.cc (printNPVariant): Account for
+	length of the characters.
+	(NPVariantToString): Same.
+	(isObjectJSArray): Same.
+
+2012-05-30  Jiri Vanek  <jvanek@redhat.com>
+
+	Enabled multiple certificates and extracted variables
+	* Makefile.am: EXPORTED_TEST_CERT by EXPORTED_TEST_CERT_PREFIX and 
+	EXPORTED_TEST_CERT_SUFFIX for further composition
+	SIGNED_REPRODUCERS new variable for  iterating through signed reproducers
+	SIMPLE_REPRODUCERS new variable for  iterating through simple reproducers
+	ALL_REPRODUCER new variable for  iterating through all reproducers
+	(junit-jnlp-dist-signed.txt) replaced by
+	(stamps/junit-jnlp-dist-signed.stamp) which generates 
+	junit-jnlp-dist-signedX.txt for each directory with signed reproducers
+	(stamps/netx-dist-tests-prepare-reproducers.stamp)
+	(stamps/change-dots-to-paths.stamp) 
+	(stamps/netx-dist-tests-compile-testcases.stamp)
+	(run-netx-dist-codecoverage): extracted variables
+	(clean-netx-dist-tests): iterates through all the list and removes them
+	(stamps/netx-dist-tests-sign-some-reproducers.stamp): now iterate through
+	SIGNED_REPRODUCERS and creates special certificate for each member. Each
+	jar from this directory is then signed by corresponding certificate
+	(netx-dist-tests-remove-cert-from-public): iterates through all certificates
+	(stamps/netx-dist-tests-import-cert-to-public): exports each certificate
+	created during tests preparations
+	($(EXPORTED_TEST_CERT)) replaced by stamps/exported-test-certs.stamp which
+	create for each of SIGNED_REPRODUCERS individual certificate
+	(tests/jnlp_tests/README): mentioned possibility of multiple certificate
+
+2012-05-29  Jiri Vanek  <jvanek@redhat.com>
+
+	* netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java: (getPermissions):
+	New rethrow of exceptions and following condition make more accurate. 
+
+2012-05-29  Jiri Vanek  <jvanek@redhat.com>
+
+	Get rid of repeated sout/serr  in reproducers testcases/unit tests and
+	introduce bottleneck for loging.
+	* tests/netx/jnlp_testsengine/net/sourceforge/jnlp/ServerAccess.java:
+	(PROCESS_LOG) static flag for enabling/disabling automatic logging of 
+	statically executed processes.
+	(logErrorReprint) (logOutputReprint) (logNoReprint) new methods, to call  
+	logging bottleneck.
+	(log) main logging bottleneck, reprint message to according stream with 
+	calling test-class and test-method as suffix.
+	(getTestMethod) new method to analyze calling test-method.
+	(executeProcess) enhanced for conditional automatic logging of start of
+	process and outputs of process.
+	* tests/jnlp_tests/signed/AppletTestSigned/testcases/AppletTestSignedTests.java: 
+	* tests/jnlp_tests/signed/CacheReproducer/testcases/CacheReproducerTest.java: 
+	* tests/jnlp_tests/signed/MissingJar/testcases/MissingJarTest.java: 
+	* tests/jnlp_tests/signed/ReadPropertiesSigned/testcases/ReadPropertiesSignedTest.java: 
+	* tests/jnlp_tests/signed/Spaces can be everywhere signed/testcases/SpacesCanBeEverywhereTestsSigned.java: 
+	* tests/jnlp_tests/simple/AccessClassInPackage/testcases/AccessClassInPackageTest.java: 
+	* tests/jnlp_tests/simple/AddShutdownHook/testcases/AddShutdownHookTest.java: 
+	* tests/jnlp_tests/simple/AllStackTraces/testcases/AllStackTracesTest.java: 
+	* tests/jnlp_tests/simple/AppletTest/testcases/AppletTestTests.java: 
+	* tests/jnlp_tests/simple/CheckServices/testcases/CheckServicesTests.java: 
+	* tests/jnlp_tests/simple/CreateClassLoader/testcases/CreateClassLoaderTest.java: 
+	* tests/jnlp_tests/simple/InformationTitleVendorParser/testcases/InformationTitleVendorParserTest.java: 
+	* tests/jnlp_tests/simple/ManifestedJar1/testcases/ManifestedJar1Test.java: 
+	* tests/jnlp_tests/simple/ReadEnvironment/testcases/ReadEnvironmentTest.java: 
+	* tests/jnlp_tests/simple/ReadProperties/testcases/ReadPropertiesTest.java: 
+	* tests/jnlp_tests/simple/RedirectStreams/testcases/RedirectStreamsTest.java: 
+	* tests/jnlp_tests/simple/ReplaceSecurityManager/testcases/ReplaceSecurityManagerTest.java: 
+	* tests/jnlp_tests/simple/SetContextClassLoader/testcases/SetContextClassLoaderTest.java: 
+	* tests/jnlp_tests/simple/Spaces can be everywhere/testcases/SpacesCanBeEverywhereTests.java: 
+	* tests/jnlp_tests/simple/deadlocktest/testcases/DeadLockTestTest.java: 
+	* tests/jnlp_tests/simple/simpletest1/testcases/SimpleTest1Test.java: 
+	* tests/jnlp_tests/simple/simpletest2/testcases/SimpleTest2Test.java: 
+	* tests/netx/unit/net/sourceforge/jnlp/cache/CacheLRUWrapperTest.java: 
+	* tests/netx/unit/net/sourceforge/jnlp/runtime/CodeBaseClassLoaderTest.java: 
+	* tests/netx/unit/net/sourceforge/jnlp/util/replacements/BASE64EncoderTest.java: 
+	all System.out replaced by ServerAccess.logOutputReprint 
+	and System.err replaced by ServerAccess.logErrorReprint 
+
+2012-05-25  Adam Domurad <adomurad@redhat.com>
+
+	Changed for-loops over iterators and indices to for-each loops if they
+	were sufficient and clearer.
+	* netx/net/sourceforge/jnlp/JNLPFile.java: Changed for-loops that could
+	be expressed more clearly as for-each loops.
+	* netx/net/sourceforge/jnlp/PluginBridge.java: Same
+	* netx/net/sourceforge/jnlp/ResourcesDesc.java: Same
+	* netx/net/sourceforge/jnlp/cache/CacheUtil.java: Same
+	* netx/net/sourceforge/jnlp/cache/DefaultDownloadIndicator.java: Same
+	* netx/net/sourceforge/jnlp/cache/Resource.java: Same
+	* netx/net/sourceforge/jnlp/cache/ResourceTracker.java: Same
+	* netx/net/sourceforge/jnlp/runtime/AppletEnvironment.java: Same
+	* netx/net/sourceforge/jnlp/runtime/ApplicationInstance.java: Same
+	* plugin/icedteanp/java/netscape/javascript/JSObject.java: Same
+	* plugin/icedteanp/java/sun/applet/JavaConsole.java: Same
+	* plugin/icedteanp/java/sun/applet/PluginAppletViewer.java: Same
+
+2012-05-23  Adam Domurad  <adomurad@redhat.com>
+	Removed instances of snprintf where buffer size was not known. Added
+	buffer size constant for allocating buffers for numeric conversions.
+	* plugin/icedteanp/IcedTeaNPPlugin.cc: Removed usage of snprintf for
+	simple blanking of strings. Buffer size was misguided previously.
+	Used NUM_STR_BUFFER_SIZE constant to replace magic numbers/
+	* plugin/icedteanp/IcedTeaPluginUtils.cc: Made
+	NPVariantToString(NPVariant variant, std::string* result) use two
+	space indentation. Used NUM_STR_BUFFER_SIZE constant to replace magic
+	numbers.
+	* plugin/icedteanp/IcedTeaPluginUtils.h: Added constant,
+	NUM_STR_BUFFER_SIZE.
+
+2012-05-24  Danesh Dadachanji <ddadacha@redhat.com>
+
+	Fix use of src dir instead of build dir when whitelisting.
+	* Makefile.am (REPRODUCERS_CLASS_WHITELIST): Use abs_top_srcdir
+	instead of abs_top_builddir.
+
+2012-05-23  Martin Olsson <martin@minimum.se>
+
+	* plugin/icedteanp/IcedTeaPluginUtils.cc:
+	Tiny fixup for changeset 383; don't do free(stack_variable).
+
+2012-05-20  Jiri Vanek  <jvanek@redhat.com>
+
+	Reproducers engine enhanced for jars in subdirectories by "." naming convention
+	* Makefile.am: (stamps/change-dots-to-paths.stamp) new target to copy jars
+	with dots (.jar omitted) to the java-like package/directory structure in
+	jnlp_test_server
+	(EXPORTED_TEST_CERT) now depends on  stamps/change-dots-to-paths.stamp
+	(clean-netx-dist-tests) removes stamps/change-dots-to-paths.stamp too. 
+
+2012-05-24  Jiri Vanek  <jvanek@redhat.com>
+
+	Introduced whitelist for reproducers
+	* netx-dist-tests-whitelist: new file, contains regular expressions
+	(separated by space) for expr to select testcases which only will be
+	run. By default set to all by expression .*
+	* Makefile.am: (REPRODUCERS_CLASS_NAMES) When class with testcases is
+	going to be included in list, it is at first check for match in whitelist.
+	If there is no match, will not be included. 
+
+2012-05-24  Martin Olsson <martin@minimum.se>
+	
+	* plugin/icedteanp/IcedTeaPluginUtils.cc:
+	Fix two typos.
+
+2012-05-23  Deepak Bhole <dbhole@redhat.com>
+
+	* AUTHORS: Added Martin Olsson to list.
+
+2012-05-23  Martin Olsson  <martin@minimum.se>
+
+	* plugin/icedteanp/IcedTeaNPPlugin.cc:
+	Use g_mutex_free instead of g_free to free appletviewer_mutex (fixes
+	crash).
+
+2012-05-23  Deepak Bhole <dbhole@redhat.com>
+
+	* ChangeLog: Converted spaces to tabs in an older entry
+
+2012-05-23  Jiri Vanek  <jvanek@redhat.com>
+
+	* netx/net/sourceforge/jnlp/resources/Messages.properties: fixed error
+	in PBadNonrelativeUrl 
+
+2012-05-23 Jiri Vanek  <jvanek@redhat.com>
+
+	Added more debugging outputs
+	* netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java:
+	(getCodeSourceSecurity): added output message when no SecurityDesc is found
+	for some url/resource
+	* netx/net/sourceforge/jnlp/resources/Messages.properties: added LNoSecInstance
+	and LCertFoundIn values
+	* netx/net/sourceforge/jnlp/security/KeyStores.java: (getPathToKeystore):
+	new method, able to search for file used for creating of KeyStore if possible
+	* netx/net/sourceforge/jnlp/security/CertificateUtils.java: (inKeyStores)
+	using getPathToKeystore for debug output
+
+2012-05-23  Jiri Vanek  <jvanek@redhat.com>
+
+	* netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java: (getPermissions):
+	Any exception from this method is consumed somewhere. I have cough exception,
+	reprint it in debug mode and re-throw (to be lost). Main condition in this
+	method had several possible NullPointer exceptions. Separated and thrown before
+	this condition.
+
+2012-05-23  Jiri Vanek  <jvanek@redhat.com>
+
+	Enhanced about dialog
+	* extra/net/sourceforge/javaws/about/Main.java: Main frame and Main tab
+	renamed from "About NetX" to "About IcedTea-Web and NetX".
+	* extra/net/sourceforge/javaws/about/resources/about.html: mentioned 
+	IcedTea-Web.
+	* extra/net/sourceforge/javaws/about/resources/notes.html: List of authors
+	synchronized with AUTHORS, mentioned classpath's IcedTea-Web as homepage
+	of IcedTea-web.
+
+2012-05-23  Jiri Vanek  <jvanek@redhat.com>
+
+	Fixed error in reproducers source preparation
+	* Makefile.am: (stamps/netx-dist-tests-prepare-reproducers.stamp) removed
+	inappropriately used quotes when copying notSrcFiles. Source files now
+	copied only if src dir exists in reproducer
+
+2012-05-22  Adam Domurad  <adomurad@redhat.com>
+
+	Changed allocation of small, fixed-size buffers to stack-based 
+	allocations. Changed occurences of sprintf to the safer function
+	snprintf, added buffer information. While unlikely to change
+	functionality, snprintf adds an extra check to prevent buffer
+	overflows.
+	* plugin/icedteanp/IcedTeaNPPlugin.cc: Allocation of small buffers 
+	using malloc changed to stack allocation & changed sprintf calls to 
+	buffer-size aware snprintf calls. 
+	* plugin/icedteanp/IcedTeaPluginUtils.cc: Same as above.
+
+2012-05-22  Jiri Vanek  <jvanek@redhat.com>
+
+	* tests/jnlp_tests/signed/ReadPropertiesSigned/testcases/ReadPropertiesSignedTest.java:
+	* tests/jnlp_tests/simple/AddShutdownHook/testcases/AddShutdownHookTest.java:
+	* tests/jnlp_tests/simple/AllStackTraces/testcases/AllStackTracesTest.java:
+	* tests/jnlp_tests/simple/CreateClassLoader/testcases/CreateClassLoaderTest.java:
+	* tests/jnlp_tests/simple/ReadEnvironment/testcases/ReadEnvironmentTest.java:
+	* tests/jnlp_tests/simple/ReadProperties/testcases/ReadPropertiesTest.java:
+	* tests/jnlp_tests/simple/RedirectStreams/testcases/RedirectStreamsTest.java:
+	* tests/jnlp_tests/simple/ReplaceSecurityManager/testcases/ReplaceSecurityManagerTest.java:
+	* tests/jnlp_tests/simple/SetContextClassLoader/testcases/SetContextClassLoaderTest.java:
+	All exact matches upon AccessControlException replaced by regular expression matching both jdk7 and jdk6 syntax 
+
+2012-05-21  Jiri Vanek  <jvanek@redhat.com>
+
+	* Makefile.am: mzilla-filesystem linking targets now counts also with 
+	midori and epiphany. Extracted duplicated entries to variables
+	* configure.ac: added  check for midori and epiphany
+
+2012-05-21  Jiri Vanek  <jvanek@redhat.com>
+
+	Added detection of installed browsers and added targets to create
+	symbolic links from install dir to browsers' plugin directories.
+	Primarily for testing purposes
+	* Makefile.am: (stamps/user-links.stamp) with alias (links) - new target for
+	creating symlinks for all users. One must be root to execute this target.
+	(stamps/global-links.stamp) with alias (user-links) - new target
+	for creating symlinks for logged user only. Because opera is missing this feature,
+	quite useless for testing or dependence targets, but good for live user.
+	(restore-global-links): target for restoring original global links.
+	One must be root again
+	(restore-user-links): target for restoring user's links
+	* configure.ac: added basic check whether and which browsers are
+	installed 
+
+2012-05-18  Jiri Vanek  <jvanek@redhat.com>
+
+	Fixed behavior when encoded/characters needed encoding included in url
+	* NEWS: mentioned PR811
+	* netx/net/sourceforge/jnlp/cache/CacheUtil.java: (urlEquals) Enhanced
+	to be able compare encoded/decoded urls correctly.
+	(notNullUrlEquals) new method to separate comparing of individual parts of
+	url from null checks
+	* netx/net/sourceforge/jnlp/cache/ResourceTracker.java: (addResource)
+	is now encoding url if needed. (normalizeUrl) new method to encode path in
+	url of all except file protocol. (normalizeChunk) New method for encoding
+	of atomic piece.
+
+2012-05-18  Jiri Vanek  <jvanek@redhat.com>
+
+	More tests for Spaces and characters in urls
+	* netx/net/sourceforge/jnlp/cache/CacheLRUWrapper.java: and
+	* netx/net/sourceforge/jnlp/cache/CacheUtil.java: for unit-tests
+	purposes (cacheDir) make to point to tmp dir when no
+	DeploymentConfiguration	exists.
+	* tests/jnlp_tests/signed/Spaces can be everywhere signed/:
+	couple of new test doing the same as simple "Spaces can be everywhere"
+	but are signed
+	* tests/jnlp_tests/simple/Spaces can be everywhere/: added new test-cases
+	and html/jnlp test files to try more combinations of encodable characters
+	x launches
+	* tests/netx/unit/net/sourceforge/jnlp/cache/ResourceTrackerTest.java:
+	unittest for url encoder behavior
+	* tests/netx/unit/net/sourceforge/jnlp/cache/CacheUtilTest.java:
+	unittest for urlEquals function
+
+2012-05-17  Adam Domurad  <adomurad@redhat.com>
+
+	Fixed uses of == to compare String objects to .equals where 
+	appropriate.
+	Noted a non-obvious use of == to compare a 'magic' String reference.
+	* netx/net/sourceforge/jnlp/JNLPFile.java:
+	Changed calls that compare String contents from == to .equals
+	* plugin/icedteanp/java/sun/applet/GetMemberPluginCallRequest.java: 
+	Same
+	* plugin/icedteanp/java/sun/applet/PluginCallRequestFactory.java:
+	Same
+	* netx/net/sourceforge/jnlp/Version.java: Added comment explaining why
+	== was used vs .equals
+
+2012-05-14  Jiri Vanek  <jvanek@redhat.com>
+
+	* tests/netx/unit/net/sourceforge/jnlp/runtime/CodeBaseClassLoaderTest.java:
+	* tests/netx/unit/net/sourceforge/jnlp/cache/CacheLRUWrapperTest.java:
+	System.out replaced with System.err 
+
+2012-05-14  Jiri Vanek  <jvanek@redhat.com>
+
+	* tests/junit-runner/JunitLikeXmlOutputListener.java: fixed indentation
+	and spacing
+
+2012-05-11  Thomas Meyer  <thomas@m3y3r.de>
+
+	* tests/netx/unit/net/sourceforge/jnlp/util/PropertiesFileTest.java: Add
+	some unit tests for the PropertiesFile class 
+	* tests/netx/unit/net/sourceforge/jnlp/cache/CacheLRUWrapperTest.java: Add
+	some unit tests for the CacheLRUWrapper class
+	* netx/net/sourceforge/jnlp/util/PropertiesFile.java: Use last
+	modification timestamp of the underlying file to lazy load properties.
+	(load): Only reload file, if the file modification timestamp has changed.
+	(store): Actually fsync() the file to disk.
+	* netx/net/sourceforge/jnlp/services/XPersistenceService.java (create):
+	Fix coding style
+	* netx/net/sourceforge/jnlp/cache/CacheLRUWrapper.java (load): Only check
+	data when the recently_used file was reloaded.
+
+2012-05-02  Jiri Vanek  <jvanek@redhat.com>
+
+	Introduced new annotations Bug (to connect test/reproducer with documentation)
+	and NeedsDisplay which tells the launching engine that this particular 
+	test needs Display. Based on ptisnovs's ideas and jtreg experiences
+	*Makefile.am: (JUNIT_RUNNER_JAR), (stamps/run-netx-unit-tests.stamp) and
+	(stamps/run-unit-test-code-coverage.stamp) are now dependent on (stamps/netx-dist-tests-compile)
+	 and classpaths inside them have been enriched for JNLP_TESTS_ENGINE_DIR
+	which contains definitions of those annotations
+	*tests/jnlp_tests/simple/CheckServices/testcases/CheckServicesTests.java: and
+	*tests/jnlp_tests/simple/ManifestedJar1/testcases/ManifestedJar1Test.java: and
+	*tests/jnlp_tests/simple/Spaces can be everywhere/testcase/SpacesCanBeEverywhereTests.java:
+	 filled Bug annotations
+	*tests/junit-runner/JunitLikeXmlOutputListener.java: made to understand 
+	Bug annotation
+	*tests/netx/jnlp_testsengine/net/sourceforge/jnlp/annotations/NeedsDisplay.java:
+	and
+	*tests/netx/jnlp_testsengine/net/sourceforge/jnlp/annotations/Bug.java:
+	annotations definitions
+	*tests/report-styles/jreport.xsl: made nice links from bug annotation 
+	prepared by JunitLikeXmlOutputListener 
+
+2012-04-24  Omair Majid  <omajid@redhat.com>
+
+	* Makefile.am
+	(RUNTIME): Add resources.jar.
+	(stamps/run-unit-test-code-coverage.stamp) [WITH_EMMA]: Add resouces.jar
+	to classpath.
+	(stamps/run-reproducers-test-code-coverage.stamp) [WITH_EMMA]: Include
+	resources.jar in classpath.
+	(stamps/bootstrap-directory.stamp): Create a link to resources.jar in
+	BOOT_DIR.
+
+2012-04-19  Omair Majid  <omajid@redhat.com>
+
+	PR918: java applet windows uses a low resulution black/white icon
+	* NEWS: Update with fix.
+	* netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java: Remove windowIcon.
+	(initialize): Do not call loadWindowIcon.
+	(getWindowIcon): Remove.
+	(setWindowIcon): Remove.
+	(loadWindowIcon): Remove.
+	* netx/net/sourceforge/jnlp/runtime/JNLPSecurityManager.java
+	(checkTopLevelWindow): Do not set the icon for all top level windows. Use
+	the default java icon instead.
+	* netx/net/sourceforge/jnlp/util/ImageResources.java: New file. Provides
+	access to icons.
+	* netx/net/sourceforge/jnlp/JNLPSplashScreen.java (JNLPSplashScreen),
+	* netx/net/sourceforge/jnlp/cache/DefaultDownloadIndicator.java
+	(getListener),
+	* netx/net/sourceforge/jnlp/controlpanel/AdvancedProxySettingsDialog.java
+	(AdvancedProxySettingsDialog),
+	* netx/net/sourceforge/jnlp/controlpanel/CacheViewer.java (CacheViewer),
+	* netx/net/sourceforge/jnlp/controlpanel/ControlPanel.java (ControlPanel),
+	* netx/net/sourceforge/jnlp/security/SecurityDialog.java (SecurityDialog),
+	* netx/net/sourceforge/jnlp/security/viewer/CertificateViewer.java
+	(CertificateViewer),
+	* netx/net/sourceforge/jnlp/util/BasicExceptionDialog.java (show),
+	* plugin/icedteanp/java/sun/applet/JavaConsole.java (initialize):
+	Explicitly load icons.
+	* tests/netx/unit/net/sourceforge/jnlp/util/ImageResourcesTest.java: Test
+	for ImageResources class.
+
+2012-04-18  Jiri Vanek  <jvanek@redhat.com>
+
+	Allowed signed applets in automatic reproducers tests
+	* tests/jnlp_tests/signed/AppletTestSigned/resources/AppletTestSigned.html:
+	html file for launching signed applet. Its style is different from the one for
+	calling unsigned applets - red. 
+	* tests/jnlp_tests/signed/AppletTestSigned/resources/AppletTestSigned.jnlp:
+	jnlp file for launched signed applet
+	* tests/jnlp_tests/signed/AppletTestSigned/srcs/AppletTestSigned.java
+	body of signed applet
+	* tests/jnlp_tests/signed/AppletTestSigned/testcases/AppletTestSignedTests.java:
+	(AppletTestSignedTest): testing method to launch signed applet in javaws
+	(AppletTestSignedFirefoxTest): testing method to launch signed applet in
+	browser
+	* Makefile.am: PUBLIC_KEYSTORE_PASS, EXPORTED_TEST_CERT, TEST_CERT_ALIAS,
+	PUBLIC_KEYSTORE PUBLIC_KEYSTORE_PASS: new global variables holding
+	keystores' credentials
+	(clean-local): clean-bootstrap-directory moved to be last one, as keytool
+	is necessary for removing certificate
+	(EXPORTED_TEST_CERT): new target exporting certificate from testing keystore
+	(stamps/netx-dist-tests-import-cert-to-public): new target to import
+	certificate to PUBLIC_KEYSTORE
+	(netx-dist-tests-remove-cert-from-public): new target removing testing
+	certificate from PUBLIC_KEYSTORE
+	(clean-netx-dist-tests): now depends on netx-dist-tests-remove-cert-from-public
+	and is removing EXPORTED_TEST_CERT file
+
+2012-04-17  Jiri Vanek <jvanek@redhat.com>
+
+	Rewritten DeadLockTestTest to stop failing in more then 1/2 of cases
+	All assassinated processes were hanging as zombies, killed forcibly by
+	kill -9 now.
+	* /tests/jnlp_tests/simple/deadlocktest/testcases/DeadLockTestTest.java:
+	(countJavaInstances) now return pids of found javas.
+	(killDiff) new method killing zombie javas forcibly.
+
+2012-04-11  Jiri Vanek  <jvanek@redhat.com>
+
+	* Makefile.am: EMMA_JAVA_ARGS, new variable for adjusting emma runs. 
+	Currently set to -Xmx2G.
+	(stamps/run-unit-test-code-coverage.stamp),
+	(stamps/run-reproducers-test-code-coverage.stamp),
+	(run-test-code-coverage): Use EMMA_JAVA_ARGS in theirs emma runs.
+
+2012-06-04  Jiri Vanek <jvanek@redhat.com>
+            Thomas Meyer <thomas@m3y3r.de>
+
+	* makefile.am: (stamps/run-netx-dist-tests.stamp) and
+	               (run-reproducers-test-code-coverage.stamp)
+	now using $(javaws) variable instead of plaintext javaws
+	* netx/net/sourceforge/jnlp/cache/CacheLRUWrapper.java: (checkData) new
+	method checking for sanity of cache entries
+	(load) now checks for data sanity after loading, and stores without
+	corrupted items if necessary
+	(Comparator.compare) for sorting lru items. Now redundant checking for
+	sanity removed
+	* netx/net/sourceforge/jnlp/cache/CacheUtil.java: (getCacheFile) don't
+	call lruHandler.store twice for new cache entries
+	(getCacheFileIfExist) removed iteration and cleaning mechanism
+	* netx/net/sourceforge/jnlp/resources/Messages.properties: modified
+	cache messages
+	* tests/jnlp_tests/signed/CacheReproducer/testcases/CacheReproducerTest.java
+	Added test for checking corrupted path in entry and all tests adapted for
+	exception thrown only in debug mode
+
+2012-04-04  Danesh Dadachanji <ddadacha@redhat.com>
+
+	Change the name of JarSigner to JarCertVerifier to make it more
+	relevant to the purpose of the file.
+	* netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
+	* netx/net/sourceforge/jnlp/tools/KeyStoreUtil.java:
+	Replace all instances, paramaters and references of JarSigner
+	by JarCertVerifier.
+	* netx/net/sourceforge/jnlp/security/CertWarningPane.java
+	* netx/net/sourceforge/jnlp/security/CertsInfoPane.java
+	* netx/net/sourceforge/jnlp/security/MoreInfoPane.java
+	* netx/net/sourceforge/jnlp/security/SecurityDialogs.java:
+	Replaced all paramaters, references and variable names of JarSigner
+	to CertVerifier to match the variable object type.
+	* netx/net/sourceforge/jnlp/security/SecurityDialog.java (getJarSigner):
+	Renamed to getCertVerifier as it returns the certVerfier instance.
+	* netx/net/sourceforge/jnlp/tools/JarSigner.java:
+	Renamed to JarCertVerifier.
+	* netx/net/sourceforge/jnlp/tools/JarCertVerifier.java:
+	The rename of JarSigner.
+
+2012-04-05  Jiri Vanek <jvanek@redhat.com>
+
+	Fixing issue when process was not launched at all and when was killed but
+	left behind living/hanging, fixing mime-types
+	* tests/netx/jnlp_testsengine/net/sourceforge/jnlp/ServerAccess.java:
+	(getContentOfStream) this method overloaded with possibility to specify
+	encoding (I needed to set it to ASCII in one test)
+	(deadlyException) field introduced in ThreadedProcess to record exception
+	caused by impassibility of launching the process. And so process have
+	been null without any sign why.
+	(TinyHttpdImpl) now correctly returns known mime types
+	(ProcessAssasin) can now skip or smoothly (and finally correctly)
+	destroy its process, and all his logging messages were done null-proof
+	(as deadlyException now allows)
+	Asynchronous (ContentReader) have been silenced when complaining about 
+	closed streams by Assassin.
+
+2012-04-03  Danesh Dadachanji  <ddadacha@redhat.com>
+
+	Change all vendors in JNLP test suite to IcedTea and homepage href's to
+	a link to IcedTea-Web's wiki page.
+	* tests/jnlp_tests/signed/AccessClassInPackageSigned/resources/AccessClassInPackageSignedJAVAXJNLP.jnlp
+	* tests/jnlp_tests/signed/AccessClassInPackageSigned/resources/AccessClassInPackageSignedNETSF.jnlp
+	* tests/jnlp_tests/signed/AccessClassInPackageSigned/resources/AccessClassInPackageSignedSELF.jnlp
+	* tests/jnlp_tests/signed/AccessClassInPackageSigned/resources/AccessClassInPackageSignedSUNSEC.jnlp
+	* tests/jnlp_tests/signed/CacheReproducer/resources/CacheReproducer1.jnlp
+	* tests/jnlp_tests/signed/CacheReproducer/resources/CacheReproducer1_1.jnlp
+	* tests/jnlp_tests/signed/CacheReproducer/resources/CacheReproducer2.jnlp
+	* tests/jnlp_tests/signed/CacheReproducer/resources/CacheReproducer2_1.jnlp
+	* tests/jnlp_tests/signed/MissingJar/resources/MissingJar.jnlp
+	* tests/jnlp_tests/signed/MissingJar/resources/MissingJar2.jnlp
+	* tests/jnlp_tests/signed/MissingJar/resources/MissingJar3.jnlp
+	* tests/jnlp_tests/signed/MissingJar/resources/MissingJar4.jnlp
+	* tests/jnlp_tests/signed/ReadPropertiesBySignedHack/resources/ReadPropertiesBySignedHack.jnlp
+	* tests/jnlp_tests/signed/ReadPropertiesSigned/resources/ReadPropertiesSigned1.jnlp
+	* tests/jnlp_tests/signed/ReadPropertiesSigned/resources/ReadPropertiesSigned2.jnlp
+	* tests/jnlp_tests/signed/SimpletestSigned1/resources/SimpletestSigned1.jnlp
+	* tests/jnlp_tests/simple/AccessClassInPackage/resources/AccessClassInPackageJAVAXJNLP.jnlp
+	* tests/jnlp_tests/simple/AccessClassInPackage/resources/AccessClassInPackageNETSF.jnlp
+	* tests/jnlp_tests/simple/AccessClassInPackage/resources/AccessClassInPackageSELF.jnlp
+	* tests/jnlp_tests/simple/AccessClassInPackage/resources/AccessClassInPackageSUNSEC.jnlp
+	* tests/jnlp_tests/simple/AddShutdownHook/resources/AddShutdownHook.jnlp
+	* tests/jnlp_tests/simple/AllStackTraces/resources/AllStackTraces.jnlp
+	* tests/jnlp_tests/simple/AppletTest/resources/AppletTest.jnlp
+	* tests/jnlp_tests/simple/CheckServices/resources/CheckServices.jnlp
+	* tests/jnlp_tests/simple/CreateClassLoader/resources/CreateClassLoader.jnlp
+	* tests/jnlp_tests/simple/InformationTitleVendorParser/resources/TitleParser.jnlp
+	* tests/jnlp_tests/simple/InformationTitleVendorParser/resources/TitleVendorParser.jnlp
+	* tests/jnlp_tests/simple/InformationTitleVendorParser/resources/VendorParser.jnlp
+	* tests/jnlp_tests/simple/ManifestedJar1/resources/ManifestedJar-1main2mainAppDesc.jnlp
+	* tests/jnlp_tests/simple/ManifestedJar1/resources/ManifestedJar-1main2mainNoAppDesc.jnlp
+	* tests/jnlp_tests/simple/ManifestedJar1/resources/ManifestedJar-1main2nothingNoAppDesc.jnlp
+	* tests/jnlp_tests/simple/ManifestedJar1/resources/ManifestedJar-1mainHaveAppDesc.jnlp
+	* tests/jnlp_tests/simple/ManifestedJar1/resources/ManifestedJar-1mainNoAppDesc.jnlp
+	* tests/jnlp_tests/simple/ManifestedJar1/resources/ManifestedJar-1noAppDesc.jnlp
+	* tests/jnlp_tests/simple/ManifestedJar1/resources/ManifestedJar-1noAppDescAtAll.jnlp
+	* tests/jnlp_tests/simple/ManifestedJar1/resources/ManifestedJar-1nothing2nothingAppDesc.jnlp
+	* tests/jnlp_tests/simple/ManifestedJar1/resources/ManifestedJar-1nothing2nothingNoAppDesc.jnlp
+	* tests/jnlp_tests/simple/ReadEnvironment/resources/ReadEnvironment.jnlp
+	* tests/jnlp_tests/simple/ReadProperties/resources/ReadProperties1.jnlp
+	* tests/jnlp_tests/simple/ReadProperties/resources/ReadProperties2.jnlp
+	* tests/jnlp_tests/simple/RedirectStreams/resources/RedirectStreams.jnlp
+	* tests/jnlp_tests/simple/ReplaceSecurityManager/resources/ReplaceSecurityManager.jnlp
+	* tests/jnlp_tests/simple/SetContextClassLoader/resources/SetContextClassLoader.jnlp
+	* tests/jnlp_tests/simple/Spaces can be everywhere/resources/Spaces can be everywhere1.jnlp
+	* tests/jnlp_tests/simple/Spaces can be everywhere/resources/Spaces can be everywhere2.jnlp
+	* tests/jnlp_tests/simple/Spaces can be everywhere/resources/SpacesCanBeEverywhere1.jnlp
+	* tests/jnlp_tests/simple/deadlocktest/resources/deadlocktest.jnlp
+	* tests/jnlp_tests/simple/deadlocktest/resources/deadlocktest_1.jnlp
+	* tests/jnlp_tests/simple/simpletest1/resources/simpletest1.jnlp
+	* tests/jnlp_tests/simple/simpletest1/resources/simpletestCustomSplash.jnlp
+	* tests/jnlp_tests/simple/simpletest1/resources/simpletestMegaSlow.jnlp
+	* tests/jnlp_tests/simple/simpletest1/resources/simpletestSlow.jnlp
+	* tests/jnlp_tests/simple/simpletest1/resources/simpletestSlowBrokenCustomSplash.jnlp
+	* tests/jnlp_tests/simple/simpletest1/resources/simpletestSlowSlowCustomSplash.jnlp
+	* tests/jnlp_tests/simple/simpletest2/resources/simpletest2.jnlp:
+	Replaced the specified vendor with IcedTea and homepage with a link to
+	IcedTea-Web's wiki.
+
+2012-04-03  Omair Majid  <omajid@redhat.com>
+
+	* netx/net/sourceforge/jnlp/runtime/pac-funcs.js: Replace incorrect use of
+	getYear() with getFullYear().
+	(inYearMonthDateRange): Add missing conditional case.
+	* tests/netx/pac/pac-funcs-test.js
+	(runTest): New function.
+	(runTests): Call runTest.
+	(incDate): Deal with month/year wrapping around.
+	(decDate): Removed.
+	(testDateRange, testDateRange2, testDateRange3): Handle wrapping of month
+	and days.
+
+2012-04-03  Jiri Vanek <jvanek@redhat.com>
+
+	Tests virtual server thread marked as daemon by default
+	* tests/netx/jnlp_testsengine/net/sourceforge/jnlp/ServerAccess.java:
+	All (ServerLauncher) instances returned by methods were marked as daemon
+	by default. Possibility to change and api were kept. 
+
+2012-03-30  Danesh Dadachanji  <ddadacha@redhat.com>
+
+	Certificate start dates are not being checked, they are still verified
+	even if the date has yet not been reached.
+	* netx/net/sourceforge/jnlp/tools/JarSigner.java (verifyJar): If the start
+	date is in the future, set notYetValidCert to true.
+
+2012-03-21  Omair Majid  <omajid@redhat.com>
+
+	* tests/netx/unit/net/sourceforge/jnlp/JNLPMatcherTest.java
+	(testIsMatchDoesNotHangOnLargeData): New method.
+
+2012-03-21  Lars Herschke  <lhersch@dssgmbh.de>
+
+	PR898: signed applications with big jnlp-file doesn't start
+	* netx/net/sourceforge/jnlp/JNLPMatcher.java (JNLPMatcher): Handle large
+	files correctly.
+
+2012-03-19  Danesh Dadachanji  <ddadacha@redhat.com>
+
+	Fix failing unit test missing title/vendor tags in the JNLP stream.
+	* tests/netx/unit/net/sourceforge/jnlp/ParserCornerCases.java
+	(testNestedComments): Added title and vendor tags to malformedJnlp. 
+
+2012-03-19  Jiri Vanek <jvanek@redhat.com>
+	* tests/jnlp_tests/signed/CacheReproducer/testcases/CacheReproducerTest.java: 
+	 as javaws have now integrated splash, I have changed this test to lunch
+	 javaws -Xclearcache with -headless to skip this logo (although it is 
+	not fatal fr testrun itself)
+	* tests/jnlp_tests/simple/AppletTest/resources/appletAutoTests.html: 
+	 this html file is lunched during tests run in browser and stdout of 
+	 lunched applet is examined. Is lunched with slow resources to test
+	 spalshscreen
+	* tests/jnlp_tests/simple/AppletTest/resources/appletViewTest.html: this 
+	test html file is dedicated to manual lunch and let user to look how the
+	 applet (with slow loading) is 	loaded and how looks splashscreen in
+	 small mode and in large mode
+	* tests/jnlp_tests/simple/AppletTest/testcases/AppletTestTests.java: 
+	 test is enriched for lunching the html file with applet in browser and
+	 is examining output of this file. Browser must be always terminated as
+	 there is no way how to close from inside
+	* tests/jnlp_tests/simple/simpletest1/resources/netxPlugin.png: 
+	 image to let user observe that user-defined splashscreen is still
+	 working even when internal splashscreen is enabled
+	* tests/jnlp_tests/simple/simpletest1/resources/simpletestCustomSplash.jnlp:
+	 this and all jnlp files below are just for manual lunching and for
+	 watching various lunches of splash screen - slow loading of resources 
+	 and with custom splash
+	* tests/jnlp_tests/simple/simpletest1/resources/simpletestMegaSlow.jnlp:
+	slow loading of resource and (XslowX)jnlp also
+	* tests/jnlp_tests/simple/simpletest1/resources/simpletestSlow.jnlp:
+	 slow loading of resource
+	* tests/jnlp_tests/simple/simpletest1/resources/simpletestSlowBrokenCustomSplash.jnlp: 
+	 slow loading of resource with broken user's splash (our internal will be used)
+	* tests/jnlp_tests/simple/simpletest1/resources/simpletestSlowSlowCustomSplash.jnlp: 
+	 slow loading of custom splash screen and resource
+	* tests/netx/jnlp_testsengine/net/sourceforge/jnlp/ServerAccess.java: 
+	 Main server launcher was modified to support lunching of browser, 
+	 stdout listteners and for slowing download of resources to provide time
+	 for watching splash screen (main) was rewritten to provide free port OR
+	 run server in-D specified directory on custom or default port - very
+	 useful for debuging reproducers
+	 (getIndependentInstance) can now run also on specified port and (or) directory
+	 (USED_BROWSER_COMMAND) new constant handling value of -D property to 
+	set browser = "used.browser.command";
+	 (getBrowserLocation) new method  to provide specified 
+	(by used.browser.command -D property) or default browser location (firefox)
+	 (ensureServer) test is testing weather XslowXmodifier is working
+	 (executeBrowser) set of overloaded functions to lunch browser
+	 (TinyHttpdImpl) was enriched for XslowX modifier. When resource starts
+	 with this, is returned slowly - splited to 10 parts with 1s delay
+	 betwen sending each of them.
+	 Although it is throwing BrokenPipe exception, is working fine.
+	 (splitArray) new function to split array of byte to n arrays of bytes, 
+	 which when concated do the same array
+	 (splitArrayTestN) set of tests for splitArray
+	 (ContentReader) now can also have lsteners for catching outputs n runtime.
+	* tests/netx/jnlp_testsengine/net/sourceforge/jnlp/ContentReaderListener.java: 
+	Listener for catching chars and lines form processes outputs
+	* tests/netx/jnlp_testsengine/net/sourceforge/jnlp/ResourcesTest.java: 
+	added (testListeners) to test listeners behaviour 
+
+2012-03-16  Danesh Dadachanji  <ddadacha@redhat.com>
+
+	Applications using JNLP files without a title or vendor section
+	still run, despite them being required elements.
+	* netx/net/sourceforge/jnlp/Parser.java:
+	(getInformationDesc): If title or vendor are not found in info,
+	a new ParseException is thrown.
+	* netx/net/sourceforge/jnlp/resources/Messages.properties:
+	Added PNoTitleElement and PNoVendorElement
+	* tests/jnlp_tests/simple/InformationTitleVendorParser/resources/InformationParser.jnlp,
+	* tests/jnlp_tests/simple/InformationTitleVendorParser/resources/TitleParser.jnlp,
+	* tests/jnlp_tests/simple/InformationTitleVendorParser/resources/TitleVendorParser.jnlp,
+	* tests/jnlp_tests/simple/InformationTitleVendorParser/resources/VendorParser.jnlp,
+	* tests/jnlp_tests/simple/InformationTitleVendorParser/testcases/TitleVendorParserTest.java:
+	New test that runs JNLPs in a combination of missing information, title
+	and vendor tags, checking for the appropriate exceptions.
+
+2012-03-14  Deepak Bhole <dbhole@redhat.com>
+			Omair Majid <omajid@redhat.com>
+
+	PR895: IcedTea-Web searches for missing classes on each loadClass or
+	findClass
+	* netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
+	(CodeBaseClassLoader): Added new map to track resources that are not
+	found.
+	(findClass): If resource was not found before, return immediately. If
+	resource was not found for the first time, record it in the new map.
+	(findResouces): Same.
+	(findResource): Same.
+	* tests/netx/unit/net/sourceforge/jnlp/runtime/CodeBaseClassLoaderTest.java:
+	Test case for PR895 from Omair Majid.
+
+2012-03-14  Omair Majid  <omajid@redhat.com>
+
+	Print exceptions to terminal when running in gui mode too.
+	* netx/net/sourceforge/jnlp/AbstractLaunchHandler.java: New file.
+	* netx/net/sourceforge/jnlp/DefaultLaunchHandler.java: Extend
+	AbstractLaunchHandler.
+	(DefaultLaunchHandler): New method.
+	(printMessage): Moved to parent class.
+	* netx/net/sourceforge/jnlp/GuiLaunchHandler.java: Extend
+	AbstractLaunchHandler.
+	(GuiLauchHandler): New method.
+	(launchError): Print the error too.
+	(launchWarning,validationError): Call parent's printMessage.
+	* netx/net/sourceforge/jnlp/LaunchException.java: Use standard java
+	exception chaining. This removes compatibility with pre-java 1.3 class
+	libraries.
+	(LaunchException(JNLPFile,Exception,String,String,String,String)): Pass
+	cause to parent so exceptions are chanined properly.
+	(LaunchException(String,Throwable),LaunchException(Throwable)): Call
+	parent's constructor.
+	(printStackTrace(PrintStream),printStackTrace(PrintWriter),getCause):
+	Removed. Use parent's implementation instead.
+	(getCauses): Removed.
+	* netx/net/sourceforge/jnlp/LaunchHandler.java
+	(validationError): Rename argument to clarify meaing.
+	* netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java
+	(initialize): Redirect output of all handlers to System.err.
+	* plugin/icedteanp/java/sun/applet/PluginAppletSecurityContext.java
+	(PluginAppletSecurityContext): Likewise.
+	* tests/netx/unit/net/sourceforge/jnlp/DefaultLaunchHandlerTest.java,
+	* tests/netx/unit/net/sourceforge/jnlp/LaunchExceptionTest.java: New
+	file. Contains tests.
+
+2012-03-12  Danesh Dadachanji  <ddadacha@redhat.com>
+
+	Adding test for regression of JNLP API accessibility in constructor
+	methods of applets.
+	* Makefile.am: Added classes.jar to classpath when compiling jnlp_tests.
+	* tests/jnlp_tests/simple/CheckServices/resources/CheckServices.jnlp:
+	* tests/jnlp_tests/simple/CheckServices/srcs/CheckServices.java:
+	* tests/jnlp_tests/simple/CheckServices/testcases/CheckServicesTests.java:
+	New test file added. Tests ServiceManager is setup correctly when called
+	from applet constructors.
+
+2012-03-12  Danesh Dadachanji  <ddadacha@redhat.com>
+
+	Update tests that are missing title/vendor tag in their JNLPs.
+	* tests/jnlp_tests/signed/CacheReproducer/resources/CacheReproducer1.jnlp,
+	* tests/jnlp_tests/signed/CacheReproducer/resources/CacheReproducer1_1.jnlp,
+	* tests/jnlp_tests/signed/CacheReproducer/resources/CacheReproducer2.jnlp,
+	* tests/jnlp_tests/signed/CacheReproducer/resources/CacheReproducer2_1.jnlp,
+	* tests/jnlp_tests/signed/MissingJar/resources/MissingJar.jnlp,
+	* tests/jnlp_tests/signed/MissingJar/resources/MissingJar2.jnlp,
+	* tests/jnlp_tests/signed/MissingJar/resources/MissingJar3.jnlp,
+	* tests/jnlp_tests/signed/MissingJar/resources/MissingJar4.jnlp,
+	* tests/jnlp_tests/signed/ReadPropertiesBySignedHack/resources/ReadPropertiesBySignedHack.jnlp,
+	* tests/jnlp_tests/signed/ReadPropertiesSigned/resources/ReadPropertiesSigned1.jnlp,
+	* tests/jnlp_tests/signed/ReadPropertiesSigned/resources/ReadPropertiesSigned2.jnlp,
+	* tests/jnlp_tests/simple/AddShutdownHook/resources/AddShutdownHook.jnlp,
+	* tests/jnlp_tests/simple/AllStackTraces/resources/AllStackTraces.jnlp
+	* tests/jnlp_tests/simple/CreateClassLoader/resources/CreateClassLoader.jnlp,
+	* tests/jnlp_tests/simple/ReadEnvironment/resources/ReadEnvironment.jnlp,
+	* tests/jnlp_tests/simple/ReadProperties/resources/ReadProperties1.jnlp,
+	* tests/jnlp_tests/simple/ReadProperties/resources/ReadProperties2.jnlp,
+	* tests/jnlp_tests/simple/RedirectStreams/resources/RedirectStreams.jnlp,
+	* tests/jnlp_tests/simple/ReplaceSecurityManager/resources/ReplaceSecurityManager.jnlp,
+	* tests/jnlp_tests/simple/SetContextClassLoader/resources/SetContextClassLoader.jnlp,
+	* tests/netx/unit/net/sourceforge/jnlp/templates/template8.jnlp:
+	Added missing title/vendor tags that make them fail with this changeset.
+
+2012-03-05  Jiri Vanek <jvanek@redhat.com>
+
+	Added test for main-class in manifest for jnlp
+	* Makefile.am: (prepare-reproducers.stamp) fixed manifest handling. Till
+	now was manifest copied as any other non java file, and so was rewritten 
+	by jar tool
+	* tests/jnlp_tests/simple/ManifestedJar2/srcs: secondary jar file which 
+	should have manifest and so should help ManifestedJar1 with testing
+	* tests/jnlp_tests/simple/ManifestedJar2/resources/META-INF/MANIFEST.MF:
+	 manifest for  ManifestedJar2.jar
+	* tests/jnlp_tests/simple/ManifestedJar1/srcs: main testing jar
+	* tests/jnlp_tests/simple/ManifestedJar2/resources/META-INF/MANIFEST.MF:
+	 manifest for  ManifestedJar1.jar
+	* tests/jnlp_tests/simple/ManifestedJar1/testcases/ManifestedJar1Test.java:
+	 testing class for this reproducers
+	* tests/jnlp_tests/simple/ManifestedJar1/resources/: nine reproducers jnlps
+
+2012-03-06  Jiri Vanek <jvanek@redhat.com>
+
+	Improved reflection test:
+	* tests/jnlp_tests/simple/AccessClassInPackage/testcases/AccessClassInPackageTest.java:
+	This testcase was extended for three more unsigned reflection tries and four signed
+	*tests/jnlp_tests/simple/AccessClassInPackage/srcs/AccessClassInPackage.java:
+	now accepting class to be findByName as argument. Four new jnlp files in
+	signed a four in simple are then passing  those argument
+	*tests/jnlp_tests/simple/AccessClassInPackage/resources/AccessClassInPackageSUNSEC.jnlp:
+	*tests/jnlp_tests/simple/AccessClassInPackage/resources/AccessClassInPackageNETSF.jnlp:
+	*tests/jnlp_tests/simple/AccessClassInPackage/resources/AccessClassInPackageJAVAXJNLP.jnlp:
+	*tests/jnlp_tests/simple/AccessClassInPackage/resources/AccessClassInPackageSELF.jnlp:
+	*tests/jnlp_tests/simple/AccessClassInPackage/resources/AccessClassInPackage.jnlp:
+	removed
+	* tests/jnlp_tests/signed/AccessClassInPackageSigned/srcs/AccessClassInPackageSigned.java
+	signed variation of AccessClassInPackage, tescase is also in AccessClassInPackage
+	* tests/jnlp_tests/signed/AccessClassInPackageSigned/resources/AccessClassInPackageSignedSELF.jnlp
+	* tests/jnlp_tests/signed/AccessClassInPackageSigned/resources/AccessClassInPackageSignedNETSF.jnlp
+	* tests/jnlp_tests/signed/AccessClassInPackageSigned/resources/AccessClassInPackageSignedSUNSEC.jnlp
+	* tests/jnlp_tests/signed/AccessClassInPackageSigned/resources/AccessClassInPackageSignedJAVAXJNLP.jnlp
+
+2012-02-29  Deepak Bhole <dbhole@redhat.com>
+
+	* configure.ac: Bumped version to 1.3pre
+
+2012-02-29  Deepak Bhole <dbhole@redhat.com>
+
+	* netx/net/sourceforge/jnlp/security/CertificateUtils.java
+	(inKeyStores): Only check for certificate equality.
+
+2012-02-28  Deepak Bhole <dbhole@redhat.com>
+
+	* netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
+	(checkForMain): Also check manifest file of main jar.
+	(getMainClassName): New method. Looks in a jar manifest to see if there is
+	a Main-Class specified.
+
+2012-02-28  Deepak Bhole <dbhole@redhat.com>
+
+	* plugin/icedteanp/IcedTeaPluginRequestProcessor.cc
+	(_eval): Return 0 id to Java side if eval fails.
+	(_call): Return 0 id to Java side if call fails.
+
+2012-02-27  Matthias Klose  <doko@ubuntu.com>
+
+	* acinclude.m4 (IT_CHECK_PLUGIN_DEPENDENCIES): Use the mozilla-plugin
+	 pkgconfig module if the libxul module is not available.
+
+2012-02-27  Matthias Klose  <doko@ubuntu.com>
+
+	* acinclude.m4 (IT_FIND_JAVA): Set VERSION_DEFS.
+	* Makefile.am ($(PLUGIN_DIR)/%.o): Pass $(VERSION_DEFS)
+	* IcedTeaNPPlugin.cc (PLUGIN_MIME_DESC): Define in terms
+	of HAVE_JAVA7.
+
+2012-02-27  Thomas Meyer <thomas@m3y3r.de>
+			Deepak Bhole <dbhole@redhat.com>
+
+	PR820: IcedTea-Web 1.1.3 crashing Firefox when loading Citrix XenApp
+	* plugin/icedteanp/IcedTeaJavaRequestProcessor.cc
+	(createJavaObjectFromVariant): If variant is a generic object array,
+	create a JSObject on Java side instead of JSObject array.
+	* plugin/icedteanp/IcedTeaPluginRequestProcessor.cc 
+	(newMessageOnBus): Run finalize on main thread.
+	(eval): Create Java object in _eval
+	(call): Create Java object in _call.
+	(setMember): Create Java object in _setMember.
+	(sendMember): Create Java object in _getMember.
+	(sendString): Create Java object in _getString.
+	(_setMember): Process result and create Java object if needed.
+	(_getMember): Same.
+	(_eval): Same.
+	(_call): Same.
+	(_getString): Same.
+
+2012-02-22  Danesh Dadachanji  <ddadacha@redhat.com>
+
+	Add ability to check for jnlp_href use outside of PluginBridge.
+	* netx/net/sourceforge/jnlp/PluginBridge.java
+	(PluginBridge): New boolean useJNLPHref is set if jnlp_href is used.
+	(useJNLPHref): New getter method, returns boolean useJNLPHref.
+
+2012-02-10  Danesh Dadachanji  <ddadacha@redhat.com>
+
+	Fix path to NEW_LINE_IFS for when one builds outside of src directory.
+	* Makefile.am: Use top src directory instead of top build directory
+	for NEW_LINE_IFS
+
+2012-02-06  Danesh Dadachanji  <ddadacha@redhat.com>
+
+	Fixed regression in running webstart applets from JNLP files.
+	* netx/net/sourceforge/jnlp/Launcher.java (createApplet): Added call to
+	set applet variable in the AppletInstance's AppletEnvironment.
+	* netx/net/sourceforge/jnlp/runtime/AppletEnvironment.java
+	(setApplet): New method, set AppletEnvironment's applet variable only once.
+
+2012-02-02  Danesh Dadachanji  <ddadacha@redhat.com>
+
+	* netx/net/sourceforge/jnlp/LaunchException.java: Fix message
+	to handle null description
+
+2012-02-01  Danesh Dadachanji  <ddadacha@redhat.com>
+
+	* netx/net/sourceforge/jnlp/LaunchException.java: Add description 
+	parameter to the message the exception stores.
+
+2012-02-01 Jiri Vanek<jvanek@redhat.com>
+
+	Fix for PR844
+	* netx/net/sourceforge/jnlp/cache/CacheLRUWrapper.java: (getLRUSortedEntries)
+	instead of error throwing own LRU exception. Also catches more then
+	NumberFormatException
+	(clearLRUSortedEntries) new method - making soft clearing of cache public
+	(clearCache) now return true if cache was cleared, false otherwise 
+	(or exception)
+	* netx/net/sourceforge/jnlp/cache/CacheUtil.java: (getCacheFileIfExist) 
+	does three tires to load cache. If ifrst fails, then recently_used file
+	is emptied both in memory and on disc. When second attemmpt fails, then
+	LRU cache is forcibly cleared. if clearing fails, then error is thrown.
+	If it pass, then one more try to load entries is allowed. When third
+	attempt fails, then error is  thrown.
+	* /netx/net/sourceforge/jnlp/cache/LruCacheException.java:
+	new file, for purpose of catching this particular exception
+	* netx/net/sourceforge/jnlp/util/PropertiesFile.java: (store) tries to 
+	mkdirs to its path. It is better then to fail when no cache directory exists.
+	* tests/jnlp_tests/signed/CacheReproducer: new  reproducr trying severals 
+	way of corupted cache on several types of jnlp files. Is signed because
+	of reflection used.
+	* tests/jnlp_tests/signed/SimpletestSigned1: signed hello world to be
+	used in  CacheReproducer tests.
+	* tests/netx/jnlp_testsengine/net/sourceforge/jnlp/ServerAccess.java: 
+	timeout for processes doubled, as clear cache methods sometimes took
+	more then original allowed.
+
+2012-01-27  Deepak Bhole <dbhole@redhat.com>
+
+	PR852: Classloader not being flushed after last applet from a site is closed
+	* netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java: Added variable
+	to count usage for a given ClassLoader instance.
+	(getInstance): Decrement use count for a loader after it is merged with
+	another. Increment loader use count before returning.
+	(incrementLoaderUseCount): New method. Increments loader use count.
+	(decrementLoaderUseCount): New method. Decrements loader use count.
+	* java/sun/applet/PluginAppletViewer.java (appletClose): Decrement loader
+	use count when applet is closed.
+
+2012-01-25  Jiri Vanek  <jvanek@redhat.com>
+
+	Added test for -Xnofork option and for applet launching by jnlp
+	* tests/jnlp_tests/simple/deadlocktest/resources/deadlocktest_1.jnlp: new file
+	By specifying new max heap size, should invoke jvm to fork when launched
+	* tests/jnlp_tests/simple/deadlocktest/srcs/DeadlockTest.java:
+	improved indentation, added debug output that main method was lunched
+	* tests/jnlp_tests/simple/deadlocktest/testcases/DeadLockTestTest.java:
+	small refactoring, add lunching  of deadlocktest_1.jnlp with and
+	without -Xnofork, and counting java instances during runtime
+	* tests/netx/jnlp_testsengine/net/sourceforge/jnlp/ServerAccess.java
+	(ThreadedProcess.run) fixed situation, when process ended, but not all
+	the output was read by its stdout/stderr readers
+	(ContentReader.run) enabled exception printing to stderr.
+	* tests/jnlp_tests/simple/AppletTest/ : test for loading applets by jnlp file
+
+2012-01-06  Danesh Dadachanji  <ddadacha@redhat.com>
+
+	Use the JNLP file's information section for the Name and
+	Publisher labels of access dialogs, if available.
+	* netx/net/sourceforge/jnlp/PluginBridge.java:
+	(PluginBridge): Assigned info variable to JNLP file's information
+	section (if one is used), otherwise to a new, empty ArrayList.
+	(getInformation): Removed method, superclass method
+	should be used instead.
+	* netx/net/sourceforge/jnlp/resources/Messages.properties:
+	Adding SUnverified.
+	* a/netx/net/sourceforge/jnlp/security/AccessWarningPane.java:
+	(addComponents): Append unverified note to the publisher label.
+
+2012-01-09  Deepak Bhole <dbhole@redhat.com>
+
+	PR838: IcedTea plugin crashes with chrome browser when javascript is executed
+	* plugin/icedteanp/IcedTeaPluginRequestProcessor.cc (eval): Added a check
+	to ensure that the result pointer is valid before attempting to create an
+	NPVariant from it.
+
+2012-01-05  Omair Majid <omajid@redhat.com>
+
+	* netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
+	(initializeResources): Only throw exceptions about the main class not
+	being found when the jnlp file can have a main class.
+	(addToCodeBaseLoader): Dont try to process null URLs.
+
+2011-12-15  Jiri Vanek  <jvanek@redhat.com>
+
+	* configure.ac: added search for xsltproc program and setting
+	WITH_XSLTPROC variable
+	* Makefile.am: xsltproc result is no longer ignored, command
+	itself is in conditional block 
+
+2011-12-22  Thomas Meyer <thomas@m3y3r.de>
+
+	* plugin/icedteanp/IcedTeaPluginRequestProcessor.cc(sendMember): Use
+	correct response parameter when returning array member vs member itself.
+
+2011-12-21  Thomas Meyer <thomas@m3y3r.de>
+
+	RH586194: Unable to connect to connect with Juniper VPN client
+	* plugin/icedteanp/IcedTeaPluginRequestProcessor.cc(sendMember): Use
+	createJavaObjectFromVariant to create the resulting object on Java side,
+	rather than always creating a JSObject.
+
+2011-12-21  Jiri Vanek  <jvanek@redhat.com>
+
+	* acinclude.m4: added definition of IT_CHECK_XULRUNNER_API_VERSION,
+	which tries to compile small program against new xulrunner api
+	* configure.ac: added call of IT_CHECK_XULRUNNER_API_VERSION
+	* plugin/icedteanp/IcedTeaNPPlugin.cc: (NP_GetMIMEDescription) 
+	return type set-up by dependency on defined LEGACY_XULRUNNERAPI.
+	 This one is set by IT_CHECK_XULRUNNER_API_VERSION during configure.
+	if defined, then old char* is used. New const char* is used otherwise.
+
+2011-12-19  Danesh Dadachanji <ddadacha@redhat.com>
+
+	Fix for BasicService being used in applet constructors but not 
+	having access to ApplicationInstance variable.
+	* netx/net/sourceforge/jnlp/Launcher.java: 
+	(createApplet): Moved applet initialization below loader.setApplication,
+	appletInstance is now initialized with applet param as null.
+	* netx/net/sourceforge/jnlp/runtime/AppletInstance.java:
+	(setApplet): New method, allows setting of AppletInstance's applet 
+	only once.
+
+2011-12-16  Deepak Bhole <dbhole@redhat.com>
+
+	Patch from Thomas Meyer <thomas@m3y3r.de>
+	* plugin/icedteanp/IcedTeaPluginRequestProcessor.cc: Fixed function name
+	in comment for sendMember. 
+
+2011-12-08  Omair Majid  <omajid@redhat.com>
+
+	* netx/net/sourceforge/jnlp/Launcher.java
+	(launchApplication): Print arguments being passed to the application's
+	main method in debug mode.
+
+2011-12-05  Danesh Dadachanji <ddadacha@redhat.com>
+
+	Update UI for AccessWarningPane
+	* netx/net/sourceforge/jnlp/security/AccessWarningPane.java:
+	Use question.png instead of warning.png for access dialogs.
+
+2011-11-28 Jiri Vanek <jvanek@redhat.com>
+
+	Added code-coverage generation targets
+	* configure.ac: added search for optional emma.jar
+	* makefile.am: added UNIT_CLASS_NAMES and REPRODUCERS_CLASS_NAMES variables
+	to store tests clases for reuse in emmarun. Both also moved to separate target
+	(run-netx-unit-tests): made dependent on reused stamped version
+	(run-netx-dist-tests): made dependent on reused stamped version
+	(stamps/run-netx-dist-tests): stamped rusable version of run-netx-dist-tests
+	(run-unit-test-code-coverage) targets to generate report from unit-tests. 
+	 Result binary and xml file and html report in tests.build/netx/unit
+	(run-reproducers-test-code-coverage) targets to generate report from
+	 reproducers-test. Result binary file, xml and html report in
+	 tests.build/netx/jnlp_testsengine
+	(run-test-code-coverage): merges binary results from unit and reproducers
+	(clean-unit-test-code-coverage) conditionaly removes html,xml report
+	 and es and ec files from tests.build/netx/unit
+	(clean-reproducers-test-code-coverage) condtionlay removes html and xml 
+	 report and es file from tests.build/netx/jnlp_testsengine
+	(clean-test-code-coverage) conditionlay removes merged html, xml es and em 
+	files from tests.build
+	(clean-netx-tests) now depends also on clean-test-code-coverage
+
+2011-11-11  Jiri Vanek  <jvanek@redhat.com>
+
+	Added reproducer for PR804 and PR8011
+	* tests/jnlp_tests/simple/Spaces can be everywhere/resources/Spaces can be everywhere1.jnlp:
+	new jnlp file with space in name and with jar in resources which name does not contain
+	spaces
+	* tests/jnlp_tests/simple/Spaces can be everywhere/resources/Spaces can be everywhere2.jnlp:
+	new jnlp file with space in name and with jar in resources which name contains spaces
+	* tests/jnlp_tests/simple/Spaces can be everywhere/resources/SpacesCanBeEverywhere1.jnlp:
+	jnlp file without space in name but with jar in resources which name contains spaces
+	* tests/jnlp_tests/simple/Spaces can be everywhere/srcs/SpacesCanBeEverywhere.java:
+	new file containig simple main method of "Spaces can be everywhere.jar" jar
+	* tests/jnlp_tests/simple/Spaces can be everywhere/testcases/SpacesCanBeEverywhereTests.java
+	testcase for this reproducer. It is lunching  each of this jnlp once locally from filesystem and
+	once remotely from server. Please note that except it's own jar, this reproducer is also
+	using simpletest1.jar
+
+2011-11-11  Jiri Vanek  <jvanek@redhat.com>
+
+	Fixed reproducers engine to handle spaces in files and in urls
+	* Makefile.am: (stamps/netx-dist-tests-prepare-reproducers.stamp)
+	(stamps/netx-dist-tests-sign-some-reproducers.stamp)
+	(stamps/netx-dist-tests-compile-testcases.stamp):
+	added call to NEW_LINE_IFS to use line breake temporarily as parameter
+	separator while loading files from list and correct quoting
+	* NEW_LINE_IFS: new file, small separate script used in makefile as inline script
+	which backup original IFS variable and then set it to pure new line. It is in
+	separate file because it is reused and I do not know another way how to save a new
+	line variable in makefile. Restore to original vlaue is handled in Makefile
+	*tests/netx/jnlp_testsengine/net/sourceforge/jnlp/ResourcesTest.java:
+	(testResourcesExists) filename is encoded to correct URL before requested from server
+	* tests/netx/jnlp_testsengine/net/sourceforge/jnlp/ServerAccess.java:
+	"-headless" string extracted to variable HEADLES_OPTION
+	(executeProcess) and (ThreadedProcess) enhanced for variable dir to specify working
+	directory. Backward compatibility kept
+	(TinyHttpdImpl) now expects url on requests, so all requests are now decoded by
+	java.net.URLDecoder 
+
+2011-11-10  Jiri Vanek <jvanek at redhat.com>
+	
+	Added tests which covers corner cases or rhino support function dateRange
+	Enabled testWeekdayRange test
+	* tests/netx/pac/pac-funcs-test.js: (testWeekdayRange) - added mising
+	runTests call
+	(incDate) (decDate) (monthToStr) moved level up from function scope
+	to be shareable
+	(testDateRange2) new method, tests last days of months.
+	(testDateRange3) new method, tests first days of months
+	* netx/net/sourceforge/jnlp/runtime/pac-funcs.js:
+	(dateRange) logic of this method moved to isDateInRange. This one now serve
+	just as api using current date
+	(isDateInRange) logic of dateRange, can calculate ranges against any date
+
+2011-10-31  Omair Majid  <omajid@redhat.com>
+
+	PR808: javaws is unable to start when missing jars are enumerated before
+	main jar
+	* NEWS: Update.
+	* netx/net/sourceforge/jnlp/tools/JarSigner.java (verifyJars): Continue
+	with other jars if the first jar can't be used.
+
+2011-10-28  Deepak Bhole <dbhole@redhat.com>
+
+	RH742515, CVE-2011-3377: IcedTea-Web: second-level domain subdomains and
+	suffix domain SOP bypass
+	* NEWS: Updated
+	* netx/net/sourceforge/jnlp/runtime/JNLPSecurityManager.java
+	(checkPermission): Remove special case for SocketPermission.
+
+2011-10-27  Deepak Bhole <dbhole@redhat.com>
+
+	PR778: Jar download and server certificate verification deadlock
+	* ChangeLog: Removed extra whitespace from previous entries
+	* NEWS: Updated
+	* netx/net/sourceforge/jnlp/GuiLaunchHandler.java (launchInitialized):
+	Moved as much code as possible out of the invokeLater block. 
+
+2011-10-25  Omair Majid  <omajid@redhat.com>
+
+	PR804: javaws launcher incorrectly handles file names with spaces
+	* NEWS: Update.
+	* launcher/javaws.in: Use bash arrays to store arguments to handle
+	filenames with spaces correctly.
+
+2011-10-24  Jiri Vanek <jvanek@redhat.com>  
+
+	Added reproducer for - PR788: Elluminate Live! is not working
+	* tests/jnlp_tests/signed/MissingJar/resources/MissingJar.jnlp
+	* tests/jnlp_tests/signed/MissingJar/resources/MissingJar2.jnlp
+	* tests/jnlp_tests/signed/MissingJar/resources/MissingJar3.jnlp
+	* tests/jnlp_tests/signed/MissingJar/resources/MissingJar4.jnlp
+	four testcases's jnlp files. Differs by order and by used resoure tags
+	* tests/jnlp_tests/signed/MissingJar/srcs/MissingJar.java
+	very simple main jar, just printing message when initialized
+	* tests/jnlp_tests/signed/MissingJar/testcases/MissingJarTest.java
+	testing file of reproducer, launchiing above four jnlp files, each in individual test
+
+2011-10-17  Jiri Vanek <jvanek@redhat.com>
+
+	PR564: NetX depends on sun.misc.BASE64Encoder
+	* configure.ac: removed IT564 comment, removed check for sun.misc.BASE64Encoder
+	* netx/net/sourceforge/jnlp/security/CertificateUtils.java : sun.misc.BASE64Encoder;
+	replaced (just changed import) by internal implementation from
+	net.sourceforge.jnlp.util.replacements.BASE64Encoder;
+	* netx/net/sourceforge/jnlp/util/replacements/BASE64Encoder.java:
+	* netx/net/sourceforge/jnlp/util/replacements/CharacterEncoder.java:
+	New files, internal implementation of BASE64Encoder,  copied from OpenJDK
+	* tests/netx/unit/net/sourceforge/jnlp/util/replacements/BASE64EncoderTest.java
+	New file, to test internal base64encoder implementation
+
+
+2011-10-03  Jiri Vanek <jvanek@redhat.com>
+
+	* tests/jnlp_tests/signed/ReadPropertiesBySignedHack/resources/ReadPropertiesBySignedHack.jnlp
+	* tests/jnlp_tests/signed/ReadPropertiesBySignedHack/srcs/ReadPropertiesBySignedHack.java
+	* tests/jnlp_tests/signed/ReadPropertiesBySignedHack/testcases/ReadPropertiesBySignedHackTest.java
+	* tests/jnlp_tests/signed/ReadPropertiesSigned/resources/ReadPropertiesSigned1.jnlp
+	* tests/jnlp_tests/signed/ReadPropertiesSigned/resources/ReadPropertiesSigned2.jnlp
+	* tests/jnlp_tests/signed/ReadPropertiesSigned/srcs/ReadPropertiesSigned.java
+	* tests/jnlp_tests/signed/ReadPropertiesSigned/testcases/ReadPropertiesSignedTest.java
+	Direcory signed was somehow missing from my commit from 2011-09-22. 
+	Now it  have been added with all its original files
+
+2011-09-29  Omair Majid  <omajid@redhat.com>
+
+	PR618: Can't install OpenDJ, JavaWebStart fails with Input stream is null
+	error.
+	* NEWS: Update.
+	* netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
+	(getResource): Rename to ...
+	(findResource): New method.
+	(findResources): If resource can not be found, search in lazy resources.
+	(findResourcesBySearching): New method.
+
+2011-09-28  Omair Majid  <omajid@redhat.com>
+
+	* netx/net/sourceforge/jnlp/AppletDesc.java (getMainClass): Clarify the
+	return value in javadoc.
+	* netx/net/sourceforge/jnlp/Launcher.java
+	(createApplet, createAppletObject): Do not replace '/' with '.'.
+	* netx/net/sourceforge/jnlp/PluginBridge.java (PluginBridge): Ensure that
+	the class name is in the dot-separated from.
+	* netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
+	(checkForMain): Ensure that the name is an exact match.
+
+2011-09-28  Deepak Bhole <dbhole@redhat.com>
+
+	PR794: IcedTea-Web does not work if a Web Start app jar has a Class-Path
+	element in the manifest.
+	* netx/net/sourceforge/jnlp/runtime/CachedJarFileCallback.java
+	(retrieve): Blank out the Class-Path elements in manifest.
+	* netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
+	(activateJars): Only load Class-Path elements if this is an applet.
+	(addNewJar): Add the right permissions for the cached jar file and verify
+	signatures. 
+
+2011-09-26  Lars Herschke  <lhersch@dssgmbh.de>
+
+	* netx/net/sourceforge/jnlp/resources/Messages.properties: Add
+	CVExportPasswordMessage, CVImportPasswordMessage and
+	CVPasswordTitle.
+	* netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java (initialize):
+	Initialize SSLContext with the user's client certificates.
+	* netx/net/sourceforge/jnlp/security/CertificateUtils.java
+	(addPKCS12ToKeyStore, addPKCS12ToKeyStore, dumpPKCS12): New methods.
+	* netx/net/sourceforge/jnlp/security/viewer/CertificatePane.java
+	(getPasswords): New method.
+	(ImportButtonListener.actionPerformed): Import client certificates
+	in PKCS12 format.
+	(ExportButtonListener.actionPerformed): Export client certificates
+	in PKCS12 format.
+
+2011-09-23  Omair Majid  <omajid@redhat.com>
+
+	RH738814: Access denied at ssl handshake
+	* netx/net/sourceforge/jnlp/security/SecurityDialogs.java
+	(showCertWarningDialog): Add a javadoc comment.
+	* netx/net/sourceforge/jnlp/security/VariableX509TrustManager.java
+	(askUser): Wrap the call to showCertWarningDialog in a doPrivileged
+	block.
+
+2011-09-22  Omair Majid  <omajid@redhat.com>
+
+	PR788: Elluminate Live! is not working
+	* NEWS: Update.
+	* netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
+	(checkForMain): If localFile is null (JAR couldn't be downloaded), try to
+	continue, rather than allowing the exception to cause an abort.
+
+2011-09-21  Omair Majid  <omajid@redhat.com>
+
+	PR766: javaws fails to parse an <argument> node that contains CDATA
+	* netx/net/sourceforge/nanoxml/XMLElement.java
+	(sanitizeInput): Do not remove CDATA sections along with comments.
+
+2011-09-20  Omair Majid  <omajid@redhat.com>
+
+	* tests/netx/unit/net/sourceforge/jnlp/ParserCornerCases.java
+	(testCdata, testCdataNested, testCDataFirstChild, testCDataSecondChild)
+	(testCommentInElements2, testDoubleDashesInComments): New methods
+	* tests/netx/unit/net/sourceforge/jnlp/application/application0.jnlp,
+	* tests/netx/unit/net/sourceforge/jnlp/templates/template0.jnlp:
+	Change <!CDATA[ to <![CDATA[.
+
+2011-09-22  Lars Herschke  <lhersch@dssgmbh.de>
+
+	PR789: typo in jrunscript.sh
+	* jrunscript.in: Use = instead of ==.
+
+2011-09-22  Jiri Vanek <jvanek@redhat.com>
+
+	* tests/jnlp_tests/signed/ReadPropertiesBySignedHack/resources/ReadPropertiesBySignedHack.jnlp: 
+	jnlp file to lunch ReadPropertiesBySignedHack, notice please dependenci 
+	on ReadProperties.jar from simple reproducers
+	* tests/jnlp_tests/signed/ReadPropertiesBySignedHack/srcs/ReadPropertiesBySignedHack.java: 
+	this reproducers verify, that even reflection-by enabled 
+	XtrustAll will not allow to lunch unsigned code
+	* tests/jnlp_tests/signed/ReadPropertiesBySignedHack/testcases/ReadPropertiesBySignedHackTest.java: 
+	testcase for this reproducer 
+
+2011-09-22  Jiri Vanek <jvanek@redhat.com>
+
+	* tests/jnlp_tests/signed/ReadPropertiesSigned/resources/ReadPropertiesSigned1.jnlp:
+	* tests/jnlp_tests/signed/ReadPropertiesSigned/resources/ReadPropertiesSigned2.jnlp:
+	* tests/jnlp_tests/signed/ReadPropertiesSigned/testcases/ReadPropertiesSignedTest.java:
+	* tests/jnlp_tests/signed/ReadPropertiesSigned/srcs/ReadPropertiesSigned.java: 
+	those four files are  example of signed reproducer
+	* tests/jnlp_tests/simple/ReadProperties/srcs/ReadProperties.java: now prints out got 
+	variable for comparsion with above created signed example
+
+2011-09-22  Jiri Vanek <jvanek@redhat.com>
+
+	Added signed reproducers engine
+	* Makefile.am: added variable KEYSTORE_NAME
+	(stamps/junit-jnlp-dist-dirs): creates stamp and depend on next two targets
+	(junit-jnlp-dist-simple.txt): creates list of simple reproducers, extracted
+	 from stamps/junit-jnlp-dist-dirs
+	(junit-jnlp-dist-signed.txt): creates list of signed reproducers
+	(stamps/netx-dist-tests-prepare-reproducers.stamp): now traverse over 
+	signed and simple
+	(stamps/netx-dist-tests-sign-some-reproducers.stamp): depends 
+	on netx-dist-tests-prepare-reproducers, traverse through signed 
+	reproducers and sign them
+	(stamps/netx-dist-tests-compile-testcases.stamp): now traverse over 
+	signed and simple
+	(stamps/bootstrap-directory.stamp): creates symlinks/stubs to 
+	jarsigner and keytool
+	(clean-netx-dist-tests):remove new stamps, signed and simple list and keysstore
+	* acinclude.m4: declared to proceed IT_FIND_KEYTOOL and IT_FIND_JARSIGNER macro
+	* configure.ac: declared macros to check for keytool and jarsigner
+	* tests/jnlp_tests/README: mentioned signed directory 
+
+2011-09-22  Jiri Vanek <jvanek@redhat.com>
+
+	* netx/net/sourceforge/jnlp/runtime/Boot.java: (main): added logic to 
+	handle -Xtrustall option
+	* netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java: declared private static boolean
+	trustAll=false; with public getter and pkg.private  setter
+	* netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java: (checkTrustWithUser): modified,
+	when XtrustAll declared, then user is not asked and certificate is trusted
+	* netx/net/sourceforge/jnlp/security/VariableX509TrustManager.java:  (askUser): modified,
+	when XtrustAll declared, then user is not asked and certificate is trusted
+
+2011-09-15  Jiri Vanek <jvanek@redhat.com>
+
+	* tests/jnlp_tests/: all current reproducers (AccessClassInPackage
+	AddShutdownHook AllStackTraces CreateClassLoader deadlocktest
+	ReadEnvironment ReadProperties RedirectStreams ReplaceSecurityManager
+	SetContextClassLoader simpletest1 simpletest2) junit's asserts are enchanted
+	for reason, so junit assertion exception message is much clearer. 
+
+2011-09-13  Deepak Bhole <dbhole@redhat.com>
+
+	PR782: Support building against npapi-sdk as well
+	Patch from MichaÅ GÃ³rny < mgorny at gentoo dot org >
+	* acinclude.m4: Build against npapi-sdk.
+
+2011-09-13  Deepak Bhole <dbhole@redhat.com>
+
+	* ChangeLog: Fixed formatting issues in previous entry.
+
+2011-09-01 Jiri Vanek<jvanek@redhat.com>
+
+	Added functionality to allow icedtea web to be buildable with
+	rhel5 libraries.
+	* configure.ac: added IT_CHECK_GLIB_VERSION check.
+	* acinclude.m4: added IT_CHECK_GLIB_VERSION definition block to test.
+	version of glib installed and add LEGACY_GLIB define macro into
+	 variable DEFS if version is <2.16.
+	* plugin/icedteanp/IcedTeaNPPlugin.cc: added replacements for incompatible
+	functions (g_strcmp0 and find_first_item_in_hash_table)if LEGACY_GLIB
+	is defined. Added define sections for use this function instead of glib ones.
+	Duplicated code moved into function getFirstInTableInstance(GHashTble* table).
+	* Makefile.am: ($(PLUGIN_DIR)/%.o): using DEFS setted by configure for compilation 
 
 2011-08-29  Deepak Bhole <dbhole@redhat.com>
@@ -24,4 +2303,10 @@
 	(checkServerTrusted): Account for a null hostname that the
 	overloaded implementation may pass.
+
+2011-08-23  Omair Majid  <omajid@redhat.com>
+
+	* configure.ac: Add check for new non-standard classes
+	sun.net.www.protocol.jar.URLJarFile and
+	sun.net.www.protocol.jar.URLJarFileCallBack.
 
 2011-08-23  Omair Majid  <omajid@redhat.com>
@@ -34,4 +2319,100 @@
 	JRE.
 
+2011-08-22  Saad Mohammad  <smohammad@redhat.com>
+	* netx/net/sourceforge/jnlp/JNLPFile.java:
+	(parse): After the file has been parsed, it calls 
+	checkForSpecialProperties() to check if the resources contain any special
+	properties.
+	(checkForSpecialProperties): Scans through resources and checks if it 
+	contains any special properties.
+	(requiresSignedJNLPWarning): Returns a boolean after determining if a signed
+	JNLP warning should be displayed.
+	(setSignedJNLPAsMissing): Informs JNLPFile that a signed JNLP file is
+	missing in the main jar.
+	* netx/net/sourceforge/jnlp/SecurityDesc.java:
+	(getJnlpRIAPermissions): Returns all the names of the basic JNLP system
+	properties accessible by RIAs.
+	* netx/net/sourceforge/jnlp/resources/Messages.properties:
+	Added LSignedJNLPFileDidNotMatch and SJNLPFileIsNotSigned.
+	* netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java:
+	(initializeResources): Locates the jar file that contains the main class
+	and verifies if a signed JNLP file is also located in that jar. This also
+	checks 'lazy' jars if the the main class was not found in 'eager' jars.
+	If the main jar was not found, a LaunchException is thrown which terminates
+	the launch of the application.
+	(checkForMain): A method that goes through each jar and checks to see
+	if it has the main class. If the main class is found, it calls
+	verifySignedJNLP() to verify if a valid signed JNLP file is also found in
+	the jar.
+	(verifySignedJNLP): A method that checks if the jar file contains a valid 
+	signed JNLP file.
+	(closeStream): Closes a stream.
+	(loadClassExt): Added a try/catch block when addNextResource() is called.
+	(addNextResource): If the main jar has not been found, checkForMain() is
+	called to check if the jar contains the main class, and verifies if a signed
+	JNLP file is also located.
+	* netx/net/sourceforge/jnlp/security/MoreInfoPane.java:
+	(addComponents): Displays the signed JNLP warning message if necessary.
+	* netx/net/sourceforge/jnlp/security/SecurityDialog.java:
+	(SecurityDialog): Stores the value of whether a signed JNLP warning should 
+	be displayed.
+	(showMoreInfoDialog): Passes in the associated JNLP file when creating a
+	SecurityDialog object.
+	(requiresSignedJNLPWarning): Returns a boolean after determining if a signed
+	JNLP warning should be displayed.
+
+2011-08-17  Danesh Dadachanji <ddadacha@redhat.com>
+
+	Update UI for SecurityDialog
+	* netx/net/sourceforge/jnlp/resources/question.png: New icon added.
+	* netx/net/sourceforge/jnlp/security/CertWarningPane.java:
+	(addComponents): When certs are verified, question.png is used as the icon 
+	and SAlwaysTrustPublisher is automatically selected.
+	* netx/net/sourceforge/jnlp/security/SecurityDialog.java: 
+	(initDialog): Changed the title of a CERT_WARNING dialog.
+
+2011-08-17  Danesh Dadachanji <ddadacha@redhat.com>
+
+	AUTHORS: Adding myself and Denis Lila. Removing the extra email from
+	Andrew Hughes.
+
+2011-08-11  Danesh Dadachanji <ddadacha@redhat.com>
+
+	PR742: IcedTea-Web checks certs only upto 1 level deep before declaring 
+	them untrusted.
+	* NEWS: Updated.
+	* netx/net/sourceforge/jnlp/tools/JarSigner.java:
+	(checkTrustedCerts): All certs along certPath are now checked for trust.
+
+2011-08-09  Deepak Bhole <dbhole@redhat.com>
+
+	PR771: IcedTea-Web certificate verification code does not use the right
+	API
+	* netx/net/sourceforge/jnlp/security/CertificateUtils.java
+	(inKeyStores): Use Certificate.verify to correctly verify a certificate
+	against a public key in the store.
+
+2011-08-09  Saad Mohammad  <smohammad@redhat.com>
+
+	PR765: JNLP file with all resource jars marked as 'lazy' fails to validate 
+	signature and stops the launch of application
+	* netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java:
+	(initializeResources): Initializes the first jar file if all resources
+	are marked as lazy jars
+
+2011-08-03  Saad Mohammad  <smohammad@redhat.com>
+
+	* netx/net/sourceforge/jnlp/JNLPMatcher.java:
+	  (JNLPMatcher): Removed NullPointerException from being thrown, caught and 
+	  then thrown again via JNLPMatcherException. This was replaced by throwing 
+	  a checked exception [JNLPMatcherException] directly. 
+  	  (JNLPMatcher): Removed unused code [getters]
+	  (JNLPMatcher): Closed Input/Output streams that were opened.
+	  (isMatch): Removed caching of return value
+	  (closeInputStream): Added this method to close input streams
+	  (closeOutputStream): Added this method to close output streams
+	* netx/net/sourceforge/jnlp/Node.java:
+	  Removed getAttributeNames() method from the commented section
+
 2011-08-03  Deepak Bhole <dbhole@redhat.com>
 
@@ -40,8 +2421,31 @@
 	cert hashtable only if the entry is expected to be signed.
 
+2011-08-02 Jiri Vanek <jvanek@redhat.com>
+
+	*Makefile.am: (stamps/netx-dist-tests-prepare-reproducers.stamp):
+	now are compiled files correctly compiled from directory structure.
+	Also not java files are copied with expected directory structure and
+	jarred together with classes.
+
+2011-07-26  Jiri Vanek <jvanek@redhat.com>
+
+	*tests/netx/jnlp_testsengine/net/sourceforge/jnlp/ServerAccess.java: String
+	 containing "localhost"  have been declared as final constant.
+	(SERVER_NAME) have been  moved instant Server instance so each server can
+	 have it name without affecting others
+	(getUrl()) added -  can return URL of server singleton. Implementation of
+	 this method is inside server, so each server can return its own useful URL.
+	(saveFile()) is now public.
+	Added identification for ThreadedProcess based on commandlineArgs and its
+	 run is now slowed by Thread.sleep
+	(ServerLuncher) inner class is now public (it was bug to not be as we have
+	 getIndependentInstance of it method ) and renamed to ServerLauncher
+	Enchanted wrapping of executeProcess
+
+
 2011-07-21  Deepak Bhole <dbhole@redhat.com>
 
 	PR749: sun.applet.PluginStreamHandler#handleMessage(String) really slow
-	Patch from: Ricardo MartÃ­n Camarero (Ricky) <rickyepoderi at yahoo dot es>
+	Original patch from: Ricardo MartÃ­n Camarero <rickyepoderi at yahoo dot es>
 	* plugin/icedteanp/java/sun/applet/PluginStreamHandler.java
 	(readPair): New function.
@@ -49,13 +2453,133 @@
 	than using String.split().
 
-2011-07-20  Deepak Bhole <dbhole@redhat.com>
-
-	* configure.ac: Prepare for 1.1.2
-	* NEWS: Same
-
-2011-07-15  Deepak Bhole <dbhole@redhat.com>
-
-	* configure.ac: Prepare to release 1.1.1
-	* NEWS: Same
+2011-07-19  Saad Mohammad  <smohammad@redhat.com>
+
+	* netx/net/sourceforge/jnlp/JNLPMatcher.java:
+	  Created this class to compare signed JNLP file with the launching  
+	  JNLP file. When comparing, it has support for both method of signing
+	  of a JNLP file: APPLICATION_TEMPLATE.JNLP and APPLICATION.JNLP.
+	* netx/net/sourceforge/jnlp/JNLPMatcherException.java:
+	  Added a custom exception: JNLPMatcherException. Thrown if verifying 
+	  signed JNLP files fails.
+	* netx/net/sourceforge/jnlp/Node.java:
+	  Created a method that retrieves the attribute names of the Node and 
+	  stores it in private string [] member. The method returns the
+	  attribute names.
+	* tests/netx/unit/net/sourceforge/jnlp/JNLPMatcherTest.java:
+	  This is a test case that tests the functionality of JNLPMatcher. 
+	  It tests the algorithm with a variety of template and application
+	  JNLP files.
+	* tests/netx/unit/net/sourceforge/jnlp/launchApp.jnlp:
+	  Launching JNLP file: This is the launching JNLP file used to compare 
+	  with templates and application JNLP files in JNLPMatcherTest.java
+	* tests/netx/unit/net/sourceforge/jnlp/templates/template0.jnlp:
+	  Test Template JNLP file: Contains CDATA.
+	* tests/netx/unit/net/sourceforge/jnlp/templates/template1.jnlp:
+	  Test Template JNLP file: An exact duplicate of the launching
+	  JNLP file.
+	* tests/netx/unit/net/sourceforge/jnlp/templates/template2.jnlp:
+	  Test Template JNLP file: Contains wildchars as attribute/element
+	  values.
+	* tests/netx/unit/net/sourceforge/jnlp/templates/template3.jnlp:
+	  Test Template JNLP file: Different order of elements/attributes
+	  (same value)
+	* tests/netx/unit/net/sourceforge/jnlp/templates/template4.jnlp:
+	  Test Template JNLP file: Contains wildchars as values of ALL elements 
+	  and attribute.
+	* tests/netx/unit/net/sourceforge/jnlp/templates/template5.jnlp:
+	  Test Template JNLP file: Contains comments.
+	* tests/netx/unit/net/sourceforge/jnlp/templates/template6.jnlp:
+	  Test Template JNLP file: Contains different attribute and element
+	  values.
+	* tests/netx/unit/net/sourceforge/jnlp/templates/template7.jnlp:
+	  Test Template JNLP file: Contains additional children in element.
+	* tests/netx/unit/net/sourceforge/jnlp/templates/template8.jnlp:
+	  Test Template JNLP file: Contains fewer children in element.
+	* tests/netx/unit/net/sourceforge/jnlp/templates/template9.jnlp:
+	  Test Template JNLP file: All values are different from the launching 
+	  JNLP file.
+	* tests/netx/unit/net/sourceforge/jnlp/application/application0.jnlp:
+	  Test Application JNLP file: Contains CDATA.
+	* tests/netx/unit/net/sourceforge/jnlp/application/application1.jnlp:
+	  Test Application JNLP file: An exact duplicate of the launching
+	  JNLP file.
+	* tests/netx/unit/net/sourceforge/jnlp/application/application2.jnlp:
+	  Test Application JNLP file: Different order of element/attributes
+	  (same value).
+	* tests/netx/unit/net/sourceforge/jnlp/application/application3.jnlp:
+	  Test Application JNLP file: Contains comments.
+	* tests/netx/unit/net/sourceforge/jnlp/application/application4.jnlp:
+	  Test Application JNLP file: Contains wildchars as attribute/element
+	  values.
+	* tests/netx/unit/net/sourceforge/jnlp/application/application5.jnlp:
+	  Test Application JNLP file: Contains a different attribute (codebase)
+	  value.
+	* tests/netx/unit/net/sourceforge/jnlp/application/application6.jnlp:
+	  Test Application JNLP file: Contains additional children in element.
+	* tests/netx/unit/net/sourceforge/jnlp/application/application7.jnlp:
+	  Test Application JNLP file: Contains fewer children in element.
+	* tests/netx/unit/net/sourceforge/jnlp/application/application8.jnlp:
+	  Test Application JNLP file: All values are different from the
+	  launching JNLP file.
+	* Makefile.am:
+	  (run-netx-unit-tests): Copies resources(non java files) to test.build
+	  before running the unit tests.
+
+2011-06-22 Jiri Vanek <jvanek@redhat.com>
+
+	* tests/report-styles/jreport.xsl: part with classes statistics is now collapsable
+
+2011-06-21 Jiri Vanek <jvanek@redhat.com>
+
+	*tests/jnlp_tests/simple: AccessClassInPackage, ReplaceSecurityManager,
+	AddShutdownHook, ReadEnvironment,  SetContextClassLoader,
+	AllStackTraces,  ReadProperties, CreateClassLoader, RedirectStreams tests 
+
+2011-06-21 Jiri Vanek <jvanek@redhat.com>
+
+	*Makefile.am: (run-netx-dist-tests): no depends on copying of styles
+	(clean-netx-dist-tests): depends also on removing of styles 
+
+2011-06-17 Jiri Vanek <jvanek@redhat.com>
+
+	* tests/jnlp_tests: directory for reproducers
+	* tests/jnlp_tests/advanced: reproducers which must care about
+	 deploying and compiling thmselves
+	* tests/jnlp_tests/simple: reproducers compiled, jared and deployed
+	automatically 
+	* tests/jnlp_tests/simple/name/srcs|testcases|resources/: sourcefiles,
+	resources and testaces for simple reproducers
+	* tests/jnlp_tests/simple/deadlocktest: test for tracing not-killable
+	javaws
+	* tests/jnlp_tests/simple/simpletest1: tutorial test
+	* tests/jnlp_tests/simple/simpletest2: tutorial test with exception
+	* tests/netx/jnlp_testsengine/net/sourceforge/jnlp/ResourcesTest.java:
+	tests for server basic functionality
+	* tests/netx/jnlp_testsengine/net/sourceforge/jnlp/ServerAccess.java:
+	implementation of server to produce jnlps and resources. Implementation
+	of helpers to run javaws process.
+	*Makefile.am: new variables pointing to structure above; 
+	(junit-jnlp-dist-dirs.txt): prepare destination directory structure
+	(stamps/netx-dist-tests-prepare-reproducers.stamp):compile tescascases of simple reproducers
+	(netx-dist-tests-source-files.txt): lookup for server and helping classes
+	(stamps/netx-dist-tests-compile.stamp): compile server and helping classes
+	(stamps/netx-dist-tests-compile-testcases.stamp): compile, jar and deploy all simple testcases and their resources
+	(run-netx-dist-tests): after make install run junit testsuite upon reproducers on virtual server
+	(clean-netx-tests): added dependence on  clean-netx-dist-tests
+	(clean-netx-dist-tests): deleting  of reproducers
+
+2011-06-16 Jiri Vanek <jvanek@redhat.com>
+
+	* tests/report-styles/index.js: fast navigation functions
+	* tests/report-styles/report.css: styles for transformed result
+	* tests/report-styles/jreport.xsl: template for human-readable
+	xml->html transformation.
+	* Makefile.am: New variable for report-styles directory;
+	($(TESTS_DIR)/$(REPORT_STYLES_DIRNAME)): goal for copying styles and    
+	javascripts; (run-netx-unit-tests): added nonfaling xsltproc
+	transformation of sheet and unit-tests' xml report to index_unit.html;
+	(clean-netx-unit-tests): now depends also on clean_tests_reports;
+	(clean_tests_reports): new goal to remove report styles directory and
+	indexs html files. 
 
 2011-07-14  Omair Majid  <omajid@redhat.com>
@@ -97,17 +2621,55 @@
 	addComponents): Changed to a layout that will resize itself.
 
-2011-06-08  Deepak Bhole <dbhole@redhat.com>
-
-	* configure.ac: Prepare for 1.1.1
-	* NEWS: Same
-
-2011-06-08  Deepak Bhole <dbhole@redhat.com>
-
-	* configure.ac: Update for release.
-	* NEWS: Update for release.
-
-2011-06-08  Deepak Bhole <dbhole@redhat.com>
-
-	* NEWS: Remove security update notes from NEWS as they are not "New"
+2011-06-10  Denis Lila  <dlila@redhat.com>
+
+	* netx/net/sourceforge/jnlp/GuiLaunchHandler.java:
+	(mutex): New mutex for synchronizing splashScreen.
+	(closeSplashScreen): New method to hide and dispose
+	splashScreen.
+	(launchStarting): Call closeSplashScreen instead of doing it
+	inline.
+	(launchInitialized): Sync splashScreen creation.
+	(validationError, launchError): Call closeSplashScreen.
+
+2011-06-10  Denis Lila  <dlila@redhat.com>
+
+	* netx/net/sourceforge/jnlp/cache/DefaultDownloadIndicator.java:
+	(frameMutex): New mutex to synchronize accesses to "frame".
+	(getListener): Make almost all of it synchronized on frameMutex.
+	(disposeListener): Sync hider's body around frameMutex and call
+	dispose on the frame so that the awt threads die when they should.
+	(addProgressPanel): Sync "frame" usage.
+
+2011-06-08  Saad Mohammad  <smohammad@redhat.com>
+
+	* AUTHORS: Updated
+	* netx/net/sourceforge/jnlp/services/ServiceUtil.java
+	(checkAccess): Moved the process of checking if the application is a trusted
+	application to a new method called isSigned().
+	* netx/net/sourceforge/jnlp/services/XPersistenceService.java
+	(checkLocation): Allows trusted application to have access to
+	PersistenceService data from different hosts. It uses ServiceUtil.isSigned() 
+	to determine if the current application is a trusted application.
+
+2011-06-08  Andrew Su  <asu@redhat.com>
+
+	* NEWS: Updated.
+	* netx/net/sourceforge/jnlp/JNLPFile.java:
+	(JNLPFile): Calls new constructor.
+	(JNLPFile): New constructor to take an option for forcing a codebase.
+	(JNLPFile): Call parse with extra parameter.
+	(parse): Use the given codebase passed in if we did not find one.
+	* netx/net/sourceforge/jnlp/Parser.java:
+	(Parser): Calls new constructor.
+	(Parser): New constructor which takes in a codebase as a last option.
+	* netx/net/sourceforge/jnlp/PluginBridge.java:
+	(PluginBridge): Calls new JNLPFile's constructor with current codebase
+
+2011-06-08  Andrew Su  <asu@redhat.com>
+
+	* netx/net/sourceforge/jnlp/PluginBridge.java:
+	(jars): Changed to use HashSet instead of String[].
+	(PluginBridge): Updated to work with HashSet instead of String[]
+	(getResources): Likewise.
 
 2011-06-08  Deepak Bhole <dbhole@redhat.com>
@@ -159,4 +2721,15 @@
 	_createAndRetainJavaObject.
 
+2011-05-31  Omair Majid  <omajid@redhat.com>
+
+	* netx/net/sourceforge/jnlp/JNLPSplashScreen.java: Subclass JDialog, not
+	JFrame.
+
+2011-05-30  Andrew Su  <asu@redhat.com>
+
+	* netx/net/sourceforge/jnlp/controlpanel/TemporaryInternetFilesPanel.java:
+	(addComponent): Add check to see if specified cache directory is
+	writable.
+
 2011-05-30  Andrew Su  <asu@redhat.com>
 
@@ -230,4 +2803,13 @@
 	(lock): Removed creation of file here.
 
+2011-05-17 Jiri Vanek <jvanek@redhat.com>
+
+	* tests/junit-runner/JunitLikeXmlOutputListener: This listener exports
+	results of junit in xml which "follows junit-output schema". Extended
+	for date, duration and some statististics for future purpose
+	* Makefile.am (run-netx-unit-tests): backuping stdout/stderr of tests 
+	* tests/junit-runner/CommandLine.java: registered 
+	JunitLikeXmlOutputListener
+
 2011-05-10  Andrew Su  <asu@redhat.com>
 
@@ -235,4 +2817,18 @@
 	(addComponents):Created a new comparator for sorting by file size and
 	date.
+
+2011-05-09  Jiri Vanek  <jvanek@redhat.com>
+	* tests/junit-runner/CommandLine.java:r added skipping of inner 
+	classes and one jnlp file from sources package.
+
+2011-05-03  Denis Lila  <dlila@redhat.com>
+
+	* netx/net/sourceforge/jnlp/NetxPanel.java:
+	Add imports.
+	(uKeyToTG): Change to HashMap.
+	(TGMapMutex): New mutex to synchronize uKeyToTG.
+	(getThreadGroup): Synchronize on TGMapMutex.
+	(NetxPanel): Only create a new thread group if one doesn't already
+	exist for the computed uKey.
 
 2011-05-02  Deepak Bhole <dbhole@redhat.com>
@@ -243,4 +2839,28 @@
 	invokeAndWait.
 	(appletSystemExit): Exit the VM when called.
+
+2011-04-28  Denis Lila  <dlila@redhat.com>
+
+	* netx/net/sourceforge/jnlp/NetxPanel.java:
+	Remove unused import; add imports.
+	(uKey, uKeyToTG, appContextCreated): New members.
+	(getThreadGroup, createNewAppContext): New methods.
+	(runLoader): Pass uKey to PluginBridge's constructor.
+	(run): Remove. No longer needed.
+	(NetxPanel): Initialize uKey. If it is a new key, make a new thread
+	group for it and save it in the hash map.
+	(createAppletThread): Use getFutureTG instead of creating a thread
+	group on the spot.
+	* plugin/icedteanp/java/sun/applet/PluginAppletViewer.java:
+	(createPanel): Initialize and frame the panel in a separate thread.
+	* netx/net/sourceforge/jnlp/Launcher.java:
+	Remove unused import.
+	(createApplet, createApplication, createThreadGroup): Replace
+	AppThreadGroup with ThreadGroup. Remove all calls to setApplication.
+	* netx/net/sourceforge/jnlp/PluginBridge.java:
+	(PluginBridge): Remove the uniqueKey initialization logic. Set
+	uniqueKey to the uKey parameter.
+	* netx/net/sourceforge/jnlp/runtime/AppThreadGroup.java:
+	Remove file.
 
 2011-04-28  Omair Majid  <omajid@redhat.com>
@@ -255,4 +2875,8 @@
 	(launcher.build/itweb-settings): Replace with...
 	(launcher.build/$(itweb-settings)): New target. 
+
+2011-04-21  Deepak Bhole <dbhole@redhat.com>
+
+	* configure.ac: Bumped version to 1.2pre
 
 2011-04-21  Deepak Bhole <dbhole@redhat.com>
Index: /branches/vendor/sourceforge/icedtea-web/current/Makefile.am
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/Makefile.am	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/Makefile.am	(revision 416)
@@ -1,24 +1,70 @@
 # Source directories
 
-NETX_DIR = $(abs_top_builddir)/netx.build
-NETX_SRCDIR = $(abs_top_srcdir)/netx
-NETX_RESOURCE_DIR=$(NETX_SRCDIR)/net/sourceforge/jnlp/resources
-NETX_EXTRA_DIR=$(abs_top_srcdir)/extra/net/sourceforge/javaws/about/resources
-NETX_EXTRA_DIST_DIR=$(abs_top_builddir)/extra-lib/net/sourceforge/javaws/about/resources
-
-TESTS_SRCDIR=$(abs_top_srcdir)/tests
-TESTS_DIR=$(abs_top_builddir)/tests.build
-
-NETX_UNIT_TEST_SRCDIR=$(TESTS_SRCDIR)/netx/unit
-NETX_UNIT_TEST_DIR=$(TESTS_DIR)/netx/unit
-
-JUNIT_RUNNER_DIR=$(TESTS_DIR)/junit-runner
-JUNIT_RUNNER_SRCDIR=$(TESTS_SRCDIR)/junit-runner
-
-JUNIT_RUNNER_JAR=$(abs_top_builddir)/junit-runner.jar
+export NETX_DIR = $(abs_top_builddir)/netx.build
+export NETX_SRCDIR = $(abs_top_srcdir)/netx
+export NETX_RESOURCE_DIR=$(NETX_SRCDIR)/net/sourceforge/jnlp/resources
+export NETX_EXTRA_DIR=$(abs_top_srcdir)/extra/net/sourceforge/javaws/about/resources
+export NETX_EXTRA_DIST_DIR=$(abs_top_builddir)/extra-lib/net/sourceforge/javaws/about/resources
+
+export REPORT_STYLES_DIRNAME=report-styles
+
+export TESTS_SRCDIR=$(abs_top_srcdir)/tests
+export TESTS_DIR=$(abs_top_builddir)/tests.build
+
+export NETX_UNIT_TEST_SRCDIR=$(TESTS_SRCDIR)/netx/unit
+export NETX_UNIT_TEST_DIR=$(TESTS_DIR)/netx/unit
+
+export JUNIT_RUNNER_DIR=$(TESTS_DIR)/junit-runner
+export JUNIT_RUNNER_SRCDIR=$(TESTS_SRCDIR)/junit-runner
+
+
+export JNLP_TESTS_ENGINE_SRCDIR=$(TESTS_SRCDIR)/test-extensions
+export JNLP_TESTS_ENGINE_TESTS_SRCDIR=$(TESTS_SRCDIR)/test-extensions-tests
+export JNLP_TESTS_SRCDIR=$(TESTS_SRCDIR)/reproducers
+export JNLP_TESTS_ENGINE_DIR=$(TESTS_DIR)/jnlp_testsengine
+export JNLP_TESTS_ENGINE_TESTS_DIR=$(TESTS_DIR)/netx/jnlp_testsengine_tests
+export JNLP_TESTS_SERVER_DEPLOYDIR=$(TESTS_DIR)/jnlp_test_server
+export JNLP_TESTS_DIR=$(TESTS_DIR)/jnlp_tests
+export PRIVATE_KEYSTORE_NAME=teststore.ks
+export PRIVATE_KEYSTORE_PASS=123456789
+export EXPORTED_TEST_CERT_PREFIX=icedteatests
+export EXPORTED_TEST_CERT_SUFFIX=crt
+export TEST_CERT_ALIAS=icedteaweb
+export PUBLIC_KEYSTORE=${HOME}/.icedtea/security/trusted.certs
+export PUBLIC_KEYSTORE_PASS=changeit
+
+export JUNIT_RUNNER_JAR=$(abs_top_builddir)/junit-runner.jar
+export UNIT_CLASS_NAMES = $(abs_top_builddir)/unit_class_names
+export REPRODUCERS_CLASS_NAMES = $(abs_top_builddir)/reproducers_class_names
+export REPRODUCERS_CLASS_WHITELIST = $(abs_top_srcdir)/netx-dist-tests-whitelist
+export EMMA_JAVA_ARGS=-Xmx2G
+export EMMA_MODIFIED_FILES=tests-output.xml ServerAccess-logs.xml stdout.log stderr.log all.log
+export EMMA_BACKUP_SUFFIX=_noEmma
+export EMMA_SUFFIX=_withEmma
+export META_MANIFEST = META-INF/MANIFEST.MF
+export SIGNED_REPRODUCERS=signed
+export SIMPLE_REPRODUCERS=simple
+export CUSTOM_REPRODUCERS=custom
+export ALL_NONCUSTOM_REPRODUCERS=$(SIMPLE_REPRODUCERS) $(SIGNED_REPRODUCERS)
+export ALL_REPRODUCERS=$(ALL_NONCUSTOM_REPRODUCERS) $(CUSTOM_REPRODUCERS)
+
+
+# linking variables
+export PLUGIN_LINK_NAME=libjavaplugin.so
+export MOZILLA_LOCAL_PLUGINDIR=${HOME}/.mozilla/plugins
+export MOZILLA_GLOBAL64_PLUGINDIR=/usr/lib64/mozilla/plugins
+export MOZILLA_GLOBAL32_PLUGINDIR=/usr/lib/mozilla/plugins
+export OPERA_GLOBAL64_PLUGINDIR=/usr/lib64/opera/plugins
+export OPERA_GLOBAL32_PLUGINDIR=/usr/lib/opera/plugins
+export BUILT_PLUGIN_LIBRARY=IcedTeaPlugin.so
+export MOZILLA_LOCAL_BACKUP_FILE=${HOME}/$(PLUGIN_LINK_NAME).origU
+export MOZILLA_GLOBAL_BACKUP_FILE=${HOME}/$(PLUGIN_LINK_NAME).origMG
+export OPERA_GLOBAL_BACKUP_FILE=${HOME}/$(PLUGIN_LINK_NAME).origOG
+export MOZILLA_FAMILY_TEST= "$(FIREFOX)" != "" -o "$(CHROMIUM)" != "" -o "$(CHROME)" != "" -o "$(MIDORI)" != "" -o "$(EPIPHANY)" != "" 
+# end of linking variables
 
 # Build directories
 
-BOOT_DIR = $(abs_top_builddir)/bootstrap/jdk1.6.0
+export BOOT_DIR = $(abs_top_builddir)/bootstrap/jdk1.6.0
 
 if WITH_RHINO
@@ -28,12 +74,12 @@
 endif
 
-RUNTIME = $(BOOT_DIR)/jre/lib/rt.jar:$(BOOT_DIR)/jre/lib/jsse.jar$(RHINO_RUNTIME)
+export RUNTIME = $(BOOT_DIR)/jre/lib/rt.jar:$(BOOT_DIR)/jre/lib/jsse.jar$(RHINO_RUNTIME):$(BOOT_DIR)/jre/lib/resources.jar
 
 # Flags
-IT_CFLAGS=$(CFLAGS) $(ARCHFLAG)
-IT_JAVAC_SETTINGS=-g -encoding utf-8 $(JAVACFLAGS) $(MEMORY_LIMIT) $(PREFER_SOURCE)
-IT_LANGUAGE_SOURCE_VERSION=6
-IT_CLASS_TARGET_VERSION=6
-IT_JAVACFLAGS=$(IT_JAVAC_SETTINGS) -source $(IT_LANGUAGE_SOURCE_VERSION) -target $(IT_CLASS_TARGET_VERSION)
+export IT_CFLAGS=$(CFLAGS) $(ARCHFLAG)
+export IT_JAVAC_SETTINGS=-g -encoding utf-8 $(JAVACFLAGS) $(MEMORY_LIMIT) $(PREFER_SOURCE)
+export IT_LANGUAGE_SOURCE_VERSION=6
+export IT_CLASS_TARGET_VERSION=6
+export IT_JAVACFLAGS=$(IT_JAVAC_SETTINGS) -source $(IT_LANGUAGE_SOURCE_VERSION) -target $(IT_CLASS_TARGET_VERSION)
 
 #
@@ -44,16 +90,16 @@
 #  - we want full privileges
 #
-LAUNCHER_BOOTCLASSPATH="-Xbootclasspath/a:$(datadir)/$(PACKAGE_NAME)/netx.jar$(RHINO_RUNTIME)"
-PLUGIN_BOOTCLASSPATH='"-Xbootclasspath/a:$(datadir)/$(PACKAGE_NAME)/netx.jar:$(datadir)/$(PACKAGE_NAME)/plugin.jar$(RHINO_RUNTIME)"'
+export LAUNCHER_BOOTCLASSPATH="-Xbootclasspath/a:$(datadir)/$(PACKAGE_NAME)/netx.jar$(RHINO_RUNTIME)"
+export PLUGIN_BOOTCLASSPATH='"-Xbootclasspath/a:$(datadir)/$(PACKAGE_NAME)/netx.jar:$(datadir)/$(PACKAGE_NAME)/plugin.jar$(RHINO_RUNTIME)"'
 
 # Fake update version to work with the Deployment Toolkit script used by Oracle
 # http://download.oracle.com/javase/tutorial/deployment/deploymentInDepth/depltoolkit_index.html
-JDK_UPDATE_VERSION=50
+export JDK_UPDATE_VERSION=50
 
 # Sources list
 
-PLUGIN_TEST_SRCS = $(abs_top_srcdir)/plugin/tests/LiveConnect/*.java
-
-NETX_PKGS = javax.jnlp net.sourceforge.nanoxml net.sourceforge.jnlp \
+export PLUGIN_TEST_SRCS = $(abs_top_srcdir)/plugin/tests/LiveConnect/*.java
+
+export NETX_PKGS = javax.jnlp net.sourceforge.nanoxml net.sourceforge.jnlp \
 	net.sourceforge.jnlp.cache net.sourceforge.jnlp.config \
 	net.sourceforge.jnlp.controlpanel net.sourceforge.jnlp.event \
@@ -64,11 +110,11 @@
 # Conditional defintions
 if ENABLE_PLUGIN
-ICEDTEAPLUGIN_CLEAN = clean-IcedTeaPlugin
-LIVECONNECT_DIR = netscape sun/applet
-PLUGIN_DIR=$(abs_top_builddir)/plugin/icedteanp
-PLUGIN_SRCDIR=$(abs_top_srcdir)/plugin/icedteanp
-LIVECONNECT_SRCS = $(PLUGIN_SRCDIR)/java
-ICEDTEAPLUGIN_TARGET = $(PLUGIN_DIR)/IcedTeaPlugin.so stamps/liveconnect-dist.stamp
-PLUGIN_PKGS = sun.applet netscape.security netscape.javascript
+export ICEDTEAPLUGIN_CLEAN = clean-IcedTeaPlugin
+export LIVECONNECT_DIR = netscape sun/applet
+export PLUGIN_DIR=$(abs_top_builddir)/plugin/icedteanp
+export PLUGIN_SRCDIR=$(abs_top_srcdir)/plugin/icedteanp
+export LIVECONNECT_SRCS = $(PLUGIN_SRCDIR)/java
+export ICEDTEAPLUGIN_TARGET = $(PLUGIN_DIR)/$(BUILT_PLUGIN_LIBRARY) stamps/liveconnect-dist.stamp
+export PLUGIN_PKGS = sun.applet netscape.security netscape.javascript
 endif
 
@@ -92,5 +138,5 @@
 
 if WITH_RHINO
-  RHINO_TESTS=check-pac-functions
+  RHINO_TESTS=stamps/check-pac-functions.stamp
 else
   RHINO_TESTS=
@@ -98,5 +144,5 @@
 
 if WITH_JUNIT
-  JUNIT_TESTS=run-netx-unit-tests
+  JUNIT_TESTS=stamps/run-netx-unit-tests.stamp
 else
   JUNIT_TESTS=
@@ -104,8 +150,19 @@
 
 
-PLUGIN_VERSION = IcedTea-Web $(FULL_VERSION)
-
-EXTRA_DIST = $(top_srcdir)/netx $(top_srcdir)/plugin javaws.png javaws.desktop.in extra launcher \
+export PLUGIN_VERSION = IcedTea-Web $(FULL_VERSION)
+
+export EXTRA_DIST = $(top_srcdir)/netx $(top_srcdir)/plugin javaws.png javaws.desktop.in extra launcher \
  itweb-settings.desktop.in $(top_srcdir)/tests
+
+# reproducers `D`shortcuts
+export DTEST_SERVER=-Dtest.server.dir=$(JNLP_TESTS_SERVER_DEPLOYDIR)
+export DJAVAWS_BUILD=-Djavaws.build.bin=$(DESTDIR)$(bindir)/$(javaws)
+export DBROWSERS=-Dused.browsers=$(FIREFOX):$(CHROMIUM):$(CHROME):$(OPERA):$(MIDORI):$(EPIPHANY)
+export REPRODUCERS_DPARAMETERS= $(DTEST_SERVER) $(DJAVAWS_BUILD) $(DBROWSERS) $(BROWSER_TESTS_MODIFICATION)
+# end of `D`shortcuts
+
+#exported autoconf copies
+export EXPORTED_JAVAC=$(BOOT_DIR)/bin/javac
+#end of exported autoconf copies
 
 # binary names
@@ -130,6 +187,6 @@
 check-local: $(RHINO_TESTS) $(JUNIT_TESTS)
 
-clean-local: clean-netx clean-plugin clean-liveconnect clean-extra clean-bootstrap-directory \
- clean-native-ecj clean-launchers clean-desktop-files clean-docs clean-tests
+clean-local: clean-netx clean-plugin clean-liveconnect clean-extra  \
+ clean-native-ecj clean-launchers clean-desktop-files clean-docs clean-tests clean-bootstrap-directory
 	if [ -e stamps ] ; then \
 	  rmdir stamps ; \
@@ -138,5 +195,5 @@
 .PHONY: clean-IcedTeaPlugin clean-add-netx clean-add-netx-debug clean-add-plugin clean-add-plugin-debug \
  clean-bootstrap-directory clean-native-ecj clean-desktop-files clean-netx-docs clean-docs clean-plugin-docs \
- clean-tests check-local clean-launchers check-pac-functions run-netx-unit-tests clean-netx-tests \
+ clean-tests check-local clean-launchers stamps/check-pac-functions.stamp stamps/run-netx-unit-tests.stamp clean-netx-tests \
  clean-junit-runner clean-netx-unit-tests
 
@@ -144,5 +201,5 @@
 	${mkinstalldirs} $(DESTDIR)$(bindir) $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/ $(DESTDIR)$(libdir)
 if ENABLE_PLUGIN
-	${INSTALL_PROGRAM} $(PLUGIN_DIR)/IcedTeaPlugin.so $(DESTDIR)$(libdir)
+	${INSTALL_PROGRAM} $(PLUGIN_DIR)/$(BUILT_PLUGIN_LIBRARY) $(DESTDIR)$(libdir)
 	${INSTALL_DATA} $(abs_top_builddir)/liveconnect/lib/classes.jar $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/plugin.jar
 endif
@@ -173,5 +230,5 @@
 
 uninstall-local:
-	rm -f $(DESTDIR)$(libdir)/IcedTeaPlugin.so
+	rm -f $(DESTDIR)$(libdir)/$(BUILT_PLUGIN_LIBRARY)
 	rm -f $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/plugin.jar
 	rm -f $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/netx.jar
@@ -203,4 +260,5 @@
 	cd $(PLUGIN_DIR) && \
 	$(CXX) $(CXXFLAGS) \
+	   $(DEFS) $(VERSION_DEFS) \
 	  -DJDK_UPDATE_VERSION="\"$(JDK_UPDATE_VERSION)\"" \
 	  -DPLUGIN_NAME="\"IcedTea-Web Plugin\"" \
@@ -215,5 +273,5 @@
 	  -fPIC -o $@ -c $<
 
-$(PLUGIN_DIR)/IcedTeaPlugin.so: $(addprefix $(PLUGIN_DIR)/,$(PLUGIN_OBJECTS))
+$(PLUGIN_DIR)/$(BUILT_PLUGIN_LIBRARY): $(addprefix $(PLUGIN_DIR)/,$(PLUGIN_OBJECTS))
 	cd $(PLUGIN_DIR) && \
 	$(CXX) $(CXXFLAGS) \
@@ -226,5 +284,5 @@
 clean-IcedTeaPlugin:
 	rm -f $(PLUGIN_DIR)/*.o
-	rm -f $(PLUGIN_DIR)/IcedTeaPlugin.so
+	rm -f $(PLUGIN_DIR)/$(BUILT_PLUGIN_LIBRARY)
 	if [ $(abs_top_srcdir) != $(abs_top_builddir) ]; then \
 	  if [ -e $(abs_top_builddir)/plugin/icedteanp ] ; then \
@@ -432,35 +490,399 @@
 	fi
 
-check-pac-functions: stamps/bootstrap-directory.stamp
+stamps/check-pac-functions.stamp: stamps/bootstrap-directory.stamp
 	./jrunscript $(abs_top_srcdir)/tests/netx/pac/pac-funcs-test.js \
-	  $$(readlink -f $(abs_top_srcdir)/netx/net/sourceforge/jnlp/runtime/pac-funcs.js)
+	  $$(readlink -f $(abs_top_srcdir)/netx/net/sourceforge/jnlp/runtime/pac-funcs.js) ; \
+	mkdir -p stamps && \
+	touch $@
 
 junit-runner-source-files.txt:
 	find $(JUNIT_RUNNER_SRCDIR) -name '*.java' | sort > $@
 
-$(JUNIT_RUNNER_JAR): junit-runner-source-files.txt
+$(JUNIT_RUNNER_JAR): junit-runner-source-files.txt stamps/netx-dist-tests-compile.stamp
 	mkdir -p $(JUNIT_RUNNER_DIR) && \
 	$(BOOT_DIR)/bin/javac $(IT_JAVACFLAGS) \
 	  -d $(JUNIT_RUNNER_DIR) \
-	  -classpath $(JUNIT_JAR) \
+	  -classpath $(JUNIT_JAR):$(JNLP_TESTS_ENGINE_DIR) \
 	  @junit-runner-source-files.txt && \
 	$(BOOT_DIR)/bin/jar cf $@  -C $(JUNIT_RUNNER_DIR) .
 
+stamps/junit-jnlp-dist-dirs: junit-jnlp-dist-simple.txt stamps/junit-jnlp-dist-signed.stamp junit-jnlp-dist-custom.txt
+	mkdir -p $(JNLP_TESTS_SERVER_DEPLOYDIR)
+	mkdir -p $(JNLP_TESTS_DIR)
+	touch $@
+
+junit-jnlp-dist-custom.txt:
+	cd $(JNLP_TESTS_SRCDIR)/$(CUSTOM_REPRODUCERS)/ ; \
+	find .  -maxdepth 1 -mindepth 1 | sed "s/.\/*//" > $(abs_top_builddir)/$@
+
+junit-jnlp-dist-simple.txt:
+	cd $(JNLP_TESTS_SRCDIR)/simple/ ; \
+	find .  -maxdepth 1 -mindepth 1 | sed "s/.\/*//" > $(abs_top_builddir)/$@
+
+stamps/junit-jnlp-dist-signed.stamp: 
+	types=($(SIGNED_REPRODUCERS)) ; \
+	for which in "$${types[@]}" ; do \
+	  pushd $(JNLP_TESTS_SRCDIR)/$$which/ ; \
+	  find .  -maxdepth 1 -mindepth 1 | sed "s/.\/*//" > $(abs_top_builddir)/junit-jnlp-dist-$$which.txt ; \
+	  popd ; \
+	done ; \
+	mkdir -p stamps && \
+	touch $@
+
+stamps/netx-dist-tests-prepare-reproducers.stamp: stamps/junit-jnlp-dist-dirs
+	types=($(ALL_NONCUSTOM_REPRODUCERS)); \
+	for which in "$${types[@]}" ; do \
+	  . $(abs_top_srcdir)/NEW_LINE_IFS ; \
+	  simpleReproducers=(`cat $(abs_top_builddir)/junit-jnlp-dist-$$which.txt `); \
+	  IFS="$$IFS_BACKUP" ; \
+	  for dir in "$${simpleReproducers[@]}" ; do \
+	    echo "processing: $$dir" ; \
+	    mkdir -p "$(JNLP_TESTS_DIR)/$$dir" ; \
+	    if [ -e "$(JNLP_TESTS_SRCDIR)/$$which/$$dir/srcs/" ]; then \
+	      d=`pwd` ; \
+	      cd "$(JNLP_TESTS_SRCDIR)/$$which/$$dir/srcs/" ; \
+	      srcFiles=`find . -mindepth 1 -type f -name "*.java" | sed "s/.\/*//"` ; \
+	      notSrcFiles=`find . -mindepth 1 -type f \! -name "*.java" | sed "s/.\/*//"` ; \
+	      $(BOOT_DIR)/bin/javac -cp $(NETX_DIR)/lib/classes.jar -d "$(JNLP_TESTS_DIR)/$$dir/" $$srcFiles ; \
+	      if [ -n "$$notSrcFiles" ] ; then \
+	        cp -R --parents $$notSrcFiles "$(JNLP_TESTS_DIR)/$$dir/" ; \
+	      fi ; \
+	      cd "$(JNLP_TESTS_DIR)/$$dir/" ; \
+	      if [ -f $(META_MANIFEST) ]; \
+	      then \
+	        $(BOOT_DIR)/bin/jar cfm "$(JNLP_TESTS_SERVER_DEPLOYDIR)/$$dir.jar" $(META_MANIFEST) * ; \
+	      else \
+	        $(BOOT_DIR)/bin/jar cf "$(JNLP_TESTS_SERVER_DEPLOYDIR)/$$dir.jar" * ; \
+	      fi; \
+	      cd "$$d" ; \
+	    fi; \
+	  done ; \
+	done ; \
+	mkdir -p stamps && \
+	touch $@
+
+stamps/netx-dist-tests-sign-some-reproducers.stamp: stamps/netx-dist-tests-prepare-reproducers.stamp
+	keystore=$(abs_top_builddir)/$(PRIVATE_KEYSTORE_NAME); \
+	types=($(SIGNED_REPRODUCERS)) ; \
+	for which in "$${types[@]}" ; do \
+	  tcaw=$(TEST_CERT_ALIAS)_$$which ; \
+	  $(BOOT_DIR)/bin/keytool -genkey -alias $$tcaw -keystore $$keystore -keypass $(PRIVATE_KEYSTORE_PASS) -storepass $(PRIVATE_KEYSTORE_PASS) -dname "cn=$$tcaw, ou=$$tcaw, o=$$tcaw, c=$$tcaw" ; \
+	    . $(abs_top_srcdir)/NEW_LINE_IFS ; \
+	  signedReproducers=(`cat $(abs_top_builddir)/junit-jnlp-dist-$$which.txt `); \
+	    IFS="$$IFS_BACKUP" ; \
+	  for dir in "$${signedReproducers[@]}" ; do \
+	   $(BOOT_DIR)/bin/jarsigner -keystore $$keystore -storepass $(PRIVATE_KEYSTORE_PASS) -keypass $(PRIVATE_KEYSTORE_PASS)  "$(JNLP_TESTS_SERVER_DEPLOYDIR)/$$dir.jar"  $$tcaw ; \
+	  done ; \
+	done ; \
+	mkdir -p stamps && \
+	touch $@
+
+stamps/change-dots-to-paths.stamp: stamps/netx-dist-tests-sign-some-reproducers.stamp
+	pushd  $(JNLP_TESTS_SERVER_DEPLOYDIR); \
+	types=($(ALL_NONCUSTOM_REPRODUCERS)); \
+	for which in "$${types[@]}" ; do \
+	  . $(abs_top_srcdir)/NEW_LINE_IFS ; \
+	  simpleReproducers=(`cat $(abs_top_builddir)/junit-jnlp-dist-$$which.txt `); \
+	  IFS="$$IFS_BACKUP" ; \
+	  for dir in "$${simpleReproducers[@]}" ; do \
+	    if test "$${dir:0:1}" = "." ; then \
+	      echo "reproducer $$dir starts with dot. It is forbidden" ; \
+	      exit 5; \
+	    fi; \
+	    if test "$${dir:(-1)}" = "." ; then \
+	      echo "reproducer $$dir ends with dot. It is forbidden" ; \
+	      exit 5; \
+	    fi; \
+	    q=`expr index "$$dir" .`; \
+	    r=$$? ; \
+	    if [ $$r = 0  ]; then \
+	      slashed_dir="./$${dir//.//}" ; \
+	      path="`dirname $$slashed_dir`" ; \
+	      file="`basename $$slashed_dir`.jar" ; \
+	      echo "copying $$dir.jar to $$path as $$file" ; \
+	      mkdir --parents $$path ; \
+	      cp $$dir".jar" "$$path"/"$$file" ; \
+	    fi ; \
+	  done ; \
+	done ; \
+	popd ; \
+	mkdir -p stamps && \
+	touch $@
+
+#this always tries to remove  previous testcert
+#the code is copypasted from netx-dist-tests-remove-cert-from-public, because 
+#with depending to not stamped target we always have to rerun reproducers targets
+stamps/exported-test-certs.stamp: stamps/change-dots-to-paths.stamp
+	-types=($(SIGNED_REPRODUCERS)) ; \
+	for which in "$${types[@]}" ; do \
+	  $(BOOT_DIR)/bin/keytool -delete -alias $(TEST_CERT_ALIAS)_$$which -keystore $(PUBLIC_KEYSTORE) -storepass $(PUBLIC_KEYSTORE_PASS) ; \
+	done ;
+	types=($(SIGNED_REPRODUCERS)) ; \
+	for which in "$${types[@]}" ; do \
+	  keytool -export -alias $(TEST_CERT_ALIAS)_$$which -file $(EXPORTED_TEST_CERT_PREFIX)_$$which.$(EXPORTED_TEST_CERT_SUFFIX) -storepass $(PRIVATE_KEYSTORE_PASS) -keystore $(PRIVATE_KEYSTORE_NAME) ; \
+	done ;
+	mkdir -p stamps && \
+	touch $@
+
+stamps/netx-dist-tests-import-cert-to-public: stamps/exported-test-certs.stamp
+	types=($(SIGNED_REPRODUCERS)) ; \
+	for which in "$${types[@]}" ; do \
+	  yes | $(BOOT_DIR)/bin/keytool -import -alias $(TEST_CERT_ALIAS)_$$which -keystore $(PUBLIC_KEYSTORE) -storepass $(PUBLIC_KEYSTORE_PASS) -file $(EXPORTED_TEST_CERT_PREFIX)_$$which.$(EXPORTED_TEST_CERT_SUFFIX) ;\
+	done ;
+	mkdir -p stamps && \
+	touch $@
+
+netx-dist-tests-remove-cert-from-public:
+	-types=($(SIGNED_REPRODUCERS)) ; \
+	for which in "$${types[@]}" ; do \
+	  $(BOOT_DIR)/bin/keytool -delete -alias $(TEST_CERT_ALIAS)_$$which -keystore $(PUBLIC_KEYSTORE) -storepass $(PUBLIC_KEYSTORE_PASS) ; \
+	done ;
+	-rm -rf stamps/netx-dist-tests-import-cert-to-public
+
+netx-dist-tests-source-files.txt:
+	find $(JNLP_TESTS_ENGINE_SRCDIR) -name '*.java' | sort > $@
+
+stamps/netx-dist-tests-compile.stamp: stamps/netx.stamp \
+ stamps/junit-jnlp-dist-dirs netx-dist-tests-source-files.txt
+	mkdir -p $(JNLP_TESTS_ENGINE_DIR);
+	$(BOOT_DIR)/bin/javac $(IT_JAVACFLAGS) \
+	 -d $(JNLP_TESTS_ENGINE_DIR) \
+	 -classpath $(JUNIT_JAR):$(NETX_DIR)/lib/classes.jar \
+	 @netx-dist-tests-source-files.txt && \
+	mkdir -p stamps && \
+	touch $@
+
+netx-dist-tests-tests-source-files.txt:
+	find $(JNLP_TESTS_ENGINE_TESTS_SRCDIR) -name '*.java' | sort > $@
+
+stamps/netx-dist-tests-tests-compile.stamp: stamps/junit-jnlp-dist-dirs netx-dist-tests-tests-source-files.txt  stamps/netx-dist-tests-compile.stamp
+	mkdir -p $(JNLP_TESTS_ENGINE_TESTS_DIR);
+	$(BOOT_DIR)/bin/javac $(IT_JAVACFLAGS) \
+	 -d $(JNLP_TESTS_ENGINE_TESTS_DIR) \
+	 -classpath $(JUNIT_JAR):$(NETX_DIR)/lib/classes.jar:$(JNLP_TESTS_ENGINE_DIR) \
+	 @netx-dist-tests-tests-source-files.txt && \
+	mkdir -p stamps && \
+	touch $@
+
+stamps/netx-dist-tests-compile-testcases.stamp: stamps/netx.stamp stamps/junit-jnlp-dist-dirs \
+ netx-dist-tests-source-files.txt stamps/netx-dist-tests-compile.stamp stamps/netx-dist-tests-tests-compile.stamp
+	types=($(ALL_REPRODUCERS)); \
+	for which in "$${types[@]}" ; do \
+	  . $(abs_top_srcdir)/NEW_LINE_IFS ; \
+	  simpleReproducers=(`cat $(abs_top_builddir)/junit-jnlp-dist-$$which.txt `); \
+	  IFS="$$IFS_BACKUP" ; \
+	  for dir in "$${simpleReproducers[@]}" ; do \
+	    $(BOOT_DIR)/bin/javac $(IT_JAVACFLAGS) \
+	      -d $(JNLP_TESTS_ENGINE_TESTS_DIR) \
+	      -classpath $(JUNIT_JAR):$(NETX_DIR)/lib/classes.jar:$(JNLP_TESTS_ENGINE_DIR) \
+	    "$(JNLP_TESTS_SRCDIR)/$$which/$$dir/testcases/"* ; \
+	  done ; \
+	done ; \
+	mkdir -p stamps && \
+	touch $@
+
+stamps/netx-dist-tests-copy-resources.stamp: stamps/junit-jnlp-dist-dirs
+	types=($(ALL_REPRODUCERS)); \
+	for which in "$${types[@]}" ; do \
+	  . $(abs_top_srcdir)/NEW_LINE_IFS ; \
+	  simpleReproducers=(`cat $(abs_top_builddir)/junit-jnlp-dist-$$which.txt `); \
+	  IFS="$$IFS_BACKUP" ; \
+	  for dir in "$${simpleReproducers[@]}" ; do \
+	    cp -R "$(JNLP_TESTS_SRCDIR)/$$which/$$dir/resources/"*  $(JNLP_TESTS_SERVER_DEPLOYDIR)/ ; \
+	  done ; \
+	done ; \
+	mkdir -p stamps && \
+	touch $@
+
+$(REPRODUCERS_CLASS_NAMES): $(REPRODUCERS_CLASS_WHITELIST)
+	whiteListed=`cat $(REPRODUCERS_CLASS_WHITELIST)`; \
+	cd $(JNLP_TESTS_ENGINE_TESTS_DIR) ; \
+	class_names= ; \
+	for test in `find -type f` ; do \
+	  class_name=`echo $$test | sed -e 's|\.class$$||' -e 's|^\./||'` ; \
+	  class_name=`echo $$class_name | sed -e 's|/|.|g' ` ; \
+	  INLCUDE="NO" ; \
+	  for x in $$whiteListed ; do \
+	    q=`expr match "$$class_name" "$$x"`; \
+	    r=$$? ; \
+	    if [ $$r = 0  ]; then \
+	      echo "$$class_name will be included in reproducers testcases because of $$x pattern in $(REPRODUCERS_CLASS_WHITELIST). Matching was  $$q"; \
+	      INLCUDE="YES" ; \
+	    fi; \
+	  done; \
+	  if [ "$$INLCUDE" = "YES"  ]; then \
+	    class_names="$$class_names $$class_name" ; \
+	  else \
+	    echo "$$class_name had no match in $(REPRODUCERS_CLASS_WHITELIST). Excluding"; \
+	  fi; \
+	done ; \
+	echo $$class_names > $(REPRODUCERS_CLASS_NAMES)
+
+stamps/run-netx-dist-tests.stamp: stamps/netx-dist.stamp extra-lib/about.jar stamps/plugin.stamp launcher.build/$(javaws) \
+ javaws.desktop stamps/docs.stamp launcher.build/$(itweb_settings) itweb-settings.desktop \
+ stamps/netx.stamp stamps/junit-jnlp-dist-dirs stamps/netx-dist-tests-import-cert-to-public \
+ stamps/netx-dist-tests-compile.stamp stamps/netx-dist-tests-compile-testcases.stamp $(JUNIT_RUNNER_JAR) stamps/netx-dist-tests-copy-resources.stamp\
+ $(TESTS_DIR)/$(REPORT_STYLES_DIRNAME) $(REPRODUCERS_CLASS_NAMES) stamps/process-custom-reproducers.stamp
+	cd $(JNLP_TESTS_ENGINE_DIR) ; \
+	class_names=`cat $(REPRODUCERS_CLASS_NAMES)` ; \
+	CLASSPATH=$(NETX_DIR)/lib/classes.jar:$(JUNIT_JAR):$(JUNIT_RUNNER_JAR):.:$(JNLP_TESTS_ENGINE_TESTS_DIR) \
+	  $(BOOT_DIR)/bin/java $(REPRODUCERS_DPARAMETERS) \
+	 -Xbootclasspath:$(RUNTIME) CommandLine $$class_names
+if WITH_XSLTPROC
+	$(XSLTPROC)  $(TESTS_SRCDIR)/$(REPORT_STYLES_DIRNAME)/logs.xsl $(JNLP_TESTS_ENGINE_DIR)/ServerAccess-logs.xml > $(TESTS_DIR)/logs_reproducers.html
+	$(XSLTPROC)  --stringparam logs logs_reproducers.html $(TESTS_SRCDIR)/$(REPORT_STYLES_DIRNAME)/jreport.xsl $(JNLP_TESTS_ENGINE_DIR)/tests-output.xml > $(TESTS_DIR)/index_reproducers.html
+endif
+	touch $@
+
+stamps/process-custom-reproducers.stamp: stamps/junit-jnlp-dist-dirs stamps/netx-dist-tests-import-cert-to-public \
+ stamps/netx-dist-tests-compile.stamp stamps/netx-dist-tests-compile-testcases.stamp $(JUNIT_RUNNER_JAR) stamps/netx-dist-tests-copy-resources.stamp\
+ $(TESTS_DIR)/$(REPORT_STYLES_DIRNAME) $(REPRODUCERS_CLASS_NAMES)
+	. $(abs_top_srcdir)/NEW_LINE_IFS ; \
+	customReproducers=(`cat $(abs_top_builddir)/junit-jnlp-dist-custom.txt `); \
+	IFS="$$IFS_BACKUP" ; \
+	for dir in "$${customReproducers[@]}" ; do \
+	  pushd $(JNLP_TESTS_SRCDIR)/$(CUSTOM_REPRODUCERS)/$$dir/srcs; \
+	  $(MAKE) prepare-reproducer ; \
+	  popd ; \
+	done ; \
+	mkdir -p stamps && \
+	touch $@
+
+clean-custom-reproducers: junit-jnlp-dist-custom.txt
+	. $(abs_top_srcdir)/NEW_LINE_IFS ; \
+	customReproducers=(`cat $(abs_top_builddir)/junit-jnlp-dist-custom.txt `); \
+	IFS="$$IFS_BACKUP" ; \
+	for dir in "$${customReproducers[@]}" ; do \
+	  pushd $(JNLP_TESTS_SRCDIR)/custom/$$dir/srcs; \
+	  $(MAKE) clean-reproducer ; \
+	  popd ; \
+	done ; \
+	rm -f stamps/process-custom-reproducers.stamp
+
+#for global-links you must be root, for opera there do not exists user-links
+#although this targets will indeed create symbolic links to enable 
+#icedtea-web plugin inside browser it is intended for testing purposes
+if ENABLE_PLUGIN
+stamps/user-links.stamp: stamps/netx-dist.stamp extra-lib/about.jar stamps/plugin.stamp \
+ launcher.build/$(javaws) stamps/netx.stamp $(DESTDIR)$(libdir)/$(BUILT_PLUGIN_LIBRARY) 
+	if [ $(MOZILLA_FAMILY_TEST) ]  ; then  \
+	  if [ -e $(MOZILLA_LOCAL_PLUGINDIR)/$(PLUGIN_LINK_NAME) ] ; then \
+	    mv -f $(MOZILLA_LOCAL_PLUGINDIR)/$(PLUGIN_LINK_NAME)  $(MOZILLA_LOCAL_BACKUP_FILE) ; \
+	    echo "$(MOZILLA_LOCAL_PLUGINDIR)/$(PLUGIN_LINK_NAME) backed up as $(MOZILLA_LOCAL_BACKUP_FILE)" ; \
+	  else \
+	    echo "$(MOZILLA_LOCAL_PLUGINDIR)/$(PLUGIN_LINK_NAME) doesn't exists, nothing to be backed up to $(MOZILLA_LOCAL_BACKUP_FILE)" ; \
+	  fi ; \
+	  pushd $(MOZILLA_LOCAL_PLUGINDIR) ; \
+	  ln -s $(DESTDIR)$(libdir)/$(BUILT_PLUGIN_LIBRARY) $(PLUGIN_LINK_NAME) ; \
+	  echo "$(DESTDIR)$(libdir)/$(BUILT_PLUGIN_LIBRARY) linked as  $$PWD/$(PLUGIN_LINK_NAME)" ; \
+	  popd ; \
+	fi ; \
+	touch $@
+
+restore-user-links:
+	if [ $(MOZILLA_FAMILY_TEST) ]  ; then  \
+	  if [ -e $(MOZILLA_LOCAL_BACKUP_FILE) ] ; then \
+	    mv -f  $(MOZILLA_LOCAL_BACKUP_FILE)  $(MOZILLA_LOCAL_PLUGINDIR)/$(PLUGIN_LINK_NAME) ; \
+	    echo "$(MOZILLA_LOCAL_BACKUP_FILE) restored as $(MOZILLA_LOCAL_PLUGINDIR)/$(PLUGIN_LINK_NAME)" ; \
+	  else \
+	    rm -f $(MOZILLA_LOCAL_PLUGINDIR)/$(PLUGIN_LINK_NAME) ; \
+	    echo "$(MOZILLA_LOCAL_BACKUP_FILE) do not exists, nothing to be restored. $(MOZILLA_LOCAL_PLUGINDIR)/$(PLUGIN_LINK_NAME) removed" ; \
+	  fi ; \
+	fi ;
+	if [ -e stamps/user-links.stamp ] ; then \
+	  rm -f stamps/user-links.stamp ; \
+	fi
+
+stamps/global-links.stamp: stamps/netx-dist.stamp extra-lib/about.jar stamps/plugin.stamp launcher.build/$(javaws) \
+ stamps/netx.stamp $(DESTDIR)$(libdir)/$(BUILT_PLUGIN_LIBRARY)
+	if [ $(MOZILLA_FAMILY_TEST) ]  ; then  \
+	    dir="$(MOZILLA_GLOBAL32_PLUGINDIR)"  ; \
+	    arch=`arch`  ; \
+	    if [ "$$arch" = "x86_64" ]  ; then \
+	      dir="$(MOZILLA_GLOBAL64_PLUGINDIR)"  ; \
+	    fi ; \
+	    if [ -e "$$dir"/$(PLUGIN_LINK_NAME) ] ; then \
+	      mv -f "$$dir"/$(PLUGIN_LINK_NAME)  $(MOZILLA_GLOBAL_BACKUP_FILE) ; \
+	      echo "$$dir/$(PLUGIN_LINK_NAME) backed up as  $(MOZILLA_GLOBAL_BACKUP_FILE)" ; \
+	    else \
+	      echo "$$dir/$(PLUGIN_LINK_NAME) do not exists, nothing to be backed up to $(MOZILLA_GLOBAL_BACKUP_FILE)" ; \
+	    fi ; \
+	    pushd "$$dir"  ; \
+	    ln -s $(DESTDIR)$(libdir)/$(BUILT_PLUGIN_LIBRARY) $(PLUGIN_LINK_NAME)  ; \
+	    echo "$(DESTDIR)$(libdir)/$(BUILT_PLUGIN_LIBRARY) linked as  $$PWD/$(PLUGIN_LINK_NAME)" ; \
+	    popd  ; \
+	fi ; 
+	if [ "$(OPERA)" != "" ]  ; then \
+	    dir="$(OPERA_GLOBAL32_PLUGINDIR)"  ; \
+	    arch=`arch`  ; \
+	    if [ "$$arch" = "x86_64" ] ; then \
+	      dir="$(OPERA_GLOBAL64_PLUGINDIR)" ; \
+	    fi ; \
+	    if [ -e "$$dir"/$(PLUGIN_LINK_NAME) ] ; then \
+	      mv -f "$$dir"/$(PLUGIN_LINK_NAME)  $(OPERA_GLOBAL_BACKUP_FILE) ; \
+	      echo "$$dir/$(PLUGIN_LINK_NAME) backed up as  $(OPERA_GLOBAL_BACKUP_FILE) "; \
+	    else \
+	      echo "$$dir/$(PLUGIN_LINK_NAME) do not exists, nothing to be backed up to $(OPERA_GLOBAL_BACKUP_FILE) "; \
+	    fi ; \
+	    pushd "$$dir"  ; \
+	    ln -s $(DESTDIR)$(libdir)/$(BUILT_PLUGIN_LIBRARY) $(PLUGIN_LINK_NAME)  ; \
+	    echo "$(DESTDIR)$(libdir)/$(BUILT_PLUGIN_LIBRARY) linked as  $$PWD/$(PLUGIN_LINK_NAME)" ; \
+	    popd  ; \
+	fi   ; \
+	touch $@
+
+restore-global-links:
+	if [ $(MOZILLA_FAMILY_TEST) ]  ; then  \
+	    dir="$(MOZILLA_GLOBAL32_PLUGINDIR)"  ; \
+	    arch=`arch`  ; \
+	    if [ "$$arch" = "x86_64" ]  ; then \
+	      dir="$(MOZILLA_GLOBAL64_PLUGINDIR)"  ; \
+	    fi ; \
+	    if [ -e $(MOZILLA_GLOBAL_BACKUP_FILE) ] ; then \
+	      mv -f $(MOZILLA_GLOBAL_BACKUP_FILE) "$$dir"/$(PLUGIN_LINK_NAME) ; \
+	      echo "$(MOZILLA_GLOBAL_BACKUP_FILE) restored as $$dir/$(PLUGIN_LINK_NAME)" ; \
+	    else \
+	      rm -f "$$dir"/$(PLUGIN_LINK_NAME) ; \
+	      echo "$(MOZILLA_GLOBAL_BACKUP_FILE) do not exists, nothing to be restored. $$dir/$(PLUGIN_LINK_NAME) removed" ; \
+	    fi ; \
+	fi ; 
+	if [ "$(OPERA)" != "" ]  ; then \
+	    dir="$(OPERA_GLOBAL32_PLUGINDIR)"  ; \
+	    arch=`arch`  ; \
+	    if [ "$$arch" = "x86_64" ] ; then \
+	      dir="$(OPERA_GLOBAL64_PLUGINDIR)" ; \
+	    fi ; \
+	    if [ -e $(OPERA_GLOBAL_BACKUP_FILE) ] ; then \
+	      mv -f $(OPERA_GLOBAL_BACKUP_FILE) "$$dir"/$(PLUGIN_LINK_NAME) ; \
+	      echo "$(OPERA_GLOBAL_BACKUP_FILE)  restored as $$dir/$(PLUGIN_LINK_NAME)" ; \
+	    else \
+	      rm -f "$$dir"/$(PLUGIN_LINK_NAME) ; \
+	      echo "$(OPERA_GLOBAL_BACKUP_FILE) do not exist, nothing to be restored. $$dir/$(PLUGIN_LINK_NAME) removed" ; \
+	    fi ; \
+	fi   ;
+	if [ -e stamps/global-links.stamp ] ; then \
+	  rm -f stamps/global-links.stamp ; \
+	fi
+endif
+
 netx-unit-tests-source-files.txt:
 	find $(NETX_UNIT_TEST_SRCDIR) -name '*.java' | sort > $@
 
 stamps/netx-unit-tests-compile.stamp: stamps/netx.stamp \
- netx-unit-tests-source-files.txt
+ netx-unit-tests-source-files.txt stamps/netx-dist-tests-compile.stamp
 	mkdir -p $(NETX_UNIT_TEST_DIR) && \
 	$(BOOT_DIR)/bin/javac $(IT_JAVACFLAGS) \
 	 -d $(NETX_UNIT_TEST_DIR) \
-	 -classpath $(JUNIT_JAR):$(NETX_DIR)/lib/classes.jar \
+	 -classpath $(JUNIT_JAR):$(NETX_DIR)/lib/classes.jar:$(JNLP_TESTS_ENGINE_DIR) \
 	 @netx-unit-tests-source-files.txt && \
 	mkdir -p stamps && \
 	touch $@
 
-run-netx-unit-tests: stamps/netx-unit-tests-compile.stamp \
- $(JUNIT_RUNNER_JAR)
-	cp {$(NETX_UNIT_TEST_SRCDIR),$(NETX_UNIT_TEST_DIR)}/net/sourceforge/jnlp/basic.jnlp
+$(TESTS_DIR)/$(REPORT_STYLES_DIRNAME):
+	mkdir $(TESTS_DIR)/$(REPORT_STYLES_DIRNAME)
+	cp $(TESTS_SRCDIR)/$(REPORT_STYLES_DIRNAME)/*.css $(TESTS_DIR)/$(REPORT_STYLES_DIRNAME)/
+	cp $(TESTS_SRCDIR)/$(REPORT_STYLES_DIRNAME)/*.js $(TESTS_DIR)/$(REPORT_STYLES_DIRNAME)/
+
+$(UNIT_CLASS_NAMES):
 	cd $(NETX_UNIT_TEST_DIR) ; \
 	class_names= ; \
@@ -470,9 +892,193 @@
 	  class_names="$$class_names $$class_name" ; \
 	done ; \
-	echo $$class_names ; \
-	CLASSPATH=$(NETX_DIR)/lib/classes.jar:$(JUNIT_JAR):$(JUNIT_RUNNER_JAR):. \
-	  $(BOOT_DIR)/bin/java -Xbootclasspath:$(RUNTIME) CommandLine $$class_names
-
-clean-netx-tests: clean-netx-unit-tests clean-junit-runner
+	echo $$class_names > $(UNIT_CLASS_NAMES);
+
+stamps/run-netx-unit-tests.stamp: stamps/netx-unit-tests-compile.stamp $(JUNIT_RUNNER_JAR)  \
+ $(TESTS_DIR)/$(REPORT_STYLES_DIRNAME)  $(UNIT_CLASS_NAMES)
+	filename=" " ; \
+	cd $(NETX_UNIT_TEST_SRCDIR) ; \
+	for file in `find . -type f \! -iname "*.java"`; do\
+		filename=`echo $$file `; \
+		cp --parents $$filename $(NETX_UNIT_TEST_DIR) ; \
+	done ; \
+	cd $(NETX_UNIT_TEST_DIR) ; \
+	class_names=`cat $(UNIT_CLASS_NAMES)` ; \
+	CLASSPATH=$(NETX_DIR)/lib/classes.jar:$(JUNIT_JAR):$(JUNIT_RUNNER_JAR):$(JNLP_TESTS_ENGINE_DIR):. \
+	  $(BOOT_DIR)/bin/java -Xbootclasspath:$(RUNTIME) CommandLine $$class_names 
+if WITH_XSLTPROC
+	$(XSLTPROC) $(TESTS_SRCDIR)/$(REPORT_STYLES_DIRNAME)/logs.xsl $(NETX_UNIT_TEST_DIR)/ServerAccess-logs.xml > $(TESTS_DIR)/logs_unit.html
+	$(XSLTPROC) --stringparam logs logs_unit.html $(TESTS_SRCDIR)/$(REPORT_STYLES_DIRNAME)/jreport.xsl $(NETX_UNIT_TEST_DIR)/tests-output.xml > $(TESTS_DIR)/index_unit.html
+endif
+	mkdir -p stamps && \
+	touch $@
+
+#warning,  during this target tests.build/netx/unit/tests-output.xml is backup and rewriten (but not coresponding html file)
+#xml results run from emma sandbox, however, can be wrong, co the new tests-output.xml is then renamed and orginal one restored
+#you can add -ix "-*Test*" -ix "-*test*"  to ignore all test cases from statistics
+stamps/run-unit-test-code-coverage.stamp: stamps/netx-unit-tests-compile.stamp $(JUNIT_RUNNER_JAR)  \
+ $(TESTS_DIR)/$(REPORT_STYLES_DIRNAME)  $(UNIT_CLASS_NAMES)
+if WITH_EMMA
+	cd $(NETX_UNIT_TEST_DIR) ; \
+	for file in $(EMMA_MODIFIED_FILES) ; do \
+	  mv $(NETX_UNIT_TEST_DIR)/$$file  $(NETX_UNIT_TEST_DIR)/"$$file""$(EMMA_BACKUP_SUFFIX)" ; \
+	done ;\
+	class_names=`cat $(UNIT_CLASS_NAMES)` ; \
+	$(BOOT_DIR)/bin/java $(EMMA_JAVA_ARGS) -Xbootclasspath:$(RUNTIME) -cp $(EMMA_JAR) -Demma.report.html.out.encoding=UTF-8 emmarun \
+	 -Dreport.html.out.encoding=UTF-8 \
+	 -raw \
+	 -sp $(NETX_SRCDIR) \
+	 -sp $(NETX_UNIT_TEST_SRCDIR) \
+	 -sp $(JUNIT_RUNNER_SRCDIR) \
+	 -r html \
+	 -r xml \
+	 -cp $(NETX_DIR)/lib/classes.jar \
+	 -cp $(JUNIT_JAR) \
+	 -cp $(JUNIT_RUNNER_JAR) \
+	 -cp $(BOOT_DIR)/jre/lib/rt.jar \
+	 -cp $(BOOT_DIR)/jre/lib/jsse.jar \
+	 -cp $(BOOT_DIR)/jre/lib/resources.jar \
+	 -cp $(RHINO_RUNTIME) \
+	 -cp $(JNLP_TESTS_ENGINE_DIR) \
+	 -cp . \
+	 -ix "-org.junit.*" \
+	 -ix "-junit.*" \
+	 CommandLine $$class_names ;  \
+	for file in $(EMMA_MODIFIED_FILES) ; do \
+	  mv $(NETX_UNIT_TEST_DIR)/$$file  $(NETX_UNIT_TEST_DIR)/"$$file""$(EMMA_SUFFIX)" ; \
+	  mv $(NETX_UNIT_TEST_DIR)/"$$file""$(EMMA_BACKUP_SUFFIX)"  $(NETX_UNIT_TEST_DIR)/$$file ; \
+	done ;
+else 
+	echo "Sorry, coverage report cant be run without emma installed. Try install emma or specify with-emma value" ;
+	exit 5
+endif 
+	touch $@
+
+#warning,  during this target tests.build/netx/jnlp_testsengine/tests-output.xml is backup and rewriten (but not coresponding html file)
+#xml results run from emma sandbox, however, can be wrong, co the new tests-output.xml is then renamed and orginal one restored
+stamps/run-reproducers-test-code-coverage.stamp: stamps/run-netx-dist-tests.stamp $(REPRODUCERS_CLASS_NAMES)
+if WITH_EMMA
+	cd $(TESTS_DIR) ; \
+	for file in $(EMMA_MODIFIED_FILES) ; do \
+	  mv $(JNLP_TESTS_ENGINE_DIR)/$$file $(JNLP_TESTS_ENGINE_DIR)/"$$file""$(EMMA_BACKUP_SUFFIX)" ; \
+	done ;\
+	echo "backuping javaws and netx.jar in $(DESTDIR)" ; \
+	netx_backup=$(DESTDIR)$(datadir)/$(PACKAGE_NAME)/netx_backup.jar ; \
+	javaws_backup=$(DESTDIR)$(bindir)/javaws_backup ; \
+	mv $(DESTDIR)$(bindir)/javaws $$javaws_backup ;  \
+	mv $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/netx.jar $$netx_backup ; \
+	nw_bootclasspath="$(LAUNCHER_BOOTCLASSPATH):$(EMMA_JAR):$$netx_backup" ; \
+	instructed_dir=$(TESTS_DIR)/instr ; \
+	echo "instrumenting netx.jar from $$netx_backup through $$instructed_dir" ; \
+	$(BOOT_DIR)/bin/java -cp  $(EMMA_JAR) emma instr -d $$instructed_dir -ip $$netx_backup ; \
+	pushd $$instructed_dir ; \
+	$(BOOT_DIR)/bin/jar -cf $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/netx.jar * ; \
+	popd ; \
+	rm -rf $$instructed_dir ; \
+	echo "patching $(javaws)" ; \
+	cat $$javaws_backup | sed "s,$(LAUNCHER_BOOTCLASSPATH),$$nw_bootclasspath," > $(DESTDIR)$(bindir)/$(javaws) ; \
+	chmod 777 $(DESTDIR)$(bindir)/$(javaws) ; \
+	testcases_srcs=( ) ; \
+	k=0 ; \
+	types=($(ALL_REPRODUCERS)); \
+	for which in "$${types[@]}" ; do \
+	  . $(abs_top_srcdir)/NEW_LINE_IFS ; \
+	  simpleReproducers=(`cat $(abs_top_builddir)/junit-jnlp-dist-$$which.txt `); \
+	  IFS="$$IFS_BACKUP" ; \
+	  for dir in "$${simpleReproducers[@]}" ; do \
+	    testcases_srcs[k]="-sp" ; \
+	    k=$$((k+1)) ; \
+	    testcases_srcs[k]="$(JNLP_TESTS_SRCDIR)/$$which/$$dir/testcases/" ; \
+	    k=$$((k+1)) ; \
+	    done ; \
+	  done ; \
+	cd $(JNLP_TESTS_ENGINE_DIR) ; \
+	class_names=`cat $(REPRODUCERS_CLASS_NAMES)` ; \
+	$(BOOT_DIR)/bin/java  \
+	 $(EMMA_JAVA_ARGS) \
+	  $(REPRODUCERS_DPARAMETERS) \
+	 -Xbootclasspath:$(RUNTIME) -cp $(EMMA_JAR) emmarun  \
+	   -raw \
+	   -cp $(NETX_DIR)/lib/classes.jar \
+	   -cp $(JUNIT_JAR) \
+	   -cp $(JUNIT_RUNNER_JAR) \
+	   -cp $(BOOT_DIR)/jre/lib/rt.jar \
+	   -cp $(BOOT_DIR)/jre/lib/jsse.jar \
+	   -cp $(BOOT_DIR)/jre/lib/resources.jar \
+	   -cp $(RHINO_RUNTIME) \
+	   -cp . \
+	   -cp $(JNLP_TESTS_ENGINE_TESTS_DIR) \
+	   -ix "-org.junit.*" \
+	   -ix "-junit.*" \
+	   CommandLine $$class_names ; \
+	mv $(JNLP_TESTS_ENGINE_DIR)/coverage.ec $(JNLP_TESTS_ENGINE_DIR)/coverageX.ec ; \
+	mv $(JNLP_TESTS_ENGINE_DIR)/coverage.es $(JNLP_TESTS_ENGINE_DIR)/coverageX.es ; \
+	$(BOOT_DIR)/bin/java $(EMMA_JAVA_ARGS) -cp $(EMMA_JAR) emma merge \
+	  -in $(TESTS_DIR)/coverage.em \
+	  -in $(JNLP_TESTS_ENGINE_DIR)/coverageX.ec \
+	  -in $(JNLP_TESTS_ENGINE_DIR)/coverageX.es ; \
+	$(BOOT_DIR)/bin/java $(EMMA_JAVA_ARGS) -cp $(EMMA_JAR)  -Demma.report.html.out.encoding=UTF-8 emma report \
+	  -Dreport.html.out.encoding=UTF-8 \
+	  -in $(JNLP_TESTS_ENGINE_DIR)/coverage.es  \
+	  -sp $(NETX_SRCDIR) \
+	  -sp $(NETX_UNIT_TEST_SRCDIR) \
+	  -sp $(JUNIT_RUNNER_SRCDIR) \
+	  -sp $(JNLP_TESTS_ENGINE_SRCDIR) \
+	  -sp $(JNLP_TESTS_ENGINE_TESTS_SRCDIR) \
+	  -r html \
+	  -r xml \
+	  "$${testcases_srcs[@]}" ; \
+	echo "restoring javaws and netx.jar in $(DESTDIR)" ; \
+	rm -f $(DESTDIR)$(bindir)/$(javaws) $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/netx.jar ; \
+	rm -f $(DESTDIR)$(bindir)/$(javaws);  \
+	mv $$javaws_backup $(DESTDIR)$(bindir)/$(javaws);  \
+	mv $$netx_backup $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/netx.jar ; \
+	for file in $(EMMA_MODIFIED_FILES) ; do \
+	  mv $(JNLP_TESTS_ENGINE_DIR)/$$file  $(JNLP_TESTS_ENGINE_DIR)/"$$file""$(EMMA_SUFFIX)" ; \
+	  mv $(JNLP_TESTS_ENGINE_DIR)/"$$file""$(EMMA_BACKUP_SUFFIX)"  $(JNLP_TESTS_ENGINE_DIR)/$$file ; \
+	done ;\
+	rm $(JNLP_TESTS_ENGINE_DIR)/coverage.txt ; 
+else
+	echo "Sorry, coverage report cant be run without emma installed. Try install emma or specify with-emma value" ;
+	exit 5
+endif
+	touch $@
+
+run-test-code-coverage: run-unit-test-code-coverage run-reproducers-test-code-coverage
+if WITH_EMMA
+	cd $(TESTS_DIR) ; \
+	k=0 ; \
+	types=($(ALL_REPRODUCERS)); \
+	for which in "$${types[@]}" ; do \
+	  . $(abs_top_srcdir)/NEW_LINE_IFS ; \
+	  simpleReproducers=(`cat $(abs_top_builddir)/junit-jnlp-dist-$$which.txt `); \
+	  IFS="$$IFS_BACKUP" ; \
+	  for dir in "$${simpleReproducers[@]}" ; do \
+	    testcases_srcs[k]="-sp" ; \
+	    k=$$((k+1)) ; \
+	    testcases_srcs[k]="$(JNLP_TESTS_SRCDIR)/$$which/$$dir/testcases/" ; \
+	    k=$$((k+1)) ; \
+	  done ; \
+	done ; \
+	$(BOOT_DIR)/bin/java $(EMMA_JAVA_ARGS) -cp $(EMMA_JAR) emma merge \
+	 -in $(NETX_UNIT_TEST_DIR)/coverage.es \
+	 -in $(JNLP_TESTS_ENGINE_DIR)/coverage.es ; \
+	$(BOOT_DIR)/bin/java $(EMMA_JAVA_ARGS) -cp $(EMMA_JAR)  -Demma.report.html.out.encoding=UTF-8 emma report \
+	 -Dreport.html.out.encoding=UTF-8 \
+	 -in $(TESTS_DIR)/coverage.es \
+	 -in $(TESTS_DIR)/coverage.em \
+	 -sp $(NETX_SRCDIR) \
+	 -sp $(NETX_UNIT_TEST_SRCDIR) \
+	 -sp $(JUNIT_RUNNER_SRCDIR) \
+	 -sp $(JNLP_TESTS_ENGINE_SRCDIR) \
+	 -sp $(JNLP_TESTS_ENGINE_TESTS_SRCDIR) \
+	 "$${testcases_srcs[@]}" \
+	 -r html \
+	 -r xml ; 
+else
+	echo "Sorry, coverage report cant be run without emma installed. Try install emma or specify with-emma value" ;
+	exit 5
+endif
+
+clean-netx-tests: clean-netx-unit-tests clean-junit-runner clean-netx-dist-tests clean-test-code-coverage
 	if [ -e $(TESTS_DIR)/netx ]; then \
 	  rmdir $(TESTS_DIR)/netx ; \
@@ -484,8 +1090,72 @@
 	rm -f $(JUNIT_RUNNER_JAR)
 
-clean-netx-unit-tests:
+clean-netx-unit-tests: clean_tests_reports
 	rm -f netx-unit-tests-source-files.txt
 	rm -rf $(NETX_UNIT_TEST_DIR)
+	rm -f $(UNIT_CLASS_NAMES)
+	rm -f stamps/check-pac-functions.stamp
+	rm -f stamps/run-netx-unit-tests.stamp
 	rm -f stamps/netx-unit-tests-compile.stamp
+
+clean_tests_reports:
+	rm -rf  $(TESTS_DIR)/$(REPORT_STYLES_DIRNAME)/
+	rm -f  $(TESTS_DIR)/*.html
+
+clean-netx-dist-tests: clean_tests_reports netx-dist-tests-remove-cert-from-public clean-custom-reproducers
+	rm -f netx-dist-tests-source-files.txt
+	rm -rf $(JNLP_TESTS_ENGINE_TESTS_DIR)
+	rm -rf $(JNLP_TESTS_DIR)
+	rm -rf $(JNLP_TESTS_SERVER_DEPLOYDIR)
+	rm -rf $(JNLP_TESTS_ENGINE_DIR)
+	rm -f stamps/junit-jnlp-dist-dirs
+	rm -f stamps/netx-dist-tests-compile.stamp
+	rm -f stamps/netx-dist-tests-tests-compile.stamp
+	rm -f stamps/netx-dist-tests-prepare-reproducers.stamp
+	rm -f stamps/netx-dist-tests-compile-testcases.stamp
+	rm -f stamps/netx-dist-tests-copy-resources.stamp
+	rm -f stamps/netx-dist-tests-sign-some-reproducers.stamp
+	rm -f stamps/change-dots-to-paths.stamp
+	rm -f junit-jnlp-dist-simple.txt
+	rm -f junit-jnlp-dist-custom.txt
+	rm -f netx-dist-tests-tests-source-files.txt
+	types=($(SIGNED_REPRODUCERS)) ; \
+	for which in "$${types[@]}" ; do \
+	  rm -f junit-jnlp-dist-$$which.txt ; \
+	  rm -f $(EXPORTED_TEST_CERT_PREFIX)_$$which.$(EXPORTED_TEST_CERT_SUFFIX) ; \
+	done ;
+	rm -f stamps/exported-test-certs.stamp
+	rm -f stamps/junit-jnlp-dist-signed.stamp
+	rm -f $(REPRODUCERS_CLASS_NAMES)
+	rm -f $(abs_top_builddir)/$(PRIVATE_KEYSTORE_NAME)
+	rm -f stamps/run-netx-dist-tests.stamp
+
+clean-unit-test-code-coverage:
+	if [ -e stamps/run-unit-test-code-coverage.stamp ]; then \
+	  rm -rf $(NETX_UNIT_TEST_DIR)/coverage ; \
+	  rm -f $(NETX_UNIT_TEST_DIR)/coverage.xml ; \
+	  rm -f $(NETX_UNIT_TEST_DIR)/coverageX.es ; \
+	  rm -f $(NETX_UNIT_TEST_DIR)/coverageX.ec ; \
+	  rm -f $(NETX_UNIT_TEST_DIR)/coverage.es ; \
+	  rm -f $(NETX_UNIT_TEST_DIR)/tests-output_withEmma.xml ; \
+	  rm -f stamps/run-unit-test-code-coverage.stamp ; \
+	fi
+
+clean-reproducers-test-code-coverage:
+	if [ -e stamps/run-reproducers-test-code-coverage.stamp ]; then \
+	 rm -rf $(JNLP_TESTS_ENGINE_DIR)/coverage ; \
+	 rm -f $(JNLP_TESTS_ENGINE_DIR)/coverage.xml ; \
+	 rm -f $(JNLP_TESTS_ENGINE_DIR)/coverage.es ; \
+	 rm -f $(JNLP_TESTS_ENGINE_DIR)/tests-output_withEmma.xml ; \
+	 rm -f stamps/run-reproducers-test-code-coverage.stamp ; \
+	fi
+
+clean-test-code-coverage: clean-unit-test-code-coverage clean-reproducers-test-code-coverage
+	if [ -e $(TESTS_DIR)/coverage.xml ]; then \
+	  rm -rf $(TESTS_DIR)/coverage  ; \
+	  rm -f $(TESTS_DIR)/coverage.xml  ; \
+	  rm -f $(TESTS_DIR)/coverage.es  ; \
+	  rm -f $(TESTS_DIR)/coverage.em ; \
+	fi
+
 
 # plugin tests
@@ -529,4 +1199,18 @@
 	ln -sf $(abs_top_builddir)/javac $(BOOT_DIR)/bin/javac
 	ln -sf $(JAVADOC) $(BOOT_DIR)/bin/javadoc
+	if [ -e "$(KEYTOOL)" ] ; then \
+	  ln -sf $(KEYTOOL) $(BOOT_DIR)/bin/keytool ;\
+	else \
+	  echo "#! /bin/sh" > $(BOOT_DIR)/bin/keytool ;\
+	  echo "echo \"keytool not exist on your system, signed part of reproducers test will fail\"" >> $(BOOT_DIR)/bin/keytool ;\
+	  chmod 777 $(BOOT_DIR)/bin/keytool ;\
+	fi
+	if [ -e "$(JARSIGNER)" ] ; then \
+	  ln -sf $(JARSIGNER) $(BOOT_DIR)/bin/jarsigner ;\
+	else \
+	  echo "#! /bin/sh" > $(BOOT_DIR)/bin/jarsigner ;\
+	  echo "echo \"jarsigner not exist on your system, signed part of reproducers test will fail\"" >> $(BOOT_DIR)/bin/jarsigner ;\
+	  chmod 777 $(BOOT_DIR)/bin/jarsigner ;\
+	fi
 	mkdir -p $(BOOT_DIR)/jre/lib && \
 	ln -s $(SYSTEM_JRE_DIR)/lib/rt.jar $(BOOT_DIR)/jre/lib && \
@@ -535,4 +1219,9 @@
 	else \
 	  ln -s rt.jar $(BOOT_DIR)/jre/lib/jsse.jar ; \
+	fi
+	if [ -e $(SYSTEM_JRE_DIR)/lib/resources.jar ] ; then \
+	  ln -s $(SYSTEM_JRE_DIR)/lib/resources.jar $(BOOT_DIR)/jre/lib ; \
+	else \
+	  ln -s rt.jar $(BOOT_DIR)/jre/lib/resources.jar ; \
 	fi
 	ln -sf $(SYSTEM_JRE_DIR)/lib/$(JRE_ARCH_DIR) \
@@ -574,2 +1263,16 @@
 
 plugin-tests: stamps/plugin-tests.stamp
+
+check-pac-functions: stamps/check-pac-functions.stamp
+
+run-netx-unit-tests: stamps/run-netx-unit-tests.stamp
+
+links: stamps/global-links.stamp
+
+user-links: stamps/user-links.stamp
+
+run-netx-dist-tests: stamps/run-netx-dist-tests.stamp
+
+run-unit-test-code-coverage: stamps/run-unit-test-code-coverage.stamp
+
+run-reproducers-test-code-coverage: stamps/run-reproducers-test-code-coverage.stamp
Index: /branches/vendor/sourceforge/icedtea-web/current/Makefile.in
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/Makefile.in	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/Makefile.in	(revision 416)
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.3 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -59,10 +59,14 @@
 top_distdir = $(distdir)
 am__remove_distdir = \
-  { test ! -d "$(distdir)" \
-    || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
-         && rm -fr "$(distdir)"; }; }
+  if test -d "$(distdir)"; then \
+    find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
+      && rm -rf "$(distdir)" \
+      || { sleep 5 && rm -rf "$(distdir)"; }; \
+  else :; fi
 DIST_ARCHIVES = $(distdir).tar.gz
 GZIP_ENV = --best
 distuninstallcheck_listfiles = find . -type f -print
+am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
+  | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
 distcleancheck_listfiles = find . -type f -print
 ACLOCAL = @ACLOCAL@
@@ -74,8 +78,11 @@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
+BROWSER_TESTS_MODIFICATION = @BROWSER_TESTS_MODIFICATION@
 BUILD_ARCH_DIR = @BUILD_ARCH_DIR@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
+CHROME = @CHROME@
+CHROMIUM = @CHROMIUM@
 CPPFLAGS = @CPPFLAGS@
 CXX = @CXX@
@@ -90,7 +97,13 @@
 ECJ = @ECJ@
 ECJ_JAR = @ECJ_JAR@
+EMMA_AVAILABLE = @EMMA_AVAILABLE@
+EMMA_JAR = @EMMA_JAR@
+EPIPHANY = @EPIPHANY@
 EXEEXT = @EXEEXT@
+FIREFOX = @FIREFOX@
 FULL_VERSION = @FULL_VERSION@
 GCJ = @GCJ@
+GLIB2_V_216_CFLAGS = @GLIB2_V_216_CFLAGS@
+GLIB2_V_216_LIBS = @GLIB2_V_216_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_LIBS = @GLIB_LIBS@
@@ -106,4 +119,5 @@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
 JAR = @JAR@
+JARSIGNER = @JARSIGNER@
 JAR_ACCEPTS_STDIN_LIST = @JAR_ACCEPTS_STDIN_LIST@
 JAR_KNOWS_ATFILE = @JAR_KNOWS_ATFILE@
@@ -116,4 +130,5 @@
 JUNIT_AVAILABLE = @JUNIT_AVAILABLE@
 JUNIT_JAR = @JUNIT_JAR@
+KEYTOOL = @KEYTOOL@
 LDFLAGS = @LDFLAGS@
 LIBOBJS = @LIBOBJS@
@@ -121,4 +136,5 @@
 LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
+MIDORI = @MIDORI@
 MKDIR_P = @MKDIR_P@
 MOZILLA_CFLAGS = @MOZILLA_CFLAGS@
@@ -126,4 +142,5 @@
 MOZILLA_VERSION_COLLAPSED = @MOZILLA_VERSION_COLLAPSED@
 OBJEXT = @OBJEXT@
+OPERA = @OPERA@
 PACKAGE = @PACKAGE@
 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@@ -147,6 +164,8 @@
 USING_ECJ = @USING_ECJ@
 VERSION = @VERSION@
+VERSION_DEFS = @VERSION_DEFS@
 X11_CFLAGS = @X11_CFLAGS@
 X11_LIBS = @X11_LIBS@
+XSLTPROC = @XSLTPROC@
 ZIP = @ZIP@
 abs_builddir = @abs_builddir@
@@ -201,62 +220,6 @@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
-NETX_DIR = $(abs_top_builddir)/netx.build
-NETX_SRCDIR = $(abs_top_srcdir)/netx
-NETX_RESOURCE_DIR = $(NETX_SRCDIR)/net/sourceforge/jnlp/resources
-NETX_EXTRA_DIR = $(abs_top_srcdir)/extra/net/sourceforge/javaws/about/resources
-NETX_EXTRA_DIST_DIR = $(abs_top_builddir)/extra-lib/net/sourceforge/javaws/about/resources
-TESTS_SRCDIR = $(abs_top_srcdir)/tests
-TESTS_DIR = $(abs_top_builddir)/tests.build
-NETX_UNIT_TEST_SRCDIR = $(TESTS_SRCDIR)/netx/unit
-NETX_UNIT_TEST_DIR = $(TESTS_DIR)/netx/unit
-JUNIT_RUNNER_DIR = $(TESTS_DIR)/junit-runner
-JUNIT_RUNNER_SRCDIR = $(TESTS_SRCDIR)/junit-runner
-JUNIT_RUNNER_JAR = $(abs_top_builddir)/junit-runner.jar
-
-# Build directories
-BOOT_DIR = $(abs_top_builddir)/bootstrap/jdk1.6.0
 @WITH_RHINO_FALSE@RHINO_RUNTIME = 
 @WITH_RHINO_TRUE@RHINO_RUNTIME = :$(RHINO_JAR)
-RUNTIME = $(BOOT_DIR)/jre/lib/rt.jar:$(BOOT_DIR)/jre/lib/jsse.jar$(RHINO_RUNTIME)
-
-# Flags
-IT_CFLAGS = $(CFLAGS) $(ARCHFLAG)
-IT_JAVAC_SETTINGS = -g -encoding utf-8 $(JAVACFLAGS) $(MEMORY_LIMIT) $(PREFER_SOURCE)
-IT_LANGUAGE_SOURCE_VERSION = 6
-IT_CLASS_TARGET_VERSION = 6
-IT_JAVACFLAGS = $(IT_JAVAC_SETTINGS) -source $(IT_LANGUAGE_SOURCE_VERSION) -target $(IT_CLASS_TARGET_VERSION)
-
-#
-# We need the jars in bootclasspath for a couple of reasons
-#  - we use classes (in the sun.applet package) loaded by the bootclassloader
-#    using another classloader to load classes from the same package causes an
-#    IllegalAccessException
-#  - we want full privileges
-#
-LAUNCHER_BOOTCLASSPATH = "-Xbootclasspath/a:$(datadir)/$(PACKAGE_NAME)/netx.jar$(RHINO_RUNTIME)"
-PLUGIN_BOOTCLASSPATH = '"-Xbootclasspath/a:$(datadir)/$(PACKAGE_NAME)/netx.jar:$(datadir)/$(PACKAGE_NAME)/plugin.jar$(RHINO_RUNTIME)"'
-
-# Fake update version to work with the Deployment Toolkit script used by Oracle
-# http://download.oracle.com/javase/tutorial/deployment/deploymentInDepth/depltoolkit_index.html
-JDK_UPDATE_VERSION = 50
-
-# Sources list
-PLUGIN_TEST_SRCS = $(abs_top_srcdir)/plugin/tests/LiveConnect/*.java
-NETX_PKGS = javax.jnlp net.sourceforge.nanoxml net.sourceforge.jnlp \
-	net.sourceforge.jnlp.cache net.sourceforge.jnlp.config \
-	net.sourceforge.jnlp.controlpanel net.sourceforge.jnlp.event \
-	net.sourceforge.jnlp.runtime net.sourceforge.jnlp.security \
-	net.sourceforge.jnlp.security.viewer net.sourceforge.jnlp.services \
-	net.sourceforge.jnlp.tools net.sourceforge.jnlp.util
-
-
-# Conditional defintions
-@ENABLE_PLUGIN_TRUE@ICEDTEAPLUGIN_CLEAN = clean-IcedTeaPlugin
-@ENABLE_PLUGIN_TRUE@LIVECONNECT_DIR = netscape sun/applet
-@ENABLE_PLUGIN_TRUE@PLUGIN_DIR = $(abs_top_builddir)/plugin/icedteanp
-@ENABLE_PLUGIN_TRUE@PLUGIN_SRCDIR = $(abs_top_srcdir)/plugin/icedteanp
-@ENABLE_PLUGIN_TRUE@LIVECONNECT_SRCS = $(PLUGIN_SRCDIR)/java
-@ENABLE_PLUGIN_TRUE@ICEDTEAPLUGIN_TARGET = $(PLUGIN_DIR)/IcedTeaPlugin.so stamps/liveconnect-dist.stamp
-@ENABLE_PLUGIN_TRUE@PLUGIN_PKGS = sun.applet netscape.security netscape.javascript
 @CP_SUPPORTS_REFLINK_TRUE@REFLINK = --reflink=auto
 @SRC_DIR_HARDLINKABLE_FALSE@SRC_DIR_LINK = $(REFLINK)
@@ -267,11 +230,8 @@
 @ENABLE_DOCS_TRUE@@JAVADOC_SUPPORTS_J_OPTIONS_TRUE@JAVADOC_MEM_OPTS = -J-Xmx1024m -J-Xms128m -J-XX:PermSize=32m -J-XX:MaxPermSize=160m
 @WITH_RHINO_FALSE@RHINO_TESTS = 
-@WITH_RHINO_TRUE@RHINO_TESTS = check-pac-functions
+@WITH_RHINO_TRUE@RHINO_TESTS = stamps/check-pac-functions.stamp
 @WITH_JUNIT_FALSE@JUNIT_TESTS = 
-@WITH_JUNIT_TRUE@JUNIT_TESTS = run-netx-unit-tests
-PLUGIN_VERSION = IcedTea-Web $(FULL_VERSION)
-EXTRA_DIST = $(top_srcdir)/netx $(top_srcdir)/plugin javaws.png javaws.desktop.in extra launcher \
- itweb-settings.desktop.in $(top_srcdir)/tests
-
+@WITH_JUNIT_TRUE@JUNIT_TESTS = stamps/run-netx-unit-tests.stamp
+#end of exported autoconf copies
 
 # binary names
@@ -306,5 +266,5 @@
 
 .SUFFIXES:
-am--refresh:
+am--refresh: Makefile
 	@:
 $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
@@ -399,5 +359,9 @@
 
 dist-bzip2: distdir
-	tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
+	tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
+	$(am__remove_distdir)
+
+dist-lzip: distdir
+	tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
 	$(am__remove_distdir)
 
@@ -407,5 +371,5 @@
 
 dist-xz: distdir
-	tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
+	tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
 	$(am__remove_distdir)
 
@@ -438,4 +402,6 @@
 	*.tar.lzma*) \
 	  lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
+	*.tar.lz*) \
+	  lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
 	*.tar.xz*) \
 	  xz -dc $(distdir).tar.xz | $(am__untar) ;;\
@@ -457,4 +423,5 @@
 	  && $(am__cd) $(distdir)/_build \
 	  && ../configure --srcdir=.. --prefix="$$dc_install_base" \
+	    $(AM_DISTCHECK_CONFIGURE_FLAGS) \
 	    $(DISTCHECK_CONFIGURE_FLAGS) \
 	  && $(MAKE) $(AM_MAKEFLAGS) \
@@ -485,6 +452,14 @@
 	  sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
 distuninstallcheck:
-	@$(am__cd) '$(distuninstallcheck_dir)' \
-	&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
+	@test -n '$(distuninstallcheck_dir)' || { \
+	  echo 'ERROR: trying to run $@ with an empty' \
+	       '$$(distuninstallcheck_dir)' >&2; \
+	  exit 1; \
+	}; \
+	$(am__cd) '$(distuninstallcheck_dir)' || { \
+	  echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
+	  exit 1; \
+	}; \
+	test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
 	   || { echo "ERROR: files left after uninstall:" ; \
 	        if test -n "$(DESTDIR)"; then \
@@ -517,8 +492,13 @@
 installcheck: installcheck-am
 install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
 mostlyclean-generic:
 
@@ -605,8 +585,8 @@
 .PHONY: all all-am all-local am--refresh check check-am check-local \
 	clean clean-generic clean-local dist dist-all dist-bzip2 \
-	dist-gzip dist-lzma dist-shar dist-tarZ dist-xz dist-zip \
-	distcheck distclean distclean-generic distcleancheck distdir \
-	distuninstallcheck dvi dvi-am html html-am info info-am \
-	install install-am install-data install-data-am \
+	dist-gzip dist-lzip dist-lzma dist-shar dist-tarZ dist-xz \
+	dist-zip distcheck distclean distclean-generic distcleancheck \
+	distdir distuninstallcheck dvi dvi-am html html-am info \
+	info-am install install-am install-data install-data-am \
 	install-data-local install-dvi install-dvi-am install-exec \
 	install-exec-am install-exec-local install-html \
@@ -619,4 +599,127 @@
 
 
+export NETX_DIR = $(abs_top_builddir)/netx.build
+export NETX_SRCDIR = $(abs_top_srcdir)/netx
+export NETX_RESOURCE_DIR=$(NETX_SRCDIR)/net/sourceforge/jnlp/resources
+export NETX_EXTRA_DIR=$(abs_top_srcdir)/extra/net/sourceforge/javaws/about/resources
+export NETX_EXTRA_DIST_DIR=$(abs_top_builddir)/extra-lib/net/sourceforge/javaws/about/resources
+
+export REPORT_STYLES_DIRNAME=report-styles
+
+export TESTS_SRCDIR=$(abs_top_srcdir)/tests
+export TESTS_DIR=$(abs_top_builddir)/tests.build
+
+export NETX_UNIT_TEST_SRCDIR=$(TESTS_SRCDIR)/netx/unit
+export NETX_UNIT_TEST_DIR=$(TESTS_DIR)/netx/unit
+
+export JUNIT_RUNNER_DIR=$(TESTS_DIR)/junit-runner
+export JUNIT_RUNNER_SRCDIR=$(TESTS_SRCDIR)/junit-runner
+
+export JNLP_TESTS_ENGINE_SRCDIR=$(TESTS_SRCDIR)/test-extensions
+export JNLP_TESTS_ENGINE_TESTS_SRCDIR=$(TESTS_SRCDIR)/test-extensions-tests
+export JNLP_TESTS_SRCDIR=$(TESTS_SRCDIR)/reproducers
+export JNLP_TESTS_ENGINE_DIR=$(TESTS_DIR)/jnlp_testsengine
+export JNLP_TESTS_ENGINE_TESTS_DIR=$(TESTS_DIR)/netx/jnlp_testsengine_tests
+export JNLP_TESTS_SERVER_DEPLOYDIR=$(TESTS_DIR)/jnlp_test_server
+export JNLP_TESTS_DIR=$(TESTS_DIR)/jnlp_tests
+export PRIVATE_KEYSTORE_NAME=teststore.ks
+export PRIVATE_KEYSTORE_PASS=123456789
+export EXPORTED_TEST_CERT_PREFIX=icedteatests
+export EXPORTED_TEST_CERT_SUFFIX=crt
+export TEST_CERT_ALIAS=icedteaweb
+export PUBLIC_KEYSTORE=${HOME}/.icedtea/security/trusted.certs
+export PUBLIC_KEYSTORE_PASS=changeit
+
+export JUNIT_RUNNER_JAR=$(abs_top_builddir)/junit-runner.jar
+export UNIT_CLASS_NAMES = $(abs_top_builddir)/unit_class_names
+export REPRODUCERS_CLASS_NAMES = $(abs_top_builddir)/reproducers_class_names
+export REPRODUCERS_CLASS_WHITELIST = $(abs_top_srcdir)/netx-dist-tests-whitelist
+export EMMA_JAVA_ARGS=-Xmx2G
+export EMMA_MODIFIED_FILES=tests-output.xml ServerAccess-logs.xml stdout.log stderr.log all.log
+export EMMA_BACKUP_SUFFIX=_noEmma
+export EMMA_SUFFIX=_withEmma
+export META_MANIFEST = META-INF/MANIFEST.MF
+export SIGNED_REPRODUCERS=signed
+export SIMPLE_REPRODUCERS=simple
+export CUSTOM_REPRODUCERS=custom
+export ALL_NONCUSTOM_REPRODUCERS=$(SIMPLE_REPRODUCERS) $(SIGNED_REPRODUCERS)
+export ALL_REPRODUCERS=$(ALL_NONCUSTOM_REPRODUCERS) $(CUSTOM_REPRODUCERS)
+
+# linking variables
+export PLUGIN_LINK_NAME=libjavaplugin.so
+export MOZILLA_LOCAL_PLUGINDIR=${HOME}/.mozilla/plugins
+export MOZILLA_GLOBAL64_PLUGINDIR=/usr/lib64/mozilla/plugins
+export MOZILLA_GLOBAL32_PLUGINDIR=/usr/lib/mozilla/plugins
+export OPERA_GLOBAL64_PLUGINDIR=/usr/lib64/opera/plugins
+export OPERA_GLOBAL32_PLUGINDIR=/usr/lib/opera/plugins
+export BUILT_PLUGIN_LIBRARY=IcedTeaPlugin.so
+export MOZILLA_LOCAL_BACKUP_FILE=${HOME}/$(PLUGIN_LINK_NAME).origU
+export MOZILLA_GLOBAL_BACKUP_FILE=${HOME}/$(PLUGIN_LINK_NAME).origMG
+export OPERA_GLOBAL_BACKUP_FILE=${HOME}/$(PLUGIN_LINK_NAME).origOG
+export MOZILLA_FAMILY_TEST= "$(FIREFOX)" != "" -o "$(CHROMIUM)" != "" -o "$(CHROME)" != "" -o "$(MIDORI)" != "" -o "$(EPIPHANY)" != "" 
+# end of linking variables
+
+# Build directories
+
+export BOOT_DIR = $(abs_top_builddir)/bootstrap/jdk1.6.0
+
+export RUNTIME = $(BOOT_DIR)/jre/lib/rt.jar:$(BOOT_DIR)/jre/lib/jsse.jar$(RHINO_RUNTIME):$(BOOT_DIR)/jre/lib/resources.jar
+
+# Flags
+export IT_CFLAGS=$(CFLAGS) $(ARCHFLAG)
+export IT_JAVAC_SETTINGS=-g -encoding utf-8 $(JAVACFLAGS) $(MEMORY_LIMIT) $(PREFER_SOURCE)
+export IT_LANGUAGE_SOURCE_VERSION=6
+export IT_CLASS_TARGET_VERSION=6
+export IT_JAVACFLAGS=$(IT_JAVAC_SETTINGS) -source $(IT_LANGUAGE_SOURCE_VERSION) -target $(IT_CLASS_TARGET_VERSION)
+
+#
+# We need the jars in bootclasspath for a couple of reasons
+#  - we use classes (in the sun.applet package) loaded by the bootclassloader
+#    using another classloader to load classes from the same package causes an
+#    IllegalAccessException
+#  - we want full privileges
+#
+export LAUNCHER_BOOTCLASSPATH="-Xbootclasspath/a:$(datadir)/$(PACKAGE_NAME)/netx.jar$(RHINO_RUNTIME)"
+export PLUGIN_BOOTCLASSPATH='"-Xbootclasspath/a:$(datadir)/$(PACKAGE_NAME)/netx.jar:$(datadir)/$(PACKAGE_NAME)/plugin.jar$(RHINO_RUNTIME)"'
+
+# Fake update version to work with the Deployment Toolkit script used by Oracle
+# http://download.oracle.com/javase/tutorial/deployment/deploymentInDepth/depltoolkit_index.html
+export JDK_UPDATE_VERSION=50
+
+# Sources list
+
+export PLUGIN_TEST_SRCS = $(abs_top_srcdir)/plugin/tests/LiveConnect/*.java
+
+export NETX_PKGS = javax.jnlp net.sourceforge.nanoxml net.sourceforge.jnlp \
+	net.sourceforge.jnlp.cache net.sourceforge.jnlp.config \
+	net.sourceforge.jnlp.controlpanel net.sourceforge.jnlp.event \
+	net.sourceforge.jnlp.runtime net.sourceforge.jnlp.security \
+	net.sourceforge.jnlp.security.viewer net.sourceforge.jnlp.services \
+	net.sourceforge.jnlp.tools net.sourceforge.jnlp.util
+
+# Conditional defintions
+@ENABLE_PLUGIN_TRUE@export ICEDTEAPLUGIN_CLEAN = clean-IcedTeaPlugin
+@ENABLE_PLUGIN_TRUE@export LIVECONNECT_DIR = netscape sun/applet
+@ENABLE_PLUGIN_TRUE@export PLUGIN_DIR=$(abs_top_builddir)/plugin/icedteanp
+@ENABLE_PLUGIN_TRUE@export PLUGIN_SRCDIR=$(abs_top_srcdir)/plugin/icedteanp
+@ENABLE_PLUGIN_TRUE@export LIVECONNECT_SRCS = $(PLUGIN_SRCDIR)/java
+@ENABLE_PLUGIN_TRUE@export ICEDTEAPLUGIN_TARGET = $(PLUGIN_DIR)/$(BUILT_PLUGIN_LIBRARY) stamps/liveconnect-dist.stamp
+@ENABLE_PLUGIN_TRUE@export PLUGIN_PKGS = sun.applet netscape.security netscape.javascript
+
+export PLUGIN_VERSION = IcedTea-Web $(FULL_VERSION)
+
+export EXTRA_DIST = $(top_srcdir)/netx $(top_srcdir)/plugin javaws.png javaws.desktop.in extra launcher \
+ itweb-settings.desktop.in $(top_srcdir)/tests
+
+# reproducers `D`shortcuts
+export DTEST_SERVER=-Dtest.server.dir=$(JNLP_TESTS_SERVER_DEPLOYDIR)
+export DJAVAWS_BUILD=-Djavaws.build.bin=$(DESTDIR)$(bindir)/$(javaws)
+export DBROWSERS=-Dused.browsers=$(FIREFOX):$(CHROMIUM):$(CHROME):$(OPERA):$(MIDORI):$(EPIPHANY)
+export REPRODUCERS_DPARAMETERS= $(DTEST_SERVER) $(DJAVAWS_BUILD) $(DBROWSERS) $(BROWSER_TESTS_MODIFICATION)
+# end of `D`shortcuts
+
+#exported autoconf copies
+export EXPORTED_JAVAC=$(BOOT_DIR)/bin/javac
+
 # Top-Level Targets
 # =================
@@ -627,6 +730,6 @@
 check-local: $(RHINO_TESTS) $(JUNIT_TESTS)
 
-clean-local: clean-netx clean-plugin clean-liveconnect clean-extra clean-bootstrap-directory \
- clean-native-ecj clean-launchers clean-desktop-files clean-docs clean-tests
+clean-local: clean-netx clean-plugin clean-liveconnect clean-extra  \
+ clean-native-ecj clean-launchers clean-desktop-files clean-docs clean-tests clean-bootstrap-directory
 	if [ -e stamps ] ; then \
 	  rmdir stamps ; \
@@ -635,10 +738,10 @@
 .PHONY: clean-IcedTeaPlugin clean-add-netx clean-add-netx-debug clean-add-plugin clean-add-plugin-debug \
  clean-bootstrap-directory clean-native-ecj clean-desktop-files clean-netx-docs clean-docs clean-plugin-docs \
- clean-tests check-local clean-launchers check-pac-functions run-netx-unit-tests clean-netx-tests \
+ clean-tests check-local clean-launchers stamps/check-pac-functions.stamp stamps/run-netx-unit-tests.stamp clean-netx-tests \
  clean-junit-runner clean-netx-unit-tests
 
 install-exec-local:
 	${mkinstalldirs} $(DESTDIR)$(bindir) $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/ $(DESTDIR)$(libdir)
-@ENABLE_PLUGIN_TRUE@	${INSTALL_PROGRAM} $(PLUGIN_DIR)/IcedTeaPlugin.so $(DESTDIR)$(libdir)
+@ENABLE_PLUGIN_TRUE@	${INSTALL_PROGRAM} $(PLUGIN_DIR)/$(BUILT_PLUGIN_LIBRARY) $(DESTDIR)$(libdir)
 @ENABLE_PLUGIN_TRUE@	${INSTALL_DATA} $(abs_top_builddir)/liveconnect/lib/classes.jar $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/plugin.jar
 	${INSTALL_DATA} $(NETX_DIR)/lib/classes.jar $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/netx.jar
@@ -664,5 +767,5 @@
 
 uninstall-local:
-	rm -f $(DESTDIR)$(libdir)/IcedTeaPlugin.so
+	rm -f $(DESTDIR)$(libdir)/$(BUILT_PLUGIN_LIBRARY)
 	rm -f $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/plugin.jar
 	rm -f $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/netx.jar
@@ -678,4 +781,5 @@
 @ENABLE_PLUGIN_TRUE@	cd $(PLUGIN_DIR) && \
 @ENABLE_PLUGIN_TRUE@	$(CXX) $(CXXFLAGS) \
+@ENABLE_PLUGIN_TRUE@	   $(DEFS) $(VERSION_DEFS) \
 @ENABLE_PLUGIN_TRUE@	  -DJDK_UPDATE_VERSION="\"$(JDK_UPDATE_VERSION)\"" \
 @ENABLE_PLUGIN_TRUE@	  -DPLUGIN_NAME="\"IcedTea-Web Plugin\"" \
@@ -690,5 +794,5 @@
 @ENABLE_PLUGIN_TRUE@	  -fPIC -o $@ -c $<
 
-@ENABLE_PLUGIN_TRUE@$(PLUGIN_DIR)/IcedTeaPlugin.so: $(addprefix $(PLUGIN_DIR)/,$(PLUGIN_OBJECTS))
+@ENABLE_PLUGIN_TRUE@$(PLUGIN_DIR)/$(BUILT_PLUGIN_LIBRARY): $(addprefix $(PLUGIN_DIR)/,$(PLUGIN_OBJECTS))
 @ENABLE_PLUGIN_TRUE@	cd $(PLUGIN_DIR) && \
 @ENABLE_PLUGIN_TRUE@	$(CXX) $(CXXFLAGS) \
@@ -701,5 +805,5 @@
 @ENABLE_PLUGIN_TRUE@clean-IcedTeaPlugin:
 @ENABLE_PLUGIN_TRUE@	rm -f $(PLUGIN_DIR)/*.o
-@ENABLE_PLUGIN_TRUE@	rm -f $(PLUGIN_DIR)/IcedTeaPlugin.so
+@ENABLE_PLUGIN_TRUE@	rm -f $(PLUGIN_DIR)/$(BUILT_PLUGIN_LIBRARY)
 @ENABLE_PLUGIN_TRUE@	if [ $(abs_top_srcdir) != $(abs_top_builddir) ]; then \
 @ENABLE_PLUGIN_TRUE@	  if [ -e $(abs_top_builddir)/plugin/icedteanp ] ; then \
@@ -897,35 +1001,395 @@
 	fi
 
-check-pac-functions: stamps/bootstrap-directory.stamp
+stamps/check-pac-functions.stamp: stamps/bootstrap-directory.stamp
 	./jrunscript $(abs_top_srcdir)/tests/netx/pac/pac-funcs-test.js \
-	  $$(readlink -f $(abs_top_srcdir)/netx/net/sourceforge/jnlp/runtime/pac-funcs.js)
+	  $$(readlink -f $(abs_top_srcdir)/netx/net/sourceforge/jnlp/runtime/pac-funcs.js) ; \
+	mkdir -p stamps && \
+	touch $@
 
 junit-runner-source-files.txt:
 	find $(JUNIT_RUNNER_SRCDIR) -name '*.java' | sort > $@
 
-$(JUNIT_RUNNER_JAR): junit-runner-source-files.txt
+$(JUNIT_RUNNER_JAR): junit-runner-source-files.txt stamps/netx-dist-tests-compile.stamp
 	mkdir -p $(JUNIT_RUNNER_DIR) && \
 	$(BOOT_DIR)/bin/javac $(IT_JAVACFLAGS) \
 	  -d $(JUNIT_RUNNER_DIR) \
-	  -classpath $(JUNIT_JAR) \
+	  -classpath $(JUNIT_JAR):$(JNLP_TESTS_ENGINE_DIR) \
 	  @junit-runner-source-files.txt && \
 	$(BOOT_DIR)/bin/jar cf $@  -C $(JUNIT_RUNNER_DIR) .
 
+stamps/junit-jnlp-dist-dirs: junit-jnlp-dist-simple.txt stamps/junit-jnlp-dist-signed.stamp junit-jnlp-dist-custom.txt
+	mkdir -p $(JNLP_TESTS_SERVER_DEPLOYDIR)
+	mkdir -p $(JNLP_TESTS_DIR)
+	touch $@
+
+junit-jnlp-dist-custom.txt:
+	cd $(JNLP_TESTS_SRCDIR)/$(CUSTOM_REPRODUCERS)/ ; \
+	find .  -maxdepth 1 -mindepth 1 | sed "s/.\/*//" > $(abs_top_builddir)/$@
+
+junit-jnlp-dist-simple.txt:
+	cd $(JNLP_TESTS_SRCDIR)/simple/ ; \
+	find .  -maxdepth 1 -mindepth 1 | sed "s/.\/*//" > $(abs_top_builddir)/$@
+
+stamps/junit-jnlp-dist-signed.stamp: 
+	types=($(SIGNED_REPRODUCERS)) ; \
+	for which in "$${types[@]}" ; do \
+	  pushd $(JNLP_TESTS_SRCDIR)/$$which/ ; \
+	  find .  -maxdepth 1 -mindepth 1 | sed "s/.\/*//" > $(abs_top_builddir)/junit-jnlp-dist-$$which.txt ; \
+	  popd ; \
+	done ; \
+	mkdir -p stamps && \
+	touch $@
+
+stamps/netx-dist-tests-prepare-reproducers.stamp: stamps/junit-jnlp-dist-dirs
+	types=($(ALL_NONCUSTOM_REPRODUCERS)); \
+	for which in "$${types[@]}" ; do \
+	  . $(abs_top_srcdir)/NEW_LINE_IFS ; \
+	  simpleReproducers=(`cat $(abs_top_builddir)/junit-jnlp-dist-$$which.txt `); \
+	  IFS="$$IFS_BACKUP" ; \
+	  for dir in "$${simpleReproducers[@]}" ; do \
+	    echo "processing: $$dir" ; \
+	    mkdir -p "$(JNLP_TESTS_DIR)/$$dir" ; \
+	    if [ -e "$(JNLP_TESTS_SRCDIR)/$$which/$$dir/srcs/" ]; then \
+	      d=`pwd` ; \
+	      cd "$(JNLP_TESTS_SRCDIR)/$$which/$$dir/srcs/" ; \
+	      srcFiles=`find . -mindepth 1 -type f -name "*.java" | sed "s/.\/*//"` ; \
+	      notSrcFiles=`find . -mindepth 1 -type f \! -name "*.java" | sed "s/.\/*//"` ; \
+	      $(BOOT_DIR)/bin/javac -cp $(NETX_DIR)/lib/classes.jar -d "$(JNLP_TESTS_DIR)/$$dir/" $$srcFiles ; \
+	      if [ -n "$$notSrcFiles" ] ; then \
+	        cp -R --parents $$notSrcFiles "$(JNLP_TESTS_DIR)/$$dir/" ; \
+	      fi ; \
+	      cd "$(JNLP_TESTS_DIR)/$$dir/" ; \
+	      if [ -f $(META_MANIFEST) ]; \
+	      then \
+	        $(BOOT_DIR)/bin/jar cfm "$(JNLP_TESTS_SERVER_DEPLOYDIR)/$$dir.jar" $(META_MANIFEST) * ; \
+	      else \
+	        $(BOOT_DIR)/bin/jar cf "$(JNLP_TESTS_SERVER_DEPLOYDIR)/$$dir.jar" * ; \
+	      fi; \
+	      cd "$$d" ; \
+	    fi; \
+	  done ; \
+	done ; \
+	mkdir -p stamps && \
+	touch $@
+
+stamps/netx-dist-tests-sign-some-reproducers.stamp: stamps/netx-dist-tests-prepare-reproducers.stamp
+	keystore=$(abs_top_builddir)/$(PRIVATE_KEYSTORE_NAME); \
+	types=($(SIGNED_REPRODUCERS)) ; \
+	for which in "$${types[@]}" ; do \
+	  tcaw=$(TEST_CERT_ALIAS)_$$which ; \
+	  $(BOOT_DIR)/bin/keytool -genkey -alias $$tcaw -keystore $$keystore -keypass $(PRIVATE_KEYSTORE_PASS) -storepass $(PRIVATE_KEYSTORE_PASS) -dname "cn=$$tcaw, ou=$$tcaw, o=$$tcaw, c=$$tcaw" ; \
+	    . $(abs_top_srcdir)/NEW_LINE_IFS ; \
+	  signedReproducers=(`cat $(abs_top_builddir)/junit-jnlp-dist-$$which.txt `); \
+	    IFS="$$IFS_BACKUP" ; \
+	  for dir in "$${signedReproducers[@]}" ; do \
+	   $(BOOT_DIR)/bin/jarsigner -keystore $$keystore -storepass $(PRIVATE_KEYSTORE_PASS) -keypass $(PRIVATE_KEYSTORE_PASS)  "$(JNLP_TESTS_SERVER_DEPLOYDIR)/$$dir.jar"  $$tcaw ; \
+	  done ; \
+	done ; \
+	mkdir -p stamps && \
+	touch $@
+
+stamps/change-dots-to-paths.stamp: stamps/netx-dist-tests-sign-some-reproducers.stamp
+	pushd  $(JNLP_TESTS_SERVER_DEPLOYDIR); \
+	types=($(ALL_NONCUSTOM_REPRODUCERS)); \
+	for which in "$${types[@]}" ; do \
+	  . $(abs_top_srcdir)/NEW_LINE_IFS ; \
+	  simpleReproducers=(`cat $(abs_top_builddir)/junit-jnlp-dist-$$which.txt `); \
+	  IFS="$$IFS_BACKUP" ; \
+	  for dir in "$${simpleReproducers[@]}" ; do \
+	    if test "$${dir:0:1}" = "." ; then \
+	      echo "reproducer $$dir starts with dot. It is forbidden" ; \
+	      exit 5; \
+	    fi; \
+	    if test "$${dir:(-1)}" = "." ; then \
+	      echo "reproducer $$dir ends with dot. It is forbidden" ; \
+	      exit 5; \
+	    fi; \
+	    q=`expr index "$$dir" .`; \
+	    r=$$? ; \
+	    if [ $$r = 0  ]; then \
+	      slashed_dir="./$${dir//.//}" ; \
+	      path="`dirname $$slashed_dir`" ; \
+	      file="`basename $$slashed_dir`.jar" ; \
+	      echo "copying $$dir.jar to $$path as $$file" ; \
+	      mkdir --parents $$path ; \
+	      cp $$dir".jar" "$$path"/"$$file" ; \
+	    fi ; \
+	  done ; \
+	done ; \
+	popd ; \
+	mkdir -p stamps && \
+	touch $@
+
+#this always tries to remove  previous testcert
+#the code is copypasted from netx-dist-tests-remove-cert-from-public, because 
+#with depending to not stamped target we always have to rerun reproducers targets
+stamps/exported-test-certs.stamp: stamps/change-dots-to-paths.stamp
+	-types=($(SIGNED_REPRODUCERS)) ; \
+	for which in "$${types[@]}" ; do \
+	  $(BOOT_DIR)/bin/keytool -delete -alias $(TEST_CERT_ALIAS)_$$which -keystore $(PUBLIC_KEYSTORE) -storepass $(PUBLIC_KEYSTORE_PASS) ; \
+	done ;
+	types=($(SIGNED_REPRODUCERS)) ; \
+	for which in "$${types[@]}" ; do \
+	  keytool -export -alias $(TEST_CERT_ALIAS)_$$which -file $(EXPORTED_TEST_CERT_PREFIX)_$$which.$(EXPORTED_TEST_CERT_SUFFIX) -storepass $(PRIVATE_KEYSTORE_PASS) -keystore $(PRIVATE_KEYSTORE_NAME) ; \
+	done ;
+	mkdir -p stamps && \
+	touch $@
+
+stamps/netx-dist-tests-import-cert-to-public: stamps/exported-test-certs.stamp
+	types=($(SIGNED_REPRODUCERS)) ; \
+	for which in "$${types[@]}" ; do \
+	  yes | $(BOOT_DIR)/bin/keytool -import -alias $(TEST_CERT_ALIAS)_$$which -keystore $(PUBLIC_KEYSTORE) -storepass $(PUBLIC_KEYSTORE_PASS) -file $(EXPORTED_TEST_CERT_PREFIX)_$$which.$(EXPORTED_TEST_CERT_SUFFIX) ;\
+	done ;
+	mkdir -p stamps && \
+	touch $@
+
+netx-dist-tests-remove-cert-from-public:
+	-types=($(SIGNED_REPRODUCERS)) ; \
+	for which in "$${types[@]}" ; do \
+	  $(BOOT_DIR)/bin/keytool -delete -alias $(TEST_CERT_ALIAS)_$$which -keystore $(PUBLIC_KEYSTORE) -storepass $(PUBLIC_KEYSTORE_PASS) ; \
+	done ;
+	-rm -rf stamps/netx-dist-tests-import-cert-to-public
+
+netx-dist-tests-source-files.txt:
+	find $(JNLP_TESTS_ENGINE_SRCDIR) -name '*.java' | sort > $@
+
+stamps/netx-dist-tests-compile.stamp: stamps/netx.stamp \
+ stamps/junit-jnlp-dist-dirs netx-dist-tests-source-files.txt
+	mkdir -p $(JNLP_TESTS_ENGINE_DIR);
+	$(BOOT_DIR)/bin/javac $(IT_JAVACFLAGS) \
+	 -d $(JNLP_TESTS_ENGINE_DIR) \
+	 -classpath $(JUNIT_JAR):$(NETX_DIR)/lib/classes.jar \
+	 @netx-dist-tests-source-files.txt && \
+	mkdir -p stamps && \
+	touch $@
+
+netx-dist-tests-tests-source-files.txt:
+	find $(JNLP_TESTS_ENGINE_TESTS_SRCDIR) -name '*.java' | sort > $@
+
+stamps/netx-dist-tests-tests-compile.stamp: stamps/junit-jnlp-dist-dirs netx-dist-tests-tests-source-files.txt  stamps/netx-dist-tests-compile.stamp
+	mkdir -p $(JNLP_TESTS_ENGINE_TESTS_DIR);
+	$(BOOT_DIR)/bin/javac $(IT_JAVACFLAGS) \
+	 -d $(JNLP_TESTS_ENGINE_TESTS_DIR) \
+	 -classpath $(JUNIT_JAR):$(NETX_DIR)/lib/classes.jar:$(JNLP_TESTS_ENGINE_DIR) \
+	 @netx-dist-tests-tests-source-files.txt && \
+	mkdir -p stamps && \
+	touch $@
+
+stamps/netx-dist-tests-compile-testcases.stamp: stamps/netx.stamp stamps/junit-jnlp-dist-dirs \
+ netx-dist-tests-source-files.txt stamps/netx-dist-tests-compile.stamp stamps/netx-dist-tests-tests-compile.stamp
+	types=($(ALL_REPRODUCERS)); \
+	for which in "$${types[@]}" ; do \
+	  . $(abs_top_srcdir)/NEW_LINE_IFS ; \
+	  simpleReproducers=(`cat $(abs_top_builddir)/junit-jnlp-dist-$$which.txt `); \
+	  IFS="$$IFS_BACKUP" ; \
+	  for dir in "$${simpleReproducers[@]}" ; do \
+	    $(BOOT_DIR)/bin/javac $(IT_JAVACFLAGS) \
+	      -d $(JNLP_TESTS_ENGINE_TESTS_DIR) \
+	      -classpath $(JUNIT_JAR):$(NETX_DIR)/lib/classes.jar:$(JNLP_TESTS_ENGINE_DIR) \
+	    "$(JNLP_TESTS_SRCDIR)/$$which/$$dir/testcases/"* ; \
+	  done ; \
+	done ; \
+	mkdir -p stamps && \
+	touch $@
+
+stamps/netx-dist-tests-copy-resources.stamp: stamps/junit-jnlp-dist-dirs
+	types=($(ALL_REPRODUCERS)); \
+	for which in "$${types[@]}" ; do \
+	  . $(abs_top_srcdir)/NEW_LINE_IFS ; \
+	  simpleReproducers=(`cat $(abs_top_builddir)/junit-jnlp-dist-$$which.txt `); \
+	  IFS="$$IFS_BACKUP" ; \
+	  for dir in "$${simpleReproducers[@]}" ; do \
+	    cp -R "$(JNLP_TESTS_SRCDIR)/$$which/$$dir/resources/"*  $(JNLP_TESTS_SERVER_DEPLOYDIR)/ ; \
+	  done ; \
+	done ; \
+	mkdir -p stamps && \
+	touch $@
+
+$(REPRODUCERS_CLASS_NAMES): $(REPRODUCERS_CLASS_WHITELIST)
+	whiteListed=`cat $(REPRODUCERS_CLASS_WHITELIST)`; \
+	cd $(JNLP_TESTS_ENGINE_TESTS_DIR) ; \
+	class_names= ; \
+	for test in `find -type f` ; do \
+	  class_name=`echo $$test | sed -e 's|\.class$$||' -e 's|^\./||'` ; \
+	  class_name=`echo $$class_name | sed -e 's|/|.|g' ` ; \
+	  INLCUDE="NO" ; \
+	  for x in $$whiteListed ; do \
+	    q=`expr match "$$class_name" "$$x"`; \
+	    r=$$? ; \
+	    if [ $$r = 0  ]; then \
+	      echo "$$class_name will be included in reproducers testcases because of $$x pattern in $(REPRODUCERS_CLASS_WHITELIST). Matching was  $$q"; \
+	      INLCUDE="YES" ; \
+	    fi; \
+	  done; \
+	  if [ "$$INLCUDE" = "YES"  ]; then \
+	    class_names="$$class_names $$class_name" ; \
+	  else \
+	    echo "$$class_name had no match in $(REPRODUCERS_CLASS_WHITELIST). Excluding"; \
+	  fi; \
+	done ; \
+	echo $$class_names > $(REPRODUCERS_CLASS_NAMES)
+
+stamps/run-netx-dist-tests.stamp: stamps/netx-dist.stamp extra-lib/about.jar stamps/plugin.stamp launcher.build/$(javaws) \
+ javaws.desktop stamps/docs.stamp launcher.build/$(itweb_settings) itweb-settings.desktop \
+ stamps/netx.stamp stamps/junit-jnlp-dist-dirs stamps/netx-dist-tests-import-cert-to-public \
+ stamps/netx-dist-tests-compile.stamp stamps/netx-dist-tests-compile-testcases.stamp $(JUNIT_RUNNER_JAR) stamps/netx-dist-tests-copy-resources.stamp\
+ $(TESTS_DIR)/$(REPORT_STYLES_DIRNAME) $(REPRODUCERS_CLASS_NAMES) stamps/process-custom-reproducers.stamp
+	cd $(JNLP_TESTS_ENGINE_DIR) ; \
+	class_names=`cat $(REPRODUCERS_CLASS_NAMES)` ; \
+	CLASSPATH=$(NETX_DIR)/lib/classes.jar:$(JUNIT_JAR):$(JUNIT_RUNNER_JAR):.:$(JNLP_TESTS_ENGINE_TESTS_DIR) \
+	  $(BOOT_DIR)/bin/java $(REPRODUCERS_DPARAMETERS) \
+	 -Xbootclasspath:$(RUNTIME) CommandLine $$class_names
+@WITH_XSLTPROC_TRUE@	$(XSLTPROC)  $(TESTS_SRCDIR)/$(REPORT_STYLES_DIRNAME)/logs.xsl $(JNLP_TESTS_ENGINE_DIR)/ServerAccess-logs.xml > $(TESTS_DIR)/logs_reproducers.html
+@WITH_XSLTPROC_TRUE@	$(XSLTPROC)  --stringparam logs logs_reproducers.html $(TESTS_SRCDIR)/$(REPORT_STYLES_DIRNAME)/jreport.xsl $(JNLP_TESTS_ENGINE_DIR)/tests-output.xml > $(TESTS_DIR)/index_reproducers.html
+	touch $@
+
+stamps/process-custom-reproducers.stamp: stamps/junit-jnlp-dist-dirs stamps/netx-dist-tests-import-cert-to-public \
+ stamps/netx-dist-tests-compile.stamp stamps/netx-dist-tests-compile-testcases.stamp $(JUNIT_RUNNER_JAR) stamps/netx-dist-tests-copy-resources.stamp\
+ $(TESTS_DIR)/$(REPORT_STYLES_DIRNAME) $(REPRODUCERS_CLASS_NAMES)
+	. $(abs_top_srcdir)/NEW_LINE_IFS ; \
+	customReproducers=(`cat $(abs_top_builddir)/junit-jnlp-dist-custom.txt `); \
+	IFS="$$IFS_BACKUP" ; \
+	for dir in "$${customReproducers[@]}" ; do \
+	  pushd $(JNLP_TESTS_SRCDIR)/$(CUSTOM_REPRODUCERS)/$$dir/srcs; \
+	  $(MAKE) prepare-reproducer ; \
+	  popd ; \
+	done ; \
+	mkdir -p stamps && \
+	touch $@
+
+clean-custom-reproducers: junit-jnlp-dist-custom.txt
+	. $(abs_top_srcdir)/NEW_LINE_IFS ; \
+	customReproducers=(`cat $(abs_top_builddir)/junit-jnlp-dist-custom.txt `); \
+	IFS="$$IFS_BACKUP" ; \
+	for dir in "$${customReproducers[@]}" ; do \
+	  pushd $(JNLP_TESTS_SRCDIR)/custom/$$dir/srcs; \
+	  $(MAKE) clean-reproducer ; \
+	  popd ; \
+	done ; \
+	rm -f stamps/process-custom-reproducers.stamp
+
+#for global-links you must be root, for opera there do not exists user-links
+#although this targets will indeed create symbolic links to enable 
+#icedtea-web plugin inside browser it is intended for testing purposes
+@ENABLE_PLUGIN_TRUE@stamps/user-links.stamp: stamps/netx-dist.stamp extra-lib/about.jar stamps/plugin.stamp \
+@ENABLE_PLUGIN_TRUE@ launcher.build/$(javaws) stamps/netx.stamp $(DESTDIR)$(libdir)/$(BUILT_PLUGIN_LIBRARY) 
+@ENABLE_PLUGIN_TRUE@	if [ $(MOZILLA_FAMILY_TEST) ]  ; then  \
+@ENABLE_PLUGIN_TRUE@	  if [ -e $(MOZILLA_LOCAL_PLUGINDIR)/$(PLUGIN_LINK_NAME) ] ; then \
+@ENABLE_PLUGIN_TRUE@	    mv -f $(MOZILLA_LOCAL_PLUGINDIR)/$(PLUGIN_LINK_NAME)  $(MOZILLA_LOCAL_BACKUP_FILE) ; \
+@ENABLE_PLUGIN_TRUE@	    echo "$(MOZILLA_LOCAL_PLUGINDIR)/$(PLUGIN_LINK_NAME) backed up as $(MOZILLA_LOCAL_BACKUP_FILE)" ; \
+@ENABLE_PLUGIN_TRUE@	  else \
+@ENABLE_PLUGIN_TRUE@	    echo "$(MOZILLA_LOCAL_PLUGINDIR)/$(PLUGIN_LINK_NAME) doesn't exists, nothing to be backed up to $(MOZILLA_LOCAL_BACKUP_FILE)" ; \
+@ENABLE_PLUGIN_TRUE@	  fi ; \
+@ENABLE_PLUGIN_TRUE@	  pushd $(MOZILLA_LOCAL_PLUGINDIR) ; \
+@ENABLE_PLUGIN_TRUE@	  ln -s $(DESTDIR)$(libdir)/$(BUILT_PLUGIN_LIBRARY) $(PLUGIN_LINK_NAME) ; \
+@ENABLE_PLUGIN_TRUE@	  echo "$(DESTDIR)$(libdir)/$(BUILT_PLUGIN_LIBRARY) linked as  $$PWD/$(PLUGIN_LINK_NAME)" ; \
+@ENABLE_PLUGIN_TRUE@	  popd ; \
+@ENABLE_PLUGIN_TRUE@	fi ; \
+@ENABLE_PLUGIN_TRUE@	touch $@
+
+@ENABLE_PLUGIN_TRUE@restore-user-links:
+@ENABLE_PLUGIN_TRUE@	if [ $(MOZILLA_FAMILY_TEST) ]  ; then  \
+@ENABLE_PLUGIN_TRUE@	  if [ -e $(MOZILLA_LOCAL_BACKUP_FILE) ] ; then \
+@ENABLE_PLUGIN_TRUE@	    mv -f  $(MOZILLA_LOCAL_BACKUP_FILE)  $(MOZILLA_LOCAL_PLUGINDIR)/$(PLUGIN_LINK_NAME) ; \
+@ENABLE_PLUGIN_TRUE@	    echo "$(MOZILLA_LOCAL_BACKUP_FILE) restored as $(MOZILLA_LOCAL_PLUGINDIR)/$(PLUGIN_LINK_NAME)" ; \
+@ENABLE_PLUGIN_TRUE@	  else \
+@ENABLE_PLUGIN_TRUE@	    rm -f $(MOZILLA_LOCAL_PLUGINDIR)/$(PLUGIN_LINK_NAME) ; \
+@ENABLE_PLUGIN_TRUE@	    echo "$(MOZILLA_LOCAL_BACKUP_FILE) do not exists, nothing to be restored. $(MOZILLA_LOCAL_PLUGINDIR)/$(PLUGIN_LINK_NAME) removed" ; \
+@ENABLE_PLUGIN_TRUE@	  fi ; \
+@ENABLE_PLUGIN_TRUE@	fi ;
+@ENABLE_PLUGIN_TRUE@	if [ -e stamps/user-links.stamp ] ; then \
+@ENABLE_PLUGIN_TRUE@	  rm -f stamps/user-links.stamp ; \
+@ENABLE_PLUGIN_TRUE@	fi
+
+@ENABLE_PLUGIN_TRUE@stamps/global-links.stamp: stamps/netx-dist.stamp extra-lib/about.jar stamps/plugin.stamp launcher.build/$(javaws) \
+@ENABLE_PLUGIN_TRUE@ stamps/netx.stamp $(DESTDIR)$(libdir)/$(BUILT_PLUGIN_LIBRARY)
+@ENABLE_PLUGIN_TRUE@	if [ $(MOZILLA_FAMILY_TEST) ]  ; then  \
+@ENABLE_PLUGIN_TRUE@	    dir="$(MOZILLA_GLOBAL32_PLUGINDIR)"  ; \
+@ENABLE_PLUGIN_TRUE@	    arch=`arch`  ; \
+@ENABLE_PLUGIN_TRUE@	    if [ "$$arch" = "x86_64" ]  ; then \
+@ENABLE_PLUGIN_TRUE@	      dir="$(MOZILLA_GLOBAL64_PLUGINDIR)"  ; \
+@ENABLE_PLUGIN_TRUE@	    fi ; \
+@ENABLE_PLUGIN_TRUE@	    if [ -e "$$dir"/$(PLUGIN_LINK_NAME) ] ; then \
+@ENABLE_PLUGIN_TRUE@	      mv -f "$$dir"/$(PLUGIN_LINK_NAME)  $(MOZILLA_GLOBAL_BACKUP_FILE) ; \
+@ENABLE_PLUGIN_TRUE@	      echo "$$dir/$(PLUGIN_LINK_NAME) backed up as  $(MOZILLA_GLOBAL_BACKUP_FILE)" ; \
+@ENABLE_PLUGIN_TRUE@	    else \
+@ENABLE_PLUGIN_TRUE@	      echo "$$dir/$(PLUGIN_LINK_NAME) do not exists, nothing to be backed up to $(MOZILLA_GLOBAL_BACKUP_FILE)" ; \
+@ENABLE_PLUGIN_TRUE@	    fi ; \
+@ENABLE_PLUGIN_TRUE@	    pushd "$$dir"  ; \
+@ENABLE_PLUGIN_TRUE@	    ln -s $(DESTDIR)$(libdir)/$(BUILT_PLUGIN_LIBRARY) $(PLUGIN_LINK_NAME)  ; \
+@ENABLE_PLUGIN_TRUE@	    echo "$(DESTDIR)$(libdir)/$(BUILT_PLUGIN_LIBRARY) linked as  $$PWD/$(PLUGIN_LINK_NAME)" ; \
+@ENABLE_PLUGIN_TRUE@	    popd  ; \
+@ENABLE_PLUGIN_TRUE@	fi ; 
+@ENABLE_PLUGIN_TRUE@	if [ "$(OPERA)" != "" ]  ; then \
+@ENABLE_PLUGIN_TRUE@	    dir="$(OPERA_GLOBAL32_PLUGINDIR)"  ; \
+@ENABLE_PLUGIN_TRUE@	    arch=`arch`  ; \
+@ENABLE_PLUGIN_TRUE@	    if [ "$$arch" = "x86_64" ] ; then \
+@ENABLE_PLUGIN_TRUE@	      dir="$(OPERA_GLOBAL64_PLUGINDIR)" ; \
+@ENABLE_PLUGIN_TRUE@	    fi ; \
+@ENABLE_PLUGIN_TRUE@	    if [ -e "$$dir"/$(PLUGIN_LINK_NAME) ] ; then \
+@ENABLE_PLUGIN_TRUE@	      mv -f "$$dir"/$(PLUGIN_LINK_NAME)  $(OPERA_GLOBAL_BACKUP_FILE) ; \
+@ENABLE_PLUGIN_TRUE@	      echo "$$dir/$(PLUGIN_LINK_NAME) backed up as  $(OPERA_GLOBAL_BACKUP_FILE) "; \
+@ENABLE_PLUGIN_TRUE@	    else \
+@ENABLE_PLUGIN_TRUE@	      echo "$$dir/$(PLUGIN_LINK_NAME) do not exists, nothing to be backed up to $(OPERA_GLOBAL_BACKUP_FILE) "; \
+@ENABLE_PLUGIN_TRUE@	    fi ; \
+@ENABLE_PLUGIN_TRUE@	    pushd "$$dir"  ; \
+@ENABLE_PLUGIN_TRUE@	    ln -s $(DESTDIR)$(libdir)/$(BUILT_PLUGIN_LIBRARY) $(PLUGIN_LINK_NAME)  ; \
+@ENABLE_PLUGIN_TRUE@	    echo "$(DESTDIR)$(libdir)/$(BUILT_PLUGIN_LIBRARY) linked as  $$PWD/$(PLUGIN_LINK_NAME)" ; \
+@ENABLE_PLUGIN_TRUE@	    popd  ; \
+@ENABLE_PLUGIN_TRUE@	fi   ; \
+@ENABLE_PLUGIN_TRUE@	touch $@
+
+@ENABLE_PLUGIN_TRUE@restore-global-links:
+@ENABLE_PLUGIN_TRUE@	if [ $(MOZILLA_FAMILY_TEST) ]  ; then  \
+@ENABLE_PLUGIN_TRUE@	    dir="$(MOZILLA_GLOBAL32_PLUGINDIR)"  ; \
+@ENABLE_PLUGIN_TRUE@	    arch=`arch`  ; \
+@ENABLE_PLUGIN_TRUE@	    if [ "$$arch" = "x86_64" ]  ; then \
+@ENABLE_PLUGIN_TRUE@	      dir="$(MOZILLA_GLOBAL64_PLUGINDIR)"  ; \
+@ENABLE_PLUGIN_TRUE@	    fi ; \
+@ENABLE_PLUGIN_TRUE@	    if [ -e $(MOZILLA_GLOBAL_BACKUP_FILE) ] ; then \
+@ENABLE_PLUGIN_TRUE@	      mv -f $(MOZILLA_GLOBAL_BACKUP_FILE) "$$dir"/$(PLUGIN_LINK_NAME) ; \
+@ENABLE_PLUGIN_TRUE@	      echo "$(MOZILLA_GLOBAL_BACKUP_FILE) restored as $$dir/$(PLUGIN_LINK_NAME)" ; \
+@ENABLE_PLUGIN_TRUE@	    else \
+@ENABLE_PLUGIN_TRUE@	      rm -f "$$dir"/$(PLUGIN_LINK_NAME) ; \
+@ENABLE_PLUGIN_TRUE@	      echo "$(MOZILLA_GLOBAL_BACKUP_FILE) do not exists, nothing to be restored. $$dir/$(PLUGIN_LINK_NAME) removed" ; \
+@ENABLE_PLUGIN_TRUE@	    fi ; \
+@ENABLE_PLUGIN_TRUE@	fi ; 
+@ENABLE_PLUGIN_TRUE@	if [ "$(OPERA)" != "" ]  ; then \
+@ENABLE_PLUGIN_TRUE@	    dir="$(OPERA_GLOBAL32_PLUGINDIR)"  ; \
+@ENABLE_PLUGIN_TRUE@	    arch=`arch`  ; \
+@ENABLE_PLUGIN_TRUE@	    if [ "$$arch" = "x86_64" ] ; then \
+@ENABLE_PLUGIN_TRUE@	      dir="$(OPERA_GLOBAL64_PLUGINDIR)" ; \
+@ENABLE_PLUGIN_TRUE@	    fi ; \
+@ENABLE_PLUGIN_TRUE@	    if [ -e $(OPERA_GLOBAL_BACKUP_FILE) ] ; then \
+@ENABLE_PLUGIN_TRUE@	      mv -f $(OPERA_GLOBAL_BACKUP_FILE) "$$dir"/$(PLUGIN_LINK_NAME) ; \
+@ENABLE_PLUGIN_TRUE@	      echo "$(OPERA_GLOBAL_BACKUP_FILE)  restored as $$dir/$(PLUGIN_LINK_NAME)" ; \
+@ENABLE_PLUGIN_TRUE@	    else \
+@ENABLE_PLUGIN_TRUE@	      rm -f "$$dir"/$(PLUGIN_LINK_NAME) ; \
+@ENABLE_PLUGIN_TRUE@	      echo "$(OPERA_GLOBAL_BACKUP_FILE) do not exist, nothing to be restored. $$dir/$(PLUGIN_LINK_NAME) removed" ; \
+@ENABLE_PLUGIN_TRUE@	    fi ; \
+@ENABLE_PLUGIN_TRUE@	fi   ;
+@ENABLE_PLUGIN_TRUE@	if [ -e stamps/global-links.stamp ] ; then \
+@ENABLE_PLUGIN_TRUE@	  rm -f stamps/global-links.stamp ; \
+@ENABLE_PLUGIN_TRUE@	fi
+
 netx-unit-tests-source-files.txt:
 	find $(NETX_UNIT_TEST_SRCDIR) -name '*.java' | sort > $@
 
 stamps/netx-unit-tests-compile.stamp: stamps/netx.stamp \
- netx-unit-tests-source-files.txt
+ netx-unit-tests-source-files.txt stamps/netx-dist-tests-compile.stamp
 	mkdir -p $(NETX_UNIT_TEST_DIR) && \
 	$(BOOT_DIR)/bin/javac $(IT_JAVACFLAGS) \
 	 -d $(NETX_UNIT_TEST_DIR) \
-	 -classpath $(JUNIT_JAR):$(NETX_DIR)/lib/classes.jar \
+	 -classpath $(JUNIT_JAR):$(NETX_DIR)/lib/classes.jar:$(JNLP_TESTS_ENGINE_DIR) \
 	 @netx-unit-tests-source-files.txt && \
 	mkdir -p stamps && \
 	touch $@
 
-run-netx-unit-tests: stamps/netx-unit-tests-compile.stamp \
- $(JUNIT_RUNNER_JAR)
-	cp {$(NETX_UNIT_TEST_SRCDIR),$(NETX_UNIT_TEST_DIR)}/net/sourceforge/jnlp/basic.jnlp
+$(TESTS_DIR)/$(REPORT_STYLES_DIRNAME):
+	mkdir $(TESTS_DIR)/$(REPORT_STYLES_DIRNAME)
+	cp $(TESTS_SRCDIR)/$(REPORT_STYLES_DIRNAME)/*.css $(TESTS_DIR)/$(REPORT_STYLES_DIRNAME)/
+	cp $(TESTS_SRCDIR)/$(REPORT_STYLES_DIRNAME)/*.js $(TESTS_DIR)/$(REPORT_STYLES_DIRNAME)/
+
+$(UNIT_CLASS_NAMES):
 	cd $(NETX_UNIT_TEST_DIR) ; \
 	class_names= ; \
@@ -935,9 +1399,182 @@
 	  class_names="$$class_names $$class_name" ; \
 	done ; \
-	echo $$class_names ; \
-	CLASSPATH=$(NETX_DIR)/lib/classes.jar:$(JUNIT_JAR):$(JUNIT_RUNNER_JAR):. \
-	  $(BOOT_DIR)/bin/java -Xbootclasspath:$(RUNTIME) CommandLine $$class_names
-
-clean-netx-tests: clean-netx-unit-tests clean-junit-runner
+	echo $$class_names > $(UNIT_CLASS_NAMES);
+
+stamps/run-netx-unit-tests.stamp: stamps/netx-unit-tests-compile.stamp $(JUNIT_RUNNER_JAR)  \
+ $(TESTS_DIR)/$(REPORT_STYLES_DIRNAME)  $(UNIT_CLASS_NAMES)
+	filename=" " ; \
+	cd $(NETX_UNIT_TEST_SRCDIR) ; \
+	for file in `find . -type f \! -iname "*.java"`; do\
+		filename=`echo $$file `; \
+		cp --parents $$filename $(NETX_UNIT_TEST_DIR) ; \
+	done ; \
+	cd $(NETX_UNIT_TEST_DIR) ; \
+	class_names=`cat $(UNIT_CLASS_NAMES)` ; \
+	CLASSPATH=$(NETX_DIR)/lib/classes.jar:$(JUNIT_JAR):$(JUNIT_RUNNER_JAR):$(JNLP_TESTS_ENGINE_DIR):. \
+	  $(BOOT_DIR)/bin/java -Xbootclasspath:$(RUNTIME) CommandLine $$class_names 
+@WITH_XSLTPROC_TRUE@	$(XSLTPROC) $(TESTS_SRCDIR)/$(REPORT_STYLES_DIRNAME)/logs.xsl $(NETX_UNIT_TEST_DIR)/ServerAccess-logs.xml > $(TESTS_DIR)/logs_unit.html
+@WITH_XSLTPROC_TRUE@	$(XSLTPROC) --stringparam logs logs_unit.html $(TESTS_SRCDIR)/$(REPORT_STYLES_DIRNAME)/jreport.xsl $(NETX_UNIT_TEST_DIR)/tests-output.xml > $(TESTS_DIR)/index_unit.html
+	mkdir -p stamps && \
+	touch $@
+
+#warning,  during this target tests.build/netx/unit/tests-output.xml is backup and rewriten (but not coresponding html file)
+#xml results run from emma sandbox, however, can be wrong, co the new tests-output.xml is then renamed and orginal one restored
+#you can add -ix "-*Test*" -ix "-*test*"  to ignore all test cases from statistics
+stamps/run-unit-test-code-coverage.stamp: stamps/netx-unit-tests-compile.stamp $(JUNIT_RUNNER_JAR)  \
+ $(TESTS_DIR)/$(REPORT_STYLES_DIRNAME)  $(UNIT_CLASS_NAMES)
+@WITH_EMMA_TRUE@	cd $(NETX_UNIT_TEST_DIR) ; \
+@WITH_EMMA_TRUE@	for file in $(EMMA_MODIFIED_FILES) ; do \
+@WITH_EMMA_TRUE@	  mv $(NETX_UNIT_TEST_DIR)/$$file  $(NETX_UNIT_TEST_DIR)/"$$file""$(EMMA_BACKUP_SUFFIX)" ; \
+@WITH_EMMA_TRUE@	done ;\
+@WITH_EMMA_TRUE@	class_names=`cat $(UNIT_CLASS_NAMES)` ; \
+@WITH_EMMA_TRUE@	$(BOOT_DIR)/bin/java $(EMMA_JAVA_ARGS) -Xbootclasspath:$(RUNTIME) -cp $(EMMA_JAR) -Demma.report.html.out.encoding=UTF-8 emmarun \
+@WITH_EMMA_TRUE@	 -Dreport.html.out.encoding=UTF-8 \
+@WITH_EMMA_TRUE@	 -raw \
+@WITH_EMMA_TRUE@	 -sp $(NETX_SRCDIR) \
+@WITH_EMMA_TRUE@	 -sp $(NETX_UNIT_TEST_SRCDIR) \
+@WITH_EMMA_TRUE@	 -sp $(JUNIT_RUNNER_SRCDIR) \
+@WITH_EMMA_TRUE@	 -r html \
+@WITH_EMMA_TRUE@	 -r xml \
+@WITH_EMMA_TRUE@	 -cp $(NETX_DIR)/lib/classes.jar \
+@WITH_EMMA_TRUE@	 -cp $(JUNIT_JAR) \
+@WITH_EMMA_TRUE@	 -cp $(JUNIT_RUNNER_JAR) \
+@WITH_EMMA_TRUE@	 -cp $(BOOT_DIR)/jre/lib/rt.jar \
+@WITH_EMMA_TRUE@	 -cp $(BOOT_DIR)/jre/lib/jsse.jar \
+@WITH_EMMA_TRUE@	 -cp $(BOOT_DIR)/jre/lib/resources.jar \
+@WITH_EMMA_TRUE@	 -cp $(RHINO_RUNTIME) \
+@WITH_EMMA_TRUE@	 -cp $(JNLP_TESTS_ENGINE_DIR) \
+@WITH_EMMA_TRUE@	 -cp . \
+@WITH_EMMA_TRUE@	 -ix "-org.junit.*" \
+@WITH_EMMA_TRUE@	 -ix "-junit.*" \
+@WITH_EMMA_TRUE@	 CommandLine $$class_names ;  \
+@WITH_EMMA_TRUE@	for file in $(EMMA_MODIFIED_FILES) ; do \
+@WITH_EMMA_TRUE@	  mv $(NETX_UNIT_TEST_DIR)/$$file  $(NETX_UNIT_TEST_DIR)/"$$file""$(EMMA_SUFFIX)" ; \
+@WITH_EMMA_TRUE@	  mv $(NETX_UNIT_TEST_DIR)/"$$file""$(EMMA_BACKUP_SUFFIX)"  $(NETX_UNIT_TEST_DIR)/$$file ; \
+@WITH_EMMA_TRUE@	done ;
+@WITH_EMMA_FALSE@	echo "Sorry, coverage report cant be run without emma installed. Try install emma or specify with-emma value" ;
+@WITH_EMMA_FALSE@	exit 5
+	touch $@
+
+#warning,  during this target tests.build/netx/jnlp_testsengine/tests-output.xml is backup and rewriten (but not coresponding html file)
+#xml results run from emma sandbox, however, can be wrong, co the new tests-output.xml is then renamed and orginal one restored
+stamps/run-reproducers-test-code-coverage.stamp: stamps/run-netx-dist-tests.stamp $(REPRODUCERS_CLASS_NAMES)
+@WITH_EMMA_TRUE@	cd $(TESTS_DIR) ; \
+@WITH_EMMA_TRUE@	for file in $(EMMA_MODIFIED_FILES) ; do \
+@WITH_EMMA_TRUE@	  mv $(JNLP_TESTS_ENGINE_DIR)/$$file $(JNLP_TESTS_ENGINE_DIR)/"$$file""$(EMMA_BACKUP_SUFFIX)" ; \
+@WITH_EMMA_TRUE@	done ;\
+@WITH_EMMA_TRUE@	echo "backuping javaws and netx.jar in $(DESTDIR)" ; \
+@WITH_EMMA_TRUE@	netx_backup=$(DESTDIR)$(datadir)/$(PACKAGE_NAME)/netx_backup.jar ; \
+@WITH_EMMA_TRUE@	javaws_backup=$(DESTDIR)$(bindir)/javaws_backup ; \
+@WITH_EMMA_TRUE@	mv $(DESTDIR)$(bindir)/javaws $$javaws_backup ;  \
+@WITH_EMMA_TRUE@	mv $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/netx.jar $$netx_backup ; \
+@WITH_EMMA_TRUE@	nw_bootclasspath="$(LAUNCHER_BOOTCLASSPATH):$(EMMA_JAR):$$netx_backup" ; \
+@WITH_EMMA_TRUE@	instructed_dir=$(TESTS_DIR)/instr ; \
+@WITH_EMMA_TRUE@	echo "instrumenting netx.jar from $$netx_backup through $$instructed_dir" ; \
+@WITH_EMMA_TRUE@	$(BOOT_DIR)/bin/java -cp  $(EMMA_JAR) emma instr -d $$instructed_dir -ip $$netx_backup ; \
+@WITH_EMMA_TRUE@	pushd $$instructed_dir ; \
+@WITH_EMMA_TRUE@	$(BOOT_DIR)/bin/jar -cf $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/netx.jar * ; \
+@WITH_EMMA_TRUE@	popd ; \
+@WITH_EMMA_TRUE@	rm -rf $$instructed_dir ; \
+@WITH_EMMA_TRUE@	echo "patching $(javaws)" ; \
+@WITH_EMMA_TRUE@	cat $$javaws_backup | sed "s,$(LAUNCHER_BOOTCLASSPATH),$$nw_bootclasspath," > $(DESTDIR)$(bindir)/$(javaws) ; \
+@WITH_EMMA_TRUE@	chmod 777 $(DESTDIR)$(bindir)/$(javaws) ; \
+@WITH_EMMA_TRUE@	testcases_srcs=( ) ; \
+@WITH_EMMA_TRUE@	k=0 ; \
+@WITH_EMMA_TRUE@	types=($(ALL_REPRODUCERS)); \
+@WITH_EMMA_TRUE@	for which in "$${types[@]}" ; do \
+@WITH_EMMA_TRUE@	  . $(abs_top_srcdir)/NEW_LINE_IFS ; \
+@WITH_EMMA_TRUE@	  simpleReproducers=(`cat $(abs_top_builddir)/junit-jnlp-dist-$$which.txt `); \
+@WITH_EMMA_TRUE@	  IFS="$$IFS_BACKUP" ; \
+@WITH_EMMA_TRUE@	  for dir in "$${simpleReproducers[@]}" ; do \
+@WITH_EMMA_TRUE@	    testcases_srcs[k]="-sp" ; \
+@WITH_EMMA_TRUE@	    k=$$((k+1)) ; \
+@WITH_EMMA_TRUE@	    testcases_srcs[k]="$(JNLP_TESTS_SRCDIR)/$$which/$$dir/testcases/" ; \
+@WITH_EMMA_TRUE@	    k=$$((k+1)) ; \
+@WITH_EMMA_TRUE@	    done ; \
+@WITH_EMMA_TRUE@	  done ; \
+@WITH_EMMA_TRUE@	cd $(JNLP_TESTS_ENGINE_DIR) ; \
+@WITH_EMMA_TRUE@	class_names=`cat $(REPRODUCERS_CLASS_NAMES)` ; \
+@WITH_EMMA_TRUE@	$(BOOT_DIR)/bin/java  \
+@WITH_EMMA_TRUE@	 $(EMMA_JAVA_ARGS) \
+@WITH_EMMA_TRUE@	  $(REPRODUCERS_DPARAMETERS) \
+@WITH_EMMA_TRUE@	 -Xbootclasspath:$(RUNTIME) -cp $(EMMA_JAR) emmarun  \
+@WITH_EMMA_TRUE@	   -raw \
+@WITH_EMMA_TRUE@	   -cp $(NETX_DIR)/lib/classes.jar \
+@WITH_EMMA_TRUE@	   -cp $(JUNIT_JAR) \
+@WITH_EMMA_TRUE@	   -cp $(JUNIT_RUNNER_JAR) \
+@WITH_EMMA_TRUE@	   -cp $(BOOT_DIR)/jre/lib/rt.jar \
+@WITH_EMMA_TRUE@	   -cp $(BOOT_DIR)/jre/lib/jsse.jar \
+@WITH_EMMA_TRUE@	   -cp $(BOOT_DIR)/jre/lib/resources.jar \
+@WITH_EMMA_TRUE@	   -cp $(RHINO_RUNTIME) \
+@WITH_EMMA_TRUE@	   -cp . \
+@WITH_EMMA_TRUE@	   -cp $(JNLP_TESTS_ENGINE_TESTS_DIR) \
+@WITH_EMMA_TRUE@	   -ix "-org.junit.*" \
+@WITH_EMMA_TRUE@	   -ix "-junit.*" \
+@WITH_EMMA_TRUE@	   CommandLine $$class_names ; \
+@WITH_EMMA_TRUE@	mv $(JNLP_TESTS_ENGINE_DIR)/coverage.ec $(JNLP_TESTS_ENGINE_DIR)/coverageX.ec ; \
+@WITH_EMMA_TRUE@	mv $(JNLP_TESTS_ENGINE_DIR)/coverage.es $(JNLP_TESTS_ENGINE_DIR)/coverageX.es ; \
+@WITH_EMMA_TRUE@	$(BOOT_DIR)/bin/java $(EMMA_JAVA_ARGS) -cp $(EMMA_JAR) emma merge \
+@WITH_EMMA_TRUE@	  -in $(TESTS_DIR)/coverage.em \
+@WITH_EMMA_TRUE@	  -in $(JNLP_TESTS_ENGINE_DIR)/coverageX.ec \
+@WITH_EMMA_TRUE@	  -in $(JNLP_TESTS_ENGINE_DIR)/coverageX.es ; \
+@WITH_EMMA_TRUE@	$(BOOT_DIR)/bin/java $(EMMA_JAVA_ARGS) -cp $(EMMA_JAR)  -Demma.report.html.out.encoding=UTF-8 emma report \
+@WITH_EMMA_TRUE@	  -Dreport.html.out.encoding=UTF-8 \
+@WITH_EMMA_TRUE@	  -in $(JNLP_TESTS_ENGINE_DIR)/coverage.es  \
+@WITH_EMMA_TRUE@	  -sp $(NETX_SRCDIR) \
+@WITH_EMMA_TRUE@	  -sp $(NETX_UNIT_TEST_SRCDIR) \
+@WITH_EMMA_TRUE@	  -sp $(JUNIT_RUNNER_SRCDIR) \
+@WITH_EMMA_TRUE@	  -sp $(JNLP_TESTS_ENGINE_SRCDIR) \
+@WITH_EMMA_TRUE@	  -sp $(JNLP_TESTS_ENGINE_TESTS_SRCDIR) \
+@WITH_EMMA_TRUE@	  -r html \
+@WITH_EMMA_TRUE@	  -r xml \
+@WITH_EMMA_TRUE@	  "$${testcases_srcs[@]}" ; \
+@WITH_EMMA_TRUE@	echo "restoring javaws and netx.jar in $(DESTDIR)" ; \
+@WITH_EMMA_TRUE@	rm -f $(DESTDIR)$(bindir)/$(javaws) $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/netx.jar ; \
+@WITH_EMMA_TRUE@	rm -f $(DESTDIR)$(bindir)/$(javaws);  \
+@WITH_EMMA_TRUE@	mv $$javaws_backup $(DESTDIR)$(bindir)/$(javaws);  \
+@WITH_EMMA_TRUE@	mv $$netx_backup $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/netx.jar ; \
+@WITH_EMMA_TRUE@	for file in $(EMMA_MODIFIED_FILES) ; do \
+@WITH_EMMA_TRUE@	  mv $(JNLP_TESTS_ENGINE_DIR)/$$file  $(JNLP_TESTS_ENGINE_DIR)/"$$file""$(EMMA_SUFFIX)" ; \
+@WITH_EMMA_TRUE@	  mv $(JNLP_TESTS_ENGINE_DIR)/"$$file""$(EMMA_BACKUP_SUFFIX)"  $(JNLP_TESTS_ENGINE_DIR)/$$file ; \
+@WITH_EMMA_TRUE@	done ;\
+@WITH_EMMA_TRUE@	rm $(JNLP_TESTS_ENGINE_DIR)/coverage.txt ; 
+@WITH_EMMA_FALSE@	echo "Sorry, coverage report cant be run without emma installed. Try install emma or specify with-emma value" ;
+@WITH_EMMA_FALSE@	exit 5
+	touch $@
+
+run-test-code-coverage: run-unit-test-code-coverage run-reproducers-test-code-coverage
+@WITH_EMMA_TRUE@	cd $(TESTS_DIR) ; \
+@WITH_EMMA_TRUE@	k=0 ; \
+@WITH_EMMA_TRUE@	types=($(ALL_REPRODUCERS)); \
+@WITH_EMMA_TRUE@	for which in "$${types[@]}" ; do \
+@WITH_EMMA_TRUE@	  . $(abs_top_srcdir)/NEW_LINE_IFS ; \
+@WITH_EMMA_TRUE@	  simpleReproducers=(`cat $(abs_top_builddir)/junit-jnlp-dist-$$which.txt `); \
+@WITH_EMMA_TRUE@	  IFS="$$IFS_BACKUP" ; \
+@WITH_EMMA_TRUE@	  for dir in "$${simpleReproducers[@]}" ; do \
+@WITH_EMMA_TRUE@	    testcases_srcs[k]="-sp" ; \
+@WITH_EMMA_TRUE@	    k=$$((k+1)) ; \
+@WITH_EMMA_TRUE@	    testcases_srcs[k]="$(JNLP_TESTS_SRCDIR)/$$which/$$dir/testcases/" ; \
+@WITH_EMMA_TRUE@	    k=$$((k+1)) ; \
+@WITH_EMMA_TRUE@	  done ; \
+@WITH_EMMA_TRUE@	done ; \
+@WITH_EMMA_TRUE@	$(BOOT_DIR)/bin/java $(EMMA_JAVA_ARGS) -cp $(EMMA_JAR) emma merge \
+@WITH_EMMA_TRUE@	 -in $(NETX_UNIT_TEST_DIR)/coverage.es \
+@WITH_EMMA_TRUE@	 -in $(JNLP_TESTS_ENGINE_DIR)/coverage.es ; \
+@WITH_EMMA_TRUE@	$(BOOT_DIR)/bin/java $(EMMA_JAVA_ARGS) -cp $(EMMA_JAR)  -Demma.report.html.out.encoding=UTF-8 emma report \
+@WITH_EMMA_TRUE@	 -Dreport.html.out.encoding=UTF-8 \
+@WITH_EMMA_TRUE@	 -in $(TESTS_DIR)/coverage.es \
+@WITH_EMMA_TRUE@	 -in $(TESTS_DIR)/coverage.em \
+@WITH_EMMA_TRUE@	 -sp $(NETX_SRCDIR) \
+@WITH_EMMA_TRUE@	 -sp $(NETX_UNIT_TEST_SRCDIR) \
+@WITH_EMMA_TRUE@	 -sp $(JUNIT_RUNNER_SRCDIR) \
+@WITH_EMMA_TRUE@	 -sp $(JNLP_TESTS_ENGINE_SRCDIR) \
+@WITH_EMMA_TRUE@	 -sp $(JNLP_TESTS_ENGINE_TESTS_SRCDIR) \
+@WITH_EMMA_TRUE@	 "$${testcases_srcs[@]}" \
+@WITH_EMMA_TRUE@	 -r html \
+@WITH_EMMA_TRUE@	 -r xml ; 
+@WITH_EMMA_FALSE@	echo "Sorry, coverage report cant be run without emma installed. Try install emma or specify with-emma value" ;
+@WITH_EMMA_FALSE@	exit 5
+
+clean-netx-tests: clean-netx-unit-tests clean-junit-runner clean-netx-dist-tests clean-test-code-coverage
 	if [ -e $(TESTS_DIR)/netx ]; then \
 	  rmdir $(TESTS_DIR)/netx ; \
@@ -949,8 +1586,71 @@
 	rm -f $(JUNIT_RUNNER_JAR)
 
-clean-netx-unit-tests:
+clean-netx-unit-tests: clean_tests_reports
 	rm -f netx-unit-tests-source-files.txt
 	rm -rf $(NETX_UNIT_TEST_DIR)
+	rm -f $(UNIT_CLASS_NAMES)
+	rm -f stamps/check-pac-functions.stamp
+	rm -f stamps/run-netx-unit-tests.stamp
 	rm -f stamps/netx-unit-tests-compile.stamp
+
+clean_tests_reports:
+	rm -rf  $(TESTS_DIR)/$(REPORT_STYLES_DIRNAME)/
+	rm -f  $(TESTS_DIR)/*.html
+
+clean-netx-dist-tests: clean_tests_reports netx-dist-tests-remove-cert-from-public clean-custom-reproducers
+	rm -f netx-dist-tests-source-files.txt
+	rm -rf $(JNLP_TESTS_ENGINE_TESTS_DIR)
+	rm -rf $(JNLP_TESTS_DIR)
+	rm -rf $(JNLP_TESTS_SERVER_DEPLOYDIR)
+	rm -rf $(JNLP_TESTS_ENGINE_DIR)
+	rm -f stamps/junit-jnlp-dist-dirs
+	rm -f stamps/netx-dist-tests-compile.stamp
+	rm -f stamps/netx-dist-tests-tests-compile.stamp
+	rm -f stamps/netx-dist-tests-prepare-reproducers.stamp
+	rm -f stamps/netx-dist-tests-compile-testcases.stamp
+	rm -f stamps/netx-dist-tests-copy-resources.stamp
+	rm -f stamps/netx-dist-tests-sign-some-reproducers.stamp
+	rm -f stamps/change-dots-to-paths.stamp
+	rm -f junit-jnlp-dist-simple.txt
+	rm -f junit-jnlp-dist-custom.txt
+	rm -f netx-dist-tests-tests-source-files.txt
+	types=($(SIGNED_REPRODUCERS)) ; \
+	for which in "$${types[@]}" ; do \
+	  rm -f junit-jnlp-dist-$$which.txt ; \
+	  rm -f $(EXPORTED_TEST_CERT_PREFIX)_$$which.$(EXPORTED_TEST_CERT_SUFFIX) ; \
+	done ;
+	rm -f stamps/exported-test-certs.stamp
+	rm -f stamps/junit-jnlp-dist-signed.stamp
+	rm -f $(REPRODUCERS_CLASS_NAMES)
+	rm -f $(abs_top_builddir)/$(PRIVATE_KEYSTORE_NAME)
+	rm -f stamps/run-netx-dist-tests.stamp
+
+clean-unit-test-code-coverage:
+	if [ -e stamps/run-unit-test-code-coverage.stamp ]; then \
+	  rm -rf $(NETX_UNIT_TEST_DIR)/coverage ; \
+	  rm -f $(NETX_UNIT_TEST_DIR)/coverage.xml ; \
+	  rm -f $(NETX_UNIT_TEST_DIR)/coverageX.es ; \
+	  rm -f $(NETX_UNIT_TEST_DIR)/coverageX.ec ; \
+	  rm -f $(NETX_UNIT_TEST_DIR)/coverage.es ; \
+	  rm -f $(NETX_UNIT_TEST_DIR)/tests-output_withEmma.xml ; \
+	  rm -f stamps/run-unit-test-code-coverage.stamp ; \
+	fi
+
+clean-reproducers-test-code-coverage:
+	if [ -e stamps/run-reproducers-test-code-coverage.stamp ]; then \
+	 rm -rf $(JNLP_TESTS_ENGINE_DIR)/coverage ; \
+	 rm -f $(JNLP_TESTS_ENGINE_DIR)/coverage.xml ; \
+	 rm -f $(JNLP_TESTS_ENGINE_DIR)/coverage.es ; \
+	 rm -f $(JNLP_TESTS_ENGINE_DIR)/tests-output_withEmma.xml ; \
+	 rm -f stamps/run-reproducers-test-code-coverage.stamp ; \
+	fi
+
+clean-test-code-coverage: clean-unit-test-code-coverage clean-reproducers-test-code-coverage
+	if [ -e $(TESTS_DIR)/coverage.xml ]; then \
+	  rm -rf $(TESTS_DIR)/coverage  ; \
+	  rm -f $(TESTS_DIR)/coverage.xml  ; \
+	  rm -f $(TESTS_DIR)/coverage.es  ; \
+	  rm -f $(TESTS_DIR)/coverage.em ; \
+	fi
 
 # plugin tests
@@ -992,4 +1692,18 @@
 	ln -sf $(abs_top_builddir)/javac $(BOOT_DIR)/bin/javac
 	ln -sf $(JAVADOC) $(BOOT_DIR)/bin/javadoc
+	if [ -e "$(KEYTOOL)" ] ; then \
+	  ln -sf $(KEYTOOL) $(BOOT_DIR)/bin/keytool ;\
+	else \
+	  echo "#! /bin/sh" > $(BOOT_DIR)/bin/keytool ;\
+	  echo "echo \"keytool not exist on your system, signed part of reproducers test will fail\"" >> $(BOOT_DIR)/bin/keytool ;\
+	  chmod 777 $(BOOT_DIR)/bin/keytool ;\
+	fi
+	if [ -e "$(JARSIGNER)" ] ; then \
+	  ln -sf $(JARSIGNER) $(BOOT_DIR)/bin/jarsigner ;\
+	else \
+	  echo "#! /bin/sh" > $(BOOT_DIR)/bin/jarsigner ;\
+	  echo "echo \"jarsigner not exist on your system, signed part of reproducers test will fail\"" >> $(BOOT_DIR)/bin/jarsigner ;\
+	  chmod 777 $(BOOT_DIR)/bin/jarsigner ;\
+	fi
 	mkdir -p $(BOOT_DIR)/jre/lib && \
 	ln -s $(SYSTEM_JRE_DIR)/lib/rt.jar $(BOOT_DIR)/jre/lib && \
@@ -998,4 +1712,9 @@
 	else \
 	  ln -s rt.jar $(BOOT_DIR)/jre/lib/jsse.jar ; \
+	fi
+	if [ -e $(SYSTEM_JRE_DIR)/lib/resources.jar ] ; then \
+	  ln -s $(SYSTEM_JRE_DIR)/lib/resources.jar $(BOOT_DIR)/jre/lib ; \
+	else \
+	  ln -s rt.jar $(BOOT_DIR)/jre/lib/resources.jar ; \
 	fi
 	ln -sf $(SYSTEM_JRE_DIR)/lib/$(JRE_ARCH_DIR) \
@@ -1038,4 +1757,18 @@
 plugin-tests: stamps/plugin-tests.stamp
 
+check-pac-functions: stamps/check-pac-functions.stamp
+
+run-netx-unit-tests: stamps/run-netx-unit-tests.stamp
+
+links: stamps/global-links.stamp
+
+user-links: stamps/user-links.stamp
+
+run-netx-dist-tests: stamps/run-netx-dist-tests.stamp
+
+run-unit-test-code-coverage: stamps/run-unit-test-code-coverage.stamp
+
+run-reproducers-test-code-coverage: stamps/run-reproducers-test-code-coverage.stamp
+
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
Index: /branches/vendor/sourceforge/icedtea-web/current/NEWS
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/NEWS	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/NEWS	(revision 416)
@@ -9,19 +9,64 @@
 CVE-XXXX-YYYY: http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=XXXX-YYYY
 
-New in release 1.1.2 (2011-08-31):
+New in release 1.3 (2012-09-04):
+* Security updates
+  - CVE-2012-3422, RH840592: Potential read from an uninitialized memory location
+  - CVE-2012-3423, RH841345: Incorrect handling of not 0-terminated strings
+* NetX
+  - PR898: signed applications with big jnlp-file doesn't start (webstart affect like "frozen")
+  - PR811: javaws is not handling urls with spaces (and other characters needing encoding) correctly
+* Plugin
+  - PR820: IcedTea-Web 1.1.3 crashing Firefox when loading Citrix XenApp
+  - PR863: Error passing strings to applet methods in Chromium
+  - PR895: IcedTea-Web searches for missing classes on each loadClass or findClass
+  - PR861: Allow loading from non codebase hosts. Allow code to connect to hosting server
+  - PR518: NPString.utf8characters not guaranteed to be nul-terminated
+  - PR722: META-INF/ unsigned entries should be ignored in signing
+  - PR855: AppletStub getDocumentBase() doesn't return full URL
+  - PR1011: Folders treated as jar files in archive tag
+  - PR1106: Buffer overflow in plugin table
+  - PR975: Plugin should not include classpaths specified in jar manifests when using jnlp_href
+  - PR588: Cookies not written from cookie jar to browser cookies
+* Common
+  - PR918: java applet windows uses a low resulution black/white icon
+  - RH838417: Disambiguate signed applet security prompt from certificate warning
+  - RH838559: Disambiguate signed applet security prompt from certificate warning
+  - RH720836: project can be compiled against GTK+ 2 or 3 librarie
+  - PR955: regression: SweetHome3D fails to run
+
+New in release 1.2 (2011-XX-XX):
+* Security updates:
+	- RH718164, CVE-2011-2513: Home directory path disclosure to untrusted applications
+	- RH718170, CVE-2011-2514: Java Web Start security warning dialog manipulation
+	- RH742515, CVE-2011-3377: IcedTea-Web: second-level domain subdomains and suffix domain SOP bypass
+* NetX
+  - PR618: Can't install OpenDJ, JavaWebStart fails with Input stream is null error
+  - PR765: JNLP file with all resource jars marked as 'lazy' fails to validate signature and stops the launch of application
+  - PR788: Elluminate Live! is not working
+  - PR804: javaws launcher incorrectly handles file names with spaces
 * Plugin
   - PR749: sun.applet.PluginStreamHandler#handleMessage(String) really slow
+  - PR782: Support building against npapi-sdk as well
+  - PR838: IcedTea plugin crashes with chrome browser when javascript is executed
+  - PR852: Classloader not being flushed after last applet from a site is closed
+  - RH586194: Unable to connect to connect with Juniper VPN client
   - RH718693: MindTerm SSH Applet doesn't work
 Common
   - PR768: Signed applets/Web Start apps don't work with OpenJDK7 and up
+  - PR771: IcedTea-Web certificate verification code does not use the right API
+  - PR742: IcedTea-Web checks certs only upto 1 level deep before declaring them untrusted.
   - PR769: IcedTea-Web does not work with some ssl sites with OpenJDK7
+  - PR778: Jar download and server certificate verification deadlock
+  - PR789: typo in jrunscript.sh
+  - PR794: IcedTea-Web does not work if a Web Start app jar has a Class-Path element in the manifest
+  - PR808: javaws is unable to start, when missing jars are enumerated before main jar
   - RH734081: Javaws cannot use proxy settings from Firefox
+  - RH738814: Access denied at ssl handshake
+  - Support for authenticating using client certificates
 
-New in release 1.1.1 (2011-07-20):
-* Security updates:
-	- RH718164, CVE-2011-2513: Home directory path disclosure to untrusted applications
-	- RH718170, CVE-2011-2514: Java Web Start security warning dialog manipulation
-
-New in release 1.1 (2011-06-08):
+New in release 1.1 (2011-XX-XX):
+* Security updates
+  - S6983554, CVE-2010-4450: Launcher incorrect processing of empty library path entries 
+  - RH677332, CVE-2011-0706: IcedTea multiple signers privilege escalation
 * New Features
   - IcedTea-Web now installs to a FHS-compliant location
@@ -38,4 +83,5 @@
   - The user's default browser (determined from xdg-open or $BROWSER) is used
   - RH669942: javaws fails to download version/packed files (missing support for jnlp.packEnabled and jnlp.versionEnabled)
+  - PR464: plugin can now load parameters from jnlp files.
   - PR658: now jnlp.packEnabled works with applets.
   - PR726: closing javaws -about no longer throws exceptions.
Index: /branches/vendor/sourceforge/icedtea-web/current/acinclude.m4
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/acinclude.m4	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/acinclude.m4	(revision 416)
@@ -360,4 +360,34 @@
 ])
 
+dnl ITW_GTK_CHECK_VERSION([gtk version])
+AC_DEFUN([ITW_GTK_CHECK_VERSION],
+[
+  AC_MSG_CHECKING([for GTK$1 version])
+  GTK_VER=`$PKG_CONFIG --modversion gtk+-$1.0`
+  AC_MSG_RESULT([$GTK_VER])
+])
+
+dnl ITW_GTK_CHECK([gtk version])
+AC_DEFUN([ITW_GTK_CHECK],
+[
+  case "$1" in
+    default)
+      PKG_CHECK_MODULES(GTK, gtk+-3.0,
+        [ITW_GTK_CHECK_VERSION([3])],
+        [PKG_CHECK_MODULES(GTK, gtk+-2.0,
+           [ITW_GTK_CHECK_VERSION([2])],
+           [AC_MSG_ERROR([GTK $1 not found])]
+        )]
+      )
+      ;;
+    *)
+      PKG_CHECK_MODULES(GTK, gtk+-$1.0,
+        [ITW_GTK_CHECK_VERSION([$1])],
+        [AC_MSG_ERROR([GTK $1 not found])]
+      )
+      ;;
+  esac
+])
+
 AC_DEFUN_ONCE([IT_CHECK_PLUGIN_DEPENDENCIES],
 [
@@ -366,5 +396,13 @@
 AC_REQUIRE([IT_CHECK_PLUGIN])
 if test "x${enable_plugin}" = "xyes" ; then
-  PKG_CHECK_MODULES(GTK, gtk+-2.0)
+  AC_ARG_WITH([gtk],
+    [AS_HELP_STRING([--with-gtk=[2|3|default]],
+    [the GTK+ version to use (default: 3)])],
+    [case "$with_gtk" in
+       2|3|default) ;;
+       *) AC_MSG_ERROR([invalid GTK version specified]) ;;
+     esac],
+    [with_gtk=default])
+  ITW_GTK_CHECK([$with_gtk])
   PKG_CHECK_MODULES(GLIB, glib-2.0)
   AC_SUBST(GLIB_CFLAGS)
@@ -373,6 +411,13 @@
   AC_SUBST(GTK_LIBS)
 
-  PKG_CHECK_MODULES(MOZILLA, mozilla-plugin)
-    
+  PKG_CHECK_MODULES(MOZILLA, npapi-sdk, [
+    AC_CACHE_CHECK([for xulrunner version], [xulrunner_cv_collapsed_version],[
+      # XXX: use NPAPI versions instead
+      xulrunner_cv_collapsed_version=20000000
+    ])
+  ], [
+    PKG_CHECK_MODULES(MOZILLA, mozilla-plugin)
+  ])
+
   AC_SUBST(MOZILLA_CFLAGS)
   AC_SUBST(MOZILLA_LIBS)
@@ -390,4 +435,7 @@
     then
       xulrunner_cv_collapsed_version=`pkg-config --modversion libxul | awk -F. '{power=6; v=0; for (i=1; i <= NF; i++) {v += $i * 10 ^ power; power -=2}; print v}'`
+    elif pkg-config --modversion mozilla-plugin >/dev/null 2>&1
+    then
+      xulrunner_cv_collapsed_version=`pkg-config --modversion mozilla-plugin | awk -F. '{power=6; v=0; for (i=1; i <= NF; i++) {v += $i * 10 ^ power; power -=2}; print v}'`
     else
       AC_MSG_FAILURE([cannot determine xulrunner version])
@@ -483,4 +531,28 @@
 AM_CONDITIONAL(HAS_PKGVERSION, test "x${PKGVERSION}" != "xnone") 
 AC_SUBST(PKGVERSION)
+])
+
+AC_DEFUN_ONCE([IT_CHECK_GLIB_VERSION],[
+   PKG_CHECK_MODULES([GLIB2_V_216],[glib-2.0 >= 2.16],[],[AC_DEFINE([LEGACY_GLIB])])
+ ])
+
+AC_DEFUN_ONCE([IT_CHECK_XULRUNNER_API_VERSION],
+[
+  AC_MSG_CHECKING([for legacy xulrunner api])
+  AC_LANG_PUSH(C++)
+  CXXFLAGS_BACKUP=$CXXFLAGS
+  CXXFLAGS=$CXXFLAGS" "$MOZILLA_CFLAGS
+  AC_TRY_COMPILE([
+    #include <npfunctions.h>
+    const  char* NP_GetMIMEDescription ()
+    {return (char*) "yap!";}
+  ],[],[
+    AC_MSG_RESULT(no)
+  ],[
+    AC_MSG_RESULT(yes)
+    AC_DEFINE([LEGACY_XULRUNNERAPI])
+  ])
+  CXXFLAGS=$CXXFLAGS_BACKUP
+  AC_LANG_POP(C++)
 ])
 
@@ -643,4 +715,67 @@
   AC_MSG_RESULT(${JAVA})
   AC_SUBST(JAVA)
+  JAVA_VERSION=`$JAVA -version 2>&1 | sed -n '1s/@<:@^"@:>@*"\(.*\)"$/\1/p'`
+  case "${JAVA_VERSION}" in
+    1.7*) VERSION_DEFS='-DHAVE_JAVA7';;
+  esac
+  AC_SUBST(VERSION_DEFS)
+])
+
+AC_DEFUN_ONCE([IT_FIND_KEYTOOL],
+[
+  AC_REQUIRE([IT_CHECK_FOR_JDK])
+  AC_MSG_CHECKING([for keytool])
+  AC_ARG_WITH([keytool],
+              [AS_HELP_STRING(--with-keytool,specify location of keytool for signed part of run-netx-dist)],
+  [
+    if test "${withval}" = "yes" ; then 
+      KEYTOOL=${SYSTEM_JDK_DIR}/bin/keytool  
+    else 
+      KEYTOOL="${withval}"
+    fi
+  ],
+  [
+    KEYTOOL=${SYSTEM_JDK_DIR}/bin/keytool
+  ])
+  if ! test -f "${KEYTOOL}"; then
+    AC_PATH_PROG(KEYTOOL, keytool)
+  fi
+  if ! test -f "${KEYTOOL}"; then
+    KEYTOOL=""
+  fi
+  if test -z "${KEYTOOL}" ; then
+     AC_MSG_WARN("keytool not found so signed part of run-netx-dist will fail")
+  fi
+  AC_MSG_RESULT(${KEYTOOL})
+  AC_SUBST(KEYTOOL)
+])
+
+AC_DEFUN_ONCE([IT_FIND_JARSIGNER],
+[
+  AC_REQUIRE([IT_CHECK_FOR_JDK])
+  AC_MSG_CHECKING([for jarsigner])
+  AC_ARG_WITH([jarsigner],
+              [AS_HELP_STRING(--with-jarsigner,specify location of jarsigner for signed part od run-netx-dist)],
+  [
+    if test "${withval}" = "yes" ; then 
+      JARSIGNER=${SYSTEM_JDK_DIR}/bin/jarsigner  
+    else 
+      JARSIGNER="${withval}"
+    fi
+  ],
+  [
+    JARSIGNER=${SYSTEM_JDK_DIR}/bin/jarsigner
+  ])
+  if ! test -f "${JARSIGNER}"; then
+    AC_PATH_PROG(JARSIGNER, jarsigner,"")
+  fi
+  if ! test -f "${JARSIGNER}"; then
+    JARSIGNER=""
+  fi
+  if test -z "${JARSIGNER}"; then
+     AC_MSG_WARN("jarsigner not found so signed part of run-netx-dist will fail")
+  fi
+  AC_MSG_RESULT(${JARSIGNER})
+  AC_SUBST(JARSIGNER)
 ])
 
@@ -784,2 +919,68 @@
   AC_SUBST([FULL_VERSION])
 ])
+
+dnl Allows you to configure (enable/disable/set path to) the browser
+dnl REQUIRED Parameters: 
+dnl [browser name, variable to store path, default command to run browser (if not provided, assume it's the same as the browser name]
+AC_DEFUN([IT_FIND_BROWSER],
+[
+  AC_ARG_WITH([$1],
+              [AS_HELP_STRING(--with-$1,specify the location of $1)],
+  [
+   if test "${withval}" = "no" || test "${withval}" = "yes" || test "${withval}" = "" ; then
+    $2=""
+   elif test -f "${withval}" ; then
+    $2="${withval}"
+   else 
+    AC_MSG_CHECKING([for $1])
+    AC_MSG_RESULT([not found])
+    AC_MSG_FAILURE([invalid location specified to $1: ${withval}])
+   fi
+  ],
+  [
+   withval="yes"
+  ])
+
+  if test -f "${$2}"; then
+   AC_MSG_CHECKING([for $1])
+   AC_MSG_RESULT([${$2}])
+  elif test "${withval}" != "no"; then
+   if test $# -gt 2; then
+    AC_PATH_TOOL([$2], [$3], [], [])  
+   else
+    AC_PATH_TOOL([$2], [$1], [], [])
+   fi
+  else
+   AC_MSG_CHECKING([for $1])        
+   AC_MSG_RESULT([no])
+  fi
+])
+
+AC_DEFUN_ONCE([IT_SET_GLOBAL_BROWSERTESTS_BEHAVIOUR],
+[
+  AC_MSG_CHECKING([how browser test will be run])
+  AC_ARG_WITH([browser-tests],
+             [AS_HELP_STRING([--with-browser-tests],
+                              [yes - as defined (default), no - all browser tests will be skipped, one - all "mutiple browsers" test will behave as "one" test, all - all browser tests will be run for all set browsers])],
+             [
+               BROWSER_SWITCH=${withval}
+             ],
+             [
+               BROWSER_SWITCH="yes"
+             ])
+  D_PARAM_PART="-Dmodified.browsers.run"
+  case "$BROWSER_SWITCH" in
+    "yes" )
+        BROWSER_TESTS_MODIFICATION="" ;;
+    "no" )
+        BROWSER_TESTS_MODIFICATION="$D_PARAM_PART=ignore" ;;
+    "one" )
+        BROWSER_TESTS_MODIFICATION="$D_PARAM_PART=one" ;;
+    "all" )
+        BROWSER_TESTS_MODIFICATION="$D_PARAM_PART=all" ;;
+    *) 
+        AC_MSG_ERROR([unknown valkue of with-browser-tests ($BROWSER_SWITCH), so not use (yes) or set yes|no|one|all])
+  esac
+  AC_MSG_RESULT(${BROWSER_SWITCH})
+  AC_SUBST(BROWSER_TESTS_MODIFICATION)
+])
Index: /branches/vendor/sourceforge/icedtea-web/current/aclocal.m4
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/aclocal.m4	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/aclocal.m4	(revision 416)
@@ -1,6 +1,7 @@
-# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
+# generated automatically by aclocal 1.11.3 -*- Autoconf -*-
 
 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
+# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
+# Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -178,9 +179,12 @@
 ])# PKG_CHECK_MODULES
 
-# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software
+# Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 1
 
 # AM_AUTOMAKE_VERSION(VERSION)
@@ -193,5 +197,5 @@
 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
 dnl require some minimum version.  Point them to the right macro.
-m4_if([$1], [1.11.1], [],
+m4_if([$1], [1.11.3], [],
       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
 ])
@@ -209,5 +213,5 @@
 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.11.1])dnl
+[AM_AUTOMAKE_VERSION([1.11.3])dnl
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
@@ -216,9 +220,11 @@
 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
 
-# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 1
 
 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
@@ -303,12 +309,12 @@
 fi])])
 
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 10
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009,
+# 2010, 2011 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 12
 
 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
@@ -350,4 +356,5 @@
   # making a dummy file named `D' -- because `-MD' means `put the output
   # in D'.
+  rm -rf conftest.dir
   mkdir conftest.dir
   # Copy depcomp to subdir because otherwise we won't find it if we're
@@ -414,5 +421,5 @@
       fi
       ;;
-    msvisualcpp | msvcmsys)
+    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
       # This compiler won't grok `-c -o', but also, the minuso test has
       # not run yet.  These depmodes are late enough in the game, and
@@ -479,8 +486,11 @@
   am_depcomp="$ac_aux_dir/depcomp"
   AMDEPBACKSLASH='\'
+  am__nodep='_no'
 fi
 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
 AC_SUBST([AMDEPBACKSLASH])dnl
 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
+AC_SUBST([am__nodep])dnl
+_AM_SUBST_NOTMAKE([am__nodep])dnl
 ])
 
@@ -704,9 +714,12 @@
 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
 
-# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation,
+# Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 1
 
 # AM_PROG_INSTALL_SH
@@ -841,9 +854,12 @@
 ])
 
-# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation,
+# Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 1
 
 # AM_PROG_MKDIR_P
@@ -869,11 +885,12 @@
 # Helper functions for option handling.                     -*- Autoconf -*-
 
-# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 4
+# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software
+# Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 5
 
 # _AM_MANGLE_OPTION(NAME)
@@ -883,5 +900,5 @@
 
 # _AM_SET_OPTION(NAME)
-# ------------------------------
+# --------------------
 # Set option NAME.  Presently that only means defining a flag for this option.
 AC_DEFUN([_AM_SET_OPTION],
@@ -889,5 +906,5 @@
 
 # _AM_SET_OPTIONS(OPTIONS)
-# ----------------------------------
+# ------------------------
 # OPTIONS is a space-separated list of Automake options.
 AC_DEFUN([_AM_SET_OPTIONS],
@@ -900,9 +917,11 @@
 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
 
-# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 1
 
 # AM_RUN_LOG(COMMAND)
@@ -982,9 +1001,11 @@
 AC_MSG_RESULT(yes)])
 
-# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 1
 
 # AM_PROG_INSTALL_STRIP
@@ -1010,11 +1031,11 @@
 AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
-# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 2
+# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 3
 
 # _AM_SUBST_NOTMAKE(VARIABLE)
@@ -1025,5 +1046,5 @@
 
 # AM_SUBST_NOTMAKE(VARIABLE)
-# ---------------------------
+# --------------------------
 # Public sister of _AM_SUBST_NOTMAKE.
 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
@@ -1031,5 +1052,5 @@
 # Check how to create a tarball.                            -*- Autoconf -*-
 
-# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
@@ -1053,8 +1074,9 @@
 #     $(am__untar) < result.tar
 AC_DEFUN([_AM_PROG_TAR],
-[# Always define AMTAR for backward compatibility.
-AM_MISSING_PROG([AMTAR], [tar])
+[# Always define AMTAR for backward compatibility.  Yes, it's still used
+# in the wild :-(  We should find a proper way to deprecate it ...
+AC_SUBST([AMTAR], ['$${TAR-tar}'])
 m4_if([$1], [v7],
-     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
+     [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
      [m4_case([$1], [ustar],, [pax],,
               [m4_fatal([Unknown tar format])])
Index: /branches/vendor/sourceforge/icedtea-web/current/config.guess
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/config.guess	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/config.guess	(revision 416)
@@ -2,8 +2,8 @@
 # Attempt to guess a canonical system name.
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
-#   Free Software Foundation, Inc.
-
-timestamp='2009-11-20'
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
+#   2011, 2012 Free Software Foundation, Inc.
+
+timestamp='2012-01-01'
 
 # This file is free software; you can redistribute it and/or modify it
@@ -57,6 +57,7 @@
 
 Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
+Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
@@ -145,5 +146,5 @@
     *:NetBSD:*:*)
 	# NetBSD (nbsd) targets should (where applicable) match one or
-	# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+	# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
 	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
 	# switched to ELF, *-*-netbsd* would select the old
@@ -181,5 +182,5 @@
 		;;
 	    *)
-	        os=netbsd
+		os=netbsd
 		;;
 	esac
@@ -224,5 +225,5 @@
 		;;
 	*5.*)
-	        UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
 		;;
 	esac
@@ -270,5 +271,8 @@
 	# 1.2 uses "1.2" for uname -r.
 	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-	exit ;;
+	# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
+	exitcode=$?
+	trap '' 0
+	exit $exitcode ;;
     Alpha\ *:Windows_NT*:*)
 	# How do we know it's Interix rather than the generic POSIX subsystem?
@@ -296,5 +300,5 @@
 	exit ;;
     *:OS400:*:*)
-        echo powerpc-ibm-os400
+	echo powerpc-ibm-os400
 	exit ;;
     arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
@@ -395,21 +399,21 @@
     # be no problem.
     atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
-        echo m68k-atari-mint${UNAME_RELEASE}
+	echo m68k-atari-mint${UNAME_RELEASE}
 	exit ;;
     atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
 	echo m68k-atari-mint${UNAME_RELEASE}
-        exit ;;
+	exit ;;
     *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
-        echo m68k-atari-mint${UNAME_RELEASE}
+	echo m68k-atari-mint${UNAME_RELEASE}
 	exit ;;
     milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
-        echo m68k-milan-mint${UNAME_RELEASE}
-        exit ;;
+	echo m68k-milan-mint${UNAME_RELEASE}
+	exit ;;
     hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
-        echo m68k-hades-mint${UNAME_RELEASE}
-        exit ;;
+	echo m68k-hades-mint${UNAME_RELEASE}
+	exit ;;
     *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
-        echo m68k-unknown-mint${UNAME_RELEASE}
-        exit ;;
+	echo m68k-unknown-mint${UNAME_RELEASE}
+	exit ;;
     m68k:machten:*:*)
 	echo m68k-apple-machten${UNAME_RELEASE}
@@ -481,6 +485,6 @@
 	exit ;;
     AViiON:dgux:*:*)
-        # DG/UX returns AViiON for all architectures
-        UNAME_PROCESSOR=`/usr/bin/uname -p`
+	# DG/UX returns AViiON for all architectures
+	UNAME_PROCESSOR=`/usr/bin/uname -p`
 	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
 	then
@@ -495,5 +499,5 @@
 	    echo i586-dg-dgux${UNAME_RELEASE}
 	fi
- 	exit ;;
+	exit ;;
     M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
 	echo m88k-dolphin-sysv3
@@ -552,5 +556,5 @@
 	fi
 	exit ;;
-    *:AIX:*:[456])
+    *:AIX:*:[4567])
 	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
 	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
@@ -595,50 +599,50 @@
 		if [ -x /usr/bin/getconf ]; then
 		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
-                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
-                    case "${sc_cpu_version}" in
-                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
-                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
-                      532)                      # CPU_PA_RISC2_0
-                        case "${sc_kernel_bits}" in
-                          32) HP_ARCH="hppa2.0n" ;;
-                          64) HP_ARCH="hppa2.0w" ;;
+		    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+		    case "${sc_cpu_version}" in
+		      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+		      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+		      532)                      # CPU_PA_RISC2_0
+			case "${sc_kernel_bits}" in
+			  32) HP_ARCH="hppa2.0n" ;;
+			  64) HP_ARCH="hppa2.0w" ;;
 			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
-                        esac ;;
-                    esac
+			esac ;;
+		    esac
 		fi
 		if [ "${HP_ARCH}" = "" ]; then
 		    eval $set_cc_for_build
-		    sed 's/^              //' << EOF >$dummy.c
-
-              #define _HPUX_SOURCE
-              #include <stdlib.h>
-              #include <unistd.h>
-
-              int main ()
-              {
-              #if defined(_SC_KERNEL_BITS)
-                  long bits = sysconf(_SC_KERNEL_BITS);
-              #endif
-                  long cpu  = sysconf (_SC_CPU_VERSION);
-
-                  switch (cpu)
-              	{
-              	case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
-              	case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
-              	case CPU_PA_RISC2_0:
-              #if defined(_SC_KERNEL_BITS)
-              	    switch (bits)
-              		{
-              		case 64: puts ("hppa2.0w"); break;
-              		case 32: puts ("hppa2.0n"); break;
-              		default: puts ("hppa2.0"); break;
-              		} break;
-              #else  /* !defined(_SC_KERNEL_BITS) */
-              	    puts ("hppa2.0"); break;
-              #endif
-              	default: puts ("hppa1.0"); break;
-              	}
-                  exit (0);
-              }
+		    sed 's/^		//' << EOF >$dummy.c
+
+		#define _HPUX_SOURCE
+		#include <stdlib.h>
+		#include <unistd.h>
+
+		int main ()
+		{
+		#if defined(_SC_KERNEL_BITS)
+		    long bits = sysconf(_SC_KERNEL_BITS);
+		#endif
+		    long cpu  = sysconf (_SC_CPU_VERSION);
+
+		    switch (cpu)
+			{
+			case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+			case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+			case CPU_PA_RISC2_0:
+		#if defined(_SC_KERNEL_BITS)
+			    switch (bits)
+				{
+				case 64: puts ("hppa2.0w"); break;
+				case 32: puts ("hppa2.0n"); break;
+				default: puts ("hppa2.0"); break;
+				} break;
+		#else  /* !defined(_SC_KERNEL_BITS) */
+			    puts ("hppa2.0"); break;
+		#endif
+			default: puts ("hppa1.0"); break;
+			}
+		    exit (0);
+		}
 EOF
 		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
@@ -731,5 +735,5 @@
     C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
 	echo c1-convex-bsd
-        exit ;;
+	exit ;;
     C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
 	if getsysinfo -f scalar_acc
@@ -737,14 +741,14 @@
 	else echo c2-convex-bsd
 	fi
-        exit ;;
+	exit ;;
     C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
 	echo c34-convex-bsd
-        exit ;;
+	exit ;;
     C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
 	echo c38-convex-bsd
-        exit ;;
+	exit ;;
     C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
 	echo c4-convex-bsd
-        exit ;;
+	exit ;;
     CRAY*Y-MP:*:*:*)
 	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
@@ -770,12 +774,12 @@
     F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
 	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
-        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
-        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
-        exit ;;
+	FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+	FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+	echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+	exit ;;
     5000:UNIX_System_V:4.*:*)
-        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
-        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
-        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+	FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+	FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+	echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
 	exit ;;
     i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
@@ -789,11 +793,10 @@
 	exit ;;
     *:FreeBSD:*:*)
-	case ${UNAME_MACHINE} in
-	    pc98)
-		echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+	UNAME_PROCESSOR=`/usr/bin/uname -p`
+	case ${UNAME_PROCESSOR} in
 	    amd64)
 		echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
 	    *)
-		echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+		echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
 	esac
 	exit ;;
@@ -804,7 +807,10 @@
 	echo ${UNAME_MACHINE}-pc-mingw32
 	exit ;;
+    i*:MSYS*:*)
+	echo ${UNAME_MACHINE}-pc-msys
+	exit ;;
     i*:windows32*:*)
-    	# uname -m includes "-pc" on this system.
-    	echo ${UNAME_MACHINE}-mingw32
+	# uname -m includes "-pc" on this system.
+	echo ${UNAME_MACHINE}-mingw32
 	exit ;;
     i*:PW*:*)
@@ -812,5 +818,5 @@
 	exit ;;
     *:Interix*:*)
-    	case ${UNAME_MACHINE} in
+	case ${UNAME_MACHINE} in
 	    x86)
 		echo i586-pc-interix${UNAME_RELEASE}
@@ -867,5 +873,5 @@
 	  EV67)  UNAME_MACHINE=alphaev67 ;;
 	  EV68*) UNAME_MACHINE=alphaev68 ;;
-        esac
+	esac
 	objdump --private-headers /bin/sh | grep -q ld.so.1
 	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
@@ -879,5 +885,11 @@
 	    echo ${UNAME_MACHINE}-unknown-linux-gnu
 	else
-	    echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+	    if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+		| grep -q __ARM_PCS_VFP
+	    then
+		echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+	    else
+		echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
+	    fi
 	fi
 	exit ;;
@@ -886,11 +898,14 @@
 	exit ;;
     cris:Linux:*:*)
-	echo cris-axis-linux-gnu
+	echo ${UNAME_MACHINE}-axis-linux-gnu
 	exit ;;
     crisv32:Linux:*:*)
-	echo crisv32-axis-linux-gnu
+	echo ${UNAME_MACHINE}-axis-linux-gnu
 	exit ;;
     frv:Linux:*:*)
-    	echo frv-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    hexagon:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit ;;
     i*86:Linux:*:*)
@@ -934,5 +949,5 @@
 	;;
     or32:Linux:*:*)
-	echo or32-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit ;;
     padre:Linux:*:*)
@@ -960,5 +975,5 @@
 	exit ;;
     sh64*:Linux:*:*)
-    	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit ;;
     sh*:Linux:*:*)
@@ -968,12 +983,15 @@
 	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit ;;
+    tile*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
     vax:Linux:*:*)
 	echo ${UNAME_MACHINE}-dec-linux-gnu
 	exit ;;
     x86_64:Linux:*:*)
-	echo x86_64-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit ;;
     xtensa*:Linux:*:*)
-    	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit ;;
     i*86:DYNIX/ptx:4*:*)
@@ -984,9 +1002,9 @@
 	exit ;;
     i*86:UNIX_SV:4.2MP:2.*)
-        # Unixware is an offshoot of SVR4, but it has its own version
-        # number series starting with 2...
-        # I am not positive that other SVR4 systems won't match this,
+	# Unixware is an offshoot of SVR4, but it has its own version
+	# number series starting with 2...
+	# I am not positive that other SVR4 systems won't match this,
 	# I just have to hope.  -- rms.
-        # Use sysv4.2uw... so that sysv4* matches it.
+	# Use sysv4.2uw... so that sysv4* matches it.
 	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
 	exit ;;
@@ -1020,5 +1038,5 @@
 	exit ;;
     i*86:*:5:[678]*)
-    	# UnixWare 7.x, OpenUNIX and OpenServer 6.
+	# UnixWare 7.x, OpenUNIX and OpenServer 6.
 	case `/bin/uname -X | grep "^Machine"` in
 	    *486*)	     UNAME_MACHINE=i486 ;;
@@ -1048,11 +1066,11 @@
     pc:*:*:*)
 	# Left here for compatibility:
-        # uname -m prints for DJGPP always 'pc', but it prints nothing about
-        # the processor, so we play safe by assuming i586.
+	# uname -m prints for DJGPP always 'pc', but it prints nothing about
+	# the processor, so we play safe by assuming i586.
 	# Note: whatever this is, it MUST be the same as what config.sub
 	# prints for the "djgpp" host, or else GDB configury will decide that
 	# this is a cross-build.
 	echo i586-pc-msdosdjgpp
-        exit ;;
+	exit ;;
     Intel:Mach:3*:*)
 	echo i386-pc-mach3
@@ -1089,6 +1107,6 @@
 	  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
     3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
-        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-          && { echo i486-ncr-sysv4; exit; } ;;
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+	  && { echo i486-ncr-sysv4; exit; } ;;
     NCR*:*:4.2:* | MPRAS*:*:4.2:*)
 	OS_REL='.3'
@@ -1133,8 +1151,8 @@
 	fi
 	exit ;;
-    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
-                      # says <Richard.M.Bartel@ccMail.Census.GOV>
-        echo i586-unisys-sysv4
-        exit ;;
+    PENTIUM:*:4.0*:*)	# Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+			# says <Richard.M.Bartel@ccMail.Census.GOV>
+	echo i586-unisys-sysv4
+	exit ;;
     *:UNIX_System_V:4*:FTX*)
 	# From Gerald Hewes <hewes@openmarket.com>.
@@ -1162,9 +1180,9 @@
     R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
 	if [ -d /usr/nec ]; then
-	        echo mips-nec-sysv${UNAME_RELEASE}
+		echo mips-nec-sysv${UNAME_RELEASE}
 	else
-	        echo mips-unknown-sysv${UNAME_RELEASE}
-	fi
-        exit ;;
+		echo mips-unknown-sysv${UNAME_RELEASE}
+	fi
+	exit ;;
     BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
 	echo powerpc-be-beos
@@ -1231,4 +1249,7 @@
 	echo i386-pc-qnx
 	exit ;;
+    NEO-?:NONSTOP_KERNEL:*:*)
+	echo neo-tandem-nsk${UNAME_RELEASE}
+	exit ;;
     NSE-?:NONSTOP_KERNEL:*:*)
 	echo nse-tandem-nsk${UNAME_RELEASE}
@@ -1276,5 +1297,5 @@
 	exit ;;
     SEI:*:*:SEIUX)
-        echo mips-sei-seiux${UNAME_RELEASE}
+	echo mips-sei-seiux${UNAME_RELEASE}
 	exit ;;
     *:DragonFly:*:*)
@@ -1282,5 +1303,5 @@
 	exit ;;
     *:*VMS:*:*)
-    	UNAME_MACHINE=`(uname -p) 2>/dev/null`
+	UNAME_MACHINE=`(uname -p) 2>/dev/null`
 	case "${UNAME_MACHINE}" in
 	    A*) echo alpha-dec-vms ; exit ;;
@@ -1322,9 +1343,9 @@
   printf ("m68k-sony-newsos%s\n",
 #ifdef NEWSOS4
-          "4"
+	"4"
 #else
-	  ""
-#endif
-         ); exit (0);
+	""
+#endif
+	); exit (0);
 #endif
 #endif
Index: /branches/vendor/sourceforge/icedtea-web/current/config.sub
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/config.sub	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/config.sub	(revision 416)
@@ -2,8 +2,8 @@
 # Configuration validation subroutine script.
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
-#   Free Software Foundation, Inc.
-
-timestamp='2009-11-20'
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
+#   2011, 2012 Free Software Foundation, Inc.
+
+timestamp='2012-01-01'
 
 # This file is (in principle) common to ALL GNU software.
@@ -76,6 +76,7 @@
 GNU config.sub ($timestamp)
 
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
+Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
@@ -124,6 +125,7 @@
 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
 case $maybe_os in
-  nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
-  uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
+  nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
+  linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+  knetbsd*-gnu* | netbsd*-gnu* | \
   kopensolaris*-gnu* | \
   storm-chaos* | os2-emx* | rtmk-nova*)
@@ -157,6 +159,6 @@
 		basic_machine=$1
 		;;
-        -bluegene*)
-	        os=-cnk
+	-bluegene*)
+		os=-cnk
 		;;
 	-sim | -cisco | -oki | -wec | -winbond)
@@ -174,8 +176,8 @@
 		basic_machine=$1
 		;;
- 	-chorusrdb)
- 		os=-chorusrdb
+	-chorusrdb)
+		os=-chorusrdb
 		basic_machine=$1
- 		;;
+		;;
 	-hiux*)
 		os=-hiuxwe2
@@ -250,11 +252,15 @@
 	| am33_2.0 \
 	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
+        | be32 | be64 \
 	| bfin \
 	| c4x | clipper \
 	| d10v | d30v | dlx | dsp16xx \
+	| epiphany \
 	| fido | fr30 | frv \
 	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+	| hexagon \
 	| i370 | i860 | i960 | ia64 \
 	| ip2k | iq2000 \
+	| le32 | le64 \
 	| lm32 \
 	| m32c | m32r | m32rle | m68000 | m68k | m88k \
@@ -282,11 +288,13 @@
 	| mt \
 	| msp430 \
+	| nds32 | nds32le | nds32be \
 	| nios | nios2 \
 	| ns16k | ns32k \
+	| open8 \
 	| or32 \
 	| pdp10 | pdp11 | pj | pjl \
-	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+	| powerpc | powerpc64 | powerpc64le | powerpcle \
 	| pyramid \
-	| rx \
+	| rl78 | rx \
 	| score \
 	| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
@@ -294,15 +302,23 @@
 	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
 	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
-	| spu | strongarm \
-	| tahoe | thumb | tic4x | tic80 | tron \
+	| spu \
+	| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
 	| ubicom32 \
-	| v850 | v850e \
+	| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
 	| we32k \
-	| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
+	| x86 | xc16x | xstormy16 | xtensa \
 	| z8k | z80)
 		basic_machine=$basic_machine-unknown
 		;;
+	c54x)
+		basic_machine=tic54x-unknown
+		;;
+	c55x)
+		basic_machine=tic55x-unknown
+		;;
+	c6x)
+		basic_machine=tic6x-unknown
+		;;
 	m6811 | m68hc11 | m6812 | m68hc12 | picochip)
-		# Motorola 68HC11/12.
 		basic_machine=$basic_machine-unknown
 		os=-none
@@ -312,4 +328,16 @@
 	ms1)
 		basic_machine=mt-unknown
+		;;
+
+	strongarm | thumb | xscale)
+		basic_machine=arm-unknown
+		;;
+
+	xscaleeb)
+		basic_machine=armeb-unknown
+		;;
+
+	xscaleel)
+		basic_machine=armel-unknown
 		;;
 
@@ -333,6 +361,7 @@
 	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
 	| avr-* | avr32-* \
+	| be32-* | be64-* \
 	| bfin-* | bs2000-* \
-	| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
+	| c[123]* | c30-* | [cjt]90-* | c4x-* \
 	| clipper-* | craynv-* | cydra-* \
 	| d10v-* | d30v-* | dlx-* \
@@ -341,6 +370,8 @@
 	| h8300-* | h8500-* \
 	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+	| hexagon-* \
 	| i*86-* | i860-* | i960-* | ia64-* \
 	| ip2k-* | iq2000-* \
+	| le32-* | le64-* \
 	| lm32-* \
 	| m32c-* | m32r-* | m32rle-* \
@@ -368,23 +399,27 @@
 	| mt-* \
 	| msp430-* \
+	| nds32-* | nds32le-* | nds32be-* \
 	| nios-* | nios2-* \
 	| none-* | np1-* | ns16k-* | ns32k-* \
+	| open8-* \
 	| orion-* \
 	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
-	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
 	| pyramid-* \
-	| romp-* | rs6000-* | rx-* \
+	| rl78-* | romp-* | rs6000-* | rx-* \
 	| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
 	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
 	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
 	| sparclite-* \
-	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
-	| tahoe-* | thumb-* \
-	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
+	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
+	| tahoe-* \
+	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+	| tile*-* \
 	| tron-* \
 	| ubicom32-* \
-	| v850-* | v850e-* | vax-* \
+	| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
+	| vax-* \
 	| we32k-* \
-	| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
+	| x86-* | x86_64-* | xc16x-* | xps100-* \
 	| xstormy16-* | xtensa*-* \
 	| ymp-* \
@@ -411,5 +446,5 @@
 		os=-udi
 		;;
-    	abacus)
+	abacus)
 		basic_machine=abacus-unknown
 		;;
@@ -481,9 +516,18 @@
 		os=-cnk
 		;;
+	c54x-*)
+		basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	c55x-*)
+		basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	c6x-*)
+		basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
 	c90)
 		basic_machine=c90-cray
 		os=-unicos
 		;;
-        cegcc)
+	cegcc)
 		basic_machine=arm-unknown
 		os=-cegcc
@@ -517,5 +561,5 @@
 		os=-unicosmp
 		;;
-	cr16)
+	cr16 | cr16-*)
 		basic_machine=cr16-unknown
 		os=-elf
@@ -675,5 +719,4 @@
 		basic_machine=i370-ibm
 		;;
-# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
 	i*86v32)
 		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
@@ -733,5 +776,5 @@
 		os=-sysv
 		;;
-        microblaze)
+	microblaze)
 		basic_machine=microblaze-xilinx
 		;;
@@ -772,7 +815,15 @@
 		basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
 		;;
+	msys)
+		basic_machine=i386-pc
+		os=-msys
+		;;
 	mvs)
 		basic_machine=i370-ibm
 		os=-mvs
+		;;
+	nacl)
+		basic_machine=le32-unknown
+		os=-nacl
 		;;
 	ncr3000)
@@ -840,4 +891,10 @@
 		basic_machine=np1-gould
 		;;
+	neo-tandem)
+		basic_machine=neo-tandem
+		;;
+	nse-tandem)
+		basic_machine=nse-tandem
+		;;
 	nsr-tandem)
 		basic_machine=nsr-tandem
@@ -922,7 +979,8 @@
 	power)	basic_machine=power-ibm
 		;;
-	ppc)	basic_machine=powerpc-unknown
-		;;
-	ppc-*)	basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+	ppc | ppcbe)	basic_machine=powerpc-unknown
+		;;
+	ppc-* | ppcbe-*)
+		basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
 		;;
 	ppcle | powerpclittle | ppc-le | powerpc-little)
@@ -1018,4 +1076,7 @@
 		os=-sysv4
 		;;
+	strongarm-* | thumb-*)
+		basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
 	sun2)
 		basic_machine=m68000-sun
@@ -1074,18 +1135,6 @@
 		os=-unicos
 		;;
-	tic54x | c54x*)
-		basic_machine=tic54x-unknown
-		os=-coff
-		;;
-	tic55x | c55x*)
-		basic_machine=tic55x-unknown
-		os=-coff
-		;;
-	tic6x | c6x*)
-		basic_machine=tic6x-unknown
-		os=-coff
-		;;
 	tile*)
-		basic_machine=tile-unknown
+		basic_machine=$basic_machine-unknown
 		os=-linux-gnu
 		;;
@@ -1156,4 +1205,7 @@
 	xps | xps100)
 		basic_machine=xps100-honeywell
+		;;
+	xscale-* | xscalee[bl]-*)
+		basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
 		;;
 	ymp)
@@ -1254,9 +1306,9 @@
 then
 case $os in
-        # First match some system type aliases
-        # that might get confused with valid system types.
+	# First match some system type aliases
+	# that might get confused with valid system types.
 	# -solaris* is a basic system type, with this one exception.
-        -auroraux)
-	        os=-auroraux
+	-auroraux)
+		os=-auroraux
 		;;
 	-solaris1 | -solaris1.*)
@@ -1294,6 +1346,7 @@
 	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
 	      | -chorusos* | -chorusrdb* | -cegcc* \
-	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-	      | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
+	      | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+	      | -mingw32* | -linux-gnu* | -linux-android* \
+	      | -linux-newlib* | -linux-uclibc* \
 	      | -uxpv* | -beos* | -mpeix* | -udk* \
 	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
@@ -1342,5 +1395,5 @@
 		os=-openedition
 		;;
-        -os400*)
+	-os400*)
 		os=-os400
 		;;
@@ -1391,5 +1444,5 @@
 		os=-sysv4
 		;;
-        -tpf*)
+	-tpf*)
 		os=-tpf
 		;;
@@ -1435,4 +1488,6 @@
 	-dicos*)
 		os=-dicos
+		;;
+	-nacl*)
 		;;
 	-none)
@@ -1458,8 +1513,8 @@
 
 case $basic_machine in
-        score-*)
+	score-*)
 		os=-elf
 		;;
-        spu-*)
+	spu-*)
 		os=-elf
 		;;
@@ -1473,6 +1528,15 @@
 		os=-aout
 		;;
-        c4x-* | tic4x-*)
-        	os=-coff
+	c4x-* | tic4x-*)
+		os=-coff
+		;;
+	tic54x-*)
+		os=-coff
+		;;
+	tic55x-*)
+		os=-coff
+		;;
+	tic6x-*)
+		os=-coff
 		;;
 	# This must come before the *-dec entry.
@@ -1494,12 +1558,9 @@
 	m68000-sun)
 		os=-sunos3
-		# This also exists in the configure program, but was not the
-		# default.
-		# os=-sunos4
 		;;
 	m68*-cisco)
 		os=-aout
 		;;
-        mep-*)
+	mep-*)
 		os=-elf
 		;;
@@ -1528,5 +1589,5 @@
 		os=-aix
 		;;
-    	*-knuth)
+	*-knuth)
 		os=-mmixware
 		;;
Index: /branches/vendor/sourceforge/icedtea-web/current/configure
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/configure	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/configure	(revision 416)
@@ -1,5 +1,5 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for icedtea-web 1.1.2.
+# Generated by GNU Autoconf 2.68 for icedtea-web 1.3.
 #
 # Report bugs to <distro-pkg-dev@openjdk.java.net>.
@@ -560,6 +560,6 @@
 PACKAGE_NAME='icedtea-web'
 PACKAGE_TARNAME='icedtea-web'
-PACKAGE_VERSION='1.1.2'
-PACKAGE_STRING='icedtea-web 1.1.2'
+PACKAGE_VERSION='1.3'
+PACKAGE_STRING='icedtea-web 1.3'
 PACKAGE_BUGREPORT='distro-pkg-dev@openjdk.java.net'
 PACKAGE_URL='http://icedtea.classpath.org/wiki/IcedTea-Web'
@@ -569,4 +569,8 @@
 LTLIBOBJS
 LIBOBJS
+EMMA_AVAILABLE
+EMMA_JAR
+WITH_EMMA_FALSE
+WITH_EMMA_TRUE
 JUNIT_AVAILABLE
 JUNIT_JAR
@@ -577,4 +581,17 @@
 WITH_RHINO_FALSE
 WITH_RHINO_TRUE
+WITH_XSLTPROC_FALSE
+WITH_XSLTPROC_TRUE
+BROWSER_TESTS_MODIFICATION
+EPIPHANY
+MIDORI
+OPERA
+CHROMIUM
+CHROME
+FIREFOX
+XSLTPROC
+GLIB2_V_216_LIBS
+GLIB2_V_216_CFLAGS
+VERSION_DEFS
 JAVA
 SYSTEM_JRE_DIR
@@ -601,4 +618,6 @@
 ICEDTEA_REVISION
 HG
+JARSIGNER
+KEYTOOL
 JAVADOC_SUPPORTS_J_OPTIONS_FALSE
 JAVADOC_SUPPORTS_J_OPTIONS_TRUE
@@ -636,4 +655,5 @@
 am__fastdepCC_TRUE
 CCDEPMODE
+am__nodep
 AMDEPBACKSLASH
 AMDEP_FALSE
@@ -732,10 +752,21 @@
 with_ecj_jar
 with_javadoc
+with_keytool
+with_jarsigner
 with_pkgversion
 enable_plugin
+with_gtk
 with_jre_home
 with_java
+with_firefox
+with_chrome
+with_chromium
+with_opera
+with_midori
+with_epiphany
+with_browser_tests
 with_rhino
 with_junit
+with_emma
 '
       ac_precious_vars='build_alias
@@ -760,5 +791,7 @@
 MOZILLA_LIBS
 X11_CFLAGS
-X11_LIBS'
+X11_LIBS
+GLIB2_V_216_CFLAGS
+GLIB2_V_216_LIBS'
 
 
@@ -1303,5 +1336,5 @@
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures icedtea-web 1.1.2 to adapt to many kinds of systems.
+\`configure' configures icedtea-web 1.3 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1373,5 +1406,5 @@
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of icedtea-web 1.1.2:";;
+     short | recursive ) echo "Configuration of icedtea-web 1.3:";;
    esac
   cat <<\_ACEOF
@@ -1398,11 +1431,27 @@
   --with-javadoc          specify location of Java documentation tool
                           (javadoc)
+  --with-keytool          specify location of keytool for signed part of
+                          run-netx-dist
+  --with-jarsigner        specify location of jarsigner for signed part od
+                          run-netx-dist
   --with-pkgversion=PKG   Use PKG in the version string in addition to
                           "IcedTea"
+  --with-gtk=2|3|default  the GTK+ version to use (default: 3)
   --with-jre-home         jre home directory (default is the JRE under the
                           JDK)
   --with-java             specify location of the 1.5 java vm
+  --with-firefox          specify the location of firefox
+  --with-chrome           specify the location of chrome
+  --with-chromium         specify the location of chromium
+  --with-opera            specify the location of opera
+  --with-midori           specify the location of midori
+  --with-epiphany         specify the location of epiphany
+  --with-browser-tests    yes - as defined (default), no - all browser tests
+                          will be skipped, one - all "mutiple browsers" test
+                          will behave as "one" test, all - all browser tests
+                          will be run for all set browsers
   --with-rhino            specify location of the rhino jar
   --with-junit            specify location of the junit jar
+  --with-emma             specify location of the emma jar
 
 Some influential environment variables:
@@ -1431,4 +1480,8 @@
   X11_CFLAGS  C compiler flags for X11, overriding pkg-config
   X11_LIBS    linker flags for X11, overriding pkg-config
+  GLIB2_V_216_CFLAGS
+              C compiler flags for GLIB2_V_216, overriding pkg-config
+  GLIB2_V_216_LIBS
+              linker flags for GLIB2_V_216, overriding pkg-config
 
 Use these variables to override the choices made by `configure' or to help
@@ -1499,5 +1552,5 @@
 if $ac_init_version; then
   cat <<\_ACEOF
-icedtea-web configure 1.1.2
+icedtea-web configure 1.3
 generated by GNU Autoconf 2.68
 
@@ -1638,5 +1691,5 @@
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by icedtea-web $as_me 1.1.2, which was
+It was created by icedtea-web $as_me 1.3, which was
 generated by GNU Autoconf 2.68.  Invocation command line was
 
@@ -2453,5 +2506,5 @@
 # Define the identity of the package.
  PACKAGE='icedtea-web'
- VERSION='1.1.2'
+ VERSION='1.3'
 
 
@@ -2483,7 +2536,7 @@
 # We need awk for the "check" target.  The system "awk" is bad on
 # some platforms.
-# Always define AMTAR for backward compatibility.
-
-AMTAR=${AMTAR-"${am_missing_run}tar"}
+# Always define AMTAR for backward compatibility.  Yes, it's still used
+# in the wild :-(  We should find a proper way to deprecate it ...
+AMTAR='$${TAR-tar}'
 
 
@@ -3498,4 +3551,5 @@
   am_depcomp="$ac_aux_dir/depcomp"
   AMDEPBACKSLASH='\'
+  am__nodep='_no'
 fi
  if test "x$enable_dependency_tracking" != xno; then
@@ -3522,4 +3576,5 @@
   # making a dummy file named `D' -- because `-MD' means `put the output
   # in D'.
+  rm -rf conftest.dir
   mkdir conftest.dir
   # Copy depcomp to subdir because otherwise we won't find it if we're
@@ -3581,5 +3636,5 @@
       fi
       ;;
-    msvisualcpp | msvcmsys)
+    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
       # This compiler won't grok `-c -o', but also, the minuso test has
       # not run yet.  These depmodes are late enough in the game, and
@@ -3906,4 +3961,5 @@
   # making a dummy file named `D' -- because `-MD' means `put the output
   # in D'.
+  rm -rf conftest.dir
   mkdir conftest.dir
   # Copy depcomp to subdir because otherwise we won't find it if we're
@@ -3965,5 +4021,5 @@
       fi
       ;;
-    msvisualcpp | msvcmsys)
+    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
       # This compiler won't grok `-c -o', but also, the minuso test has
       # not run yet.  These depmodes are late enough in the game, and
@@ -5832,5 +5888,5 @@
   mkdir pkg
   cat << \EOF > $CLASS
-/* [#]line 5834 "configure" */
+/* [#]line 5890 "configure" */
 package pkg;
 
@@ -5870,4 +5926,151 @@
 
 
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for keytool" >&5
+$as_echo_n "checking for keytool... " >&6; }
+
+# Check whether --with-keytool was given.
+if test "${with_keytool+set}" = set; then :
+  withval=$with_keytool;
+    if test "${withval}" = "yes" ; then
+      KEYTOOL=${SYSTEM_JDK_DIR}/bin/keytool
+    else
+      KEYTOOL="${withval}"
+    fi
+
+else
+
+    KEYTOOL=${SYSTEM_JDK_DIR}/bin/keytool
+
+fi
+
+  if ! test -f "${KEYTOOL}"; then
+    # Extract the first word of "keytool", so it can be a program name with args.
+set dummy keytool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_KEYTOOL+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $KEYTOOL in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_KEYTOOL="$KEYTOOL" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_KEYTOOL="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+KEYTOOL=$ac_cv_path_KEYTOOL
+if test -n "$KEYTOOL"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $KEYTOOL" >&5
+$as_echo "$KEYTOOL" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  fi
+  if ! test -f "${KEYTOOL}"; then
+    KEYTOOL=""
+  fi
+  if test -z "${KEYTOOL}" ; then
+     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"keytool not found so signed part of run-netx-dist will fail\"" >&5
+$as_echo "$as_me: WARNING: \"keytool not found so signed part of run-netx-dist will fail\"" >&2;}
+  fi
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${KEYTOOL}" >&5
+$as_echo "${KEYTOOL}" >&6; }
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner" >&5
+$as_echo_n "checking for jarsigner... " >&6; }
+
+# Check whether --with-jarsigner was given.
+if test "${with_jarsigner+set}" = set; then :
+  withval=$with_jarsigner;
+    if test "${withval}" = "yes" ; then
+      JARSIGNER=${SYSTEM_JDK_DIR}/bin/jarsigner
+    else
+      JARSIGNER="${withval}"
+    fi
+
+else
+
+    JARSIGNER=${SYSTEM_JDK_DIR}/bin/jarsigner
+
+fi
+
+  if ! test -f "${JARSIGNER}"; then
+    # Extract the first word of "jarsigner", so it can be a program name with args.
+set dummy jarsigner; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_JARSIGNER+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $JARSIGNER in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  test -z "$ac_cv_path_JARSIGNER" && ac_cv_path_JARSIGNER=""""
+  ;;
+esac
+fi
+JARSIGNER=$ac_cv_path_JARSIGNER
+if test -n "$JARSIGNER"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
+$as_echo "$JARSIGNER" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  fi
+  if ! test -f "${JARSIGNER}"; then
+    JARSIGNER=""
+  fi
+  if test -z "${JARSIGNER}"; then
+     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"jarsigner not found so signed part of run-netx-dist will fail\"" >&5
+$as_echo "$as_me: WARNING: \"jarsigner not found so signed part of run-netx-dist will fail\"" >&2;}
+  fi
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${JARSIGNER}" >&5
+$as_echo "${JARSIGNER}" >&6; }
+
+
 ac_config_files="$ac_config_files javac"
 
@@ -6175,4 +6378,75 @@
 if test "x${enable_plugin}" = "xyes" ; then
 
+# Check whether --with-gtk was given.
+if test "${with_gtk+set}" = set; then :
+  withval=$with_gtk; case "$with_gtk" in
+       2|3|default) ;;
+       *) as_fn_error $? "invalid GTK version specified" "$LINENO" 5 ;;
+     esac
+else
+  with_gtk=default
+fi
+
+
+  case "$with_gtk" in
+    default)
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK" >&5
+$as_echo_n "checking for GTK... " >&6; }
+
+if test -n "$GTK_CFLAGS"; then
+    pkg_cv_GTK_CFLAGS="$GTK_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-3.0\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "gtk+-3.0") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_GTK_CFLAGS=`$PKG_CONFIG --cflags "gtk+-3.0" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$GTK_LIBS"; then
+    pkg_cv_GTK_LIBS="$GTK_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-3.0\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "gtk+-3.0") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_GTK_LIBS=`$PKG_CONFIG --libs "gtk+-3.0" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+	        GTK_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "gtk+-3.0" 2>&1`
+        else
+	        GTK_PKG_ERRORS=`$PKG_CONFIG --print-errors "gtk+-3.0" 2>&1`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$GTK_PKG_ERRORS" >&5
+
+
 pkg_failed=no
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK" >&5
@@ -6231,30 +6505,10 @@
 	echo "$GTK_PKG_ERRORS" >&5
 
-	as_fn_error $? "Package requirements (gtk+-2.0) were not met:
-
-$GTK_PKG_ERRORS
-
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
-
-Alternatively, you may set the environment variables GTK_CFLAGS
-and GTK_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details." "$LINENO" 5
+	as_fn_error $? "GTK $with_gtk not found" "$LINENO" 5
 
 elif test $pkg_failed = untried; then
      	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
-
-Alternatively, you may set the environment variables GTK_CFLAGS
-and GTK_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-
-To get pkg-config, see <http://pkg-config.freedesktop.org/>.
-See \`config.log' for more details" "$LINENO" 5; }
+	as_fn_error $? "GTK $with_gtk not found" "$LINENO" 5
 
 else
@@ -6264,5 +6518,188 @@
 $as_echo "yes" >&6; }
 
-fi
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK2 version" >&5
+$as_echo_n "checking for GTK2 version... " >&6; }
+  GTK_VER=`$PKG_CONFIG --modversion gtk+-2.0`
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_VER" >&5
+$as_echo "$GTK_VER" >&6; }
+
+fi
+
+elif test $pkg_failed = untried; then
+     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK" >&5
+$as_echo_n "checking for GTK... " >&6; }
+
+if test -n "$GTK_CFLAGS"; then
+    pkg_cv_GTK_CFLAGS="$GTK_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "gtk+-2.0") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_GTK_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$GTK_LIBS"; then
+    pkg_cv_GTK_LIBS="$GTK_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "gtk+-2.0") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_GTK_LIBS=`$PKG_CONFIG --libs "gtk+-2.0" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+	        GTK_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "gtk+-2.0" 2>&1`
+        else
+	        GTK_PKG_ERRORS=`$PKG_CONFIG --print-errors "gtk+-2.0" 2>&1`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$GTK_PKG_ERRORS" >&5
+
+	as_fn_error $? "GTK $with_gtk not found" "$LINENO" 5
+
+elif test $pkg_failed = untried; then
+     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+	as_fn_error $? "GTK $with_gtk not found" "$LINENO" 5
+
+else
+	GTK_CFLAGS=$pkg_cv_GTK_CFLAGS
+	GTK_LIBS=$pkg_cv_GTK_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK2 version" >&5
+$as_echo_n "checking for GTK2 version... " >&6; }
+  GTK_VER=`$PKG_CONFIG --modversion gtk+-2.0`
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_VER" >&5
+$as_echo "$GTK_VER" >&6; }
+
+fi
+
+else
+	GTK_CFLAGS=$pkg_cv_GTK_CFLAGS
+	GTK_LIBS=$pkg_cv_GTK_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK3 version" >&5
+$as_echo_n "checking for GTK3 version... " >&6; }
+  GTK_VER=`$PKG_CONFIG --modversion gtk+-3.0`
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_VER" >&5
+$as_echo "$GTK_VER" >&6; }
+
+fi
+      ;;
+    *)
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK" >&5
+$as_echo_n "checking for GTK... " >&6; }
+
+if test -n "$GTK_CFLAGS"; then
+    pkg_cv_GTK_CFLAGS="$GTK_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-\$with_gtk.0\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "gtk+-$with_gtk.0") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_GTK_CFLAGS=`$PKG_CONFIG --cflags "gtk+-$with_gtk.0" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$GTK_LIBS"; then
+    pkg_cv_GTK_LIBS="$GTK_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-\$with_gtk.0\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "gtk+-$with_gtk.0") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_GTK_LIBS=`$PKG_CONFIG --libs "gtk+-$with_gtk.0" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+	        GTK_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "gtk+-$with_gtk.0" 2>&1`
+        else
+	        GTK_PKG_ERRORS=`$PKG_CONFIG --print-errors "gtk+-$with_gtk.0" 2>&1`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$GTK_PKG_ERRORS" >&5
+
+	as_fn_error $? "GTK $with_gtk not found" "$LINENO" 5
+
+elif test $pkg_failed = untried; then
+     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+	as_fn_error $? "GTK $with_gtk not found" "$LINENO" 5
+
+else
+	GTK_CFLAGS=$pkg_cv_GTK_CFLAGS
+	GTK_LIBS=$pkg_cv_GTK_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK$with_gtk version" >&5
+$as_echo_n "checking for GTK$with_gtk version... " >&6; }
+  GTK_VER=`$PKG_CONFIG --modversion gtk+-$with_gtk.0`
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_VER" >&5
+$as_echo "$GTK_VER" >&6; }
+
+fi
+      ;;
+  esac
+
 
 pkg_failed=no
@@ -6370,4 +6807,62 @@
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"npapi-sdk\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "npapi-sdk") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_MOZILLA_CFLAGS=`$PKG_CONFIG --cflags "npapi-sdk" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$MOZILLA_LIBS"; then
+    pkg_cv_MOZILLA_LIBS="$MOZILLA_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"npapi-sdk\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "npapi-sdk") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_MOZILLA_LIBS=`$PKG_CONFIG --libs "npapi-sdk" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+	        MOZILLA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "npapi-sdk" 2>&1`
+        else
+	        MOZILLA_PKG_ERRORS=`$PKG_CONFIG --print-errors "npapi-sdk" 2>&1`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$MOZILLA_PKG_ERRORS" >&5
+
+
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for MOZILLA" >&5
+$as_echo_n "checking for MOZILLA... " >&6; }
+
+if test -n "$MOZILLA_CFLAGS"; then
+    pkg_cv_MOZILLA_CFLAGS="$MOZILLA_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"mozilla-plugin\""; } >&5
   ($PKG_CONFIG --exists --print-errors "mozilla-plugin") 2>&5
@@ -6453,4 +6948,121 @@
 fi
 
+elif test $pkg_failed = untried; then
+     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for MOZILLA" >&5
+$as_echo_n "checking for MOZILLA... " >&6; }
+
+if test -n "$MOZILLA_CFLAGS"; then
+    pkg_cv_MOZILLA_CFLAGS="$MOZILLA_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"mozilla-plugin\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "mozilla-plugin") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_MOZILLA_CFLAGS=`$PKG_CONFIG --cflags "mozilla-plugin" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$MOZILLA_LIBS"; then
+    pkg_cv_MOZILLA_LIBS="$MOZILLA_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"mozilla-plugin\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "mozilla-plugin") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_MOZILLA_LIBS=`$PKG_CONFIG --libs "mozilla-plugin" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+	        MOZILLA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "mozilla-plugin" 2>&1`
+        else
+	        MOZILLA_PKG_ERRORS=`$PKG_CONFIG --print-errors "mozilla-plugin" 2>&1`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$MOZILLA_PKG_ERRORS" >&5
+
+	as_fn_error $? "Package requirements (mozilla-plugin) were not met:
+
+$MOZILLA_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables MOZILLA_CFLAGS
+and MOZILLA_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details." "$LINENO" 5
+
+elif test $pkg_failed = untried; then
+     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables MOZILLA_CFLAGS
+and MOZILLA_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details" "$LINENO" 5; }
+
+else
+	MOZILLA_CFLAGS=$pkg_cv_MOZILLA_CFLAGS
+	MOZILLA_LIBS=$pkg_cv_MOZILLA_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+fi
+
+else
+	MOZILLA_CFLAGS=$pkg_cv_MOZILLA_CFLAGS
+	MOZILLA_LIBS=$pkg_cv_MOZILLA_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xulrunner version" >&5
+$as_echo_n "checking for xulrunner version... " >&6; }
+if ${xulrunner_cv_collapsed_version+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+      # XXX: use NPAPI versions instead
+      xulrunner_cv_collapsed_version=20000000
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xulrunner_cv_collapsed_version" >&5
+$as_echo "$xulrunner_cv_collapsed_version" >&6; }
+
+fi
+
 
 
@@ -6478,4 +7090,7 @@
     then
       xulrunner_cv_collapsed_version=`pkg-config --modversion libxul | awk -F. '{power=6; v=0; for (i=1; i <= NF; i++) {v += $i * 10 ^ power; power -=2}; print v}'`
+    elif pkg-config --modversion mozilla-plugin >/dev/null 2>&1
+    then
+      xulrunner_cv_collapsed_version=`pkg-config --modversion mozilla-plugin | awk -F. '{power=6; v=0; for (i=1; i <= NF; i++) {v += $i * 10 ^ power; power -=2}; print v}'`
     else
       { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
@@ -6787,4 +7402,9 @@
 $as_echo "${JAVA}" >&6; }
 
+  JAVA_VERSION=`$JAVA -version 2>&1 | sed -n '1s/[^"]*"\(.*\)"$/\1/p'`
+  case "${JAVA_VERSION}" in
+    1.7*) VERSION_DEFS='-DHAVE_JAVA7';;
+  esac
+
 
 
@@ -6802,5 +7422,5 @@
 cd tmp.$$
 cat << \EOF > $CLASS
-/* [#]line 6804 "configure" */
+/* [#]line 7424 "configure" */
 package sun.applet;
 
@@ -6852,5 +7472,5 @@
 cd tmp.$$
 cat << \EOF > $CLASS
-/* [#]line 6854 "configure" */
+/* [#]line 7474 "configure" */
 package sun.applet;
 
@@ -6902,5 +7522,5 @@
 cd tmp.$$
 cat << \EOF > $CLASS
-/* [#]line 6904 "configure" */
+/* [#]line 7524 "configure" */
 package sun.applet;
 
@@ -6952,5 +7572,5 @@
 cd tmp.$$
 cat << \EOF > $CLASS
-/* [#]line 6954 "configure" */
+/* [#]line 7574 "configure" */
 package sun.applet;
 
@@ -7002,5 +7622,5 @@
 cd tmp.$$
 cat << \EOF > $CLASS
-/* [#]line 7004 "configure" */
+/* [#]line 7624 "configure" */
 package sun.applet;
 
@@ -7052,5 +7672,5 @@
 cd tmp.$$
 cat << \EOF > $CLASS
-/* [#]line 7054 "configure" */
+/* [#]line 7674 "configure" */
 package sun.applet;
 
@@ -7102,5 +7722,5 @@
 cd tmp.$$
 cat << \EOF > $CLASS
-/* [#]line 7104 "configure" */
+/* [#]line 7724 "configure" */
 package sun.applet;
 
@@ -7152,5 +7772,5 @@
 cd tmp.$$
 cat << \EOF > $CLASS
-/* [#]line 7154 "configure" */
+/* [#]line 7774 "configure" */
 package sun.applet;
 
@@ -7191,7 +7811,7 @@
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sun.misc.BASE64Encoder is available" >&5
-$as_echo_n "checking if sun.misc.BASE64Encoder is available... " >&6; }
-if ${it_cv_SUN_MISC_BASE64ENCODER+:} false; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sun.misc.HexDumpEncoder is available" >&5
+$as_echo_n "checking if sun.misc.HexDumpEncoder is available... " >&6; }
+if ${it_cv_SUN_MISC_HEXDUMPENCODER+:} false; then :
   $as_echo_n "(cached) " >&6
 else
@@ -7202,55 +7822,5 @@
 cd tmp.$$
 cat << \EOF > $CLASS
-/* [#]line 7204 "configure" */
-package sun.applet;
-
-import sun.misc.BASE64Encoder;
-
-public class Test
-{
-  public static void main(String[] args)
-    throws Exception
-  {
-    System.out.println(Class.forName("sun.misc.BASE64Encoder"));
-  }
-}
-
-EOF
-if $JAVAC -cp . $JAVACFLAGS -nowarn $CLASS >&5 2>&1; then
-  if $JAVA -classpath . $BYTECODE >&5 2>&1; then
-      it_cv_SUN_MISC_BASE64ENCODER=yes;
-  else
-      it_cv_SUN_MISC_BASE64ENCODER=no;
-  fi
-else
-  it_cv_SUN_MISC_BASE64ENCODER=no;
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $it_cv_SUN_MISC_BASE64ENCODER" >&5
-$as_echo "$it_cv_SUN_MISC_BASE64ENCODER" >&6; }
-rm -f $CLASS *.class
-cd ..
-# should be rmdir but has to be rm -rf due to sun.applet usage
-rm -rf tmp.$$
-if test x"${it_cv_SUN_MISC_BASE64ENCODER}" = "xno"; then
-   as_fn_error $? "sun.misc.BASE64Encoder not found." "$LINENO" 5
-fi
-
-
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sun.misc.HexDumpEncoder is available" >&5
-$as_echo_n "checking if sun.misc.HexDumpEncoder is available... " >&6; }
-if ${it_cv_SUN_MISC_HEXDUMPENCODER+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-CLASS=sun/applet/Test.java
-BYTECODE=$(echo $CLASS|sed 's#\.java##')
-mkdir -p tmp.$$/$(dirname $CLASS)
-cd tmp.$$
-cat << \EOF > $CLASS
-/* [#]line 7254 "configure" */
+/* [#]line 7824 "configure" */
 package sun.applet;
 
@@ -7302,5 +7872,5 @@
 cd tmp.$$
 cat << \EOF > $CLASS
-/* [#]line 7304 "configure" */
+/* [#]line 7874 "configure" */
 package sun.applet;
 
@@ -7352,5 +7922,5 @@
 cd tmp.$$
 cat << \EOF > $CLASS
-/* [#]line 7354 "configure" */
+/* [#]line 7924 "configure" */
 package sun.applet;
 
@@ -7391,7 +7961,7 @@
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sun.awt.X11.XEmbeddedFrame is available" >&5
-$as_echo_n "checking if sun.awt.X11.XEmbeddedFrame is available... " >&6; }
-if ${it_cv_SUN_AWT_X11_XEMBEDDEDFRAME+:} false; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sun.net.www.protocol.jar.URLJarFile is available" >&5
+$as_echo_n "checking if sun.net.www.protocol.jar.URLJarFile is available... " >&6; }
+if ${it_cv_SUN_NET_WWW_PROTOCOL_JAR_URLJARFILE+:} false; then :
   $as_echo_n "(cached) " >&6
 else
@@ -7402,5 +7972,105 @@
 cd tmp.$$
 cat << \EOF > $CLASS
-/* [#]line 7404 "configure" */
+/* [#]line 7974 "configure" */
+package sun.applet;
+
+import sun.net.www.protocol.jar.URLJarFile;
+
+public class Test
+{
+  public static void main(String[] args)
+    throws Exception
+  {
+    System.out.println(Class.forName("sun.net.www.protocol.jar.URLJarFile"));
+  }
+}
+
+EOF
+if $JAVAC -cp . $JAVACFLAGS -nowarn $CLASS >&5 2>&1; then
+  if $JAVA -classpath . $BYTECODE >&5 2>&1; then
+      it_cv_SUN_NET_WWW_PROTOCOL_JAR_URLJARFILE=yes;
+  else
+      it_cv_SUN_NET_WWW_PROTOCOL_JAR_URLJARFILE=no;
+  fi
+else
+  it_cv_SUN_NET_WWW_PROTOCOL_JAR_URLJARFILE=no;
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $it_cv_SUN_NET_WWW_PROTOCOL_JAR_URLJARFILE" >&5
+$as_echo "$it_cv_SUN_NET_WWW_PROTOCOL_JAR_URLJARFILE" >&6; }
+rm -f $CLASS *.class
+cd ..
+# should be rmdir but has to be rm -rf due to sun.applet usage
+rm -rf tmp.$$
+if test x"${it_cv_SUN_NET_WWW_PROTOCOL_JAR_URLJARFILE}" = "xno"; then
+   as_fn_error $? "sun.net.www.protocol.jar.URLJarFile not found." "$LINENO" 5
+fi
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sun.net.www.protocol.jar.URLJarFileCallBack is available" >&5
+$as_echo_n "checking if sun.net.www.protocol.jar.URLJarFileCallBack is available... " >&6; }
+if ${it_cv_SUN_NET_WWW_PROTOCOL_JAR_URLJARFILECALLBACK+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+CLASS=sun/applet/Test.java
+BYTECODE=$(echo $CLASS|sed 's#\.java##')
+mkdir -p tmp.$$/$(dirname $CLASS)
+cd tmp.$$
+cat << \EOF > $CLASS
+/* [#]line 8024 "configure" */
+package sun.applet;
+
+import sun.net.www.protocol.jar.URLJarFileCallBack;
+
+public class Test
+{
+  public static void main(String[] args)
+    throws Exception
+  {
+    System.out.println(Class.forName("sun.net.www.protocol.jar.URLJarFileCallBack"));
+  }
+}
+
+EOF
+if $JAVAC -cp . $JAVACFLAGS -nowarn $CLASS >&5 2>&1; then
+  if $JAVA -classpath . $BYTECODE >&5 2>&1; then
+      it_cv_SUN_NET_WWW_PROTOCOL_JAR_URLJARFILECALLBACK=yes;
+  else
+      it_cv_SUN_NET_WWW_PROTOCOL_JAR_URLJARFILECALLBACK=no;
+  fi
+else
+  it_cv_SUN_NET_WWW_PROTOCOL_JAR_URLJARFILECALLBACK=no;
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $it_cv_SUN_NET_WWW_PROTOCOL_JAR_URLJARFILECALLBACK" >&5
+$as_echo "$it_cv_SUN_NET_WWW_PROTOCOL_JAR_URLJARFILECALLBACK" >&6; }
+rm -f $CLASS *.class
+cd ..
+# should be rmdir but has to be rm -rf due to sun.applet usage
+rm -rf tmp.$$
+if test x"${it_cv_SUN_NET_WWW_PROTOCOL_JAR_URLJARFILECALLBACK}" = "xno"; then
+   as_fn_error $? "sun.net.www.protocol.jar.URLJarFileCallBack not found." "$LINENO" 5
+fi
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sun.awt.X11.XEmbeddedFrame is available" >&5
+$as_echo_n "checking if sun.awt.X11.XEmbeddedFrame is available... " >&6; }
+if ${it_cv_SUN_AWT_X11_XEMBEDDEDFRAME+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+CLASS=sun/applet/Test.java
+BYTECODE=$(echo $CLASS|sed 's#\.java##')
+mkdir -p tmp.$$/$(dirname $CLASS)
+cd tmp.$$
+cat << \EOF > $CLASS
+/* [#]line 8074 "configure" */
 package sun.applet;
 
@@ -7452,5 +8122,5 @@
 cd tmp.$$
 cat << \EOF > $CLASS
-/* [#]line 7454 "configure" */
+/* [#]line 8124 "configure" */
 package sun.applet;
 
@@ -7502,5 +8172,5 @@
 cd tmp.$$
 cat << \EOF > $CLASS
-/* [#]line 7504 "configure" */
+/* [#]line 8174 "configure" */
 package sun.applet;
 
@@ -7552,5 +8222,5 @@
 cd tmp.$$
 cat << \EOF > $CLASS
-/* [#]line 7554 "configure" */
+/* [#]line 8224 "configure" */
 package sun.applet;
 
@@ -7602,5 +8272,5 @@
 cd tmp.$$
 cat << \EOF > $CLASS
-/* [#]line 7604 "configure" */
+/* [#]line 8274 "configure" */
 import java.lang.reflect.Modifier;
 
@@ -7654,7 +8324,1648 @@
 
 
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLIB2_V_216" >&5
+$as_echo_n "checking for GLIB2_V_216... " >&6; }
+
+if test -n "$GLIB2_V_216_CFLAGS"; then
+    pkg_cv_GLIB2_V_216_CFLAGS="$GLIB2_V_216_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.16\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.16") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_GLIB2_V_216_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= 2.16" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$GLIB2_V_216_LIBS"; then
+    pkg_cv_GLIB2_V_216_LIBS="$GLIB2_V_216_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.16\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.16") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_GLIB2_V_216_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= 2.16" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+	        GLIB2_V_216_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "glib-2.0 >= 2.16" 2>&1`
+        else
+	        GLIB2_V_216_PKG_ERRORS=`$PKG_CONFIG --print-errors "glib-2.0 >= 2.16" 2>&1`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$GLIB2_V_216_PKG_ERRORS" >&5
+
+	$as_echo "#define LEGACY_GLIB 1" >>confdefs.h
+
+elif test $pkg_failed = untried; then
+     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+	$as_echo "#define LEGACY_GLIB 1" >>confdefs.h
+
+else
+	GLIB2_V_216_CFLAGS=$pkg_cv_GLIB2_V_216_CFLAGS
+	GLIB2_V_216_LIBS=$pkg_cv_GLIB2_V_216_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for legacy xulrunner api" >&5
+$as_echo_n "checking for legacy xulrunner api... " >&6; }
+  ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+  CXXFLAGS_BACKUP=$CXXFLAGS
+  CXXFLAGS=$CXXFLAGS" "$MOZILLA_CFLAGS
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+    #include <npfunctions.h>
+    const  char* NP_GetMIMEDescription ()
+    {return (char*) "yap!";}
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+else
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+    $as_echo "#define LEGACY_XULRUNNERAPI 1" >>confdefs.h
+
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  CXXFLAGS=$CXXFLAGS_BACKUP
+  ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
 #
 # Find optional depedencies
 #
+
+for ac_prog in xsltproc
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_XSLTPROC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$XSLTPROC"; then
+  ac_cv_prog_XSLTPROC="$XSLTPROC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_XSLTPROC="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+XSLTPROC=$ac_cv_prog_XSLTPROC
+if test -n "$XSLTPROC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
+$as_echo "$XSLTPROC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$XSLTPROC" && break
+done
+
+# browser to be linked/tested
+# Example: IT_FIND_BROWSER([browser-name],[variable-to-store-path],[default-run-command-if-different-from-the-browser-name])
+
+
+# Check whether --with-firefox was given.
+if test "${with_firefox+set}" = set; then :
+  withval=$with_firefox;
+   if test "${withval}" = "no" || test "${withval}" = "yes" || test "${withval}" = "" ; then
+    FIREFOX=""
+   elif test -f "${withval}" ; then
+    FIREFOX="${withval}"
+   else
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for firefox" >&5
+$as_echo_n "checking for firefox... " >&6; }
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "invalid location specified to firefox: ${withval}
+See \`config.log' for more details" "$LINENO" 5; }
+   fi
+
+else
+
+   withval="yes"
+
+fi
+
+
+  if test -f "${FIREFOX}"; then
+   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for firefox" >&5
+$as_echo_n "checking for firefox... " >&6; }
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${FIREFOX}" >&5
+$as_echo "${FIREFOX}" >&6; }
+  elif test "${withval}" != "no"; then
+   if test 2 -gt 2; then
+    if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}", so it can be a program name with args.
+set dummy ${ac_tool_prefix}; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_FIREFOX+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $FIREFOX in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_FIREFOX="$FIREFOX" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_FIREFOX="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+FIREFOX=$ac_cv_path_FIREFOX
+if test -n "$FIREFOX"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIREFOX" >&5
+$as_echo "$FIREFOX" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_path_FIREFOX"; then
+  ac_pt_FIREFOX=$FIREFOX
+  # Extract the first word of "", so it can be a program name with args.
+set dummy ; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_ac_pt_FIREFOX+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $ac_pt_FIREFOX in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_ac_pt_FIREFOX="$ac_pt_FIREFOX" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_ac_pt_FIREFOX="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+ac_pt_FIREFOX=$ac_cv_path_ac_pt_FIREFOX
+if test -n "$ac_pt_FIREFOX"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_FIREFOX" >&5
+$as_echo "$ac_pt_FIREFOX" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_pt_FIREFOX" = x; then
+    FIREFOX=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    FIREFOX=$ac_pt_FIREFOX
+  fi
+else
+  FIREFOX="$ac_cv_path_FIREFOX"
+fi
+
+   else
+    if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}firefox", so it can be a program name with args.
+set dummy ${ac_tool_prefix}firefox; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_FIREFOX+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $FIREFOX in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_FIREFOX="$FIREFOX" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_FIREFOX="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+FIREFOX=$ac_cv_path_FIREFOX
+if test -n "$FIREFOX"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIREFOX" >&5
+$as_echo "$FIREFOX" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_path_FIREFOX"; then
+  ac_pt_FIREFOX=$FIREFOX
+  # Extract the first word of "firefox", so it can be a program name with args.
+set dummy firefox; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_ac_pt_FIREFOX+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $ac_pt_FIREFOX in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_ac_pt_FIREFOX="$ac_pt_FIREFOX" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_ac_pt_FIREFOX="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+ac_pt_FIREFOX=$ac_cv_path_ac_pt_FIREFOX
+if test -n "$ac_pt_FIREFOX"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_FIREFOX" >&5
+$as_echo "$ac_pt_FIREFOX" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_pt_FIREFOX" = x; then
+    FIREFOX=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    FIREFOX=$ac_pt_FIREFOX
+  fi
+else
+  FIREFOX="$ac_cv_path_FIREFOX"
+fi
+
+   fi
+  else
+   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for firefox" >&5
+$as_echo_n "checking for firefox... " >&6; }
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+  fi
+
+
+
+# Check whether --with-chrome was given.
+if test "${with_chrome+set}" = set; then :
+  withval=$with_chrome;
+   if test "${withval}" = "no" || test "${withval}" = "yes" || test "${withval}" = "" ; then
+    CHROME=""
+   elif test -f "${withval}" ; then
+    CHROME="${withval}"
+   else
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for chrome" >&5
+$as_echo_n "checking for chrome... " >&6; }
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "invalid location specified to chrome: ${withval}
+See \`config.log' for more details" "$LINENO" 5; }
+   fi
+
+else
+
+   withval="yes"
+
+fi
+
+
+  if test -f "${CHROME}"; then
+   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for chrome" >&5
+$as_echo_n "checking for chrome... " >&6; }
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${CHROME}" >&5
+$as_echo "${CHROME}" >&6; }
+  elif test "${withval}" != "no"; then
+   if test 3 -gt 2; then
+    if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}google-chrome", so it can be a program name with args.
+set dummy ${ac_tool_prefix}google-chrome; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_CHROME+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $CHROME in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_CHROME="$CHROME" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_CHROME="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+CHROME=$ac_cv_path_CHROME
+if test -n "$CHROME"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHROME" >&5
+$as_echo "$CHROME" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_path_CHROME"; then
+  ac_pt_CHROME=$CHROME
+  # Extract the first word of "google-chrome", so it can be a program name with args.
+set dummy google-chrome; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_ac_pt_CHROME+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $ac_pt_CHROME in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_ac_pt_CHROME="$ac_pt_CHROME" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_ac_pt_CHROME="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+ac_pt_CHROME=$ac_cv_path_ac_pt_CHROME
+if test -n "$ac_pt_CHROME"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CHROME" >&5
+$as_echo "$ac_pt_CHROME" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_pt_CHROME" = x; then
+    CHROME=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    CHROME=$ac_pt_CHROME
+  fi
+else
+  CHROME="$ac_cv_path_CHROME"
+fi
+
+   else
+    if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}chrome", so it can be a program name with args.
+set dummy ${ac_tool_prefix}chrome; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_CHROME+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $CHROME in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_CHROME="$CHROME" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_CHROME="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+CHROME=$ac_cv_path_CHROME
+if test -n "$CHROME"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHROME" >&5
+$as_echo "$CHROME" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_path_CHROME"; then
+  ac_pt_CHROME=$CHROME
+  # Extract the first word of "chrome", so it can be a program name with args.
+set dummy chrome; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_ac_pt_CHROME+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $ac_pt_CHROME in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_ac_pt_CHROME="$ac_pt_CHROME" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_ac_pt_CHROME="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+ac_pt_CHROME=$ac_cv_path_ac_pt_CHROME
+if test -n "$ac_pt_CHROME"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CHROME" >&5
+$as_echo "$ac_pt_CHROME" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_pt_CHROME" = x; then
+    CHROME=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    CHROME=$ac_pt_CHROME
+  fi
+else
+  CHROME="$ac_cv_path_CHROME"
+fi
+
+   fi
+  else
+   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for chrome" >&5
+$as_echo_n "checking for chrome... " >&6; }
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+  fi
+
+
+
+# Check whether --with-chromium was given.
+if test "${with_chromium+set}" = set; then :
+  withval=$with_chromium;
+   if test "${withval}" = "no" || test "${withval}" = "yes" || test "${withval}" = "" ; then
+    CHROMIUM=""
+   elif test -f "${withval}" ; then
+    CHROMIUM="${withval}"
+   else
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for chromium" >&5
+$as_echo_n "checking for chromium... " >&6; }
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "invalid location specified to chromium: ${withval}
+See \`config.log' for more details" "$LINENO" 5; }
+   fi
+
+else
+
+   withval="yes"
+
+fi
+
+
+  if test -f "${CHROMIUM}"; then
+   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for chromium" >&5
+$as_echo_n "checking for chromium... " >&6; }
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${CHROMIUM}" >&5
+$as_echo "${CHROMIUM}" >&6; }
+  elif test "${withval}" != "no"; then
+   if test 3 -gt 2; then
+    if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}chromium-browser", so it can be a program name with args.
+set dummy ${ac_tool_prefix}chromium-browser; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_CHROMIUM+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $CHROMIUM in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_CHROMIUM="$CHROMIUM" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_CHROMIUM="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+CHROMIUM=$ac_cv_path_CHROMIUM
+if test -n "$CHROMIUM"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHROMIUM" >&5
+$as_echo "$CHROMIUM" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_path_CHROMIUM"; then
+  ac_pt_CHROMIUM=$CHROMIUM
+  # Extract the first word of "chromium-browser", so it can be a program name with args.
+set dummy chromium-browser; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_ac_pt_CHROMIUM+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $ac_pt_CHROMIUM in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_ac_pt_CHROMIUM="$ac_pt_CHROMIUM" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_ac_pt_CHROMIUM="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+ac_pt_CHROMIUM=$ac_cv_path_ac_pt_CHROMIUM
+if test -n "$ac_pt_CHROMIUM"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CHROMIUM" >&5
+$as_echo "$ac_pt_CHROMIUM" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_pt_CHROMIUM" = x; then
+    CHROMIUM=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    CHROMIUM=$ac_pt_CHROMIUM
+  fi
+else
+  CHROMIUM="$ac_cv_path_CHROMIUM"
+fi
+
+   else
+    if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}chromium", so it can be a program name with args.
+set dummy ${ac_tool_prefix}chromium; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_CHROMIUM+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $CHROMIUM in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_CHROMIUM="$CHROMIUM" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_CHROMIUM="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+CHROMIUM=$ac_cv_path_CHROMIUM
+if test -n "$CHROMIUM"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHROMIUM" >&5
+$as_echo "$CHROMIUM" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_path_CHROMIUM"; then
+  ac_pt_CHROMIUM=$CHROMIUM
+  # Extract the first word of "chromium", so it can be a program name with args.
+set dummy chromium; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_ac_pt_CHROMIUM+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $ac_pt_CHROMIUM in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_ac_pt_CHROMIUM="$ac_pt_CHROMIUM" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_ac_pt_CHROMIUM="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+ac_pt_CHROMIUM=$ac_cv_path_ac_pt_CHROMIUM
+if test -n "$ac_pt_CHROMIUM"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CHROMIUM" >&5
+$as_echo "$ac_pt_CHROMIUM" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_pt_CHROMIUM" = x; then
+    CHROMIUM=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    CHROMIUM=$ac_pt_CHROMIUM
+  fi
+else
+  CHROMIUM="$ac_cv_path_CHROMIUM"
+fi
+
+   fi
+  else
+   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for chromium" >&5
+$as_echo_n "checking for chromium... " >&6; }
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+  fi
+
+
+
+# Check whether --with-opera was given.
+if test "${with_opera+set}" = set; then :
+  withval=$with_opera;
+   if test "${withval}" = "no" || test "${withval}" = "yes" || test "${withval}" = "" ; then
+    OPERA=""
+   elif test -f "${withval}" ; then
+    OPERA="${withval}"
+   else
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opera" >&5
+$as_echo_n "checking for opera... " >&6; }
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "invalid location specified to opera: ${withval}
+See \`config.log' for more details" "$LINENO" 5; }
+   fi
+
+else
+
+   withval="yes"
+
+fi
+
+
+  if test -f "${OPERA}"; then
+   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opera" >&5
+$as_echo_n "checking for opera... " >&6; }
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${OPERA}" >&5
+$as_echo "${OPERA}" >&6; }
+  elif test "${withval}" != "no"; then
+   if test 2 -gt 2; then
+    if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}", so it can be a program name with args.
+set dummy ${ac_tool_prefix}; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_OPERA+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $OPERA in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_OPERA="$OPERA" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_OPERA="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+OPERA=$ac_cv_path_OPERA
+if test -n "$OPERA"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPERA" >&5
+$as_echo "$OPERA" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_path_OPERA"; then
+  ac_pt_OPERA=$OPERA
+  # Extract the first word of "", so it can be a program name with args.
+set dummy ; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_ac_pt_OPERA+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $ac_pt_OPERA in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_ac_pt_OPERA="$ac_pt_OPERA" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_ac_pt_OPERA="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+ac_pt_OPERA=$ac_cv_path_ac_pt_OPERA
+if test -n "$ac_pt_OPERA"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_OPERA" >&5
+$as_echo "$ac_pt_OPERA" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_pt_OPERA" = x; then
+    OPERA=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    OPERA=$ac_pt_OPERA
+  fi
+else
+  OPERA="$ac_cv_path_OPERA"
+fi
+
+   else
+    if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}opera", so it can be a program name with args.
+set dummy ${ac_tool_prefix}opera; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_OPERA+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $OPERA in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_OPERA="$OPERA" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_OPERA="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+OPERA=$ac_cv_path_OPERA
+if test -n "$OPERA"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPERA" >&5
+$as_echo "$OPERA" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_path_OPERA"; then
+  ac_pt_OPERA=$OPERA
+  # Extract the first word of "opera", so it can be a program name with args.
+set dummy opera; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_ac_pt_OPERA+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $ac_pt_OPERA in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_ac_pt_OPERA="$ac_pt_OPERA" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_ac_pt_OPERA="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+ac_pt_OPERA=$ac_cv_path_ac_pt_OPERA
+if test -n "$ac_pt_OPERA"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_OPERA" >&5
+$as_echo "$ac_pt_OPERA" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_pt_OPERA" = x; then
+    OPERA=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    OPERA=$ac_pt_OPERA
+  fi
+else
+  OPERA="$ac_cv_path_OPERA"
+fi
+
+   fi
+  else
+   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opera" >&5
+$as_echo_n "checking for opera... " >&6; }
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+  fi
+
+
+
+# Check whether --with-midori was given.
+if test "${with_midori+set}" = set; then :
+  withval=$with_midori;
+   if test "${withval}" = "no" || test "${withval}" = "yes" || test "${withval}" = "" ; then
+    MIDORI=""
+   elif test -f "${withval}" ; then
+    MIDORI="${withval}"
+   else
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for midori" >&5
+$as_echo_n "checking for midori... " >&6; }
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "invalid location specified to midori: ${withval}
+See \`config.log' for more details" "$LINENO" 5; }
+   fi
+
+else
+
+   withval="yes"
+
+fi
+
+
+  if test -f "${MIDORI}"; then
+   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for midori" >&5
+$as_echo_n "checking for midori... " >&6; }
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${MIDORI}" >&5
+$as_echo "${MIDORI}" >&6; }
+  elif test "${withval}" != "no"; then
+   if test 2 -gt 2; then
+    if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}", so it can be a program name with args.
+set dummy ${ac_tool_prefix}; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_MIDORI+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $MIDORI in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_MIDORI="$MIDORI" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_MIDORI="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+MIDORI=$ac_cv_path_MIDORI
+if test -n "$MIDORI"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIDORI" >&5
+$as_echo "$MIDORI" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_path_MIDORI"; then
+  ac_pt_MIDORI=$MIDORI
+  # Extract the first word of "", so it can be a program name with args.
+set dummy ; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_ac_pt_MIDORI+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $ac_pt_MIDORI in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_ac_pt_MIDORI="$ac_pt_MIDORI" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_ac_pt_MIDORI="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+ac_pt_MIDORI=$ac_cv_path_ac_pt_MIDORI
+if test -n "$ac_pt_MIDORI"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_MIDORI" >&5
+$as_echo "$ac_pt_MIDORI" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_pt_MIDORI" = x; then
+    MIDORI=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    MIDORI=$ac_pt_MIDORI
+  fi
+else
+  MIDORI="$ac_cv_path_MIDORI"
+fi
+
+   else
+    if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}midori", so it can be a program name with args.
+set dummy ${ac_tool_prefix}midori; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_MIDORI+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $MIDORI in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_MIDORI="$MIDORI" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_MIDORI="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+MIDORI=$ac_cv_path_MIDORI
+if test -n "$MIDORI"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIDORI" >&5
+$as_echo "$MIDORI" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_path_MIDORI"; then
+  ac_pt_MIDORI=$MIDORI
+  # Extract the first word of "midori", so it can be a program name with args.
+set dummy midori; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_ac_pt_MIDORI+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $ac_pt_MIDORI in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_ac_pt_MIDORI="$ac_pt_MIDORI" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_ac_pt_MIDORI="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+ac_pt_MIDORI=$ac_cv_path_ac_pt_MIDORI
+if test -n "$ac_pt_MIDORI"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_MIDORI" >&5
+$as_echo "$ac_pt_MIDORI" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_pt_MIDORI" = x; then
+    MIDORI=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    MIDORI=$ac_pt_MIDORI
+  fi
+else
+  MIDORI="$ac_cv_path_MIDORI"
+fi
+
+   fi
+  else
+   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for midori" >&5
+$as_echo_n "checking for midori... " >&6; }
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+  fi
+
+
+
+# Check whether --with-epiphany was given.
+if test "${with_epiphany+set}" = set; then :
+  withval=$with_epiphany;
+   if test "${withval}" = "no" || test "${withval}" = "yes" || test "${withval}" = "" ; then
+    EPIPHANY=""
+   elif test -f "${withval}" ; then
+    EPIPHANY="${withval}"
+   else
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for epiphany" >&5
+$as_echo_n "checking for epiphany... " >&6; }
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "invalid location specified to epiphany: ${withval}
+See \`config.log' for more details" "$LINENO" 5; }
+   fi
+
+else
+
+   withval="yes"
+
+fi
+
+
+  if test -f "${EPIPHANY}"; then
+   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for epiphany" >&5
+$as_echo_n "checking for epiphany... " >&6; }
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${EPIPHANY}" >&5
+$as_echo "${EPIPHANY}" >&6; }
+  elif test "${withval}" != "no"; then
+   if test 2 -gt 2; then
+    if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}", so it can be a program name with args.
+set dummy ${ac_tool_prefix}; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_EPIPHANY+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $EPIPHANY in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_EPIPHANY="$EPIPHANY" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_EPIPHANY="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+EPIPHANY=$ac_cv_path_EPIPHANY
+if test -n "$EPIPHANY"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EPIPHANY" >&5
+$as_echo "$EPIPHANY" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_path_EPIPHANY"; then
+  ac_pt_EPIPHANY=$EPIPHANY
+  # Extract the first word of "", so it can be a program name with args.
+set dummy ; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_ac_pt_EPIPHANY+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $ac_pt_EPIPHANY in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_ac_pt_EPIPHANY="$ac_pt_EPIPHANY" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_ac_pt_EPIPHANY="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+ac_pt_EPIPHANY=$ac_cv_path_ac_pt_EPIPHANY
+if test -n "$ac_pt_EPIPHANY"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_EPIPHANY" >&5
+$as_echo "$ac_pt_EPIPHANY" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_pt_EPIPHANY" = x; then
+    EPIPHANY=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    EPIPHANY=$ac_pt_EPIPHANY
+  fi
+else
+  EPIPHANY="$ac_cv_path_EPIPHANY"
+fi
+
+   else
+    if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}epiphany", so it can be a program name with args.
+set dummy ${ac_tool_prefix}epiphany; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_EPIPHANY+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $EPIPHANY in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_EPIPHANY="$EPIPHANY" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_EPIPHANY="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+EPIPHANY=$ac_cv_path_EPIPHANY
+if test -n "$EPIPHANY"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EPIPHANY" >&5
+$as_echo "$EPIPHANY" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_path_EPIPHANY"; then
+  ac_pt_EPIPHANY=$EPIPHANY
+  # Extract the first word of "epiphany", so it can be a program name with args.
+set dummy epiphany; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_ac_pt_EPIPHANY+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $ac_pt_EPIPHANY in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_ac_pt_EPIPHANY="$ac_pt_EPIPHANY" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_ac_pt_EPIPHANY="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+ac_pt_EPIPHANY=$ac_cv_path_ac_pt_EPIPHANY
+if test -n "$ac_pt_EPIPHANY"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_EPIPHANY" >&5
+$as_echo "$ac_pt_EPIPHANY" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_pt_EPIPHANY" = x; then
+    EPIPHANY=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    EPIPHANY=$ac_pt_EPIPHANY
+  fi
+else
+  EPIPHANY="$ac_cv_path_EPIPHANY"
+fi
+
+   fi
+  else
+   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for epiphany" >&5
+$as_echo_n "checking for epiphany... " >&6; }
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+  fi
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking how browser test will be run" >&5
+$as_echo_n "checking how browser test will be run... " >&6; }
+
+# Check whether --with-browser-tests was given.
+if test "${with_browser_tests+set}" = set; then :
+  withval=$with_browser_tests;
+               BROWSER_SWITCH=${withval}
+
+else
+
+               BROWSER_SWITCH="yes"
+
+fi
+
+  D_PARAM_PART="-Dmodified.browsers.run"
+  case "$BROWSER_SWITCH" in
+    "yes" )
+        BROWSER_TESTS_MODIFICATION="" ;;
+    "no" )
+        BROWSER_TESTS_MODIFICATION="$D_PARAM_PART=ignore" ;;
+    "one" )
+        BROWSER_TESTS_MODIFICATION="$D_PARAM_PART=one" ;;
+    "all" )
+        BROWSER_TESTS_MODIFICATION="$D_PARAM_PART=all" ;;
+    *)
+        as_fn_error $? "unknown valkue of with-browser-tests ($BROWSER_SWITCH), so not use (yes) or set yes|no|one|all" "$LINENO" 5
+  esac
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${BROWSER_SWITCH}" >&5
+$as_echo "${BROWSER_SWITCH}" >&6; }
+
+
+
+ if test x"$XSLTPROC" != x ; then
+  WITH_XSLTPROC_TRUE=
+  WITH_XSLTPROC_FALSE='#'
+else
+  WITH_XSLTPROC_TRUE='#'
+  WITH_XSLTPROC_FALSE=
+fi
 
 
@@ -7798,4 +10109,76 @@
   else
     JUNIT_AVAILABLE=false
+  fi
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for emma jar" >&5
+$as_echo_n "checking for emma jar... " >&6; }
+
+# Check whether --with-emma was given.
+if test "${with_emma+set}" = set; then :
+  withval=$with_emma;
+    case "${withval}" in
+      yes)
+        EMMA_JAR=yes
+        ;;
+      no)
+        EMMA_JAR=no
+        ;;
+      *)
+        if test -f "${withval}"; then
+          EMMA_JAR="${withval}"
+        elif test -z "${withval}"; then
+          EMMA_JAR=yes
+        else
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+          as_fn_error $? "\"The emma jar ${withval} was not found.\"" "$LINENO" 5
+        fi
+        ;;
+    esac
+
+else
+
+    EMMA_JAR=yes
+
+fi
+
+  it_extra_paths_emma="/usr/share/java/emma.jar"
+  if test "x${EMMA_JAR}" = "xyes"; then
+    for path in ${it_extra_paths_emma}; do
+      if test -f ${path}; then
+        EMMA_JAR=${path}
+        break
+      fi
+    done
+  fi
+  if test x"${EMMA_JAR}" = "xyes"; then
+    if test -f "/usr/share/java/emma.jar"; then
+      EMMA_JAR=/usr/share/java/emma.jar
+    fi
+  fi
+  if test x"${EMMA_JAR}" = "xyes"; then
+    EMMA_JAR=no
+  fi
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${EMMA_JAR}" >&5
+$as_echo "${EMMA_JAR}" >&6; }
+   if test x"${EMMA_JAR}" != "xno"; then
+  WITH_EMMA_TRUE=
+  WITH_EMMA_FALSE='#'
+else
+  WITH_EMMA_TRUE='#'
+  WITH_EMMA_FALSE=
+fi
+
+  # Clear EMMA_JAR if it doesn't contain a valid filename
+  if test x"${EMMA_JAR}" = "xno"; then
+    EMMA_JAR=
+  fi
+  if test -n "${EMMA_JAR}" ; then
+    EMMA_AVAILABLE=true
+  else
+    EMMA_AVAILABLE=false
   fi
 
@@ -8001,4 +10384,8 @@
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${WITH_XSLTPROC_TRUE}" && test -z "${WITH_XSLTPROC_FALSE}"; then
+  as_fn_error $? "conditional \"WITH_XSLTPROC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 if test -z "${WITH_RHINO_TRUE}" && test -z "${WITH_RHINO_FALSE}"; then
   as_fn_error $? "conditional \"WITH_RHINO\" was never defined.
@@ -8007,4 +10394,8 @@
 if test -z "${WITH_JUNIT_TRUE}" && test -z "${WITH_JUNIT_FALSE}"; then
   as_fn_error $? "conditional \"WITH_JUNIT\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${WITH_EMMA_TRUE}" && test -z "${WITH_EMMA_FALSE}"; then
+  as_fn_error $? "conditional \"WITH_EMMA\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
@@ -8418,5 +10809,5 @@
 # values after options handling.
 ac_log="
-This file was extended by icedtea-web $as_me 1.1.2, which was
+This file was extended by icedtea-web $as_me 1.3, which was
 generated by GNU Autoconf 2.68.  Invocation command line was
 
@@ -8476,5 +10867,5 @@
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-icedtea-web config.status 1.1.2
+icedtea-web config.status 1.3
 configured by $0, generated by GNU Autoconf 2.68,
   with options \\"\$ac_cs_config\\"
Index: /branches/vendor/sourceforge/icedtea-web/current/configure.ac
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/configure.ac	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/configure.ac	(revision 416)
@@ -1,3 +1,3 @@
-AC_INIT([icedtea-web],[1.1.2],[distro-pkg-dev@openjdk.java.net], [icedtea-web], [http://icedtea.classpath.org/wiki/IcedTea-Web])
+AC_INIT([icedtea-web],[1.3],[distro-pkg-dev@openjdk.java.net], [icedtea-web], [http://icedtea.classpath.org/wiki/IcedTea-Web])
 AM_INIT_AUTOMAKE([1.9 tar-pax foreign])
 AC_CONFIG_FILES([Makefile netx.manifest])
@@ -34,4 +34,6 @@
 FIND_ECJ_JAR
 IT_FIND_JAVADOC
+IT_FIND_KEYTOOL
+IT_FIND_JARSIGNER
 AC_CONFIG_FILES([javac], [chmod +x javac])
 
@@ -52,5 +54,4 @@
 dnl PR46074 (gcc) - Missing java.net cookie code required by IcedTea plugin
 dnl IT563 - NetX uses sun.security code
-dnl IT564 - NetX depends on sun.misc.BASE64Encoder
 dnl IT605 - NetX depends on sun.misc.HexDumpEncoder
 dnl IT570 - NetX depends on sun.applet.AppletViewPanel
@@ -69,9 +70,10 @@
 IT_CHECK_FOR_CLASS(SUN_SECURITY_UTIL_HOSTNAMECHECKER, [sun.security.util.HostnameChecker])
 IT_CHECK_FOR_CLASS(SUN_SECURITY_X509_X500NAME, [sun.security.x509.X500Name])
-IT_CHECK_FOR_CLASS(SUN_MISC_BASE64ENCODER, [sun.misc.BASE64Encoder])
 IT_CHECK_FOR_CLASS(SUN_MISC_HEXDUMPENCODER, [sun.misc.HexDumpEncoder])
 IT_CHECK_FOR_CLASS(SUN_SECURITY_VALIDATOR_VALIDATOREXCEPTION, [sun.security.validator.ValidatorException])
 IT_CHECK_FOR_CLASS(COM_SUN_NET_SSL_INTERNAL_SSL_X509EXTENDEDTRUSTMANAGER,
 	[com.sun.net.ssl.internal.ssl.X509ExtendedTrustManager])
+IT_CHECK_FOR_CLASS(SUN_NET_WWW_PROTOCOL_JAR_URLJARFILE, [sun.net.www.protocol.jar.URLJarFile])
+IT_CHECK_FOR_CLASS(SUN_NET_WWW_PROTOCOL_JAR_URLJARFILECALLBACK, [sun.net.www.protocol.jar.URLJarFileCallBack])
 IT_CHECK_FOR_CLASS(SUN_AWT_X11_XEMBEDDEDFRAME, [sun.awt.X11.XEmbeddedFrame])
 IT_CHECK_FOR_CLASS(SUN_MISC_REF, [sun.misc.Ref])
@@ -79,4 +81,6 @@
 IT_CHECK_FOR_CLASS(SUN_APPLET_APPLETIMAGEREF, [sun.applet.AppletImageRef])
 IT_CHECK_FOR_APPLETVIEWERPANEL_HOLE
+IT_CHECK_GLIB_VERSION
+IT_CHECK_XULRUNNER_API_VERSION
 
 #
@@ -84,8 +88,22 @@
 #
 
+AC_CHECK_PROGS([XSLTPROC],[xsltproc],[], [])
+# browser to be linked/tested
+# Example: IT_FIND_BROWSER([browser-name],[variable-to-store-path],[default-run-command-if-different-from-the-browser-name])
+IT_FIND_BROWSER([firefox],[FIREFOX])
+IT_FIND_BROWSER([chrome],[CHROME],[google-chrome])
+IT_FIND_BROWSER([chromium],[CHROMIUM],[chromium-browser])
+IT_FIND_BROWSER([opera],[OPERA])
+IT_FIND_BROWSER([midori],[MIDORI])
+IT_FIND_BROWSER([epiphany],[EPIPHANY])
+IT_SET_GLOBAL_BROWSERTESTS_BEHAVIOUR
+
+AM_CONDITIONAL([WITH_XSLTPROC], [test x"$XSLTPROC" != x ])
 IT_FIND_OPTIONAL_JAR([rhino], RHINO,
     [/usr/share/java/js.jar /usr/share/rhino-1.6/lib/js.jar])
 IT_FIND_OPTIONAL_JAR([junit], JUNIT,
     [/usr/share/java/junit4.jar /usr/share/junit-4/lib/junit.jar])
+IT_FIND_OPTIONAL_JAR([emma], EMMA,
+    [/usr/share/java/emma.jar])
 
 AC_CONFIG_FILES([jrunscript], [chmod u+x jrunscript])
Index: /branches/vendor/sourceforge/icedtea-web/current/extra/net/sourceforge/javaws/about/Main.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/extra/net/sourceforge/javaws/about/Main.java	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/extra/net/sourceforge/javaws/about/Main.java	(revision 416)
@@ -67,5 +67,5 @@
 		tabbedPane = new JTabbedPane();
 
-		tabbedPane.add("About NetX", aboutPanel);
+		tabbedPane.add("About IcedTea-Web and NetX", aboutPanel);
 		tabbedPane.add("Applications", appsPanel);
 		tabbedPane.add("Notes", notesPanel);
@@ -82,5 +82,5 @@
 		}
 		
-		JFrame frame = new JFrame("About NetX");
+		JFrame frame = new JFrame("About IcedTea-Web and NetX");
 		frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
 		Main demo = null;
Index: /branches/vendor/sourceforge/icedtea-web/current/extra/net/sourceforge/javaws/about/resources/about.html
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/extra/net/sourceforge/javaws/about/resources/about.html	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/extra/net/sourceforge/javaws/about/resources/about.html	(revision 416)
@@ -6,5 +6,5 @@
     </head>
     <body>
-        <b>NetX</b> is a high-quality JNLP client that executes
+        <h3>IcedTea-Web</h3> is a high-quality JNLP client, built on <b>NetX</b>, that executes
         network-based applications.  
         <br>NetX downloads code over the
Index: /branches/vendor/sourceforge/icedtea-web/current/extra/net/sourceforge/javaws/about/resources/notes.html
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/extra/net/sourceforge/javaws/about/resources/notes.html	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/extra/net/sourceforge/javaws/about/resources/notes.html	(revision 416)
@@ -24,4 +24,6 @@
 								<b>Lillian Angel</b> <br>
 								<b>Deepak Bhole</b> <br>
+								<b>Danesh Dadachanji</b> <br>
+								<b>Adam Domurad</b> <br>
 								<b>Thomas Fitzsimmons</b> <br>
 								<b>Andrew John Hughes</b> <br>
@@ -30,6 +32,9 @@
 								<b>Omair Majid</b> <br>
 								<b>Jon A. Maxwell</b> <br>
+								<b>Thomas Meyer</b> <br>
+								<b>Saad Mohammad</b> <br>
 								<b>Andrew Su</b> <br>
 								<b>Joshua Sumali</b> <br>
+								<b>Jiri Vanek</b> <br>
 								<b>Mark Wielaard</b> <br>
 								<b>Man Lung Wong</b> <br>
@@ -80,5 +85,9 @@
 	</tbody>
 </table>
-<b>Please visit the SourceForge site
+<b> Home page of IcedTea-Web:
+    <a href="http://icedtea.classpath.org/wiki/IcedTea-Web">
+		http://icedtea.classpath.org/wiki/IcedTea-Web
+	</a><br>
+    Please visit also the SourceForge site
 	<a href="http://jnlp.sourceforge.net/netx/index.html">
 		http://jnlp.sourceforge.net/netx/index.html
Index: /branches/vendor/sourceforge/icedtea-web/current/install-sh
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/install-sh	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/install-sh	(revision 416)
@@ -2,5 +2,5 @@
 # install - install a program, script, or datafile
 
-scriptversion=2009-04-28.21; # UTC
+scriptversion=2011-01-19.21; # UTC
 
 # This originates from X11R5 (mit/util/scripts/install.sh), which was
@@ -157,4 +157,8 @@
 
     -t) dst_arg=$2
+	# Protect names problematic for `test' and other utilities.
+	case $dst_arg in
+	  -* | [=\(\)!]) dst_arg=./$dst_arg;;
+	esac
 	shift;;
 
@@ -187,4 +191,8 @@
     shift # arg
     dst_arg=$arg
+    # Protect names problematic for `test' and other utilities.
+    case $dst_arg in
+      -* | [=\(\)!]) dst_arg=./$dst_arg;;
+    esac
   done
 fi
@@ -201,5 +209,9 @@
 
 if test -z "$dir_arg"; then
-  trap '(exit $?); exit' 1 2 13 15
+  do_exit='(exit $ret); exit $ret'
+  trap "ret=129; $do_exit" 1
+  trap "ret=130; $do_exit" 2
+  trap "ret=141; $do_exit" 13
+  trap "ret=143; $do_exit" 15
 
   # Set umask so as not to create temps with too-generous modes.
@@ -229,7 +241,7 @@
 for src
 do
-  # Protect names starting with `-'.
+  # Protect names problematic for `test' and other utilities.
   case $src in
-    -*) src=./$src;;
+    -* | [=\(\)!]) src=./$src;;
   esac
 
@@ -253,10 +265,5 @@
       exit 1
     fi
-
     dst=$dst_arg
-    # Protect names starting with `-'.
-    case $dst in
-      -*) dst=./$dst;;
-    esac
 
     # If destination is a directory, append the input filename; won't work
@@ -386,5 +393,5 @@
       case $dstdir in
 	/*) prefix='/';;
-	-*) prefix='./';;
+	[-=\(\)!]*) prefix='./';;
 	*)  prefix='';;
       esac
@@ -404,5 +411,5 @@
       for d
       do
-	test -z "$d" && continue
+	test X"$d" = X && continue
 
 	prefix=$prefix$d
Index: /branches/vendor/sourceforge/icedtea-web/current/jrunscript.in
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/jrunscript.in	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/jrunscript.in	(revision 416)
@@ -1,5 +1,5 @@
 #!/bin/bash
 
-if [ x"@RHINO_JAR@" == x ] ; then
+if [ x"@RHINO_JAR@" = x ] ; then
   echo "jrunscript requires rhino support"
   exit 1
Index: /branches/vendor/sourceforge/icedtea-web/current/launcher/javaws.in
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/launcher/javaws.in	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/launcher/javaws.in	(revision 416)
@@ -1,3 +1,3 @@
-#!/bin/sh
+#!/bin/bash
 
 JAVA=@JAVA@
@@ -9,14 +9,20 @@
 CP=@JRE@/lib/rt.jar
 
-JAVA_ARGS=
-ARGS=
+JAVA_ARGS=( )
+ARGS=( )
+COMMAND=()
+
+i=0
+j=0
 
 while [ "$#" -gt "0" ]; do
   case "$1" in
     -J*)
-      JAVA_ARGS="${JAVA_ARGS} ${1##-J}"
+      JAVA_ARGS[$i]="${1##-J}"
+      i=$((i+1))
       ;;
     *)
-      ARGS="${ARGS} $1"
+      ARGS[$j]="$1"
+      j=$((j+1))
       ;;
   esac
@@ -24,11 +30,35 @@
 done
 
-${JAVA} ${LAUNCHER_BOOTCLASSPATH} ${LAUNCHER_FLAGS} \
-  ${JAVA_ARGS} \
-  -classpath ${CP} \
-  -Dicedtea-web.bin.name=${PROGRAM_NAME} \
-  -Dicedtea-web.bin.location=${BINARY_LOCATION} \
-  ${CLASSNAME} \
-  ${ARGS}
+k=0
+COMMAND[k]="${JAVA}"
+k=$((k+1))
+COMMAND[k]="${LAUNCHER_BOOTCLASSPATH}"
+k=$((k+1))
+COMMAND[k]="${LAUNCHER_FLAGS}"
+k=$((k+1))
+i=0
+while [ "$i" -lt "${#JAVA_ARGS[@]}" ]; do
+  COMMAND[k]="${JAVA_ARGS[$i]}"
+  i=$((i+1))
+  k=$((k+1))
+done
+COMMAND[k]="-classpath"
+k=$((k+1))
+COMMAND[k]="${CP}"
+k=$((k+1))
+COMMAND[k]="-Dicedtea-web.bin.name=${PROGRAM_NAME}"
+k=$((k+1))
+COMMAND[k]="-Dicedtea-web.bin.location=${BINARY_LOCATION}"
+k=$((k+1))
+COMMAND[k]="${CLASSNAME}"
+k=$((k+1))
+j=0
+while [ "$j" -lt "${#ARGS[@]}" ]; do
+  COMMAND[k]="${ARGS[$j]}"
+  j=$((j+1))
+  k=$((k+1))
+done
+
+exec -a "javaws" "${COMMAND[@]}"
 
 exit $?
Index: /branches/vendor/sourceforge/icedtea-web/current/missing
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/missing	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/missing	(revision 416)
@@ -2,8 +2,8 @@
 # Common stub for a few missing GNU programs while installing.
 
-scriptversion=2009-04-28.21; # UTC
+scriptversion=2012-01-06.13; # UTC
 
 # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
-# 2008, 2009 Free Software Foundation, Inc.
+# 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
 # Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
 
@@ -85,5 +85,4 @@
   lex          create \`lex.yy.c', if possible, from existing .c
   makeinfo     touch the output file
-  tar          try tar, gnutar, gtar, then tar without non-portable flags
   yacc         create \`y.tab.[ch]', if possible, from existing .[ch]
 
@@ -121,13 +120,4 @@
   lex*|yacc*)
     # Not GNU programs, they don't have --version.
-    ;;
-
-  tar*)
-    if test -n "$run"; then
-       echo 1>&2 "ERROR: \`tar' requires --run"
-       exit 1
-    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
-       exit 1
-    fi
     ;;
 
@@ -227,5 +217,5 @@
     rm -f y.tab.c y.tab.h
     if test $# -ne 1; then
-        eval LASTARG="\${$#}"
+        eval LASTARG=\${$#}
 	case $LASTARG in
 	*.y)
@@ -257,5 +247,5 @@
     rm -f lex.yy.c
     if test $# -ne 1; then
-        eval LASTARG="\${$#}"
+        eval LASTARG=\${$#}
 	case $LASTARG in
 	*.l)
@@ -319,39 +309,4 @@
     ;;
 
-  tar*)
-    shift
-
-    # We have already tried tar in the generic part.
-    # Look for gnutar/gtar before invocation to avoid ugly error
-    # messages.
-    if (gnutar --version > /dev/null 2>&1); then
-       gnutar "$@" && exit 0
-    fi
-    if (gtar --version > /dev/null 2>&1); then
-       gtar "$@" && exit 0
-    fi
-    firstarg="$1"
-    if shift; then
-	case $firstarg in
-	*o*)
-	    firstarg=`echo "$firstarg" | sed s/o//`
-	    tar "$firstarg" "$@" && exit 0
-	    ;;
-	esac
-	case $firstarg in
-	*h*)
-	    firstarg=`echo "$firstarg" | sed s/h//`
-	    tar "$firstarg" "$@" && exit 0
-	    ;;
-	esac
-    fi
-
-    echo 1>&2 "\
-WARNING: I can't seem to be able to run \`tar' with the given arguments.
-         You may want to install GNU tar or Free paxutils, or check the
-         command line arguments."
-    exit 1
-    ;;
-
   *)
     echo 1>&2 "\
Index: /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/AbstractLaunchHandler.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/AbstractLaunchHandler.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/AbstractLaunchHandler.java	(revision 416)
@@ -0,0 +1,84 @@
+/* AbstractLaunchHandler.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; 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. */
+
+package net.sourceforge.jnlp;
+
+import java.io.PrintStream;
+
+import net.sourceforge.jnlp.runtime.JNLPRuntime;
+
+public abstract class AbstractLaunchHandler implements LaunchHandler {
+
+    protected final PrintStream outputStream;
+
+    public AbstractLaunchHandler(PrintStream outputStream) {
+        this.outputStream = outputStream;
+    }
+
+    /**
+     * Print a message
+     */
+    protected void printMessage(LaunchException ex) {
+        StringBuilder result = new StringBuilder();
+        result.append("netx: ");
+        result.append(ex.getCategory());
+        if (ex.getSummary() != null) {
+            result.append(": ");
+            result.append(ex.getSummary());
+        }
+        if (ex.getCause() != null) {
+            result.append(recursiveDescription(ex.getCause()));
+        }
+        outputStream.println(result);
+
+        if (JNLPRuntime.isDebug()) {
+            ex.printStackTrace(outputStream);
+        }
+    }
+
+    private String recursiveDescription(Throwable throwable) {
+        StringBuilder builder = new StringBuilder();
+        builder.append(" (");
+        builder.append(throwable.getMessage() == null ? "" : throwable.getMessage());
+        if (throwable.getCause() != null) {
+            builder.append(recursiveDescription(throwable.getCause()));
+        }
+        builder.append(")");
+        return builder.toString();
+    }
+
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/AppletDesc.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/AppletDesc.java	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/AppletDesc.java	(revision 416)
@@ -26,5 +26,5 @@
  * @version $Revision: 1.8 $
  */
-public class AppletDesc {
+public class AppletDesc implements LaunchDesc {
 
     /** the applet name */
@@ -74,6 +74,7 @@
 
     /**
-     * Returns the main class name
+     * Returns the main class name in the dot-separated form (eg: foo.bar.Baz)
      */
+    @Override
     public String getMainClass() {
         return mainClass;
Index: /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/ApplicationDesc.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/ApplicationDesc.java	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/ApplicationDesc.java	(revision 416)
@@ -25,5 +25,5 @@
  * @version $Revision: 1.7 $
  */
-public class ApplicationDesc {
+public class ApplicationDesc implements LaunchDesc {
 
     /** the main class name and package */
@@ -47,4 +47,5 @@
      * Returns the main class name
      */
+    @Override
     public String getMainClass() {
         return mainClass;
Index: /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/DefaultLaunchHandler.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/DefaultLaunchHandler.java	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/DefaultLaunchHandler.java	(revision 416)
@@ -17,4 +17,6 @@
 package net.sourceforge.jnlp;
 
+import java.io.PrintStream;
+
 import net.sourceforge.jnlp.runtime.*;
 
@@ -27,5 +29,9 @@
  * @version $Revision: 1.1 $
  */
-public class DefaultLaunchHandler implements LaunchHandler {
+public class DefaultLaunchHandler extends AbstractLaunchHandler {
+
+    public DefaultLaunchHandler(PrintStream out) {
+        super(out);
+    }
 
     /**
@@ -58,6 +64,6 @@
      * @return true to allow the application to continue, false to stop it.
      */
-    public boolean validationError(LaunchException security) {
-        printMessage(security);
+    public boolean validationError(LaunchException error) {
+        printMessage(error);
         return true;
     }
@@ -72,34 +78,4 @@
     public void launchCompleted(ApplicationInstance application) {
         //
-    }
-
-    /**
-     * Print a message to stdout.
-     */
-    protected static void printMessage(LaunchException ex) {
-        StringBuffer result = new StringBuffer();
-        result.append("netx: ");
-        result.append(ex.getCategory());
-        if (ex.getSummary() != null) {
-            result.append(": ");
-            result.append(ex.getSummary());
-        }
-
-        if (JNLPRuntime.isDebug()) {
-            if (ex.getCause() != null)
-                ex.getCause().printStackTrace();
-            else
-                ex.printStackTrace();
-        }
-
-        Throwable causes[] = ex.getCauses();
-
-        for (int i = 0; i < causes.length; i++) {
-            result.append(" (");
-            result.append(causes[i].getClass().getName());
-            result.append(" ");
-            result.append(causes[i].getMessage());
-            result.append(")");
-        }
     }
 
Index: /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/GuiLaunchHandler.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/GuiLaunchHandler.java	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/GuiLaunchHandler.java	(revision 416)
@@ -38,4 +38,6 @@
 package net.sourceforge.jnlp;
 
+import java.io.PrintStream;
+import java.lang.reflect.InvocationTargetException;
 import java.net.URL;
 
@@ -51,8 +53,13 @@
  * including splash screens and exception dialogs.
  */
-public class GuiLaunchHandler implements LaunchHandler {
+public class GuiLaunchHandler extends AbstractLaunchHandler {
 
     private JNLPSplashScreen splashScreen = null;
+    private final Object mutex = new Object();
     private UpdatePolicy policy = UpdatePolicy.ALWAYS;
+
+    public GuiLaunchHandler(PrintStream outputStream) {
+        super(outputStream);
+    }
 
     @Override
@@ -66,7 +73,20 @@
             @Override
             public void run() {
+                closeSplashScreen();
                 BasicExceptionDialog.show(exception);
             }
         });
+        printMessage(exception);
+    }
+
+    private void closeSplashScreen() {
+        synchronized(mutex) {
+            if (splashScreen != null) {
+                if (splashScreen.isSplashScreenValid()) {
+                    splashScreen.setVisible(false);
+                }
+                splashScreen.dispose();
+            }
+        }
     }
 
@@ -76,10 +96,5 @@
             @Override
             public void run() {
-                if (splashScreen != null) {
-                    if (splashScreen.isSplashScreenValid()) {
-                        splashScreen.setVisible(false);
-                    }
-                    splashScreen.dispose();
-                }
+                closeSplashScreen();
             }
         });
@@ -88,19 +103,41 @@
     @Override
     public void launchInitialized(final JNLPFile file) {
+        
+        int preferredWidth = 500;
+        int preferredHeight = 400;
+
+        final URL splashImageURL = file.getInformation().getIconLocation(
+                IconDesc.SPLASH, preferredWidth, preferredHeight);
+
+        if (splashImageURL != null) {
+            final ResourceTracker resourceTracker = new ResourceTracker(true);
+            resourceTracker.addResource(splashImageURL, file.getFileVersion(), null, policy);
+            synchronized(mutex) {
+                try {
+                    SwingUtilities.invokeAndWait(new Runnable() {
+                        @Override
+                        public void run() {
+                            splashScreen = new JNLPSplashScreen(resourceTracker, null, null);
+                        }
+                    });
+                } catch (InterruptedException ie) {
+                    // Wait till splash screen is created
+                    while (splashScreen == null);
+                } catch (InvocationTargetException ite) {
+                    ite.printStackTrace();
+                }
+
+                splashScreen.setSplashImageURL(splashImageURL);
+            }
+        }
+        
         SwingUtilities.invokeLater(new Runnable() {
             @Override
             public void run() {
-                final int preferredWidth = 500;
-                final int preferredHeight = 400;
-
-                URL splashImageURL = file.getInformation().getIconLocation(
-                        IconDesc.SPLASH, preferredWidth, preferredHeight);
                 if (splashImageURL != null) {
-                    ResourceTracker resourceTracker = new ResourceTracker(true);
-                    resourceTracker.addResource(splashImageURL, file.getFileVersion(), null, policy);
-                    splashScreen = new JNLPSplashScreen(resourceTracker, null, null);
-                    splashScreen.setSplashImageURL(splashImageURL);
-                    if (splashScreen.isSplashScreenValid()) {
-                        splashScreen.setVisible(true);
+                    synchronized(mutex) {
+                        if (splashScreen.isSplashScreenValid()) {
+                            splashScreen.setVisible(true);
+                        }
                     }
                 }
@@ -111,11 +148,12 @@
     @Override
     public boolean launchWarning(LaunchException warning) {
-        DefaultLaunchHandler.printMessage(warning);
+        printMessage(warning);
         return true;
     }
 
     @Override
-    public boolean validationError(LaunchException security) {
-        DefaultLaunchHandler.printMessage(security);
+    public boolean validationError(LaunchException error) {
+        closeSplashScreen();
+        printMessage(error);
         return true;
     }
Index: /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/InstallerDesc.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/InstallerDesc.java	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/InstallerDesc.java	(revision 416)
@@ -23,5 +23,5 @@
  * @version $Revision: 1.6 $
  */
-public class InstallerDesc {
+public class InstallerDesc implements LaunchDesc {
 
     /** the main class name and package. */
@@ -40,4 +40,5 @@
      * Returns the main class name and package.
      */
+    @Override
     public String getMainClass() {
         return mainClass;
Index: /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/JNLPCreator.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/JNLPCreator.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/JNLPCreator.java	(revision 416)
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2012 Red Hat, Inc.
+ * This file is part of IcedTea, http://icedtea.classpath.org
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code 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
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+package net.sourceforge.jnlp;
+
+import java.io.IOException;
+import java.net.URL;
+
+import net.sourceforge.jnlp.cache.UpdatePolicy;
+
+public class JNLPCreator {
+    public JNLPFile create(URL location, Version version, boolean strict,
+            UpdatePolicy policy, URL forceCodebase) throws IOException, ParseException {
+        return new JNLPFile(location, version, strict, policy, forceCodebase);
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/JNLPFile.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/JNLPFile.java	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/JNLPFile.java	(revision 416)
@@ -92,5 +92,5 @@
 
     /** the application description */
-    protected Object launchType;
+    protected LaunchDesc launchType;
 
     /** the component description */
@@ -100,12 +100,23 @@
     protected SecurityDesc security;
 
+    /** the default JVM locale */
+    protected Locale defaultLocale = null;
+
     /** the default OS */
-    protected Locale defaultLocale = null;
+    protected String defaultOS = null;
 
     /** the default arch */
-    protected String defaultOS = null;
-
-    /** the default jvm */
     protected String defaultArch = null;
+
+    /** A signed JNLP file is missing from the main jar */
+    private boolean missingSignedJNLP = false;
+
+    /** JNLP file contains special properties */
+    private boolean containsSpecialProperties = false;
+
+    /**
+     * List of acceptable properties (not-special)
+     */
+    private String[] generalProperties = SecurityDesc.getJnlpRIAPermissions();
 
     { // initialize defaults if security allows
@@ -119,4 +130,6 @@
     }
 
+    static enum Match { LANG_COUNTRY_VARIANT, LANG_COUNTRY, LANG, GENERALIZED }
+
     /**
      * Empty stub, allowing child classes to override the constructor
@@ -175,6 +188,22 @@
      */
     public JNLPFile(URL location, Version version, boolean strict, UpdatePolicy policy) throws IOException, ParseException {
+        this(location, version, strict, policy, null);
+    }
+
+    /**
+     * Create a JNLPFile from a URL and a version, checking for updates
+     * using the specified policy.
+     *
+     * @param location the location of the JNLP file
+     * @param version the version of the JNLP file
+     * @param strict whether to enforce the spec when
+     * @param policy the update policy
+     * @param forceCodebase codebase to use if not specified in JNLP file.
+     * @throws IOException if an IO exception occurred
+     * @throws ParseException if the JNLP file was invalid
+     */
+    protected JNLPFile(URL location, Version version, boolean strict, UpdatePolicy policy, URL forceCodebase) throws IOException, ParseException {
         Node root = Parser.getRootNode(openURL(location, version, policy));
-        parse(root, strict, location);
+        parse(root, strict, location, forceCodebase);
 
         //Downloads the original jnlp file into the cache if possible
@@ -182,5 +211,5 @@
         //originated from a website, then download the one from the website
         //into the cache).
-        if (sourceLocation != null && location.getProtocol() == "file") {
+        if (sourceLocation != null && "file".equals(location.getProtocol())) {
             openURL(sourceLocation, version, policy);
         }
@@ -223,5 +252,5 @@
      */
     public JNLPFile(InputStream input, boolean strict) throws ParseException {
-        parse(Parser.getRootNode(input), strict, null);
+        parse(Parser.getRootNode(input), strict, null, null);
     }
 
@@ -258,5 +287,5 @@
 
     /**
-     * Returns the JNLP file's title.  This method returns the same
+     * Returns the JNLP file's best localized title. This method returns the same
      * value as InformationDesc.getTitle().
      */
@@ -266,4 +295,12 @@
 
     /**
+     * Returns the JNLP file's best localized vendor. This method returns the same
+     * value as InformationDesc.getVendor().
+     */
+    public String getVendor() {
+        return getInformation().getVendor();
+    }
+
+    /**
      * Returns the JNLP file's network location as specified in the
      * JNLP file.
@@ -323,15 +360,50 @@
     public InformationDesc getInformation(final Locale locale) {
         return new InformationDesc(this, new Locale[] { locale }) {
+            @Override
             protected List<Object> getItems(Object key) {
                 List<Object> result = new ArrayList<Object>();
 
-                for (int i = 0; i < info.size(); i++) {
-                    InformationDesc infoDesc = info.get(i);
-
-                    if (localMatches(locale, infoDesc.getLocales()))
-                        result.addAll(infoDesc.getItems(key));
+                for (Match precision : Match.values()) {
+                    for (InformationDesc infoDesc : JNLPFile.this.info) {
+                        if (localeMatches(locale, infoDesc.getLocales(), precision)) {
+                            result.addAll(infoDesc.getItems(key));
+                        }
+                    }
+
+                    if (result.size() > 0) {
+                        return result;
+                    }
                 }
-
                 return result;
+            }
+
+            @Override
+            public String getTitle() {
+                for (Match precision : Match.values()) {
+                    for (InformationDesc infoDesc : JNLPFile.this.info) {
+                        String title = infoDesc.getTitle();
+                        if (localeMatches(locale, infoDesc.getLocales(), precision)
+                                && title != null && !"".equals(title)) {
+                            return title;
+                        }
+                    }
+                }
+
+                return null;
+            }
+
+            @Override
+            public String getVendor() {
+                for (Match precision : Match.values()) {
+                    for (InformationDesc infoDesc : JNLPFile.this.info) {
+                        String vendor = infoDesc.getVendor();
+                        if (localeMatches(locale, infoDesc.getLocales(), precision)
+                                && vendor != null && !"".equals(vendor)) {
+                            return vendor;
+                        }
+                    }
+                }
+
+                return null;
             }
         };
@@ -367,11 +439,15 @@
     public ResourcesDesc getResources(final Locale locale, final String os, final String arch) {
         return new ResourcesDesc(this, new Locale[] { locale }, new String[] { os }, new String[] { arch }) {
+
+            @Override
             public <T> List<T> getResources(Class<T> launchType) {
                 List<T> result = new ArrayList<T>();
 
-                for (int i = 0; i < resources.size(); i++) {
-                    ResourcesDesc rescDesc = resources.get(i);
-
-                    if (localMatches(locale, rescDesc.getLocales())
+                for (ResourcesDesc rescDesc : resources) {
+                    boolean hasUsableLocale = false;
+                    for (Match match : Match.values()) {
+                        hasUsableLocale |= localeMatches(locale, rescDesc.getLocales(), match);
+                    }
+                    if (hasUsableLocale
                             && stringMatches(os, rescDesc.getOS())
                             && stringMatches(arch, rescDesc.getArch()))
@@ -384,4 +460,5 @@
             }
 
+            @Override
             public void addResource(Object resource) {
                 // todo: honor the current locale, os, arch values
@@ -409,5 +486,9 @@
         List<ResourcesDesc> matchingResources = new ArrayList<ResourcesDesc>();
         for (ResourcesDesc rescDesc: resources) {
-            if (localMatches(locale, rescDesc.getLocales())
+            boolean hasUsableLocale = false;
+            for (Match match : Match.values()) {
+                hasUsableLocale |= localeMatches(locale, rescDesc.getLocales(), match);
+            }
+            if (hasUsableLocale
                     && stringMatches(os, rescDesc.getOS())
                     && stringMatches(arch, rescDesc.getArch())) {
@@ -422,5 +503,5 @@
      * ApplicationDesc and InstallerDesc
      */
-    public Object getLaunchInfo() {
+    public LaunchDesc getLaunchInfo() {
         return launchType;
     }
@@ -522,26 +603,46 @@
      * @param requested the local
      * @param available the available locales
+     * @param precision the depth with which to match locales. 1 checks only
+     * language, 2 checks language and country, 3 checks language, country and
+     * variant for matches. Passing 0 will always return true.
      * @return true if requested matches any of available, or if
      * available is empty or null.
      */
-    private boolean localMatches(Locale requested, Locale available[]) {
-        if (available == null || available.length == 0)
-            return true;
-
-        for (int i = 0; i < available.length; i++) {
-            String language = requested.getLanguage(); // "" but never null
-            String country = requested.getCountry();
-            String variant = requested.getVariant();
-
-            if (!"".equals(language) && !language.equalsIgnoreCase(available[i].getLanguage()))
-                continue;
-            if (!"".equals(country) && !country.equalsIgnoreCase(available[i].getCountry()))
-                continue;
-            if (!"".equals(variant) && !variant.equalsIgnoreCase(available[i].getVariant()))
-                continue;
-
-            return true;
-        }
-
+    public boolean localeMatches(Locale requested, Locale available[], Match matchLevel) {
+
+        if (matchLevel == Match.GENERALIZED)
+            return available == null || available.length == 0;
+
+        String language = requested.getLanguage(); // "" but never null
+        String country = requested.getCountry();
+        String variant = requested.getVariant();
+
+        for (Locale locale : available) {
+            switch (matchLevel) {
+                case LANG:
+                    if (!language.isEmpty()
+                            && language.equals(locale.getLanguage())
+                            && locale.getCountry().isEmpty()
+                            && locale.getVariant().isEmpty())
+                        return true;
+                    break;
+                case LANG_COUNTRY:
+                    if (!language.isEmpty()
+                            && language.equals(locale.getLanguage())
+                            && !country.isEmpty()
+                            && country.equals(locale.getCountry())
+                            && locale.getVariant().isEmpty())
+                        return true;
+                    break;
+                case LANG_COUNTRY_VARIANT:
+                    if (language.equals(locale.getLanguage())
+                            && country.equals(locale.getCountry())
+                            && variant.equals(locale.getVariant()))
+                        return true;
+                    break;
+                default:
+                    break;
+            }
+        }
         return false;
     }
@@ -575,10 +676,10 @@
      * @param location the file location or null
      */
-    private void parse(Node root, boolean strict, URL location) throws ParseException {
+    private void parse(Node root, boolean strict, URL location, URL forceCodebase) throws ParseException {
         try {
             //if (location != null)
             //  location = new URL(location, "."); // remove filename
 
-            Parser parser = new Parser(this, location, root, strict, true); // true == allow extensions
+            Parser parser = new Parser(this, location, root, strict, true, forceCodebase); // true == allow extensions
 
             // JNLP tag information
@@ -588,4 +689,5 @@
             sourceLocation = parser.getFileLocation() != null ? parser.getFileLocation() : location;
             info = parser.getInfo(root);
+            parser.checkForInformation();
             update = parser.getUpdate(root);
             resources = parser.getResources(root, false); // false == not a j2se/java resources section
@@ -593,4 +695,7 @@
             component = parser.getComponent(root);
             security = parser.getSecurity(root);
+
+            checkForSpecialProperties();
+
         } catch (ParseException ex) {
             throw ex;
@@ -600,4 +705,28 @@
 
             throw new RuntimeException(ex.toString());
+        }
+    }
+
+    /**
+     * Inspects the JNLP file to check if it contains any special properties
+     */
+    private void checkForSpecialProperties() {
+
+        for (ResourcesDesc res : resources) {
+            for (PropertyDesc propertyDesc : res.getProperties()) {
+
+                for (int i = 0; i < generalProperties.length; i++) {
+                    String property = propertyDesc.getKey();
+
+                    if (property.equals(generalProperties[i])) {
+                        break;
+                    } else if (!property.equals(generalProperties[i])
+                            && i == generalProperties.length - 1) {
+                        containsSpecialProperties = true;
+                        return;
+                    }
+                }
+
+            }
         }
     }
@@ -675,3 +804,19 @@
     }
 
+    /**
+     * Returns a boolean after determining if a signed JNLP warning should be
+     * displayed in the 'More Information' panel.
+     *
+     * @return true if a warning should be displayed; otherwise false
+     */
+    public boolean requiresSignedJNLPWarning() {
+        return (missingSignedJNLP && containsSpecialProperties);
+    }
+
+    /**
+     * Informs that a signed JNLP file is missing in the main jar
+     */
+    public void setSignedJNLPAsMissing() {
+        missingSignedJNLP = true;
+    }
 }
Index: /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/JNLPMatcher.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/JNLPMatcher.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/JNLPMatcher.java	(revision 416)
@@ -0,0 +1,282 @@
+/* JNLPMatcher.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.
+ */
+
+package net.sourceforge.jnlp;
+
+import java.util.List;
+import java.io.ByteArrayOutputStream;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.OutputStream;
+import java.io.Reader;
+import java.io.StringReader;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.LinkedList;
+import net.sourceforge.nanoxml.XMLElement;
+
+/**
+ * To compare launching JNLP file with signed APPLICATION.JNLP or
+ * APPLICATION_TEMPLATE.jnlp.
+ * 
+ * Used by net.sourceforge.jnlp.runtime.JNLPCLassLoader
+ */
+
+public final class JNLPMatcher {
+
+    private final Node appTemplateNode;
+    private final Node launchJNLPNode;
+    private final boolean isTemplate;
+    
+    /**
+     * Public constructor
+     * 
+     * @param appTemplate
+     *            the reader stream of the signed APPLICATION.jnlp or
+     *            APPLICATION_TEMPLATE.jnlp
+     * @param launchJNLP
+     *            the reader stream of the launching JNLP file
+     * @param isTemplate
+     *            a boolean that specifies if appTemplateFile is a template
+     * @throws JNLPMatcherException
+     *             if IOException, XMLParseException is thrown during parsing;
+     *             Or launchJNLP/appTemplate is null
+     */
+    public JNLPMatcher(Reader appTemplate, Reader launchJNLP,
+            boolean isTemplate) throws JNLPMatcherException {
+
+        if (appTemplate == null && launchJNLP == null)
+            throw new JNLPMatcherException(
+                    "Template JNLP file and Launching JNLP file are both null.");
+        else if (appTemplate == null)
+            throw new JNLPMatcherException("Template JNLP file is null.");
+        else if (launchJNLP == null)
+            throw new JNLPMatcherException("Launching JNLP file is null.");
+        
+        //Declare variables for signed JNLP file
+        ByteArrayOutputStream poutTemplate= null;
+      
+        //Declare variables for launching JNLP file 
+        ByteArrayOutputStream poutJNLPFile = null;
+        
+        try {
+            XMLElement appTemplateXML = new XMLElement();
+            XMLElement launchJNLPXML = new XMLElement();
+
+            // Remove the comments and CDATA from the JNLP file
+            poutTemplate = new ByteArrayOutputStream();
+            appTemplateXML.sanitizeInput(appTemplate, poutTemplate);
+
+            poutJNLPFile = new ByteArrayOutputStream();
+            launchJNLPXML.sanitizeInput(launchJNLP, poutJNLPFile);
+
+            // Parse both files
+            appTemplateXML.parseFromReader(new StringReader(poutTemplate.toString()));
+            launchJNLPXML.parseFromReader(new StringReader(poutJNLPFile.toString()));
+
+            // Initialize parent nodes
+            this.appTemplateNode = new Node(appTemplateXML);
+            this.launchJNLPNode = new Node(launchJNLPXML);
+            this.isTemplate = isTemplate;
+
+        } catch (Exception e) {
+            throw new JNLPMatcherException(
+                    "Failed to create an instance of JNLPVerify with specified InputStreamReader",
+                    e);
+        } finally {
+            // Close all stream
+            closeOutputStream(poutTemplate);
+            
+            closeOutputStream(poutJNLPFile);
+
+        }
+    }
+
+    /**
+     * Compares both JNLP files
+     * 
+     * @return true if both JNLP files are 'matched', otherwise false
+     */
+    public boolean isMatch() {
+    
+        return matchNodes(appTemplateNode, launchJNLPNode);
+    
+    }
+
+    /**
+     * Compares two Nodes regardless of the order of their children/attributes
+     * 
+     * @param appTemplate
+     *            signed application or template's Node
+     * @param launchJNLP
+     *            launching JNLP file's Node
+     * 
+     * @return true if both Nodes are 'matched', otherwise false
+     */
+    private boolean matchNodes(Node appTemplate, Node launchJNLP) {
+
+        if (appTemplate != null && launchJNLP != null) {
+
+            Node templateNode = appTemplate;
+            Node launchNode = launchJNLP;
+            // Store children of Node
+            List<Node> appTemplateChild = new LinkedList<Node>(Arrays.asList(templateNode
+                    .getChildNodes()));
+            List<Node> launchJNLPChild = new LinkedList<Node>(Arrays.asList(launchNode
+                    .getChildNodes()));
+
+            // Compare only if both Nodes have the same name, else return false
+            if (templateNode.getNodeName().equals(launchNode.getNodeName())) {
+
+                if (appTemplateChild.size() == launchJNLPChild.size()) { // Compare
+                                                                         // children
+
+                    int childLength = appTemplateChild.size();
+
+                    for (int i = 0; i < childLength;) {
+                        for (int j = 0; j < childLength; j++) {
+                            boolean isSame = matchNodes(appTemplateChild.get(i),
+                                    launchJNLPChild.get(j));
+
+                            if (!isSame && j == childLength - 1)
+                                return false;
+                            else if (isSame) { // If both child matches, remove them from the list of children
+                                appTemplateChild.remove(i);
+                                launchJNLPChild.remove(j);
+                                --childLength;
+                                break;
+                            }
+                        }
+                    }
+
+                    if (!templateNode.getNodeValue().equals(launchNode.getNodeValue())) {
+
+                        // If it's a template and the template's value is NOT '*'
+                        if (isTemplate && !templateNode.getNodeValue().equals("*"))
+                            return false;
+                        // Else if it's not a template, then return false
+                        else if (!isTemplate)
+                            return false;
+                    }
+                    // Compare attributes of both Nodes
+                    return matchAttributes(templateNode, launchNode);
+                }
+
+            }
+        }
+        return false;
+    }
+
+    /**
+     * Compares attributes of two Nodes regardless of order
+     * 
+     * @param appTemplateNode
+     *            signed application or template's Node with attributes
+     * @param launchJNLPNode
+     *            launching JNLP file's Node with attributes
+     * 
+     * @return true if both Nodes have 'matched' attributes, otherwise false
+     */
+    private boolean matchAttributes(Node templateNode, Node launchNode) {
+
+        if (templateNode != null && launchNode != null) {
+
+            List<String> appTemplateAttributes = templateNode.getAttributeNames();
+            List<String> launchJNLPAttributes = launchNode.getAttributeNames();
+
+            Collections.sort(appTemplateAttributes);
+            Collections.sort(launchJNLPAttributes);
+
+            if (appTemplateAttributes.size() == launchJNLPAttributes.size()) {
+
+                int size = appTemplateAttributes.size(); // Number of attributes
+
+                for (int i = 0; i < size; i++) {
+
+                    if (launchJNLPAttributes.get(i).equals(appTemplateAttributes.get(i))) { // If both Node's attribute name are the
+                                                                                            // same then compare the values
+
+                        String attribute = launchJNLPAttributes.get(i);
+                        boolean isSame = templateNode.getAttribute(attribute).equals( // Check if the Attribute values match
+                                launchNode.getAttribute(attribute));
+
+                        if (!isTemplate && !isSame)
+                            return false;
+                        else if (isTemplate && !isSame
+                                && !templateNode.getAttribute(attribute).equals("*"))
+                            return false;
+
+                    } else
+                        // If attributes names do not match, return false
+                        return false;
+                }
+                return true;
+            }
+        }
+        return false;
+    }
+    
+    /***
+     * Closes an input stream
+     * 
+     * @param stream
+     *            The input stream that will be closed
+     */
+    private void closeInputStream(InputStream stream) {
+        if (stream != null)
+            try {
+                stream.close();
+            } catch (Exception e) {
+                e.printStackTrace(System.err);
+            }
+    }
+
+    /***
+     * Closes an output stream
+     * 
+     * @param stream
+     *            The output stream that will be closed
+     */
+    private void closeOutputStream(OutputStream stream) {
+        if (stream != null)
+            try {
+                stream.close();
+            } catch (Exception e) {
+                e.printStackTrace(System.err);
+            }
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/JNLPMatcherException.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/JNLPMatcherException.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/JNLPMatcherException.java	(revision 416)
@@ -0,0 +1,16 @@
+package net.sourceforge.jnlp;
+
+public class JNLPMatcherException extends Exception
+{
+    private static final long serialVersionUID = 1L;
+
+    public JNLPMatcherException(String message)
+    {
+        super(message);
+    }
+    
+    public JNLPMatcherException(String message, Throwable cause)
+    {
+        super(message, cause);
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/JNLPSplashScreen.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/JNLPSplashScreen.java	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/JNLPSplashScreen.java	(revision 416)
@@ -11,10 +11,11 @@
 
 import javax.imageio.ImageIO;
-import javax.swing.JFrame;
+import javax.swing.JDialog;
 
 import net.sourceforge.jnlp.cache.ResourceTracker;
 import net.sourceforge.jnlp.runtime.JNLPRuntime;
+import net.sourceforge.jnlp.util.ImageResources;
 
-public class JNLPSplashScreen extends JFrame {
+public class JNLPSplashScreen extends JDialog {
 
     String applicationTitle;
@@ -28,4 +29,6 @@
     public JNLPSplashScreen(ResourceTracker resourceTracker,
             String applicationTitle, String applicationVendor) {
+
+        setIconImages(ImageResources.INSTANCE.getApplicationImages());
 
         // If the JNLP file does not contain any icon images, the splash image
Index: /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/LaunchDesc.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/LaunchDesc.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/LaunchDesc.java	(revision 416)
@@ -0,0 +1,42 @@
+/* LaunchDesc -- Represents a launch description
+   Copyright (C) 2012 Red Hat
+
+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. */
+
+package net.sourceforge.jnlp;
+
+public interface LaunchDesc {
+    public String getMainClass();
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/LaunchException.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/LaunchException.java	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/LaunchException.java	(revision 416)
@@ -17,9 +17,4 @@
 package net.sourceforge.jnlp;
 
-import java.io.*;
-import java.util.*;
-
-import net.sourceforge.jnlp.util.*;
-
 /**
  * Thrown when a JNLP application, applet, or installer could not
@@ -31,6 +26,5 @@
 public class LaunchException extends Exception {
 
-    /** the original exception */
-    private Throwable cause = null;
+    private static final long serialVersionUID = 7283827853612357423L;
 
     /** the file being launched */
@@ -53,5 +47,6 @@
      */
     public LaunchException(JNLPFile file, Exception cause, String severity, String category, String summary, String description) {
-        super(severity + ": " + category + ": " + summary);
+        super(severity + ": " + category + ": " + summary + " "
+        	    + (description == null ? "" : description), cause);
 
         this.file = file;
@@ -60,7 +55,4 @@
         this.description = description;
         this.severity = severity;
-
-        // replace with setCause when no longer 1.3 compatible
-        this.cause = cause;
     }
 
@@ -69,8 +61,5 @@
      */
     public LaunchException(Throwable cause) {
-        this(cause.getMessage());
-
-        // replace with setCause when no longer 1.3 compatible
-        this.cause = cause;
+        super(cause);
     }
 
@@ -79,8 +68,5 @@
      */
     public LaunchException(String message, Throwable cause) {
-        this(message + ": " + cause.getMessage());
-
-        // replace with setCause when no longer 1.3 compatible
-        this.cause = cause;
+        super(message, cause);
     }
 
@@ -132,56 +118,3 @@
     }
 
-    /**
-     * Return the cause of the launch exception or null if there
-     * is no cause exception.
-     */
-    public Throwable getCause() {
-        return cause;
-    }
-
-    /**
-     * Returns the causes for this exception.  This method is
-     * useful on JRE 1.3 since getCause is not a standard method,
-     * and will be removed once netx no longer supports 1.3.
-     */
-    public Throwable[] getCauses() {
-        ArrayList<Throwable> result = new ArrayList<Throwable>();
-
-        Reflect r = new Reflect();
-        Throwable cause = this.cause;
-
-        while (cause != null) {
-            result.add(cause);
-            cause = (Throwable) r.invoke(cause, "getCause");
-        }
-
-        return result.toArray(new Throwable[0]);
-    }
-
-    /**
-     * Print the stack trace and the cause exception (1.3
-     * compatible)
-     */
-    public void printStackTrace(PrintStream stream) {
-        super.printStackTrace(stream);
-
-        if (cause != null) {
-            stream.println("Caused by: ");
-            cause.printStackTrace(stream);
-        }
-    }
-
-    /**
-     * Print the stack trace and the cause exception (1.3
-     * compatible)
-     */
-    public void printStackTrace(PrintWriter stream) {
-        super.printStackTrace(stream);
-
-        if (cause != null) {
-            stream.println("Caused by: ");
-            cause.printStackTrace(stream);
-        }
-    }
-
 }
Index: /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/LaunchHandler.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/LaunchHandler.java	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/LaunchHandler.java	(revision 416)
@@ -51,5 +51,5 @@
      * @return true to allow the application to continue, false to stop it.
      */
-    public boolean validationError(LaunchException security);
+    public boolean validationError(LaunchException error);
 
     // this method will probably be replaced when real security
Index: /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/Launcher.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/Launcher.java	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/Launcher.java	(revision 416)
@@ -26,4 +26,5 @@
 import java.net.URL;
 import java.net.UnknownHostException;
+import java.util.Arrays;
 import java.util.LinkedList;
 import java.util.List;
@@ -33,5 +34,4 @@
 import net.sourceforge.jnlp.cache.CacheUtil;
 import net.sourceforge.jnlp.cache.UpdatePolicy;
-import net.sourceforge.jnlp.runtime.AppThreadGroup;
 import net.sourceforge.jnlp.runtime.AppletInstance;
 import net.sourceforge.jnlp.runtime.ApplicationInstance;
@@ -588,4 +588,8 @@
 
             main.setAccessible(true);
+
+            if (JNLPRuntime.isDebug()) {
+                System.out.println("Invoking main() with args: " + Arrays.toString(args));
+            }
             main.invoke(null, new Object[] { args });
 
@@ -703,23 +707,26 @@
             }
 
-            AppThreadGroup group = (AppThreadGroup) Thread.currentThread().getThreadGroup();
-
+            ThreadGroup group = Thread.currentThread().getThreadGroup();
+
+            // appletInstance is needed by ServiceManager when looking up 
+            // services. This could potentially be done in applet constructor
+            // so initialize appletInstance before creating applet.
+            AppletInstance appletInstance;
+            if (cont == null)
+                appletInstance = new AppletInstance(file, group, loader, null);
+            else
+                appletInstance = new AppletInstance(file, group, loader, null, cont);
+
+            loader.setApplication(appletInstance);
+
+            // Initialize applet now that ServiceManager has access to its
+            // appletInstance.
             String appletName = file.getApplet().getMainClass();
-
-            //Classloader chokes if there's '/' in the path to the main class.
-            //Must replace with '.' instead.
-            appletName = appletName.replace('/', '.');
             Class appletClass = loader.loadClass(appletName);
             Applet applet = (Applet) appletClass.newInstance();
-
-            AppletInstance appletInstance;
-            if (cont == null)
-                appletInstance = new AppletInstance(file, group, loader, applet);
-            else
-                appletInstance = new AppletInstance(file, group, loader, applet, cont);
-
-            group.setApplication(appletInstance);
-            loader.setApplication(appletInstance);
-
+            // Finish setting up appletInstance.
+            appletInstance.setApplet(applet);
+            appletInstance.getAppletEnvironment().setApplet(applet);
+            
             setContextClassLoaderForAllThreads(appletInstance.getThreadGroup(), appletInstance.getClassLoader());
 
@@ -747,8 +754,4 @@
 
             String appletName = file.getApplet().getMainClass();
-
-            //Classloader chokes if there's '/' in the path to the main class.
-            //Must replace with '.' instead.
-            appletName = appletName.replace('/', '.');
             Class appletClass = loader.loadClass(appletName);
             Applet applet = (Applet) appletClass.newInstance();
@@ -766,8 +769,7 @@
         try {
             JNLPClassLoader loader = JNLPClassLoader.getInstance(file, updatePolicy);
-            AppThreadGroup group = (AppThreadGroup) Thread.currentThread().getThreadGroup();
+            ThreadGroup group = Thread.currentThread().getThreadGroup();
 
             ApplicationInstance app = new ApplicationInstance(file, group, loader);
-            group.setApplication(app);
             loader.setApplication(app);
 
@@ -785,14 +787,14 @@
      * ThreadGroup has to be created at an earlier point in the applet code.
      */
-    protected AppThreadGroup createThreadGroup(JNLPFile file) {
-        AppThreadGroup appThreadGroup = null;
+    protected ThreadGroup createThreadGroup(JNLPFile file) {
+        ThreadGroup tg = null;
 
         if (file instanceof PluginBridge) {
-            appThreadGroup = (AppThreadGroup) Thread.currentThread().getThreadGroup();
+            tg = Thread.currentThread().getThreadGroup();
         } else {
-            appThreadGroup = new AppThreadGroup(mainGroup, file.getTitle());
-        }
-
-        return appThreadGroup;
+            tg = new ThreadGroup(mainGroup, file.getTitle());
+        }
+
+        return tg;
     }
 
Index: /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/MissingInformationException.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/MissingInformationException.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/MissingInformationException.java	(revision 416)
@@ -0,0 +1,44 @@
+// Copyright (C) 2012 Red Hat, Inc.
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+
+
+package net.sourceforge.jnlp;
+
+import static net.sourceforge.jnlp.runtime.Translator.R;
+
+/**
+ * Thrown when the required information tag is not found
+ * under the current JVM's locale or as a generalized element.
+ */
+public class MissingInformationException extends RequiredElementException {
+
+    private static final long serialVersionUID = 1L;
+    private static final String message = R("PNoInfoElement");
+
+    /* (non-Javadoc)
+     * @see net.sourceforge.jnlp.ParseException(String)
+     */
+    public MissingInformationException() {
+        super(message);
+    }
+
+    /* (non-Javadoc)
+     * @see net.sourceforge.jnlp.ParseException(String, Throwable)
+     */
+    public MissingInformationException(Throwable cause) {
+        super(message, cause);
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/MissingTitleException.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/MissingTitleException.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/MissingTitleException.java	(revision 416)
@@ -0,0 +1,45 @@
+// Copyright (C) 2012 Red Hat, Inc.
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+
+
+package net.sourceforge.jnlp;
+
+import static net.sourceforge.jnlp.runtime.Translator.R;
+
+/**
+ * Thrown when a title that is required from the information tag is not found
+ * under the current JVM's locale or as a generalized element.
+ */
+public class MissingTitleException extends RequiredElementException {
+
+    private static final long serialVersionUID = 1L;
+
+    private static final String message = R("PMissingElement", R("PMissingTitle"));
+
+    /* (non-Javadoc)
+     * @see net.sourceforge.jnlp.ParseException(String)
+     */
+    public MissingTitleException() {
+        super(message);
+    }
+
+    /* (non-Javadoc)
+     * @see net.sourceforge.jnlp.ParseException(String, Throwable)
+     */
+    public MissingTitleException(Throwable cause) {
+        super(message, cause);
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/MissingVendorException.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/MissingVendorException.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/MissingVendorException.java	(revision 416)
@@ -0,0 +1,44 @@
+// Copyright (C) 2012 Red Hat, Inc.
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+
+
+package net.sourceforge.jnlp;
+
+import static net.sourceforge.jnlp.runtime.Translator.R;
+
+/**
+ * Thrown when a vendor that is required from the information tag is not found
+ * under the current JVM's locale or as a generalized element.
+ */
+public class MissingVendorException extends RequiredElementException {
+
+    private static final long serialVersionUID = 1L;
+    private static final String message = R("PMissingElement", R("PMissingVendor"));
+
+    /* (non-Javadoc)
+     * @see net.sourceforge.jnlp.ParseException(String)
+     */
+    public MissingVendorException() {
+        super(message);
+    }
+
+    /* (non-Javadoc)
+     * @see net.sourceforge.jnlp.ParseException(String, Throwable)
+     */
+    public MissingVendorException(Throwable cause) {
+        super(message, cause);
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/NetxPanel.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/NetxPanel.java	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/NetxPanel.java	(revision 416)
@@ -24,10 +24,13 @@
 
 import net.sourceforge.jnlp.AppletLog;
-import net.sourceforge.jnlp.runtime.AppThreadGroup;
 import net.sourceforge.jnlp.runtime.AppletInstance;
 import net.sourceforge.jnlp.runtime.JNLPRuntime;
 
 import java.net.URL;
+import java.util.HashMap;
 import java.util.Hashtable;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
 
 import sun.applet.AppletViewerPanel;
@@ -45,7 +48,61 @@
     private AppletInstance appInst = null;
     private boolean appletAlive;
+    private final String uKey;
+
+    // We use this so that we can create exactly one thread group
+    // for all panels with the same uKey.
+    private static final Map<String, ThreadGroup> uKeyToTG =
+        new HashMap<String, ThreadGroup>();
+    private static final Object TGMapMutex = new Object();
+
+    // This map is actually a set (unfortunately there is no ConcurrentSet
+    // in java.util.concurrent). If KEY is in this map, then we know that
+    // an app context has been created for the panel that has uKey.equals(KEY),
+    // so we avoid creating it a second time for panels with the same uKey.
+    // Because it's a set, only the keys matter. However, we can't insert
+    // null values in because if we did, we couldn't use null checks to see
+    // if a key was absent before a putIfAbsent. 
+    private static final ConcurrentMap<String, Boolean> appContextCreated =
+        new ConcurrentHashMap<String, Boolean>();
 
     public NetxPanel(URL documentURL, Hashtable<String, String> atts) {
         super(documentURL, atts);
+
+        /* According to http://download.oracle.com/javase/6/docs/technotes/guides/deployment/deployment-guide/applet-compatibility.html, 
+         * classloaders are shared iff these properties match:
+         * codebase, cache_archive, java_archive, archive
+         * 
+         * To achieve this, we create the uniquekey based on those 4 values,
+         * always in the same order. The initial "<NAME>=" parts ensure a 
+         * bad tag cannot trick the loader into getting shared with another.
+         */
+
+        // Firefox sometimes skips the codebase if it is default  -- ".", 
+        // so set it that way if absent
+        String codebaseAttr =      atts.get("codebase") != null ?
+                                   atts.get("codebase") : ".";
+
+        String cache_archiveAttr = atts.get("cache_archive") != null ? 
+                                   atts.get("cache_archive") : "";
+
+        String java_archiveAttr =  atts.get("java_archive") != null ? 
+                                   atts.get("java_archive") : "";
+
+        String archiveAttr =       atts.get("archive") != null ? 
+                                   atts.get("archive") : "";
+
+        this.uKey = "codebase=" + codebaseAttr +
+                    "cache_archive=" + cache_archiveAttr + 
+                    "java_archive=" + java_archiveAttr + 
+                    "archive=" +  archiveAttr;
+
+        // when this was being done (incorrectly) in Launcher, the call was
+        // new AppThreadGroup(mainGroup, file.getTitle());
+        synchronized(TGMapMutex) {
+            if (!uKeyToTG.containsKey(this.uKey)) {
+                ThreadGroup tg = new ThreadGroup(Launcher.mainGroup, this.documentURL.toString());
+                uKeyToTG.put(this.uKey, tg);
+            }
+        }
     }
 
@@ -56,16 +113,4 @@
         this.exitOnFailure = exitOnFailure;
         this.appletAlive = true;
-    }
-
-    @Override
-    public void run() {
-        /*
-         * create an AppContext for this thread associated with this particular
-         * plugin instance (which runs in a different thread group from the rest
-         * of the plugin).
-         */
-        SunToolkit.createNewAppContext();
-
-        super.run();
     }
 
@@ -79,5 +124,5 @@
         super.showAppletException(t);
     }
-    
+
     //Overriding to use Netx classloader. You might need to relax visibility
     //in sun.applet.AppletPanel for runLoader().
@@ -91,5 +136,5 @@
                                 getWidth(),
                                 getHeight(),
-                                atts);
+                                atts, uKey);
 
             doInit = true;
@@ -155,9 +200,5 @@
         }
 
-        // when this was being done (incorrectly) in Launcher, the call was
-        // new AppThreadGroup(mainGroup, file.getTitle());
-        ThreadGroup tg = new AppThreadGroup(Launcher.mainGroup,
-                this.documentURL.toString());
-        handler = new Thread(tg, this);
+        handler = new Thread(getThreadGroup(), this);
         handler.start();
     }
@@ -175,3 +216,20 @@
         return handler != null && handler.isAlive() && this.appletAlive;
     }
+
+    public ThreadGroup getThreadGroup() {
+        synchronized(TGMapMutex) {
+            return uKeyToTG.get(uKey);
+        }
+    }
+
+    public void createNewAppContext() {
+        if (Thread.currentThread().getThreadGroup() != getThreadGroup()) {
+            throw new RuntimeException("createNewAppContext called from the wrong thread.");
+        }
+        // only create a new context if one hasn't already been created for the
+        // applets with this unique key.
+        if (null == appContextCreated.putIfAbsent(uKey, Boolean.TRUE)) {
+            SunToolkit.createNewAppContext();
+        }
+    }
 }
Index: /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/Node.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/Node.java	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/Node.java	(revision 416)
@@ -20,4 +20,5 @@
     private Node next;
     private Node children[];
+    private List <String> attributeNames= null;
 
     Node(XMLElement xml) {
@@ -61,4 +62,19 @@
         return children;
     }
+    
+    /**
+     * To retrieve all attribute names
+     * @return all attribute names of the Node in ArrayList<String> 
+     */
+    List<String> getAttributeNames() {
+        if (attributeNames == null) {
+            attributeNames= new ArrayList<String>();
+
+            for (Enumeration e = xml.enumerateAttributeNames(); e.hasMoreElements();)
+                attributeNames.add(new String((String) e.nextElement()));
+        }
+
+        return attributeNames;
+    }
 
     String getAttribute(String name) {
@@ -87,4 +103,5 @@
     private Node next;
     private Node children[];
+    private String attributeNames[];
 
     Node(ParsedXML tinyNode) {
@@ -128,5 +145,5 @@
         return children;
     }
-
+    
     String getAttribute(String name) {
         return tinyNode.getAttribute(name);
Index: /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/Parser.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/Parser.java	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/Parser.java	(revision 416)
@@ -1,4 +1,4 @@
 // Copyright (C) 2001-2003 Jon A. Maxwell (JAM)
-// Copyright (C) 2009 Red Hat, Inc.
+// Copyright (C) 2012 Red Hat, Inc.
 //
 // This library is free software; you can redistribute it and/or
@@ -29,4 +29,5 @@
 import net.sourceforge.jnlp.UpdateDesc.Check;
 import net.sourceforge.jnlp.UpdateDesc.Policy;
+import net.sourceforge.jnlp.runtime.JNLPRuntime;
 import net.sourceforge.nanoxml.*;
 
@@ -111,4 +112,25 @@
      */
     public Parser(JNLPFile file, URL base, Node root, boolean strict, boolean allowExtensions) throws ParseException {
+	this(file, base, root, strict, allowExtensions, null);
+    }
+
+    /**
+     * Create a parser for the JNLP file.  If the location
+     * parameters is not null it is used as the default codebase
+     * (does not override value of jnlp element's href
+     * attribute).<p>
+     *
+     * The root node may be normalized as a side effect of this
+     * constructor.
+     *
+     * @param file the (uninitialized) file reference
+     * @param base if codebase is not specified, a default base for relative URLs
+     * @param root the root node
+     * @param strict whether to enforce strict compliance with the JNLP spec
+     * @param allowExtensions whether to allow extensions to the JNLP spec
+     * @param codebase codebase to use if we did not parse one from JNLP file.
+     * @throws ParseException if the JNLP file is invalid
+     */
+    public Parser(JNLPFile file, URL base, Node root, boolean strict, boolean allowExtensions, URL codebase) throws ParseException {
         this.file = file;
         this.root = root;
@@ -123,5 +145,7 @@
         this.spec = getVersion(root, "spec", "1.0+");
         this.codebase = addSlash(getURL(root, "codebase", base));
-        this.base = (codebase != null) ? codebase : base; // if codebase not specified use default codebase
+        if (this.codebase == null) // We only override it if it is not specified.
+            this.codebase = codebase;
+        this.base = (this.codebase != null) ? this.codebase : base; // if codebase not specified use default codebase
         fileLocation = getURL(root, "href", this.base);
 
@@ -403,4 +427,33 @@
 
     /**
+     * Make sure a title and vendor are present and nonempty and localized as
+     * best matching as possible for the JVM's current locale. Fallback to a
+     * generalized title and vendor otherwise. If none is found, throw an exception.
+     *
+     * Additionally prints homepage, description, title and vendor to stdout
+     * if in Debug mode.
+     * @throws RequiredElementException
+     */
+    void checkForInformation() throws RequiredElementException {
+        if (JNLPRuntime.isDebug()) {
+            System.out.println("Homepage: " + file.getInformation().getHomepage());
+            System.out.println("Description: " + file.getInformation().getDescription());
+        }
+
+        String title = file.getTitle();
+        String vendor = file.getVendor();
+
+        if (title == null || title.trim().isEmpty())
+            throw new MissingTitleException();
+        else if (JNLPRuntime.isDebug())
+            System.out.println("Acceptable title tag found, contains: " + title);
+
+        if (vendor == null || vendor.trim().isEmpty())
+            throw new MissingVendorException();
+        else if (JNLPRuntime.isDebug())
+            System.out.println("Acceptable vendor tag found, contains: " + vendor);
+    }
+
+    /**
      * Returns all of the information elements under the specified
      * node.
@@ -416,9 +469,10 @@
         // ensure that there are at least one information section present
         if (info.length == 0)
-            throw new ParseException(R("PNoInfoElement"));
+            throw new MissingInformationException();
 
         // create objects from the info sections
-        for (int i = 0; i < info.length; i++)
-            result.add(getInformationDesc(info[i]));
+        for (Node infoNode : info) {
+            result.add(getInformationDesc(infoNode));
+        }
 
         return result;
@@ -582,5 +636,5 @@
      * @throws ParseException if the JNLP file is invalid
      */
-    public Object getLauncher(Node parent) throws ParseException {
+    public LaunchDesc getLauncher(Node parent) throws ParseException {
         // check for other than one application type
         if (1 < getChildNodes(parent, "applet-desc").length
@@ -869,5 +923,5 @@
         String language = localeStr.substring(0, 2);
         String country = (localeStr.length() < 5) ? "" : localeStr.substring(3, 5);
-        String variant = (localeStr.length() < 7) ? "" : localeStr.substring(6, 8);
+        String variant = (localeStr.length() > 7) ? localeStr.substring(6) : "";
 
         // null is not allowed n locale but "" is
Index: /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/PluginBridge.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/PluginBridge.java	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/PluginBridge.java	(revision 416)
@@ -1,4 +1,4 @@
 /*
- * Copyright 2007 Red Hat, Inc.
+ * Copyright 2012 Red Hat, Inc.
  * This file is part of IcedTea, http://icedtea.classpath.org
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -23,27 +23,65 @@
 package net.sourceforge.jnlp;
 
+import java.io.File;
 import java.net.URL;
 import java.net.MalformedURLException;
-import java.util.Hashtable;
+import java.util.HashSet;
 import java.util.Locale;
 import java.util.List;
 import java.util.ArrayList;
 import java.util.Map;
+import java.util.Set;
 
 import net.sourceforge.jnlp.runtime.JNLPRuntime;
 
+/**
+ * Allows reuse of code that expects a JNLPFile object,
+ * while overriding behaviour specific to applets.
+ */
 public class PluginBridge extends JNLPFile {
 
-    String name;
-    String[] jars = new String[0];
-    String[] cacheJars = new String[0];
-    String[] cacheExJars = new String[0];
-    Hashtable<String, String> atts;
+    private String name;
+    private Set<String> jars = new HashSet<String>();
+    //Folders can be added to the code-base through the archive tag
+    private List<String> codeBaseFolders = new ArrayList<String>();
+    private String[] cacheJars = new String[0];
+    private String[] cacheExJars = new String[0];
+    private Map<String, String> atts;
     private boolean usePack;
     private boolean useVersion;
     private boolean codeBaseLookup;
-
+    private boolean useJNLPHref;
+
+    /**
+     * Creates a new PluginBridge using a default JNLPCreator.
+     */
     public PluginBridge(URL codebase, URL documentBase, String jar, String main,
-                        int width, int height, Hashtable<String, String> atts)
+                        int width, int height, Map<String, String> atts,
+                        String uKey)
+            throws Exception {
+        this(codebase, documentBase, jar, main, width, height, atts, uKey, new JNLPCreator());
+    }
+
+    /**
+     * Handles archive tag entries, which may be folders or jar files
+     * @param archives the components of the archive tag
+     */
+    private void addArchiveEntries(String[] archives) {
+        for (String archiveEntry : archives){
+            // trim white spaces
+            archiveEntry = archiveEntry.trim();
+
+            /*Only '/' on linux, '/' or '\\' on windows*/
+            if (archiveEntry.endsWith("/") || archiveEntry.endsWith(File.pathSeparator)) {
+                this.codeBaseFolders.add(archiveEntry);
+            } else {
+                this.jars.add(archiveEntry);
+            }
+        }
+    }
+
+    public PluginBridge(URL codebase, URL documentBase, String archive, String main,
+                        int width, int height, Map<String, String> atts,
+                        String uKey, JNLPCreator jnlpCreator)
             throws Exception {
         specVersion = new Version("1.0");
@@ -51,21 +89,35 @@
         this.codeBase = codebase;
         this.sourceLocation = documentBase;
+        this.atts = atts;
 
         if (atts.containsKey("jnlp_href")) {
+            useJNLPHref = true;
             try {
-                URL jnlp = new URL(codeBase.toExternalForm() + atts.get("jnlp_href"));
-                JNLPFile jnlpFile = new JNLPFile(jnlp);
+                // Use codeBase as the context for the URL. If jnlp_href's
+                // value is a complete URL, it will replace codeBase's context.
+                URL jnlp = new URL(codeBase, atts.get("jnlp_href"));
+                JNLPFile jnlpFile = jnlpCreator.create(jnlp, null, false, JNLPRuntime.getDefaultUpdatePolicy(), codeBase);
                 Map<String, String> jnlpParams = jnlpFile.getApplet().getParameters();
+                info = jnlpFile.info;
 
                 // Change the parameter name to lowercase to follow conventions.
                 for (Map.Entry<String, String> entry : jnlpParams.entrySet()) {
-                    atts.put(entry.getKey().toLowerCase(), entry.getValue());
+                    this.atts.put(entry.getKey().toLowerCase(), entry.getValue());
                 }
+                JARDesc[] jarDescs = jnlpFile.getResources().getJARs();
+                for (JARDesc jarDesc : jarDescs) {
+                     String fileName = jarDesc.getLocation().toExternalForm();
+                     this.jars.add(fileName);
+                 }
             } catch (MalformedURLException e) {
                 // Don't fail because we cannot get the jnlp file. Parameters are optional not required.
                 // it is the site developer who should ensure that file exist.
-                System.err.println("Unable to get JNLP file at: " + codeBase.toExternalForm()
-                        + atts.get("jnlp_href"));
-            }
+                System.err.println("Unable to get JNLP file at: " + atts.get("jnlp_href")
+                        + " with context of URL as: " + codeBase.toExternalForm());
+            }
+        } else {
+            // Should we populate this list with applet attribute tags?
+            info = new ArrayList<InformationDesc>();
+            useJNLPHref = false;
         }
 
@@ -100,18 +152,14 @@
         }
 
-        if (jar != null && jar.length() > 0) {
-            this.jars = jar.split(",");
-
-            // trim white spaces
-            for (int i = 0; i < this.jars.length; i++) {
-                this.jars[i] = this.jars[i].trim();
-            }
+        if (archive != null && archive.length() > 0) {
+            String[] archives = archive.split(",");
+
+            addArchiveEntries(archives);
 
             if (JNLPRuntime.isDebug()) {
-                System.err.println("Jar string: " + jar);
-                System.err.println("jars length: " + jars.length);
-            }
-        }
-        this.atts = atts;
+                System.err.println("Jar string: " + archive);
+                System.err.println("jars length: " + archives.length);
+            }
+        }
 
         name = atts.get("name");
@@ -124,5 +172,7 @@
             main = main.substring(0, main.length() - 6);
 
-        launchType = new AppletDesc(name, main, documentBase, width,
+        // the class name should be of the form foo.bar.Baz not foo/bar/Baz
+        String mainClass = main.replace('/', '.');
+        launchType = new AppletDesc(name, mainClass, documentBase, width,
                                     height, atts);
 
@@ -133,32 +183,5 @@
             security = null;
 
-        /* According to http://download.oracle.com/javase/6/docs/technotes/guides/deployment/deployment-guide/applet-compatibility.html, 
-         * classloaders are shared iff these properties match:
-         * codebase, cache_archive, java_archive, archive
-         * 
-         * To achieve this, we create the uniquekey based on those 4 values,
-         * always in the same order. The initial "<NAME>=" parts ensure a 
-         * bad tag cannot trick the loader into getting shared with another.
-         */
-
-        // Firefox sometimes skips the codebase if it is default  -- ".", 
-        // so set it that way if absent
-        String codebaseAttr =      atts.get("codebase") != null ?
-                                   atts.get("codebase") : ".";
-
-        String cache_archiveAttr = atts.get("cache_archive") != null ? 
-                                   atts.get("cache_archive") : "";
-
-        String java_archiveAttr =  atts.get("java_archive") != null ? 
-                                   atts.get("java_archive") : "";
-
-        String archiveAttr =       atts.get("archive") != null ? 
-                                   atts.get("archive") : "";
-
-        this.uniqueKey = "codebase=" + codebaseAttr +
-                         "cache_archive=" + cache_archiveAttr + 
-                         "java_archive=" + java_archiveAttr + 
-                         "archive=" +  archiveAttr;
-
+        this.uniqueKey = uKey;
         usePack = false;
         useVersion = false;
@@ -184,4 +207,8 @@
     }
 
+    public boolean useJNLPHref() {
+        return useJNLPHref;
+    }
+
     /**
      * {@inheritdoc }
@@ -194,13 +221,4 @@
     public String getTitle() {
         return name;
-    }
-
-    public InformationDesc getInformation(final Locale locale) {
-        return new InformationDesc(this, new Locale[] { locale }) {
-            protected List<Object> getItems(Object key) {
-                // Should we populate this list with applet attribute tags?
-                return new ArrayList<Object>();
-            }
-        };
     }
 
@@ -218,8 +236,9 @@
                         jarDescs.addAll(sharedResources.getResources(JARDesc.class));
 
-                        for (int i = 0; i < jars.length; i++)
-                            if (jars[i].length() > 0)
-                                jarDescs.add(new JARDesc(new URL(codeBase, jars[i]),
+                        for (String name : jars) {
+                            if (name.length() > 0)
+                                jarDescs.add(new JARDesc(new URL(codeBase, name),
                                         null, null, false, true, false, true));
+                        }
 
                         boolean cacheable = true;
@@ -229,7 +248,7 @@
                             cacheable = false;
 
-                        for (int i = 0; i < cacheJars.length; i++) {
-
-                            String[] jarAndVer = cacheJars[i].split(";");
+                        for (String cacheJar : cacheJars) {
+
+                            String[] jarAndVer = cacheJar.split(";");
 
                             String jar = jarAndVer[0];
@@ -247,10 +266,10 @@
                         }
 
-                        for (int i = 0; i < cacheExJars.length; i++) {
-
-                            if (cacheExJars[i].length() == 0)
+                        for (String cacheExJar : cacheExJars) {
+
+                            if (cacheExJar.length() == 0)
                                 continue;
 
-                            String[] jarInfo = cacheExJars[i].split(";");
+                            String[] jarInfo = cacheExJar.split(";");
 
                             String jar = jarInfo[0].trim();
@@ -302,4 +321,11 @@
 
     /**
+     * Returns the list of folders to be added to the codebase
+     */
+    public List<String> getCodeBaseFolders() {
+        return new ArrayList<String>(codeBaseFolders);
+    }
+
+    /**
      * Returns the resources section of the JNLP file for the
      * specified locale, os, and arch.
Index: /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/RequiredElementException.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/RequiredElementException.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/RequiredElementException.java	(revision 416)
@@ -0,0 +1,41 @@
+// Copyright (C) 2012 Red Hat, Inc.
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+
+
+package net.sourceforge.jnlp;
+
+/**
+ * Thrown when a field that is required from the information tag is not found
+ * under the current JVM's locale or as a generalized element.
+ */
+public class RequiredElementException extends ParseException {
+
+    private static final long serialVersionUID = 1L;
+
+    /* (non-Javadoc)
+     * @see net.sourceforge.jnlp.ParseException(String)
+     */
+    public RequiredElementException(String message) {
+        super(message);
+    }
+
+    /* (non-Javadoc)
+     * @see net.sourceforge.jnlp.ParseException(String, Throwable)
+     */
+    public RequiredElementException(String message, Throwable cause) {
+        super(message, cause);
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/ResourcesDesc.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/ResourcesDesc.java	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/ResourcesDesc.java	(revision 416)
@@ -76,7 +76,8 @@
         JARDesc jars[] = getJARs();
 
-        for (int i = 0; i < jars.length; i++)
-            if (jars[i].isMain())
-                return jars[i];
+        for (JARDesc jar : jars) {
+            if (jar.isMain())
+                return jar;
+        }
 
         if (jars.length > 0)
@@ -161,6 +162,5 @@
         Map<String, String> properties = new HashMap<String, String>();
         List<PropertyDesc> resources = getResources(PropertyDesc.class);
-        for (int i = 0; i < resources.size(); i++) {
-            PropertyDesc prop = resources.get(i);
+        for (PropertyDesc prop : resources) {
             properties.put(prop.getKey(), prop.getValue());
         }
@@ -206,7 +206,8 @@
         List<T> result = new ArrayList<T>();
 
-        for (int i = 0; i < resources.size(); i++)
-            if (type.isAssignableFrom(resources.get(i).getClass()))
-                result.add(type.cast(resources.get(i)));
+        for (Object resource : resources) {
+            if (type.isAssignableFrom(resource.getClass()))
+                result.add(type.cast(resource));
+        }
 
         return result;
Index: /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/SecurityDesc.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/SecurityDesc.java	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/SecurityDesc.java	(revision 416)
@@ -203,5 +203,5 @@
 
         // discard sandbox, give all
-        if (type == ALL_PERMISSIONS) {
+        if (ALL_PERMISSIONS.equals(type)) {
             permissions = new Permissions();
             if (customTrustedPolicy == null) {
@@ -214,5 +214,5 @@
 
         // add j2ee to sandbox if needed
-        if (type == J2EE_PERMISSIONS)
+        if (J2EE_PERMISSIONS.equals(type))
             for (int i = 0; i < j2eePermissions.length; i++)
                 permissions.add(j2eePermissions[i]);
@@ -239,5 +239,5 @@
                 permissions.add(jnlpRIAPermissions[i]);
 
-        if (downloadHost != null)
+        if (downloadHost != null && downloadHost.length() > 0)
             permissions.add(new SocketPermission(downloadHost,
                                                  "connect, accept"));
@@ -245,4 +245,16 @@
         return permissions;
     }
+    
+    /**
+     * Returns all the names of the basic JNLP system properties accessible by RIAs
+     */
+    public static String[] getJnlpRIAPermissions() {
+        String[] jnlpPermissions = new String[jnlpRIAPermissions.length];
+
+        for (int i = 0; i < jnlpRIAPermissions.length; i++)
+            jnlpPermissions[i] = jnlpRIAPermissions[i].getName();
+
+        return jnlpPermissions;
+    }
 
 }
Index: /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/Version.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/Version.java	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/Version.java	(revision 416)
@@ -231,4 +231,5 @@
 
         // compare as integers
+        // for normalization key, compare exact object, not using .equals
         try {
             if (!(part1 == emptyString)) // compare to magic normalization key
@@ -243,7 +244,7 @@
         }
 
-        if (part1 == emptyString)
+        if (part1 == emptyString) // compare to magic normalization key
             part1 = "";
-        if (part2 == emptyString)
+        if (part2 == emptyString) // compare to magic normalization key
             part2 = "";
 
Index: /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/cache/CacheLRUWrapper.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/cache/CacheLRUWrapper.java	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/cache/CacheLRUWrapper.java	(revision 416)
@@ -37,4 +37,7 @@
 package net.sourceforge.jnlp.cache;
 
+import java.util.Set;
+import static  net.sourceforge.jnlp.runtime.Translator.R;
+
 import java.io.File;
 import java.io.IOException;
@@ -44,4 +47,5 @@
 import java.util.Collections;
 import java.util.Comparator;
+import java.util.Iterator;
 import java.util.List;
 import java.util.Map.Entry;
@@ -68,6 +72,6 @@
 
     /* location of cache directory */
-    private final String cacheDir = new File(JNLPRuntime.getConfiguration()
-            .getProperty(DeploymentConfiguration.KEY_USER_CACHE_DIR)).getPath();
+    private final String setCachePath = JNLPRuntime.getConfiguration().getProperty(DeploymentConfiguration.KEY_USER_CACHE_DIR);
+    private final String cacheDir = new File(setCachePath != null ? setCachePath : System.getProperty("java.io.tmpdir")).getPath();
 
     /*
@@ -105,5 +109,56 @@
      */
     public synchronized void load() {
-        cacheOrder.load();
+        boolean loaded = cacheOrder.load();
+        /* 
+         * clean up possibly corrupted entries
+         */
+        if (loaded && checkData()) {
+            if (JNLPRuntime.isDebug()) {
+                new LruCacheException().printStackTrace();
+            }
+            System.out.println(R("CFakeCache"));
+            store();
+            System.out.println(R("CFakedCache"));
+        }
+    }
+
+    /**
+     * check content of cacheOrder and remove invalid/corrupt entries
+     *
+     * @return true, if cache was corrupted and affected entry removed
+     */
+    private boolean checkData () {
+        boolean modified = false;
+        Set<Entry<Object, Object>> q = cacheOrder.entrySet();
+        for (Iterator<Entry<Object, Object>> it = q.iterator(); it.hasNext();) {
+            Entry<Object, Object> currentEntry = it.next();
+
+            final String key = (String) currentEntry.getKey();
+            final String path = (String) currentEntry.getValue();
+
+            // 1. check key format: "milliseconds,number"
+            try {
+                String sa[] = key.split(",");
+                Long l1 = Long.parseLong(sa[0]);
+                Long l2 = Long.parseLong(sa[1]);
+            } catch (Exception ex) {
+                it.remove();
+                modified = true;
+                continue;
+            }
+
+            // 2. check path format - does the path look correct?
+            if (path != null) {
+                if (path.indexOf(cacheDir) < 0) {
+                    it.remove();
+                    modified = true;
+                }
+            } else {
+                it.remove();
+                modified = true;
+            }
+        }
+        
+        return modified;
     }
 
@@ -173,15 +228,9 @@
             @Override
             public int compare(Entry<String, String> e1, Entry<String, String> e2) {
-                try {
-                    Long t1 = Long.parseLong(e1.getKey().split(",")[0]);
-                    Long t2 = Long.parseLong(e2.getKey().split(",")[0]);
-
-                    int c = t1.compareTo(t2);
-                    return c < 0 ? 1 : (c > 0 ? -1 : 0);
-                } catch (NumberFormatException e) {
-                    // Perhaps an error is too harsh. Maybe just somehow turn
-                    // caching off if this is the case.
-                    throw new InternalError("Corrupt LRU file entries");
-                }
+                Long t1 = Long.parseLong(e1.getKey().split(",")[0]);
+                Long t2 = Long.parseLong(e2.getKey().split(",")[0]);
+
+                int c = t1.compareTo(t2);
+                return c < 0 ? 1 : (c > 0 ? -1 : 0);
             }
         });
@@ -250,3 +299,7 @@
         return System.currentTimeMillis() + "," + getIdForCacheFolder(path);
     }
+
+    void clearLRUSortedEntries() {
+        cacheOrder.clear();
+    }
 }
Index: /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/cache/CacheUtil.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/cache/CacheUtil.java	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/cache/CacheUtil.java	(revision 416)
@@ -48,6 +48,6 @@
 public class CacheUtil {
 
-    private static final String cacheDir = new File(JNLPRuntime.getConfiguration()
-            .getProperty(DeploymentConfiguration.KEY_USER_CACHE_DIR)).getPath(); // Do this with file to standardize it.
+    private static final String setCacheDir = JNLPRuntime.getConfiguration().getProperty(DeploymentConfiguration.KEY_USER_CACHE_DIR);
+    private static final String cacheDir = new File(setCacheDir != null ? setCacheDir : System.getProperty("java.io.tmpdir")).getPath(); // Do this with file to standardize it.
     private static final CacheLRUWrapper lruHandler = CacheLRUWrapper.getInstance();
     private static final HashMap<String, FileLock> propertiesLockPool = new HashMap<String, FileLock>();
@@ -62,20 +62,38 @@
      */
     public static boolean urlEquals(URL u1, URL u2) {
-        if (u1 == u2)
+        if (u1 == u2) {
             return true;
-        if (u1 == null || u2 == null)
-            return false;
-
-        if (!compare(u1.getProtocol(), u2.getProtocol(), true) ||
-                !compare(u1.getHost(), u2.getHost(), true) ||
-                //u1.getDefaultPort() != u2.getDefaultPort() || // only in 1.4
-                !compare(u1.getPath(), u2.getPath(), false) ||
-                !compare(u1.getQuery(), u2.getQuery(), false) ||
-                !compare(u1.getRef(), u2.getRef(), false))
-            return false;
-        else
+        }
+        if (u1 == null || u2 == null) {
+            return false;
+        }
+
+        if (notNullUrlEquals(u1, u2)) {
             return true;
-    }
-
+        }
+        try {
+            URL nu1 = ResourceTracker.normalizeUrl(u1, false);
+            URL nu2 = ResourceTracker.normalizeUrl(u2, false);
+            if (notNullUrlEquals(nu1, nu2)) {
+                return true;
+            }
+        } catch (Exception ex) {
+            //keep silent here and return false
+        }
+        return false;
+    }
+
+    private static boolean notNullUrlEquals(URL u1, URL u2) {
+        if (!compare(u1.getProtocol(), u2.getProtocol(), true)
+                || !compare(u1.getHost(), u2.getHost(), true)
+                || //u1.getDefaultPort() != u2.getDefaultPort() || // only in 1.4
+                !compare(u1.getPath(), u2.getPath(), false)
+                || !compare(u1.getQuery(), u2.getQuery(), false)
+                || !compare(u1.getRef(), u2.getRef(), false)) {
+            return false;
+        } else {
+            return true;
+        }
+    }
     /**
      * Caches a resource and returns a URL for it in the cache;
@@ -145,14 +163,14 @@
      * and we check for those by calling {@link #okToClearCache()}
      */
-    public static void clearCache() {
+    public static boolean clearCache() {
 
         if (!okToClearCache()) {
             System.err.println(R("CCannotClearCache"));
-            return;
+            return false;
         }
 
         File cacheDir = new File(CacheUtil.cacheDir);
         if (!(cacheDir.isDirectory())) {
-            return;
+            return false;
         }
 
@@ -166,4 +184,5 @@
             throw new RuntimeException(e);
         }
+        return true;
     }
 
@@ -307,6 +326,6 @@
             if (cacheFile == null) { // We did not find a copy of it.
                 cacheFile = makeNewCacheFile(source, version);
-            }
-            lruHandler.store();
+            } else
+                lruHandler.store();
             lruHandler.unlock();
         }
@@ -329,10 +348,8 @@
                 final String path = e.getValue();
 
-                if (path != null) {
-                    if (pathToURLPath(path).equals(urlPath.getPath())) { // Match found.
-                        cacheFile = new File(path);
-                        lruHandler.updateEntry(key);
-                        break; // Stop searching since we got newest one already.
-                    }
+                if (pathToURLPath(path).equals(urlPath.getPath())) { // Match found.
+                    cacheFile = new File(path);
+                    lruHandler.updateEntry(key);
+                    break; // Stop searching since we got newest one already.
                 }
             }
@@ -484,7 +501,7 @@
             // only resources not starting out downloaded are displayed
             List<URL> urlList = new ArrayList<URL>();
-            for (int i = 0; i < resources.length; i++) {
-                if (!tracker.checkResource(resources[i]))
-                    urlList.add(resources[i]);
+            for (URL url : resources) {
+                if (!tracker.checkResource(url))
+                    urlList.add(url);
             }
             URL undownloaded[] = urlList.toArray(new URL[urlList.size()]);
@@ -496,26 +513,27 @@
                 long total = 0;
 
-                for (int i = 0; i < undownloaded.length; i++) {
+                for (URL url : undownloaded) {
                     // add in any -1's; they're insignificant
-                    total += tracker.getTotalSize(undownloaded[i]);
-                    read += tracker.getAmountRead(undownloaded[i]);
+                    total += tracker.getTotalSize(url);
+                    read += tracker.getAmountRead(url);
                 }
 
                 int percent = (int) ((100 * read) / Math.max(1, total));
 
-                for (int i = 0; i < undownloaded.length; i++)
-                    listener.progress(undownloaded[i], "version",
-                                      tracker.getAmountRead(undownloaded[i]),
-                                      tracker.getTotalSize(undownloaded[i]),
+                for (URL url : undownloaded) {
+                    listener.progress(url, "version",
+                                      tracker.getAmountRead(url),
+                                      tracker.getTotalSize(url),
                                       percent);
+                }
             } while (!tracker.waitForResources(resources, indicator.getUpdateRate()));
 
             // make sure they read 100% until indicator closes
-            for (int i = 0; i < undownloaded.length; i++)
-                listener.progress(undownloaded[i], "version",
-                                  tracker.getTotalSize(undownloaded[i]),
-                                  tracker.getTotalSize(undownloaded[i]),
+            for (URL url : undownloaded) {
+                listener.progress(url, "version",
+                                  tracker.getTotalSize(url),
+                                  tracker.getTotalSize(url),
                                   100);
-
+            }
         } catch (InterruptedException ex) {
             if (JNLPRuntime.isDebug())
@@ -531,4 +549,5 @@
      */
     public static void cleanCache() {
+
         if (okToClearCache()) {
             // First we want to figure out which stuff we need to delete.
@@ -549,55 +568,53 @@
                 // Check if the item is contained in cacheOrder.
                 final String key = e.getKey();
-                final String value = e.getValue();
-
-                if (value != null) {
-                    File file = new File(value);
-                    PropertiesFile pf = new PropertiesFile(new File(value + ".info"));
-                    boolean delete = Boolean.parseBoolean(pf.getProperty("delete"));
-
-                    /*
-                     * This will get me the root directory specific to this cache item.
-                     * Example:
-                     *  cacheDir = /home/user1/.icedtea/cache
-                     *  file.getPath() = /home/user1/.icedtea/cache/0/http/www.example.com/subdir/a.jar
-                     *  rStr first becomes: /0/http/www.example.com/subdir/a.jar
-                     *  then rstr becomes: /home/user1/.icedtea/cache/0
-                     */
-                    String rStr = file.getPath().substring(cacheDir.length());
-                    rStr = cacheDir + rStr.substring(0, rStr.indexOf(File.separatorChar, 1));
-                    long len = file.length();
-
-                    if (keep.contains(file.getPath().substring(rStr.length()))) {
-                        lruHandler.removeEntry(key);
-                        continue;
-                    }
-                    
-                    /*
-                     * we remove entries from our lru if any of the following condition is met.
-                     * Conditions:
-                     *  - delete: file has been marked for deletion.
-                     *  - !file.isFile(): if someone tampered with the directory, file doesn't exist.
-                     *  - maxSize >= 0 && curSize + len > maxSize: If a limit was set and the new size
-                     *  on disk would exceed the maximum size.
-                     */
-                    if (delete || !file.isFile() || (maxSize >= 0 && curSize + len > maxSize)) {
-                        lruHandler.removeEntry(key);
-                        remove.add(rStr);
-                    } else {
-                        curSize += len;
-                        keep.add(file.getPath().substring(rStr.length()));
-
-                        for (File f : file.getParentFile().listFiles()) {
-                            if (!(f.equals(file) || f.equals(pf.getStoreFile()))){
-                                try {
-                                    FileUtils.recursiveDelete(f, f);
-                                } catch (IOException e1) {
-                                    e1.printStackTrace();
-                                }
-                            }
+                final String path = e.getValue();
+
+                File file = new File(path);
+                PropertiesFile pf = new PropertiesFile(new File(path + ".info"));
+                boolean delete = Boolean.parseBoolean(pf.getProperty("delete"));
+
+                /*
+                 * This will get me the root directory specific to this cache item.
+                 * Example:
+                 *  cacheDir = /home/user1/.icedtea/cache
+                 *  file.getPath() = /home/user1/.icedtea/cache/0/http/www.example.com/subdir/a.jar
+                 *  rStr first becomes: /0/http/www.example.com/subdir/a.jar
+                 *  then rstr becomes: /home/user1/.icedtea/cache/0
+                 */
+                String rStr = file.getPath().substring(cacheDir.length());
+                rStr = cacheDir + rStr.substring(0, rStr.indexOf(File.separatorChar, 1));
+                long len = file.length();
+
+                if (keep.contains(file.getPath().substring(rStr.length()))) {
+                    lruHandler.removeEntry(key);
+                    continue;
+                }
+
+                /*
+                 * we remove entries from our lru if any of the following condition is met.
+                 * Conditions:
+                 *  - delete: file has been marked for deletion.
+                 *  - !file.isFile(): if someone tampered with the directory, file doesn't exist.
+                 *  - maxSize >= 0 && curSize + len > maxSize: If a limit was set and the new size
+                 *  on disk would exceed the maximum size.
+                 */
+                if (delete || !file.isFile() || (maxSize >= 0 && curSize + len > maxSize)) {
+                    lruHandler.removeEntry(key);
+                    remove.add(rStr);
+                    continue;
+                }
+
+                curSize += len;
+                keep.add(file.getPath().substring(rStr.length()));
+
+                for (File f : file.getParentFile().listFiles()) {
+                    if (!(f.equals(file) || f.equals(pf.getStoreFile()))) {
+                        try {
+                            FileUtils.recursiveDelete(f, f);
+                        } catch (IOException e1) {
+                            e1.printStackTrace();
                         }
                     }
-                } else {
-                    lruHandler.removeEntry(key);
+
                 }
             }
Index: /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/cache/DefaultDownloadIndicator.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/cache/DefaultDownloadIndicator.java	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/cache/DefaultDownloadIndicator.java	(revision 416)
@@ -29,4 +29,5 @@
 
 import net.sourceforge.jnlp.runtime.*;
+import net.sourceforge.jnlp.util.ImageResources;
 
 /**
@@ -58,4 +59,5 @@
     /** the display window */
     private static JFrame frame;
+    private static final Object frameMutex = new Object();
 
     /** shared constraint */
@@ -98,28 +100,33 @@
         DownloadPanel result = new DownloadPanel(downloadName);
 
-        if (frame == null) {
-            frame = new JFrame(downloading + "...");
-            frame.getContentPane().setLayout(new GridBagLayout());
-        }
-
-        if (resources != null)
-            for (int i = 0; i < resources.length; i++)
-                result.addProgressPanel(resources[i], null);
-
-        frame.getContentPane().add(result, vertical);
-        frame.pack();
-
-        if (!frame.isVisible()) {
-            Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
-            Insets insets = Toolkit.getDefaultToolkit().getScreenInsets(frame.getGraphicsConfiguration());
-            Dimension screen = new Dimension(screenSize.width - insets.left,
-                    screenSize.height - insets.top);
-            frame.setLocation(screen.width - frame.getWidth(),
-                              screen.height - frame.getHeight());
-        }
-
-        frame.setVisible(true);
-
-        return result;
+        synchronized (frameMutex) {
+            if (frame == null) {
+                frame = new JFrame(downloading + "...");
+                frame.setIconImages(ImageResources.INSTANCE.getApplicationImages());
+                frame.getContentPane().setLayout(new GridBagLayout());
+            }
+
+            if (resources != null) {
+                for (URL url : resources) {
+                    result.addProgressPanel(url, null);
+                }
+            }
+
+            frame.getContentPane().add(result, vertical);
+            frame.pack();
+
+            if (!frame.isVisible()) {
+                Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
+                Insets insets = Toolkit.getDefaultToolkit().getScreenInsets(frame.getGraphicsConfiguration());
+                Dimension screen = new Dimension(screenSize.width - insets.left,
+                        screenSize.height - insets.top);
+                frame.setLocation(screen.width - frame.getWidth(),
+                        screen.height - frame.getHeight());
+            }
+
+            frame.setVisible(true);
+
+            return result;
+        }
     }
 
@@ -135,9 +142,14 @@
         ActionListener hider = new ActionListener() {
             public void actionPerformed(ActionEvent evt) {
-                if (frame.getContentPane().getComponentCount() == 1)
-                    frame.setVisible(false);
-
-                frame.getContentPane().remove((DownloadPanel) listener);
-                frame.pack();
+                synchronized(frameMutex) {
+                    frame.getContentPane().remove((DownloadPanel) listener);
+                    frame.pack();
+
+                    if (frame.getContentPane().getComponentCount() == 0) {
+                        frame.setVisible(false);
+                        frame.dispose();
+                        frame = null;
+                    }
+                }
             }
         };
@@ -187,5 +199,7 @@
 
                 add(panel, verticalIndent);
-                frame.pack();
+                synchronized (frameMutex) {
+                    frame.pack();
+                }
 
                 urls.add(url);
Index: /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/cache/IllegalResourceDescriptorException.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/cache/IllegalResourceDescriptorException.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/cache/IllegalResourceDescriptorException.java	(revision 416)
@@ -0,0 +1,13 @@
+package net.sourceforge.jnlp.cache;
+
+@SuppressWarnings("serial")
+public class IllegalResourceDescriptorException extends IllegalArgumentException {
+    /**
+     * Constructs a <code>IllegalResourceDescriptorException</code> with the
+     * specified detail message.
+     * @param msg the detail message.
+     */
+    public IllegalResourceDescriptorException(String msg) {
+        super(msg);
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/cache/LruCacheException.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/cache/LruCacheException.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/cache/LruCacheException.java	(revision 416)
@@ -0,0 +1,52 @@
+/* LruCacheException.java -- Thrown when cache is corrupted.
+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.
+ */
+package net.sourceforge.jnlp.cache;
+
+class LruCacheException extends RuntimeException {
+
+    public LruCacheException() {
+        super();
+    }
+
+    public LruCacheException(String string) {
+        super(string);
+    }
+
+    public LruCacheException(Throwable cause) {
+        super(cause);
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/cache/Resource.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/cache/Resource.java	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/cache/Resource.java	(revision 416)
@@ -273,6 +273,5 @@
         }
 
-        for (int i = 0; i < send.size(); i++) {
-            ResourceTracker rt = send.get(i);
+        for (ResourceTracker rt : send) {
             rt.fireDownloadEvent(this);
         }
Index: /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/cache/ResourceTracker.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/cache/ResourceTracker.java	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/cache/ResourceTracker.java	(revision 416)
@@ -25,8 +25,11 @@
 import java.io.InputStream;
 import java.io.OutputStream;
+import java.io.UnsupportedEncodingException;
 import java.net.HttpURLConnection;
 import java.net.MalformedURLException;
 import java.net.URL;
 import java.net.URLConnection;
+import java.net.URLDecoder;
+import java.net.URLEncoder;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
@@ -109,4 +112,13 @@
     private static final int STARTED = Resource.STARTED;
 
+    // normalization of url
+    private static final char PATH_DELIMITER_MARK = '/';
+    private static final String PATH_DELIMITER = "" + PATH_DELIMITER_MARK;
+    private static final char QUERY_DELIMITER_MARK = '&';
+    private static final String QUERY_DELIMITER = "" + QUERY_DELIMITER_MARK;
+    private static final char QUERY_MARK = '?';
+    private static final char HREF_MARK = '#';
+    private static final String UTF8 = "utf-8";
+
     /** max threads */
     private static final int maxThreads = 5;
@@ -173,6 +185,11 @@
     public void addResource(URL location, Version version, DownloadOptions options, UpdatePolicy updatePolicy) {
         if (location == null)
-            throw new IllegalArgumentException("location==null");
-
+            throw new IllegalResourceDescriptorException("location==null");
+        try {
+            location = normalizeUrl(location, JNLPRuntime.isDebug());
+        } catch (Exception ex) {
+            System.err.println("Normalization of " + location.toString() + " have failed");
+            ex.printStackTrace();
+        }
         Resource resource = Resource.getResource(location, version, updatePolicy);
         boolean downloaded = false;
@@ -209,5 +226,5 @@
      * collected.
      *
-     * @throws IllegalArgumentException if the resource is not being tracked
+     * @throws IllegalResourceDescriptorException if the resource is not being tracked
      */
     public void removeResource(URL location) {
@@ -315,11 +332,11 @@
 
         DownloadEvent event = new DownloadEvent(this, resource);
-        for (int i = 0; i < l.length; i++) {
+        for (DownloadListener dl : l) {
             if (0 != ((ERROR | DOWNLOADED) & status))
-                l[i].downloadCompleted(event);
+                dl.downloadCompleted(event);
             else if (0 != (DOWNLOADING & status))
-                l[i].downloadStarted(event);
+                dl.downloadStarted(event);
             else if (0 != (CONNECTING & status))
-                l[i].updateStarted(event);
+                dl.updateStarted(event);
         }
     }
@@ -335,5 +352,5 @@
      * @param location the resource location
      * @return the resource, or null if it could not be downloaded
-     * @throws IllegalArgumentException if the resource is not being tracked
+     * @throws IllegalResourceDescriptorException if the resource is not being tracked
      * @see CacheUtil#isCacheable
      */
@@ -362,5 +379,5 @@
      * @param location the resource location
      * @return a local file containing the resource, or null
-     * @throws IllegalArgumentException if the resource is not being tracked
+     * @throws IllegalResourceDescriptorException if the resource is not being tracked
      * @see CacheUtil#isCacheable
      */
@@ -402,5 +419,5 @@
      *
      * @throws IOException if there was an error opening the stream
-     * @throws IllegalArgumentException if the resource is not being tracked
+     * @throws IllegalResourceDescriptorException if the resource is not being tracked
      */
     public InputStream getInputStream(URL location) throws IOException {
@@ -426,5 +443,5 @@
      * @param timeout the time in ms to wait before returning, 0 for no timeout
      * @return whether the resources downloaded before the timeout
-     * @throws IllegalArgumentException if the resource is not being tracked
+     * @throws IllegalResourceDescriptorException if the resource is not being tracked
      */
     public boolean waitForResources(URL urls[], long timeout) throws InterruptedException {
@@ -433,6 +450,7 @@
         synchronized (resources) {
             // keep the lock so getResource doesn't have to aquire it each time
-            for (int i = 0; i < urls.length; i++)
+            for (int i = 0; i < urls.length; i++) {
                 resources[i] = getResource(urls[i]);
+            }
         }
 
@@ -451,5 +469,5 @@
      * @return whether the resource downloaded before the timeout
      * @throws InterruptedException if another thread interrupted the wait
-     * @throws IllegalArgumentException if the resource is not being tracked
+     * @throws IllegalResourceDescriptorException if the resource is not being tracked
      */
     public boolean waitForResource(URL location, long timeout) throws InterruptedException {
@@ -462,5 +480,5 @@
      * @param location the resource location
      * @return the number of bytes transferred
-     * @throws IllegalArgumentException if the resource is not being tracked
+     * @throws IllegalResourceDescriptorException if the resource is not being tracked
      */
     public long getAmountRead(URL location) {
@@ -474,5 +492,5 @@
      * accessed with the getCacheFile method).
      *
-     * @throws IllegalArgumentException if the resource is not being tracked
+     * @throws IllegalResourceDescriptorException if the resource is not being tracked
      */
     public boolean checkResource(URL location) {
@@ -488,5 +506,5 @@
      *
      * @return true if the resource is already downloaded (or an error occurred)
-     * @throws IllegalArgumentException if the resource is not being tracked
+     * @throws IllegalResourceDescriptorException if the resource is not being tracked
      */
     public boolean startResource(URL location) {
@@ -501,5 +519,5 @@
      *
      * @return true if the resource is already downloaded (or an error occurred)
-     * @throws IllegalArgumentException if the resource is not being tracked
+     * @throws IllegalResourceDescriptorException if the resource is not being tracked
      */
     private boolean startResource(Resource resource) {
@@ -533,5 +551,5 @@
      * @param location the resource location
      * @return the number of bytes, or -1
-     * @throws IllegalArgumentException if the resource is not being tracked
+     * @throws IllegalResourceDescriptorException if the resource is not being tracked
      */
     public long getTotalSize(URL location) {
@@ -589,5 +607,5 @@
         synchronized (lock) {
             if (!resource.isSet(CONNECT | DOWNLOAD))
-                throw new IllegalArgumentException("Invalid resource state (resource: " + resource + ")");
+                throw new IllegalResourceDescriptorException("Invalid resource state (resource: " + resource + ")");
 
             queue.add(resource);
@@ -852,6 +870,5 @@
         }
         URL bestUrl = null;
-        for (int i = 0; i < urls.size(); i++) {
-            URL url = urls.get(i);
+        for (URL url : urls) {
             try {
                 URLConnection connection = url.openConnection();
@@ -983,6 +1000,5 @@
         int score = Integer.MAX_VALUE;
 
-        for (int i = 0; i < source.size(); i++) {
-            Resource resource = source.get(i);
+        for (Resource resource : source) {
             boolean selectable = false;
 
@@ -995,7 +1011,8 @@
                 int activeCount = 0;
 
-                for (int j = 0; j < active.size(); j++)
-                    if (active.get(j) == resource.getTracker())
+                for (ResourceTracker rt : active) {
+                    if (rt == resource.getTracker())
                         activeCount++;
+                }
 
                 // try to spread out the downloads so that a slow host
@@ -1014,11 +1031,9 @@
      * Return the resource matching the specified URL.
      *
-     * @throws IllegalArgumentException if the resource is not being tracked
+     * @throws IllegalResourceDescriptorException if the resource is not being tracked
      */
     private Resource getResource(URL location) {
         synchronized (resources) {
-            for (int i = 0; i < resources.size(); i++) {
-                Resource resource = resources.get(i);
-
+            for (Resource resource : resources) {
                 if (CacheUtil.urlEquals(resource.location, location))
                     return resource;
@@ -1026,5 +1041,5 @@
         }
 
-        throw new IllegalArgumentException("Location does not specify a resource being tracked.");
+        throw new IllegalResourceDescriptorException("Location does not specify a resource being tracked.");
     }
 
@@ -1042,6 +1057,7 @@
 
         // start them downloading / connecting in background
-        for (int i = 0; i < resources.length; i++)
-            startResource(resources[i]);
+        for (Resource resource : resources) {
+            startResource(resource);
+        }
 
         // wait for completion
@@ -1051,9 +1067,9 @@
             synchronized (lock) {
                 // check for completion
-                for (int i = 0; i < resources.length; i++) {
+                for (Resource resource : resources) {
                     //NetX Deadlocking may be solved by removing this
                     //synch block.
-                    synchronized (resources[i]) {
-                        if (!resources[i].isSet(DOWNLOADED | ERROR)) {
+                    synchronized (resource) {
+                        if (!resource.isSet(DOWNLOADED | ERROR)) {
                             finished = false;
                             break;
@@ -1128,3 +1144,114 @@
     };
 
+    private static String normalizeChunk(String base, boolean debug) throws UnsupportedEncodingException {
+        if (base == null) {
+            return base;
+        }
+        if ("".equals(base)) {
+            return base;
+        }
+        String result = base;
+        String ssE = URLDecoder.decode(base, UTF8);
+        //            System.out.println("*" + base + "*");
+        //            System.out.println("-" + ssE + "-");
+        if (base.equals(ssE)) {
+            result = URLEncoder.encode(base, UTF8);
+            if (debug) {
+                System.out.println(base + " chunk needs to be encoded => " + result);
+            }
+        } else {
+            if (debug) {
+                System.out.println(base + " chunk already encoded");
+            }
+        }
+        return result;
+    }
+
+    public static URL normalizeUrl(URL u, boolean debug) throws MalformedURLException, UnsupportedEncodingException {
+        if (u == null) {
+            return null;
+        }
+        String protocol = u.getProtocol();
+        if (protocol == null || "file".equals(protocol)) {
+            return u;
+        }
+        String file = u.getPath();
+        if (file == null) {
+            return u;
+        }
+        String host = u.getHost();
+        String ref = u.getRef();
+        int port = u.getPort();
+        String query = u.getQuery();
+        String[] qq = {};
+        if (query != null) {
+            qq = query.split(QUERY_DELIMITER);
+        }
+        String[] ss = file.split(PATH_DELIMITER);
+        int normalized = 0;
+        if (debug) {
+            System.out.println("normalizing path " + file + " in " + u.toString());
+        }
+        for (int i = 0; i < ss.length; i++) {
+            String base = ss[i];
+            String r = normalizeChunk(base, debug);
+            if (!r.equals(ss[i])) {
+                normalized++;
+            }
+            ss[i] = r;
+        }
+        if (debug) {
+            System.out.println("normalizing query " + query + " in " + u.toString());
+        }
+        for (int i = 0; i < qq.length; i++) {
+            String base = qq[i];
+            String r = normalizeChunk(base, debug);
+            if (!r.equals(qq[i])) {
+                normalized++;
+            }
+            qq[i] = r;
+        }
+        if (normalized == 0) {
+            if (debug) {
+                System.out.println("Nothing was normalized in this url");
+            }
+            return u;
+        } else {
+            if (debug) {
+                System.out.println(normalized + " chunks normalized, rejoining url");
+            }
+        }
+        StringBuilder composed = new StringBuilder("");
+        for (int i = 0; i < ss.length; i++) {
+            String string = ss[i];
+            if (ss.length <= 1 || (string != null && !"".equals(string))) {
+                composed.append(PATH_DELIMITER_MARK).append(string);
+            }
+        }
+        String composed1 = composed.toString();
+        if (query != null && !query.trim().equals("")) {
+            composed.append(QUERY_MARK);
+            for (int i = 0; i < qq.length; i++) {
+                String string = qq[i];
+                if ((string != null && !"".equals(string))) {
+                    composed.append(string);
+                    if (i != qq.length - 1) {
+                        composed.append(QUERY_DELIMITER_MARK);
+                    }
+                }
+            }
+        }
+        String composed2 = composed.substring(composed1.length() - 1);
+        if (ref != null && !ref.trim().equals("")) {
+            composed.append(HREF_MARK).append(ref);
+        }
+
+        URL result = new URL(protocol, host, port, composed.toString());
+
+        if (debug) {
+            System.out.println("normalized `" + composed1 + "` and `" + composed2 + "` in " + result.toString());
+        }
+        return result;
+
+    }
 }
Index: /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/controlpanel/AdvancedProxySettingsDialog.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/controlpanel/AdvancedProxySettingsDialog.java	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/controlpanel/AdvancedProxySettingsDialog.java	(revision 416)
@@ -32,4 +32,5 @@
 import net.sourceforge.jnlp.config.DeploymentConfiguration;
 import net.sourceforge.jnlp.runtime.Translator;
+import net.sourceforge.jnlp.util.ImageResources;
 
 /**
@@ -55,4 +56,6 @@
     public AdvancedProxySettingsDialog(DeploymentConfiguration config) {
         super((Frame) null, dialogTitle, true); // Don't need a parent.
+        setIconImages(ImageResources.INSTANCE.getApplicationImages());
+
         this.config = config;
 
Index: /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/controlpanel/CacheViewer.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/controlpanel/CacheViewer.java	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/controlpanel/CacheViewer.java	(revision 416)
@@ -31,4 +31,5 @@
 import net.sourceforge.jnlp.config.DeploymentConfiguration;
 import net.sourceforge.jnlp.runtime.Translator;
+import net.sourceforge.jnlp.util.ImageResources;
 
 /**
@@ -52,4 +53,5 @@
     public CacheViewer(DeploymentConfiguration config) {
         super((Frame) null, dialogTitle, true); // Don't need a parent.
+        setIconImages(ImageResources.INSTANCE.getApplicationImages());
         this.config = config;
 
Index: /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/controlpanel/ControlPanel.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/controlpanel/ControlPanel.java	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/controlpanel/ControlPanel.java	(revision 416)
@@ -56,4 +56,5 @@
 import net.sourceforge.jnlp.security.KeyStores;
 import net.sourceforge.jnlp.security.viewer.CertificatePane;
+import net.sourceforge.jnlp.util.ImageResources;
 
 /**
@@ -103,4 +104,5 @@
         super();
         setTitle(Translator.R("CPHead"));
+        setIconImages(ImageResources.INSTANCE.getApplicationImages());
 
         this.config = config;
Index: /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/controlpanel/TemporaryInternetFilesPanel.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/controlpanel/TemporaryInternetFilesPanel.java	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/controlpanel/TemporaryInternetFilesPanel.java	(revision 416)
@@ -27,4 +27,5 @@
 import java.awt.event.ItemEvent;
 import java.awt.event.ItemListener;
+import java.io.File;
 
 import javax.swing.JButton;
@@ -34,4 +35,5 @@
 import javax.swing.JFileChooser;
 import javax.swing.JLabel;
+import javax.swing.JOptionPane;
 import javax.swing.JPanel;
 import javax.swing.JSlider;
@@ -110,8 +112,25 @@
                 JFileChooser fileChooser = new JFileChooser();
                 fileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
+                fileChooser.setFileHidingEnabled(false);
                 if (fileChooser.showOpenDialog(null) == JFileChooser.APPROVE_OPTION) {
+                    // Check if we have permission to write to that location.
                     String result = fileChooser.getSelectedFile().getAbsolutePath();
-                    location.setText(result);
-                    config.setProperty(properties[1], result);
+                    File dirLocation = new File(result);
+                    boolean canWrite = dirLocation.canWrite();
+                    while (!canWrite && dirLocation != null){ // File does not exist, or no permission.
+                        
+                        if (dirLocation.exists()) {
+                            JOptionPane.showMessageDialog(null, "No permission to write to this location.");
+                            return;
+                        }
+                        
+                        dirLocation = dirLocation.getParentFile();
+                        canWrite = dirLocation.canWrite();
+                    }
+                    
+                    if (canWrite) {
+                        location.setText(result);
+                        config.setProperty(properties[1], result);
+                    }
                 }
             }
Index: /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/resources/Messages.properties
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/resources/Messages.properties	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/resources/Messages.properties	(revision 416)
@@ -81,5 +81,8 @@
 LSignedAppJarUsingUnsignedJar=Signed application using unsigned jars.
 LSignedAppJarUsingUnsignedJarInfo=The main application jar is signed, but some of the jars it is using aren't.
-
+LSignedJNLPFileDidNotMatch=The signed JNLP file did not match the launching JNLP file.
+LNoSecInstance=Error: No security instance for {0}. The application may have trouble continuing
+LCertFoundIn={0} found in cacerts ({1})
+ 
 JNotApplet=File is not an applet.
 JNotApplication=File is not an application.
@@ -104,5 +107,8 @@
 PTwoMains=Duplicate main JAR defined in a resources element (there can be only one)
 PNativeHasMain=Cannot specify main attribute on native JARs.
-PNoInfoElement=No information section defined
+PNoInfoElement=No information section defined.
+PMissingTitle=title
+PMissingVendor=vendor
+PMissingElement=The {0} section has not been defined for your locale nor does a default value exist in the JNLP file.
 PTwoDescriptions=Duplicate description of kind {0}
 PSharing=Element "sharing-allowed" is illegal in a standard JNLP file
@@ -120,5 +126,5 @@
 PUrlNotInCodebase=Relative URL does not specify a subdirectory of the codebase. (node={0}, href={1}, base={2})
 PBadRelativeUrl=Invalid relative URL (node={0}, href={1}, base={2})
-PBadNonrelativeUrl=Invalid non-relative URL (node={0}, href={0}).
+PBadNonrelativeUrl=Invalid non-relative URL (node={0}, href={1})
 PNeedsAttribute=The {0} element must specify a {1} attribute.
 PBadXML=Invalid XML document syntax.
@@ -190,4 +196,6 @@
 CChooseCacheDir=Cache directory
 CCannotClearCache=Can not clear cache at this time
+CFakeCache=Cache is corrupt. Fixing.
+CFakedCache=Cache is corrupt and has been fixed. It is strongly recommended that you run 'javaws -Xclearcache' and rerun your application as soon as possible.
 
 # Security
@@ -199,4 +207,5 @@
 SSignatureError=The application's digital signature has an error. Do you want to run the application?
 SUntrustedSource=The digital signature could not be verified by a trusted source. Only run if you trust the origin of the application.
+SWarnFullPermissionsIgnorePolicy=The code executed will be given full permissions, ignoring any java policies you may have.
 STrustedSource=The digital signature has been validated by a trusted source.
 SClipboardReadAccess=The application has requested read-only access to the system clipboard. Do you want to allow this action?
@@ -205,10 +214,12 @@
 SNetworkAccess=The application has requested permission to establish connections to {0}. Do you want to allow this action?
 SNoAssociatedCertificate=<no associated certificate>
+SUnverified=(unverified)
 SAlwaysTrustPublisher=Always trust content from this publisher
-SHttpsUnverified=The website's certificate cannot be verified.
+SHttpsUnverified=The website's HTTPS certificate cannot be verified.
 SNotAllSignedSummary=Only parts of this application code are signed.
 SNotAllSignedDetail=This application contains both signed and unsigned code. While signed code is safe if you trust the provider, unsigned code may imply code outside of the trusted provider's control.
 SNotAllSignedQuestion=Do you wish to proceed and run this application anyway?
 SAuthenticationPrompt=The {0} server at {1} is requesting authentication. It says "{2}"
+SJNLPFileIsNotSigned=This application contains a digital signature in which the launching JNLP file is not signed.
 
 # Security - used for the More Information dialog
@@ -241,7 +252,10 @@
 CVDetails=Details
 CVExport=Export
+CVExportPasswordMessage=Enter password to protect key file:
 CVImport=Import
+CVImportPasswordMessage=Enter password to access file:
 CVIssuedBy=Issued By
 CVIssuedTo=Issued To
+CVPasswordTitle=Authentication Required
 CVRemove=Remove
 CVRemoveConfirmMessage=Are you sure you want to remove the selected certificate?
Index: anches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/runtime/AppThreadGroup.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/runtime/AppThreadGroup.java	(revision 415)
+++ 	(revision )
@@ -1,63 +1,0 @@
-// Copyright (C) 2001-2003 Jon A. Maxwell (JAM)
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library 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
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-
-package net.sourceforge.jnlp.runtime;
-
-/**
- * Thread group for a JNLP application.
- *
- * @author <a href="mailto:jmaxwell@users.sourceforge.net">Jon A. Maxwell (JAM)</a> - initial author
- * @version $Revision: 1.5 $
- */
-public class AppThreadGroup extends ThreadGroup {
-
-    /** the app */
-    private ApplicationInstance app = null;
-
-    /**
-     * Creates new JavaAppThreadGroup
-     *
-     * @param name of the App
-     */
-    public AppThreadGroup(ThreadGroup parent, String name) {
-        super(parent, name);
-    }
-
-    /**
-     * Sets the JNLP app this group is for; can only be called once.
-     */
-    public void setApplication(ApplicationInstance app) {
-        if (this.app != null)
-            throw new IllegalStateException("Application can only be set once");
-
-        this.app = app;
-    }
-
-    /**
-     * Returns the JNLP app for this thread group.
-     */
-    public ApplicationInstance getApplication() {
-        return app;
-    }
-
-    /**
-     * Handle uncaught exceptions for the app.
-     */
-    public void uncaughtException(Thread t, Throwable e) {
-        super.uncaughtException(t, e);
-    }
-
-}
Index: /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/runtime/AppletEnvironment.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/runtime/AppletEnvironment.java	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/runtime/AppletEnvironment.java	(revision 416)
@@ -117,6 +117,6 @@
 
         List<AppletAudioClip> clips = weakClips.hardList();
-        for (int i = 0; i < clips.size(); i++) {
-            clips.get(i).dispose();
+        for (AppletAudioClip clip : clips) {
+            clip.dispose();
         }
     }
@@ -208,4 +208,18 @@
 
     /**
+     * Set the applet of this environment; can only be called once.
+     */
+    public void setApplet(Applet applet) {
+        if (this.applet != null) {
+            if (JNLPRuntime.isDebug()) {
+                Exception ex = new IllegalStateException("Applet can only be set once.");
+                ex.printStackTrace();
+            }
+            return;
+        }
+        this.applet = applet;
+    }
+
+    /**
      * Returns an enumeration that contains only the applet
      * from the JNLP file.
Index: /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/runtime/AppletInstance.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/runtime/AppletInstance.java	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/runtime/AppletInstance.java	(revision 416)
@@ -50,4 +50,18 @@
 
         this.environment = new AppletEnvironment(file, this);
+    }
+
+    /**
+     * Set the applet of this launched application; can only be called once.
+     */
+    public void setApplet(Applet applet) {
+        if (this.applet != null) {
+            if (JNLPRuntime.isDebug()) {
+                Exception ex = new IllegalStateException("Applet can only be set once.");
+                ex.printStackTrace();
+            }
+            return;
+        }
+        this.applet = applet;
     }
 
Index: /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/runtime/ApplicationInstance.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/runtime/ApplicationInstance.java	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/runtime/ApplicationInstance.java	(revision 416)
@@ -232,6 +232,6 @@
         PrivilegedAction<Object> installProps = new PrivilegedAction<Object>() {
             public Object run() {
-                for (int i = 0; i < props.length; i++) {
-                    System.setProperty(props[i].getKey(), props[i].getValue());
+                for (PropertyDesc propDesc : props) {
+                    System.setProperty(propDesc.getKey(), propDesc.getValue());
                 }
 
@@ -273,6 +273,5 @@
         try {
             // destroy resources
-            for (int i = 0; i < weakWindows.size(); i++) {
-                Window w = weakWindows.get(i);
+            for (Window w : weakWindows) {
                 if (w != null)
                     w.dispose();
Index: /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/runtime/Boot.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/runtime/Boot.java	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/runtime/Boot.java	(revision 416)
@@ -157,4 +157,7 @@
             JNLPRuntime.setForksAllowed(false);
         }
+        if (null != getOption("-Xtrustall")) {
+            JNLPRuntime.setTrustAll(true);
+        }
 
         JNLPRuntime.setInitialArgments(Arrays.asList(argsIn));
Index: /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/runtime/CachedJarFileCallback.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/runtime/CachedJarFileCallback.java	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/runtime/CachedJarFileCallback.java	(revision 416)
@@ -95,5 +95,22 @@
         if (UrlUtils.isLocalFile(localUrl)) {
             // if it is known to us, just return the cached file
-            return new JarFile(localUrl.getPath());
+            JarFile returnFile = new JarFile(localUrl.getPath());
+            
+            try {
+                
+                // Blank out the class-path because:
+                // 1) Web Start does not support it
+                // 2) For the plug-in, we want to cache files from class-path so we do it manually
+                returnFile.getManifest().getMainAttributes().putValue("Class-Path", "");
+
+                if (JNLPRuntime.isDebug()) {
+                    System.err.println("Class-Path attribute cleared for " + returnFile.getName());
+                }
+
+            } catch (NullPointerException npe) {
+                // Discard NPE here. Maybe there was no manifest, maybe there were no attributes, etc.
+            }
+
+            return returnFile;
         } else {
             // throw new IllegalStateException("a non-local file in cache");
Index: /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java	(revision 416)
@@ -18,12 +18,17 @@
 import static net.sourceforge.jnlp.runtime.Translator.R;
 
+import java.io.Closeable;
 import java.io.File;
 import java.io.FileOutputStream;
+import java.io.FileReader;
 import java.io.IOException;
 import java.io.InputStream;
+import java.io.InputStreamReader;
 import java.net.MalformedURLException;
+import java.net.SocketPermission;
 import java.net.URL;
 import java.net.URLClassLoader;
 import java.security.AccessControlContext;
+import java.security.AccessControlException;
 import java.security.AccessController;
 import java.security.AllPermission;
@@ -33,9 +38,15 @@
 import java.security.Permissions;
 import java.security.PrivilegedAction;
+import java.security.PrivilegedActionException;
+import java.security.PrivilegedExceptionAction;
+import java.security.ProtectionDomain;
 import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
 import java.util.Collections;
 import java.util.Enumeration;
 import java.util.HashMap;
 import java.util.HashSet;
+import java.util.Iterator;
 import java.util.LinkedList;
 import java.util.List;
@@ -44,12 +55,18 @@
 import java.util.TreeSet;
 import java.util.Vector;
+import java.util.concurrent.ConcurrentHashMap;
 import java.util.jar.JarEntry;
 import java.util.jar.JarFile;
 import java.util.jar.Manifest;
 
+import net.sourceforge.jnlp.AppletDesc;
+import net.sourceforge.jnlp.ApplicationDesc;
 import net.sourceforge.jnlp.DownloadOptions;
 import net.sourceforge.jnlp.ExtensionDesc;
 import net.sourceforge.jnlp.JARDesc;
 import net.sourceforge.jnlp.JNLPFile;
+import net.sourceforge.jnlp.JNLPMatcher;
+import net.sourceforge.jnlp.JNLPMatcherException;
+import net.sourceforge.jnlp.LaunchDesc;
 import net.sourceforge.jnlp.LaunchException;
 import net.sourceforge.jnlp.ParseException;
@@ -59,9 +76,10 @@
 import net.sourceforge.jnlp.Version;
 import net.sourceforge.jnlp.cache.CacheUtil;
+import net.sourceforge.jnlp.cache.IllegalResourceDescriptorException;
 import net.sourceforge.jnlp.cache.ResourceTracker;
 import net.sourceforge.jnlp.cache.UpdatePolicy;
 import net.sourceforge.jnlp.security.SecurityDialogs;
 import net.sourceforge.jnlp.security.SecurityDialogs.AccessType;
-import net.sourceforge.jnlp.tools.JarSigner;
+import net.sourceforge.jnlp.tools.JarCertVerifier;
 import net.sourceforge.jnlp.util.FileUtils;
 import sun.misc.JarIndex;
@@ -82,4 +100,11 @@
     // resources in an extension.
 
+    /** Signed JNLP File and Template */
+    final public static String TEMPLATE = "JNLP-INF/APPLICATION_TEMPLATE.JNLP";
+    final public static String APPLICATION = "JNLP-INF/APPLICATION.JNLP";
+    
+    /** True if the application has a signed JNLP File */
+    private boolean isSignedJNLP = false;
+    
     /** map from JNLPFile url to shared classloader */
     private static Map<String, JNLPClassLoader> urlToLoader =
@@ -134,6 +159,6 @@
     private ArrayList<String> unverifiedJars = null;
 
-    /** the jarsigner tool to verify our jars */
-    private JarSigner js = null;
+    /** the jar cert verifier tool to verify our jars */
+    private JarCertVerifier jcv = null;
 
     private boolean signing = false;
@@ -151,7 +176,22 @@
     private HashMap<URL, SecurityDesc> jarLocationSecurityMap =
             new HashMap<URL, SecurityDesc>();
+
+    /*Set to prevent once tried-to-get resources to be tried again*/
+    private Set<URL> alreadyTried = Collections.synchronizedSet(new HashSet<URL>());
     
     /** Loader for codebase (which is a path, rather than a file) */
     private CodeBaseClassLoader codeBaseLoader;
+    
+    /** True if the jar with the main class has been found
+     * */
+    private boolean foundMainJar= false;
+
+    /** Name of the application's main class */
+    private String mainClass = null;
+
+    /**
+     * Variable to track how many times this loader is in use
+     */
+    private int useCount = 0;
 
     /**
@@ -161,4 +201,14 @@
      */
     protected JNLPClassLoader(JNLPFile file, UpdatePolicy policy) throws LaunchException {
+        this(file,policy,null);
+    }
+
+    /**
+     * Create a new JNLPClassLoader from the specified file.
+     *
+     * @param file the JNLP file
+     * @param name of the application's main class
+     */
+    protected JNLPClassLoader(JNLPFile file, UpdatePolicy policy, String mainName) throws LaunchException {
         super(new URL[0], JNLPClassLoader.class.getClassLoader());
 
@@ -169,4 +219,6 @@
         this.updatePolicy = policy;
         this.resources = file.getResources();
+
+        this.mainClass = mainName;
 
         // initialize extensions
@@ -276,4 +328,15 @@
      */
     public static JNLPClassLoader getInstance(JNLPFile file, UpdatePolicy policy) throws LaunchException {
+        return getInstance(file, policy, null);
+    }
+
+    /**
+     * Returns a JNLP classloader for the specified JNLP file.
+     *
+     * @param file the file to load classes for
+     * @param policy the update policy to use when downloading resources
+     * @param mainName Overrides the main class name of the application
+     */
+    public static JNLPClassLoader getInstance(JNLPFile file, UpdatePolicy policy, String mainName) throws LaunchException {
         JNLPClassLoader baseLoader = null;
         JNLPClassLoader loader = null;
@@ -292,5 +355,5 @@
                      !baseLoader.getJNLPFile().getFileLocation().equals(file.getFileLocation()))) {
 
-                loader = new JNLPClassLoader(file, policy);
+                loader = new JNLPClassLoader(file, policy, mainName);
 
                 // New loader init may have caused extentions to create a
@@ -304,4 +367,5 @@
 
                     loader.merge(extLoader);
+                    extLoader.decrementLoaderUseCount(); // loader urls have been merged, ext loader is no longer used
                 }
 
@@ -309,5 +373,5 @@
                 // the baseLoader
                 if (baseLoader != null && baseLoader != loader) {
-                    loader.merge(baseLoader);
+                   loader.merge(baseLoader);
                 }
 
@@ -316,5 +380,5 @@
                 if (!file.isApplication()) {
                     // If this is an applet, we do need to consider its loader
-                    loader = new JNLPClassLoader(file, policy);
+                   loader = new JNLPClassLoader(file, policy, mainName);
 
                     if (baseLoader != null)
@@ -330,5 +394,9 @@
         // loaders are mapped to a unique key. Only extensions and parent
         // share a key, so it is safe to always share based on it
-        urlToLoader.put(uniqueKey, loader);
+        
+        loader.incrementLoaderUseCount();
+        synchronized(urlToLoader) {
+            urlToLoader.put(uniqueKey, loader);
+        }
 
         return loader;
@@ -342,11 +410,15 @@
      * @param version the file's version
      * @param policy the update policy to use when downloading resources
-     */
-    public static JNLPClassLoader getInstance(URL location, String uniqueKey, Version version, UpdatePolicy policy)
+     * @param mainName Overrides the main class name of the application
+     */
+    public static JNLPClassLoader getInstance(URL location, String uniqueKey, Version version, UpdatePolicy policy, String mainName)
             throws IOException, ParseException, LaunchException {
         JNLPClassLoader loader = urlToLoader.get(uniqueKey);
 
-        if (loader == null || !location.equals(loader.getJNLPFile().getFileLocation()))
-            loader = getInstance(new JNLPFile(location, uniqueKey, version, false, policy), policy);
+        if (loader == null || !location.equals(loader.getJNLPFile().getFileLocation())) {
+            JNLPFile jnlpFile = new JNLPFile(location, uniqueKey, version, false, policy);
+
+            loader = getInstance(jnlpFile, policy, mainName);
+        }
 
         return loader;
@@ -362,4 +434,16 @@
 
         loaderList.add(this);
+
+        if (mainClass == null) {
+            Object obj = file.getLaunchInfo();
+
+            if (obj instanceof ApplicationDesc) {
+                ApplicationDesc ad = (ApplicationDesc) file.getLaunchInfo();
+                mainClass = ad.getMainClass();
+            } else if (obj instanceof AppletDesc) {
+                AppletDesc ad = (AppletDesc) file.getLaunchInfo();
+                mainClass = ad.getMainClass();
+            }
+        }
 
         //if (ext != null) {
@@ -367,5 +451,5 @@
             try {
                 String uniqueKey = this.getJNLPFile().getUniqueKey();
-                JNLPClassLoader loader = getInstance(ext[i].getLocation(), uniqueKey, ext[i].getVersion(), updatePolicy);
+                JNLPClassLoader loader = getInstance(ext[i].getLocation(), uniqueKey, ext[i].getVersion(), updatePolicy, mainClass);
                 loaderList.add(loader);
             } catch (Exception ex) {
@@ -401,11 +485,74 @@
 
     /**
+     * Check if a described jar file is invalid
+     * @param jar the jar to check
+     * @return true if file exists AND is an invalid jar, false otherwise
+     */
+    private boolean isInvalidJar(JARDesc jar){
+        File cacheFile = tracker.getCacheFile(jar.getLocation());
+        if (cacheFile == null)
+            return false;//File cannot be retrieved, do not claim it is an invalid jar
+        boolean isInvalid = false;
+        try {
+            JarFile jarFile = new JarFile(cacheFile.getAbsolutePath());
+            jarFile.close();
+        } catch (IOException ioe){
+            //Catch a ZipException or any other read failure
+            isInvalid = true;
+        }
+        return isInvalid;
+    }
+
+    /**
+     * Determine how invalid jars should be handled
+     * @return whether to filter invalid jars, or error later on
+     */
+    private boolean shouldFilterInvalidJars(){
+        if (file instanceof PluginBridge){
+            PluginBridge pluginBridge = (PluginBridge)file;
+            /*Ignore on applet, ie !useJNLPHref*/
+            return !pluginBridge.useJNLPHref();
+        }
+        return false;//Error is default behaviour
+    }
+
+    /**
      * Load all of the JARs used in this JNLP file into the
      * ResourceTracker for downloading.
      */
     void initializeResources() throws LaunchException {
+        if (file instanceof PluginBridge){
+            PluginBridge bridge = (PluginBridge)file;
+
+            for (String codeBaseFolder : bridge.getCodeBaseFolders()){
+                try {
+                    addToCodeBaseLoader(new URL(file.getCodeBase(), codeBaseFolder));
+                } catch (MalformedURLException mfe) {
+                    System.err.println("Problem trying to add folder to code base:");
+                    System.err.println(mfe.getMessage());
+                }
+            }
+        }
+
         JARDesc jars[] = resources.getJARs();
-        if (jars == null || jars.length == 0)
+
+        if (jars == null || jars.length == 0) {
+
+            boolean allSigned = true;
+            for (int i = 1; i < loaders.length; i++) {
+                if (!loaders[i].getSigning()) {
+                    allSigned = false;
+                    break;
+                }
+            }
+
+            if(allSigned)
+                signing = true;
+
+            //Check if main jar is found within extensions
+            foundMainJar = foundMainJar || hasMainInExtensions();
+
             return;
+        }
         /*
         if (jars == null || jars.length == 0) {
@@ -429,17 +576,37 @@
                                );
         }
+        
+        //If there are no eager jars, initialize the first jar
+        if(initialJars.size() == 0)
+            initialJars.add(jars[0]);
 
         if (strict)
             fillInPartJars(initialJars); // add in each initial part's lazy jars
 
+        waitForJars(initialJars); //download the jars first.
+
+        //A ZipException will propagate later on if the jar is invalid and not checked here
+        if (shouldFilterInvalidJars()){
+            //We filter any invalid jars
+            Iterator<JARDesc> iterator = initialJars.iterator();
+            while (iterator.hasNext()){
+                JARDesc jar = iterator.next();
+                if (isInvalidJar(jar)) {
+                    //Remove this jar as an available jar
+                    iterator.remove();
+                    tracker.removeResource(jar.getLocation());
+                    available.remove(jar);
+                }
+            }
+        }
+
         if (JNLPRuntime.isVerifying()) {
 
-            JarSigner js;
-            waitForJars(initialJars); //download the jars first.
+            JarCertVerifier jcv;
 
             try {
-                js = verifyJars(initialJars);
+                jcv = verifyJars(initialJars);
             } catch (Exception e) {
-                //we caught an Exception from the JarSigner class.
+                //we caught an Exception from the JarCertVerifier class.
                 //Note: one of these exceptions could be from not being able
                 //to read the cacerts or trusted.certs files.
@@ -450,14 +617,40 @@
 
             //Case when at least one jar has some signing
-            if (js.anyJarsSigned() && js.isFullySignedByASingleCert()) {
+            if (jcv.anyJarsSigned() && jcv.isFullySignedByASingleCert()) {
                 signing = true;
 
-                if (!js.allJarsSigned() &&
+                if (!jcv.allJarsSigned() &&
                                     !SecurityDialogs.showNotAllSignedWarningDialog(file))
                     throw new LaunchException(file, null, R("LSFatal"), R("LCClient"), R("LSignedAppJarUsingUnsignedJar"), R("LSignedAppJarUsingUnsignedJarInfo"));
 
+
+                // Check for main class in the downloaded jars, and check/verify signed JNLP fill
+                checkForMain(initialJars);
+
+                // If jar with main class was not found, check available resources
+                while (!foundMainJar && available != null && available.size() != 0) 
+                    addNextResource();
+
+                // If the jar with main class was not found, check extension
+                // jnlp's resources
+                foundMainJar = foundMainJar || hasMainInExtensions();
+
+                // If jar with main class was not found and there are no more
+                // available jars, throw a LaunchException
+                if (file.getLaunchInfo() != null) {
+                    if (!foundMainJar
+                            && (available == null || available.size() == 0))
+                        throw new LaunchException(file, null, R("LSFatal"),
+                                R("LCClient"), R("LCantDetermineMainClass"),
+                                R("LCantDetermineMainClassInfo"));
+                }
+
+                // If main jar was found, but a signed JNLP file was not located
+                if (!isSignedJNLP && foundMainJar) 
+                    file.setSignedJNLPAsMissing();
+                
                 //user does not trust this publisher
-                if (!js.getAlreadyTrustPublisher()) {
-                    checkTrustWithUser(js);
+                if (!jcv.getAlreadyTrustPublisher()) {
+                    checkTrustWithUser(jcv);
                 } else {
                     /**
@@ -476,5 +669,14 @@
         for (JARDesc jarDesc : file.getResources().getJARs()) {
             try {
-                File cachedFile = tracker.getCacheFile(jarDesc.getLocation());
+
+                File cachedFile;
+
+                try {
+                    cachedFile = tracker.getCacheFile(jarDesc.getLocation());
+                } catch (IllegalResourceDescriptorException irde){
+                    //Caused by ignored resource being removed due to not being valid
+                    System.err.println("JAR " + jarDesc.getLocation() + " is not a valid jar file. Continuing.");
+                    continue;
+                }
 
                 if (cachedFile == null) {
@@ -515,23 +717,296 @@
             }
         }
-
         activateJars(initialJars);
     }
-
-    private void checkTrustWithUser(JarSigner js) throws LaunchException {
-        if (!js.getRootInCacerts()) { //root cert is not in cacerts
+    
+    /***
+     * Checks for the jar that contains the main class. If the main class was
+     * found, it checks to see if the jar is signed and whether it contains a
+     * signed JNLP file
+     * 
+     * @param jars Jars that are checked to see if they contain the main class
+     * @throws LaunchException Thrown if the signed JNLP file, within the main jar, fails to be verified or does not match
+     */
+    private void checkForMain(List<JARDesc> jars) throws LaunchException {
+
+        // Check launch info
+        if (mainClass == null) {
+            LaunchDesc launchDesc = file.getLaunchInfo();
+            if (launchDesc == null) {
+                return;
+            }
+
+            mainClass = launchDesc.getMainClass();
+        }
+
+        // The main class may be specified in the manifest
+
+        // Check main jar
+        if (mainClass == null) {
+            JARDesc mainJarDesc = file.getResources().getMainJAR();
+            mainClass = getMainClassName(mainJarDesc.getLocation());
+        }
+
+        // Check first jar
+        if (mainClass == null) {
+            JARDesc firstJarDesc = jars.get(0);
+            mainClass = getMainClassName(firstJarDesc.getLocation());
+        }
+
+        // Still not found? Iterate and set if only 1 was found
+        if (mainClass == null) {
+
+            for (JARDesc jarDesc: jars) {
+                String mainClassInThisJar = getMainClassName(jarDesc.getLocation());
+
+                if (mainClassInThisJar != null) {
+
+                    if (mainClass == null) { // first main class
+                        mainClass = mainClassInThisJar;
+                    } else { // There is more than one main class. Set to null and break.
+                        mainClass = null;
+                        break;
+                    }
+                }
+            }
+        }
+
+        String desiredJarEntryName = mainClass + ".class";
+
+        for (int i = 0; i < jars.size(); i++) {
+
+            try {
+                File localFile = tracker
+                        .getCacheFile(jars.get(i).getLocation());
+
+                if (localFile == null) {
+                    System.err.println("JAR " + jars.get(i).getLocation() + " not found. Continuing.");
+                    continue; // JAR not found. Keep going.
+                }
+
+                JarFile jarFile = new JarFile(localFile);
+                Enumeration<JarEntry> entries = jarFile.entries();
+                JarEntry je;
+
+                while (entries.hasMoreElements()) {
+                    je = entries.nextElement();
+                    String jeName = je.getName().replaceAll("/", ".");
+                    if (jeName.equals(desiredJarEntryName)) {
+                        foundMainJar = true;
+                        verifySignedJNLP(jars.get(i), jarFile);
+                        break;
+                    }
+                }
+            } catch (IOException e) {
+                /*
+                 * After this exception is caught, it is escaped. This will skip
+                 * the jarFile that may have thrown this exception and move on
+                 * to the next jarFile (if there are any)
+                 */
+            }
+        }
+    }
+
+    /**
+     * Gets the name of the main method if specified in the manifest
+     *
+     * @param location The JAR location
+     * @return the main class name, null if there isn't one of if there was an error
+     */
+    private String getMainClassName(URL location) {
+
+        String mainClass = null;
+        File f = tracker.getCacheFile(location);
+
+        if( f != null) {
+            try {
+                JarFile mainJar = new JarFile(f);
+                mainClass = mainJar.getManifest().
+                        getMainAttributes().getValue("Main-Class");
+            } catch (IOException ioe) {
+                mainClass = null;
+            }
+        }
+
+        return mainClass;
+    }
+
+    /**
+     * Returns true if this loader has the main jar
+     */
+    public boolean hasMainJar() {
+        return this.foundMainJar;
+    }
+
+    /**
+     * Returns true if extension loaders have the main jar
+     */
+    private boolean hasMainInExtensions() {
+        boolean foundMain = false;
+
+        for (int i = 1; i < loaders.length && !foundMain; i++) {
+            foundMain = loaders[i].hasMainJar();
+        }
+
+        return foundMain;
+    }
+
+    /**
+     * Is called by checkForMain() to check if the jar file is signed and if it
+     * contains a signed JNLP file.
+     * 
+     * @param jarDesc JARDesc of jar
+     * @param jarFile the jar file
+     * @throws LaunchException thrown if the signed JNLP file, within the main jar, fails to be verified or does not match
+     */
+    private void verifySignedJNLP(JARDesc jarDesc, JarFile jarFile)
+            throws LaunchException {
+
+        JarCertVerifier signer = new JarCertVerifier();
+        List<JARDesc> desc = new ArrayList<JARDesc>();
+        desc.add(jarDesc);
+
+        // Initialize streams
+        InputStream inStream = null;
+        InputStreamReader inputReader = null;
+        FileReader fr = null;
+        InputStreamReader jnlpReader = null;
+
+        try {
+            signer.verifyJars(desc, tracker);
+
+            if (signer.allJarsSigned()) { // If the jar is signed
+
+                Enumeration<JarEntry> entries = jarFile.entries();
+                JarEntry je;
+
+                while (entries.hasMoreElements()) {
+                    je = entries.nextElement();
+                    String jeName = je.getName().toUpperCase();
+
+                    if (jeName.equals(TEMPLATE) || jeName.equals(APPLICATION)) {
+
+                        if (JNLPRuntime.isDebug())
+                            System.err.println("Creating Jar InputStream from JarEntry");
+
+                        inStream = jarFile.getInputStream(je);
+                        inputReader = new InputStreamReader(inStream);
+
+                        if (JNLPRuntime.isDebug())
+                            System.err.println("Creating File InputStream from lauching JNLP file");
+
+                        JNLPFile jnlp = this.getJNLPFile();
+                        URL url = jnlp.getFileLocation();
+                        File jn = null;
+
+                        // If the file is on the local file system, use original path, otherwise find cached file
+                        if (url.getProtocol().toLowerCase().equals("file"))
+                            jn = new File(url.getPath());
+                        else
+                            jn = CacheUtil.getCacheFile(url, null);
+
+                        fr = new FileReader(jn);
+                        jnlpReader = fr;
+
+                        // Initialize JNLPMatcher class
+                        JNLPMatcher matcher;
+
+                        if (jeName.equals(APPLICATION)) { // If signed application was found
+                            if (JNLPRuntime.isDebug())
+                                System.err.println("APPLICATION.JNLP has been located within signed JAR. Starting verfication...");
+                           
+                            matcher = new JNLPMatcher(inputReader, jnlpReader, false);
+                        } else { // Otherwise template was found
+                            if (JNLPRuntime.isDebug())
+                                System.err.println("APPLICATION_TEMPLATE.JNLP has been located within signed JAR. Starting verfication...");
+                            
+                            matcher = new JNLPMatcher(inputReader, jnlpReader,
+                                    true);
+                        }
+
+                        // If signed JNLP file does not matches launching JNLP file, throw JNLPMatcherException
+                        if (!matcher.isMatch())
+                            throw new JNLPMatcherException("Signed Application did not match launching JNLP File");
+
+                        this.isSignedJNLP = true;
+                        if (JNLPRuntime.isDebug())
+                            System.err.println("Signed Application Verification Successful");
+
+                        break; 
+                    }
+                }
+            }
+        } catch (JNLPMatcherException e) {
+
+            /*
+             * Throws LaunchException if signed JNLP file fails to be verified
+             * or fails to match the launching JNLP file
+             */
+
+            throw new LaunchException(file, null, R("LSFatal"), R("LCClient"),
+                    R("LSignedJNLPFileDidNotMatch"), R(e.getMessage()));
+
+            /*
+             * Throwing this exception will fail to initialize the application
+             * resulting in the termination of the application
+             */
+
+        } catch (Exception e) {
+            
+            if (JNLPRuntime.isDebug())
+                e.printStackTrace(System.err);
+
+            /*
+             * After this exception is caught, it is escaped. If an exception is
+             * thrown while handling the jar file, (mainly for
+             * JarCertVerifier.verifyJars) it assumes the jar file is unsigned and
+             * skip the check for a signed JNLP file
+             */
+            
+        } finally {
+
+            //Close all streams
+            closeStream(inStream);
+            closeStream(inputReader);
+            closeStream(fr);
+            closeStream(jnlpReader);
+        }
+
+        if (JNLPRuntime.isDebug())
+            System.err.println("Ending check for signed JNLP file...");
+    }
+
+    /***
+     * Closes a stream
+     * 
+     * @param stream the stream that will be closed
+     */
+    private void closeStream (Closeable stream) {
+        if (stream != null)
+            try {
+                stream.close();
+            } catch (Exception e) {
+                e.printStackTrace(System.err);
+            }
+    }
+    
+    private void checkTrustWithUser(JarCertVerifier jcv) throws LaunchException {
+        if (JNLPRuntime.isTrustAll()){
+            return;
+        }
+        if (!jcv.getRootInCacerts()) { //root cert is not in cacerts
             boolean b = SecurityDialogs.showCertWarningDialog(
-                    AccessType.UNVERIFIED, file, js);
+                    AccessType.UNVERIFIED, file, jcv);
             if (!b)
                 throw new LaunchException(null, null, R("LSFatal"),
                         R("LCLaunching"), R("LNotVerified"), "");
-        } else if (js.getRootInCacerts()) { //root cert is in cacerts
+        } else if (jcv.getRootInCacerts()) { //root cert is in cacerts
             boolean b = false;
-            if (js.noSigningIssues())
+            if (jcv.noSigningIssues())
                 b = SecurityDialogs.showCertWarningDialog(
-                        AccessType.VERIFIED, file, js);
-            else if (!js.noSigningIssues())
+                        AccessType.VERIFIED, file, jcv);
+            else if (!jcv.noSigningIssues())
                 b = SecurityDialogs.showCertWarningDialog(
-                        AccessType.SIGNING_ERROR, file, js);
+                        AccessType.SIGNING_ERROR, file, jcv);
             if (!b)
                 throw new LaunchException(null, null, R("LSFatal"),
@@ -583,42 +1058,73 @@
      */
     protected PermissionCollection getPermissions(CodeSource cs) {
-        Permissions result = new Permissions();
-
-        // should check for extensions or boot, automatically give all
-        // access w/o security dialog once we actually check certificates.
-
-        // copy security permissions from SecurityDesc element
-        if (security != null) {
-            // Security desc. is used only to track security settings for the
-            // application. However, an application may comprise of multiple
-            // jars, and as such, security must be evaluated on a per jar basis.
-
-            // set default perms
-            PermissionCollection permissions = security.getSandBoxPermissions();
-
-            // If more than default is needed:
-            // 1. Code must be signed
-            // 2. ALL or J2EE permissions must be requested (note: plugin requests ALL automatically)
-            if (cs.getCodeSigners() != null &&
-                    (getCodeSourceSecurity(cs.getLocation()).getSecurityType().equals(SecurityDesc.ALL_PERMISSIONS) ||
-                     getCodeSourceSecurity(cs.getLocation()).getSecurityType().equals(SecurityDesc.J2EE_PERMISSIONS))) {
-
-                permissions = getCodeSourceSecurity(cs.getLocation()).getPermissions(cs);
-            }
-
-            Enumeration<Permission> e = permissions.elements();
-            while (e.hasMoreElements())
-                result.add(e.nextElement());
-        }
-
-        // add in permission to read the cached JAR files
-        for (int i = 0; i < resourcePermissions.size(); i++)
-            result.add(resourcePermissions.get(i));
-
-        // add in the permissions that the user granted.
-        for (int i = 0; i < runtimePermissions.size(); i++)
-            result.add(runtimePermissions.get(i));
-
-        return result;
+        try {
+            Permissions result = new Permissions();
+
+            // should check for extensions or boot, automatically give all
+            // access w/o security dialog once we actually check certificates.
+
+            // copy security permissions from SecurityDesc element
+            if (security != null) {
+                // Security desc. is used only to track security settings for the
+                // application. However, an application may comprise of multiple
+                // jars, and as such, security must be evaluated on a per jar basis.
+
+                // set default perms
+                PermissionCollection permissions = security.getSandBoxPermissions();
+
+                // If more than default is needed:
+                // 1. Code must be signed
+                // 2. ALL or J2EE permissions must be requested (note: plugin requests ALL automatically)
+                if (cs == null) {
+                    throw new NullPointerException("Code source was null");
+                }
+                if (cs.getCodeSigners() != null) {
+                    if (cs.getLocation() == null) {
+                        throw new NullPointerException("Code source location was null");
+                    }
+                    if (getCodeSourceSecurity(cs.getLocation()) == null) {
+                        throw new NullPointerException("Code source security was null");
+                    }
+                    if (getCodeSourceSecurity(cs.getLocation()).getSecurityType() == null) {
+                        if (JNLPRuntime.isDebug()){
+                        new NullPointerException("Warning! Code source security type was null").printStackTrace();
+                        }
+                    }
+                    Object securityType = getCodeSourceSecurity(cs.getLocation()).getSecurityType();
+                    if (SecurityDesc.ALL_PERMISSIONS.equals(securityType)
+                            || SecurityDesc.J2EE_PERMISSIONS.equals(securityType)) {
+
+                        permissions = getCodeSourceSecurity(cs.getLocation()).getPermissions(cs);
+                    }
+                }
+
+                Enumeration<Permission> e = permissions.elements();
+                while (e.hasMoreElements()) {
+                    result.add(e.nextElement());
+                }
+            }
+
+            // add in permission to read the cached JAR files
+            for (int i = 0; i < resourcePermissions.size(); i++) {
+                result.add(resourcePermissions.get(i));
+            }
+
+            // add in the permissions that the user granted.
+            for (int i = 0; i < runtimePermissions.size(); i++) {
+                result.add(runtimePermissions.get(i));
+            }
+
+            // Class from host X should be allowed to connect to host X
+            if (cs.getLocation().getHost().length() > 0)
+                result.add(new SocketPermission(cs.getLocation().getHost(),
+                        "connect, accept"));
+
+            return result;
+        } catch (RuntimeException ex) {
+            if (JNLPRuntime.isDebug()) {
+                ex.printStackTrace();
+            }
+            throw ex;
+        }
     }
 
@@ -719,5 +1225,5 @@
                                     }
 
-                                    JarSigner signer = new JarSigner();
+                                    JarCertVerifier signer = new JarCertVerifier();
                                     List<JARDesc> jars = new ArrayList<JARDesc>();
                                     JARDesc jarDesc = new JARDesc(new File(extractedJarLocation).toURL(), null, null, false, false, false, false);
@@ -780,5 +1286,13 @@
                             JarFile jarFile = new JarFile(localFile.getAbsolutePath());
                             Manifest mf = jarFile.getManifest();
-                            classpaths.addAll(getClassPathsFromManifest(mf, jar.getLocation().getPath()));
+
+                            // Only check classpath if this is the plugin and there is no jnlp_href usage.
+                            // Note that this is different from proprietary plugin behaviour.
+                            // If jnlp_href is used, the app should be treated similarly to when
+                            // it is run from javaws as a webstart.
+                            if (file instanceof PluginBridge && !((PluginBridge) file).useJNLPHref()) {
+                                classpaths.addAll(getClassPathsFromManifest(mf, jar.getLocation().getPath()));
+                            }
+
                             JarIndex index = JarIndex.getJarIndex(jarFile, null);
                             if (index != null)
@@ -964,9 +1478,9 @@
          * @param jars the jars to be verified.
          */
-    private JarSigner verifyJars(List<JARDesc> jars) throws Exception {
-
-        js = new JarSigner();
-        js.verifyJars(jars, tracker);
-        return js;
+    private JarCertVerifier verifyJars(List<JARDesc> jars) throws Exception {
+
+        jcv = new JarCertVerifier();
+        jcv.verifyJars(jars, tracker);
+        return jcv;
     }
 
@@ -978,8 +1492,19 @@
             Class result = null;
 
-            if (loaders[i] == this)
-                result = super.findLoadedClass(name);
-            else
+            if (loaders[i] == this) {
+                final String fName = name;
+                try {
+                    result = AccessController.doPrivileged(
+                            new PrivilegedExceptionAction<Class<?>>() {
+                                public Class<?> run() {
+                                    return JNLPClassLoader.super.findLoadedClass(fName);
+                                }
+                            }, getAccessControlContextForClassLoading());
+                } catch (PrivilegedActionException pae) {
+                    result = null;
+                }
+            } else {
                 result = loaders[i].findLoadedClassAll(name);
+            }
 
             if (result != null)
@@ -1095,5 +1620,5 @@
      * @param desc the JARDesc for the new jar
      */
-    private void addNewJar(JARDesc desc) {
+    private void addNewJar(final JARDesc desc) {
 
         available.add(desc);
@@ -1105,8 +1630,70 @@
                 );
 
-        URL remoteURL = desc.getLocation();
-        URL cachedUrl = tracker.getCacheURL(remoteURL);
-        addURL(remoteURL);
-        CachedJarFileCallback.getInstance().addMapping(remoteURL, cachedUrl);
+        // Give read permissions to the cached jar file
+        AccessController.doPrivileged(new PrivilegedAction<Void>() {
+            public Void run() {
+                Permission p = CacheUtil.getReadPermission(desc.getLocation(),
+                        desc.getVersion());
+
+                resourcePermissions.add(p);
+
+                return null;
+            }
+        });
+
+        final URL remoteURL = desc.getLocation();
+        final URL cachedUrl = tracker.getCacheURL(remoteURL); // blocks till download
+
+        available.remove(desc); // Resource downloaded. Remove from available list.
+        
+        try {
+
+            // Verify if needed
+
+            final JarCertVerifier signer = new JarCertVerifier();
+            final List<JARDesc> jars = new ArrayList<JARDesc>();
+            jars.add(desc);
+
+            // Decide what level of security this jar should have
+            // The verification and security setting functions rely on 
+            // having AllPermissions as those actions normally happen
+            // during initialization. We therefore need to do those 
+            // actions as privileged.
+
+            AccessController.doPrivileged(new PrivilegedExceptionAction<Void>() {
+                public Void run() throws Exception {
+                    signer.verifyJars(jars, tracker);
+
+                    if (signer.anyJarsSigned() && !signer.getAlreadyTrustPublisher()) {
+                        checkTrustWithUser(signer);
+                    }
+
+                    final SecurityDesc security;
+                    if (signer.anyJarsSigned()) {
+                        security = new SecurityDesc(file,
+                                SecurityDesc.ALL_PERMISSIONS,
+                                file.getCodeBase().getHost());
+                    } else {
+                        security = new SecurityDesc(file,
+                                SecurityDesc.SANDBOX_PERMISSIONS,
+                                file.getCodeBase().getHost());
+                    }
+
+                    jarLocationSecurityMap.put(remoteURL, security);
+
+                    return null;
+                }
+            });
+
+            addURL(remoteURL);
+            CachedJarFileCallback.getInstance().addMapping(remoteURL, cachedUrl);
+
+        } catch (Exception e) {
+            // Do nothing. This code is called by loadClass which cannot 
+            // throw additional exceptions. So instead, just ignore it. 
+            // Exception => jar will not get added to classpath, which will 
+            // result in CNFE from loadClass.
+            e.printStackTrace();
+        }
     }
 
@@ -1117,10 +1704,18 @@
         for (int i = 0; i < loaders.length; i++) {
             try {
-                if (loaders[i] == this)
-                    return super.findClass(name);
-                else
+                if (loaders[i] == this) {
+                    final String fName = name;
+                    return AccessController.doPrivileged(
+                            new PrivilegedExceptionAction<Class<?>>() {
+                                public Class<?> run() throws ClassNotFoundException {
+                                    return JNLPClassLoader.super.findClass(fName);
+                                }
+                            }, getAccessControlContextForClassLoading());
+                } else {
                     return loaders[i].findClass(name);
+                }
             } catch (ClassNotFoundException ex) {
             } catch (ClassFormatError cfe) {
+            } catch (PrivilegedActionException pae) {
             }
         }
@@ -1128,6 +1723,6 @@
         // Try codebase loader
         if (codeBaseLoader != null)
-            return codeBaseLoader.findClass(name);
-        
+            return codeBaseLoader.findClass(name, true);
+
         // All else failed. Throw CNFE
         throw new ClassNotFoundException(name);
@@ -1151,5 +1746,18 @@
         // add resources until found
         while (true) {
-            JNLPClassLoader addedTo = addNextResource();
+            JNLPClassLoader addedTo = null;
+            
+            try {
+                addedTo = addNextResource();
+            } catch (LaunchException e) {
+
+                /*
+                 * This method will never handle any search for the main class
+                 * [It is handled in initializeResources()]. Therefore, this
+                 * exception will never be thrown here and is escaped
+                 */
+
+                throw new IllegalStateException(e);
+            }
 
             if (addedTo == null)
@@ -1166,15 +1774,26 @@
      * Finds the resource in this, the parent, or the extension
      * class loaders.
-     */
-    public URL getResource(String name) {
-        URL result = super.getResource(name);
-
-        for (int i = 1; i < loaders.length; i++)
-            if (result == null)
-                result = loaders[i].getResource(name);
+     *
+     * @return a <code>URL</code> for the resource, or <code>null</code>
+     * if the resource could not be found.
+     */
+    @Override
+    public URL findResource(String name) {
+        URL result = null;
+
+        try {
+            Enumeration<URL> e = findResources(name);
+            if (e.hasMoreElements()) {
+                result = e.nextElement();
+            }
+        } catch (IOException e) {
+            if (JNLPRuntime.isDebug()) {
+                e.printStackTrace();
+            }
+        }
         
         // If result is still null, look in the codebase loader
         if (result == null && codeBaseLoader != null)
-            result = codeBaseLoader.getResource(name);
+            result = codeBaseLoader.findResource(name);
 
         return result;
@@ -1182,21 +1801,65 @@
 
     /**
-     * Finds the resource in this, the parent, or the extension
-     * class loaders.
+     * Find the resources in this, the parent, or the extension
+     * class loaders. Load lazy resources if not found in current resources.
      */
     @Override
     public Enumeration<URL> findResources(String name) throws IOException {
-        Vector<URL> resources = new Vector<URL>();
-        Enumeration<URL> e;
+        Enumeration<URL> resources = findResourcesBySearching(name);
+
+        try {
+            // if not found, load all lazy resources; repeat search
+            while (!resources.hasMoreElements() && addNextResource() != null) {
+                resources = findResourcesBySearching(name);
+            }
+        } catch (LaunchException le) {
+            le.printStackTrace();
+        }
+
+        return resources;
+    }
+
+    /**
+     * Find the resources in this, the parent, or the extension
+     * class loaders.
+     */
+    private Enumeration<URL> findResourcesBySearching(String name) throws IOException {
+        List<URL> resources = new ArrayList<URL>();
+        Enumeration<URL> e = null;
 
         for (int i = 0; i < loaders.length; i++) {
-
-            if (loaders[i] == this)
-                e = super.findResources(name);
-            else
+            // TODO check if this will blow up or not
+            // if loaders[1].getResource() is called, wont it call getResource() on
+            // the original caller? infinite recursion?
+
+            if (loaders[i] == this) {
+                final String fName = name;
+                try {
+                    e = AccessController.doPrivileged(
+                            new PrivilegedExceptionAction<Enumeration<URL>>() {
+                                public Enumeration<URL> run() throws IOException {
+                                    return JNLPClassLoader.super.findResources(fName);
+                                }
+                            }, getAccessControlContextForClassLoading());
+                } catch (PrivilegedActionException pae) {
+                }
+            } else {
                 e = loaders[i].findResources(name);
-
-            while (e.hasMoreElements())
-                resources.add(e.nextElement());
+            }
+
+            final Enumeration<URL> fURLEnum = e;
+            try {
+                resources.addAll(AccessController.doPrivileged(
+                    new PrivilegedExceptionAction<Collection<URL>>() {
+                        public Collection<URL> run() {
+                            List<URL> resources = new ArrayList<URL>();
+                            while (fURLEnum != null && fURLEnum.hasMoreElements()) {
+                                resources.add(fURLEnum.nextElement());
+                            }
+                            return resources;
+                        }
+                    }, getAccessControlContextForClassLoading()));
+            } catch (PrivilegedActionException pae) {
+            }
         }
 
@@ -1209,5 +1872,5 @@
         }
 
-        return resources.elements();
+        return Collections.enumeration(resources);
     }
 
@@ -1242,6 +1905,7 @@
      *
      * @return the classloader that resources were added to, or null
-     */
-    protected JNLPClassLoader addNextResource() {
+     * @throws LaunchException Thrown if the signed JNLP file, within the main jar, fails to be verified or does not match
+     */
+    protected JNLPClassLoader addNextResource() throws LaunchException {
         if (available.size() == 0) {
             for (int i = 1; i < loaders.length; i++) {
@@ -1259,4 +1923,5 @@
 
         fillInPartJars(jars);
+        checkForMain(jars);
         activateJars(jars);
 
@@ -1306,5 +1971,26 @@
 
     protected SecurityDesc getCodeSourceSecurity(URL source) {
-        return jarLocationSecurityMap.get(source);
+        SecurityDesc sec=jarLocationSecurityMap.get(source);
+        if (sec == null && !alreadyTried.contains(source)) {
+            alreadyTried.add(source);
+            //try to load the jar which is requesting the permissions, but was NOT downloaded by standard way
+            if (JNLPRuntime.isDebug()) {
+                System.out.println("Application is trying to get permissions for " + source.toString() + ", which was not added by standard way. Trying to download and verify!");
+            }
+            try {
+                JARDesc des = new JARDesc(source, null, null, false, false, false, false);
+                addNewJar(des);
+                sec = jarLocationSecurityMap.get(source);
+            } catch (Throwable t) {
+                if (JNLPRuntime.isDebug()) {
+                    t.printStackTrace();
+                }
+                sec = null;
+            }
+        }
+        if (sec == null){
+            System.out.println(Translator.R("LNoSecInstance",source.toString()));
+        }
+        return sec;
     }
 
@@ -1347,4 +2033,7 @@
      */
     private void addToCodeBaseLoader(URL u) {
+        if (u == null) {
+            return;
+        }
 
         // Only paths may be added
@@ -1403,4 +2092,94 @@
         return result;
     }
+    
+    /**
+     * Increments loader use count by 1
+     * 
+     * @throws SecurityException if caller is not trusted
+     */
+    private synchronized void incrementLoaderUseCount() {
+        
+        // For use by trusted code only
+        if (System.getSecurityManager() != null)
+            System.getSecurityManager().checkPermission(new AllPermission());
+        
+        useCount++;
+    }
+
+    /**
+     * Decrements loader use count by 1
+     * 
+     * If count reaches 0, loader is removed from list of available loaders
+     * 
+     * @throws SecurityException if caller is not trusted
+     */
+    public synchronized void decrementLoaderUseCount() {
+
+        // For use by trusted code only
+        if (System.getSecurityManager() != null)
+            System.getSecurityManager().checkPermission(new AllPermission());
+
+        useCount--;
+
+        if (useCount <= 0) {
+            synchronized(urlToLoader) {
+                urlToLoader.remove(file.getUniqueKey());
+            }
+        }
+    }
+
+    /**
+     * Returns an appropriate AccessControlContext for loading classes in
+     * the running instance.
+     *
+     * The default context during class-loading only allows connection to
+     * codebase. However applets are allowed to load jars from arbitrary
+     * locations and the codebase only access falls short if a class from
+     * one location needs a class from another.
+     *
+     * Given protected access since CodeBaseClassloader uses this function too.
+     *
+     * @return The appropriate AccessControlContext for loading classes for this instance
+     */
+    public AccessControlContext getAccessControlContextForClassLoading() {
+        AccessControlContext context = AccessController.getContext();
+
+        try {
+            context.checkPermission(new AllPermission());
+            return context; // If context already has all permissions, don't bother
+        } catch (AccessControlException ace) {
+            // continue below
+        } catch (ClassCircularityError cce) {
+            // continue below
+        }
+
+        // Since this is for class-loading, technically any class from one jar
+        // should be able to access a class from another, therefore making the
+        // original context code source irrelevant
+        PermissionCollection permissions = this.security.getSandBoxPermissions();
+
+        // Local cache access permissions
+        for (Permission resourcePermission : resourcePermissions) {
+            permissions.add(resourcePermission);
+        }
+
+        // Permissions for all remote hosting urls
+        for (URL u: jarLocationSecurityMap.keySet()) {
+            permissions.add(new SocketPermission(u.getHost(),
+                                                 "connect, accept"));
+        }
+
+        // Permissions for codebase urls (if there is a loader)
+        if (codeBaseLoader != null) {
+            for (URL u : codeBaseLoader.getURLs()) {
+                permissions.add(new SocketPermission(u.getHost(),
+                        "connect, accept"));
+            }
+        }
+
+        ProtectionDomain pd = new ProtectionDomain(null, permissions);
+
+        return new AccessControlContext(new ProtectionDomain[] { pd });
+    }
 
     /*
@@ -1412,4 +2191,9 @@
         JNLPClassLoader parentJNLPClassLoader;
         
+        /**
+         * Classes that are not found, so that findClass can skip them next time
+         */
+        ConcurrentHashMap<String, URL[]> notFoundResources = new ConcurrentHashMap<String, URL[]>();
+
         public CodeBaseClassLoader(URL[] urls, JNLPClassLoader cl) {
             super(urls);
@@ -1423,6 +2207,34 @@
 
         @Override
-        public Class<?> findClass(String name) throws ClassNotFoundException { 
-            return super.findClass(name); 
+        public Class<?> findClass(String name) throws ClassNotFoundException {
+            return findClass(name, false);
+        }
+
+        public Class<?> findClass(String name, boolean recursivelyInvoked) throws ClassNotFoundException {
+
+            if (!recursivelyInvoked) {
+                try {
+                    return parentJNLPClassLoader.findClass(name);
+                } catch (ClassNotFoundException cnfe) {
+                    // continue
+                }
+            }
+
+            // If we have searched this path before, don't try again
+            if (Arrays.equals(super.getURLs(), notFoundResources.get(name)))
+                throw new ClassNotFoundException(name);
+
+            try {
+                final String fName = name;
+                return AccessController.doPrivileged(
+                        new PrivilegedExceptionAction<Class<?>>() {
+                            public Class<?> run() throws ClassNotFoundException {
+                                return CodeBaseClassLoader.super.findClass(fName);
+                            }
+                        }, parentJNLPClassLoader.getAccessControlContextForClassLoading());
+            } catch (PrivilegedActionException pae) {
+                notFoundResources.put(name, super.getURLs());
+                throw new ClassNotFoundException("Could not find class " + name);
+            }
         }
 
@@ -1451,7 +2263,19 @@
         @Override
         public Enumeration<URL> findResources(String name) throws IOException {
+
+            // If we have searched this path before, don't try again
+            if (Arrays.equals(super.getURLs(), notFoundResources.get(name)))
+                return (new Vector<URL>(0)).elements();
+
             if (!name.startsWith("META-INF")) {
-                return super.findResources(name);
-            }
+                Enumeration<URL> urls = super.findResources(name);
+
+                if (!urls.hasMoreElements()) {
+                    notFoundResources.put(name, super.getURLs());
+                }
+
+                return urls;
+            }
+
             return (new Vector<URL>(0)).elements();
         }
@@ -1459,7 +2283,29 @@
         @Override
         public URL findResource(String name) {
+
+            // If we have searched this path before, don't try again
+            if (Arrays.equals(super.getURLs(), notFoundResources.get(name)))
+                return null;
+
+            URL url = null;
             if (!name.startsWith("META-INF")) {
-                return super.findResource(name);
-            }
+                try {
+                    final String fName = name;
+                    url = AccessController.doPrivileged(
+                            new PrivilegedExceptionAction<URL>() {
+                                public URL run() {
+                                    return CodeBaseClassLoader.super.findResource(fName);
+                                }
+                            }, parentJNLPClassLoader.getAccessControlContextForClassLoading());
+                } catch (PrivilegedActionException pae) {
+                }
+
+                if (url == null) {
+                    notFoundResources.put(name, super.getURLs());
+                }
+
+                return url;
+            }
+
             return null;
         }
Index: /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java	(revision 416)
@@ -30,4 +30,5 @@
 import javax.naming.ConfigurationException;
 import javax.net.ssl.HttpsURLConnection;
+import javax.net.ssl.KeyManagerFactory;
 import javax.net.ssl.SSLContext;
 import javax.net.ssl.SSLSocketFactory;
@@ -94,7 +95,4 @@
     private static UpdatePolicy updatePolicy = UpdatePolicy.ALWAYS;
 
-    /** netx window icon */
-    private static Image windowIcon = null;
-
     /** whether initialized */
     private static boolean initialized = false;
@@ -124,4 +122,7 @@
     private static boolean forksAllowed = true;
 
+    /** all security dialogs will be consumed and pretented as beeing verified by user and allowed.*/
+    private static boolean trustAll=false;
+
     /** contains the arguments passed to the jnlp runtime */
     private static List<String> initialArguments;
@@ -132,4 +133,5 @@
     public static final String STDERR_FILE = "java.stderr";
     public static final String STDOUT_FILE = "java.stdout";
+
 
     /**
@@ -184,7 +186,4 @@
             checkHeadless();
 
-        if (!headless && windowIcon == null)
-            loadWindowIcon();
-
         if (!headless && indicator == null)
             indicator = new DefaultDownloadIndicator();
@@ -192,7 +191,7 @@
         if (handler == null) {
             if (headless) {
-                handler = new DefaultLaunchHandler();
+                handler = new DefaultLaunchHandler(System.err);
             } else {
-                handler = new GuiLaunchHandler();
+                handler = new GuiLaunchHandler(System.err);
             }
         }
@@ -222,6 +221,9 @@
             SSLSocketFactory sslSocketFactory;
             SSLContext context = SSLContext.getInstance("SSL");
+            KeyStore ks = KeyStores.getKeyStore(KeyStores.Level.USER, KeyStores.Type.CLIENT_CERTS);
+            KeyManagerFactory kmf = KeyManagerFactory.getInstance("SunX509");
+            kmf.init(ks, KeyStores.getPassword());
             TrustManager[] trust = new TrustManager[] { VariableX509TrustManager.getInstance() };
-            context.init(null, trust, null);
+            context.init(kmf.getKeyManagers(), trust, null);
             sslSocketFactory = context.getSocketFactory();
 
@@ -326,22 +328,4 @@
     public static boolean isWebstartApplication() {
         return isWebstartApplication;
-    }
-
-    /**
-     * Returns the window icon.
-     */
-    public static Image getWindowIcon() {
-        return windowIcon;
-    }
-
-    /**
-     * Sets the window icon that is displayed in Java applications
-     * and applets instead of the default Java icon.
-     *
-     * @throws IllegalStateException if caller is not the exit class
-     */
-    public static void setWindowIcon(Image image) {
-        checkExitClass();
-        windowIcon = image;
     }
 
@@ -611,20 +595,4 @@
         } catch (Exception ex) {
             throw new IllegalStateException("Missing resource bundle in netx.jar:net/sourceforge/jnlp/resource/Messages.properties");
-        }
-    }
-
-    /**
-     * Load the window icon.
-     */
-    private static void loadWindowIcon() {
-        if (windowIcon != null)
-            return;
-
-        try {
-            windowIcon = new javax.swing.ImageIcon((new sun.misc.Launcher())
-                        .getClassLoader().getResource("net/sourceforge/jnlp/resources/netx-icon.png")).getImage();
-        } catch (Exception ex) {
-            if (JNLPRuntime.isDebug())
-                ex.printStackTrace();
         }
     }
@@ -733,3 +701,11 @@
     }
 
+    static void setTrustAll(boolean b) {
+        trustAll=b;
+    }
+
+    public static boolean isTrustAll() {
+        return trustAll;
+    }
+
 }
Index: /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/runtime/JNLPSecurityManager.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/runtime/JNLPSecurityManager.java	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/runtime/JNLPSecurityManager.java	(revision 416)
@@ -282,73 +282,5 @@
             //            }
 
-            try {
-                super.checkPermission(perm);
-            } catch (SecurityException se) {
-
-                //This section is a special case for dealing with SocketPermissions.
-                if (JNLPRuntime.isDebug())
-                    System.err.println("Requesting permission: " + perm.toString());
-
-                //Change this SocketPermission's action to connect and accept
-                //(and resolve). This is to avoid asking for connect permission
-                //on every address resolve.
-                Permission tmpPerm = null;
-                if (perm instanceof SocketPermission) {
-                    tmpPerm = new SocketPermission(perm.getName(),
-                                                        SecurityConstants.SOCKET_CONNECT_ACCEPT_ACTION);
-
-                    // before proceeding, check if we are trying to connect to same origin
-                    ApplicationInstance app = getApplication();
-                    JNLPFile file = app.getJNLPFile();
-
-                    String srcHost = file.getSourceLocation().getAuthority();
-                    String destHost = name;
-
-                    // host = abc.xyz.com or abc.xyz.com:<port>
-                    if (destHost.indexOf(':') >= 0)
-                        destHost = destHost.substring(0, destHost.indexOf(':'));
-
-                    // host = abc.xyz.com
-                    String[] hostComponents = destHost.split("\\.");
-
-                    int length = hostComponents.length;
-                    if (length >= 2) {
-
-                        // address is in xxx.xxx.xxx format
-                        destHost = hostComponents[length - 2] + "." + hostComponents[length - 1];
-
-                        // host = xyz.com i.e. origin
-                        boolean isDestHostName = false;
-
-                        // make sure that it is not an ip address
-                        try {
-                            Integer.parseInt(hostComponents[length - 1]);
-                        } catch (NumberFormatException e) {
-                            isDestHostName = true;
-                        }
-
-                        if (isDestHostName) {
-                            // okay, destination is hostname. Now figure out if it is a subset of origin
-                            if (srcHost.endsWith(destHost)) {
-                                addPermission(tmpPerm);
-                                return;
-                            }
-                        }
-                    }
-                } else {
-                    tmpPerm = perm;
-                }
-
-                if (tmpPerm != null) {
-                    //askPermission will only prompt the user on SocketPermission
-                    //meaning we're denying all other SecurityExceptions that may arise.
-                    if (askPermission(tmpPerm)) {
-                        addPermission(tmpPerm);
-                        //return quietly.
-                    } else {
-                        throw se;
-                    }
-                }
-            }
+            super.checkPermission(perm);
         } catch (SecurityException ex) {
             if (JNLPRuntime.isDebug()) {
@@ -418,10 +350,4 @@
             app.addWindow(w);
         }
-
-        // change coffee cup to netx for default icon
-        if (window instanceof Window)
-            for (Window w = (Window) window; w != null; w = w.getOwner())
-                if (window instanceof Frame)
-                    ((Frame) window).setIconImage(JNLPRuntime.getWindowIcon());
 
         // todo: set awt.appletWarning to custom message
Index: /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/runtime/pac-funcs.js
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/runtime/pac-funcs.js	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/runtime/pac-funcs.js	(revision 416)
@@ -326,16 +326,18 @@
  */
 function dateRange() {
-
-    // note: watch out for wrapping around of dates. date ranges, like
-    // month=9 to month=8, wrap around and cover the entire year. this
-    // makes everything more interesting
-
-    var gmt;
-	if (arguments.length > 1) {
-		if (arguments[arguments.length-1] === "GMT") {
-			gmt = true;
-            arguments.splice(0,arguments.length-1);
-        }
-	}
+    switch (arguments.length) {
+       case 1: return isDateInRange_internallForIcedTeaWebTesting(new Date(),arguments[0]);
+       case 2: return isDateInRange_internallForIcedTeaWebTesting(new Date(),arguments[0],arguments[1]);
+       case 3: return isDateInRange_internallForIcedTeaWebTesting(new Date(),arguments[0],arguments[1],arguments[2]);
+       case 4: return isDateInRange_internallForIcedTeaWebTesting(new Date(),arguments[0],arguments[1],arguments[2],arguments[3]);
+       case 5: return isDateInRange_internallForIcedTeaWebTesting(new Date(),arguments[0],arguments[1],arguments[2],arguments[3],arguments[4]);
+       case 6: return isDateInRange_internallForIcedTeaWebTesting(new Date(),arguments[0],arguments[1],arguments[2],arguments[3],arguments[4],arguments[5]);
+       case 7: return isDateInRange_internallForIcedTeaWebTesting(new Date(),arguments[0],arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6]); //GMT
+       default:
+           return false;
+    }
+}
+
+function isDateInRange_internallForIcedTeaWebTesting() {
 
     function isDate(date) {
@@ -414,5 +416,5 @@
 
     function inYearRange(today, year1, year2) {
-        if (year1 <= today.getYear() && today.getYear() <= year2) {
+        if (year1 <= today.getFullYear() && today.getFullYear() <= year2) {
             return true;
         } else {
@@ -481,5 +483,5 @@
     function inYearMonthRange(today, month1, year1, month2, year2) {
         if (year1 === year2) {
-            if (today.getYear() === year1) {
+            if (today.getFullYear() === year1) {
                if (month1 <= today.getMonth() && today.getMonth() <= month2) {
                    return true;
@@ -492,6 +494,6 @@
         }
         if (year1 < year2) {
-            if (year1 <= today.getYear() && today.getYear() <= year2) {
-                if (today.getYear() === year1) {
+            if (year1 <= today.getFullYear() && today.getFullYear() <= year2) {
+                if (today.getFullYear() === year1) {
                     if (today.getMonth() >= month1) {
                         return true;
@@ -499,5 +501,5 @@
                         return false;
                     }
-                } else if (today.getYear() === year2) {
+                } else if (today.getFullYear() === year2) {
                     if (today.getMonth() <= month2) {
                         return true;
@@ -514,10 +516,9 @@
             return false;
         }
-
     }
 
     function inYearMonthDateRange(today, date1, month1, year1, date2, month2, year2) {
         if (year1 === year2) {
-            if (year1 === today.getYear()) {
+            if (year1 === today.getFullYear()) {
                 if ((month1 <= today.getMonth()) && (today.getMonth() <= month2)) {
                     if (month1 === month2) {
@@ -549,6 +550,6 @@
             }
         } else if (year1 < year2) {
-            if (year1 <= today.getYear() && today.getYear() <= year2) {
-                if (today.getYear() === year1) {
+            if (year1 <= today.getFullYear() && today.getFullYear() <= year2) {
+                if (today.getFullYear() === year1) {
                     if (today.getMonth() === month1) {
                         if (today.getDate() >= date1) {
@@ -562,23 +563,40 @@
                         return false;
                     }
-                } else if (today.getYear() === year2) {
-                    if (today.getMonth() <= month2) {
-
-                    } else {
-                        return true;
-                    }
-                } else {
-                    return true;
-                }
-            } else {
-                return false;
-            }
-        } else {
-            return false;
-        }
-    }
-
+                } else if (today.getFullYear() === year2) {
+                    if (today.getMonth() === month2) {
+                        if (today.getDate() <= date1) {
+                            return true;
+                        } else {
+                            return false;
+                        }
+                    } else if (today.getMonth() < month2) {
+                        return true;
+                    } else {
+                        return false;
+                    }
+                } else {
+                    return true;
+                }
+            } else {
+                return false;
+            }
+        } else {
+            return false;
+        }
+    }
+
+    // note: watch out for wrapping around of dates. date ranges, like
+    // month=9 to month=8, wrap around and cover the entire year. this
+    // makes everything more interesting
+
+    var gmt;
+	if (arguments.length > 2) {
+		if (arguments[arguments.length-1] === "GMT") {
+			gmt = true;
+            arguments.splice(0,arguments.length-1);
+        }
+	}
     // TODO: change date to gmt, whatever
-    var today = new Date();
+    var today = arguments[0]
 
     var arg1;
@@ -589,7 +607,7 @@
     var arg6;
 
-    switch (arguments.length) {
+    switch (arguments.length-1) {
         case 1:
-            var arg = arguments[0];
+            var arg = arguments[1];
             if (isDate(arg)) {
                 if (today.getDate() === arg) {
@@ -605,5 +623,5 @@
                 }
             } else { // year
-                if (today.getYear() === arg) {
+                if (today.getFullYear() === arg) {
                     return true;
                 } else {
@@ -612,6 +630,6 @@
             }
         case 2:
-            arg1 = arguments[0];
-            arg2 = arguments[1];
+            arg1 = arguments[1];
+            arg2 = arguments[2];
             if (isDate(arg1) && isDate(arg2)) {
                 var date1 = arg1;
@@ -635,8 +653,8 @@
             }
         case 4:
-            arg1 = arguments[0];
-            arg2 = arguments[1];
-            arg3 = arguments[2];
-            arg4 = arguments[3];
+            arg1 = arguments[1];
+            arg2 = arguments[2];
+            arg3 = arguments[3];
+            arg4 = arguments[4];
 
             if (isDate(arg1) && isMonth(arg2) && isDate(arg3) && isMonth(arg4)) {
@@ -659,10 +677,10 @@
             }
         case 6:
-            arg1 = arguments[0];
-            arg2 = arguments[1];
-            arg3 = arguments[2];
-            arg4 = arguments[3];
-            arg5 = arguments[4];
-            arg6 = arguments[5];
+            arg1 = arguments[1];
+            arg2 = arguments[2];
+            arg3 = arguments[3];
+            arg4 = arguments[4];
+            arg5 = arguments[5];
+            arg6 = arguments[6];
             if (isDate(arg1) && isMonth(arg2) && isYear(arg3) &&
                 isDate(arg4) && isMonth(arg5) && isYear(arg6)) {
Index: /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/security/AccessWarningPane.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/security/AccessWarningPane.java	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/security/AccessWarningPane.java	(revision 416)
@@ -105,5 +105,7 @@
 
         try {
-            publisher = file.getInformation().getVendor() != null ? file.getInformation().getVendor() : R("SNoAssociatedCertificate");
+            publisher = file.getInformation().getVendor() != null ? 
+                    file.getInformation().getVendor() + " " + R("SUnverified") : 
+                    R("SNoAssociatedCertificate");
         } catch (Exception e) {
         }
@@ -151,5 +153,5 @@
         }
 
-        ImageIcon icon = new ImageIcon((new sun.misc.Launcher()).getClassLoader().getResource("net/sourceforge/jnlp/resources/warning.png"));
+        ImageIcon icon = new ImageIcon((new sun.misc.Launcher()).getClassLoader().getResource("net/sourceforge/jnlp/resources/question.png"));
         JLabel topLabel = new JLabel(htmlWrap(topLabelText), icon, SwingConstants.LEFT);
         topLabel.setFont(new Font(topLabel.getFont().toString(),
Index: /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/security/CertWarningPane.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/security/CertWarningPane.java	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/security/CertWarningPane.java	(revision 416)
@@ -1,4 +1,4 @@
 /* CertWarningPane.java
-   Copyright (C) 2008 Red Hat, Inc.
+   Copyright (C) 2012 Red Hat, Inc.
 
 This file is part of IcedTea.
@@ -97,5 +97,5 @@
         AccessType type = parent.getAccessType();
         JNLPFile file = parent.getFile();
-        Certificate c = parent.getJarSigner().getPublisher();
+        Certificate c = parent.getCertVerifier().getPublisher();
 
         String name = "";
@@ -133,11 +133,17 @@
         }
 
-        //Top label
+        // Labels
         String topLabelText = "";
+        String bottomLabelText = parent.getCertVerifier().getRootInCacerts() ?
+                                 R("STrustedSource") : R("SUntrustedSource");
         String propertyName = "";
+        String iconLocation = "net/sourceforge/jnlp/resources/";
+        boolean alwaysTrustSelected = false;
         if (certVerifier instanceof HttpsCertVerifier) {
-            topLabelText = R("SHttpsUnverified") + " " +
-                                 R("Continue");
+            // HTTPS certs that are verified do not prompt for a dialog.
+            // @see VariableX509TrustManager#checkServerTrusted
+            topLabelText = R("SHttpsUnverified") + " " + R("Continue");
             propertyName = "OptionPane.warningIcon";
+            iconLocation += "warning.png";
         } else
             switch (type) {
@@ -145,16 +151,23 @@
                     topLabelText = R("SSigVerified");
                     propertyName = "OptionPane.informationIcon";
+                    iconLocation += "question.png";
+                    alwaysTrustSelected = true;
                     break;
                 case UNVERIFIED:
                     topLabelText = R("SSigUnverified");
                     propertyName = "OptionPane.warningIcon";
+                    iconLocation += "warning.png";
+                    bottomLabelText += " " + R("SWarnFullPermissionsIgnorePolicy");
                     break;
                 case SIGNING_ERROR:
                     topLabelText = R("SSignatureError");
                     propertyName = "OptionPane.warningIcon";
+                    iconLocation += "warning.png";
+                    bottomLabelText += " " + R("SWarnFullPermissionsIgnorePolicy");
                     break;
             }
+
         ImageIcon icon = new ImageIcon((new sun.misc.Launcher())
-                                .getClassLoader().getResource("net/sourceforge/jnlp/resources/warning.png"));
+                                .getClassLoader().getResource(iconLocation));
         JLabel topLabel = new JLabel(htmlWrap(topLabelText), icon, SwingConstants.LEFT);
         topLabel.setFont(new Font(topLabel.getFont().toString(),
@@ -163,5 +176,5 @@
         topPanel.setBackground(Color.WHITE);
         topPanel.add(topLabel, BorderLayout.CENTER);
-        topPanel.setPreferredSize(new Dimension(400, 60));
+        topPanel.setPreferredSize(new Dimension(400, 75));
         topPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
 
@@ -176,4 +189,5 @@
         alwaysTrust = new JCheckBox(R("SAlwaysTrustPublisher"));
         alwaysTrust.setEnabled(true);
+        alwaysTrust.setSelected(alwaysTrustSelected);
 
         JPanel infoPanel = new JPanel(new GridLayout(4, 1));
@@ -211,12 +225,7 @@
         add(buttonPanel);
 
-        JLabel bottomLabel;
+        JLabel bottomLabel = new JLabel(htmlWrap(bottomLabelText));;
         JButton moreInfo = new JButton(R("ButMoreInformation"));
         moreInfo.addActionListener(new MoreInfoButtonListener());
-
-        if (parent.getJarSigner().getRootInCacerts())
-            bottomLabel = new JLabel(htmlWrap(R("STrustedSource")));
-        else
-            bottomLabel = new JLabel(htmlWrap(R("SUntrustedSource")));
 
         JPanel bottomPanel = new JPanel();
@@ -224,5 +233,5 @@
         bottomPanel.add(bottomLabel);
         bottomPanel.add(moreInfo);
-        bottomPanel.setPreferredSize(new Dimension(500, 100));
+        bottomPanel.setPreferredSize(new Dimension(600, 100));
         bottomPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
         add(bottomPanel);
@@ -232,5 +241,5 @@
     private class MoreInfoButtonListener implements ActionListener {
         public void actionPerformed(ActionEvent e) {
-            SecurityDialog.showMoreInfoDialog(parent.getJarSigner(),
+            SecurityDialog.showMoreInfoDialog(parent.getCertVerifier(),
                                 parent);
         }
@@ -245,5 +254,5 @@
                 try {
                     KeyStore ks = KeyStores.getKeyStore(Level.USER, Type.CERTS);
-                    X509Certificate c = (X509Certificate) parent.getJarSigner().getPublisher();
+                    X509Certificate c = (X509Certificate) parent.getCertVerifier().getPublisher();
                     CertificateUtils.addToKeyStore(c, ks);
                     File keyStoreFile = new File(KeyStores.getKeyStoreLocation(Level.USER, Type.CERTS));
Index: /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/security/CertificateUtils.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/security/CertificateUtils.java	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/security/CertificateUtils.java	(revision 416)
@@ -39,20 +39,28 @@
 
 import java.io.BufferedInputStream;
+import java.io.BufferedOutputStream;
 import java.io.File;
 import java.io.FileInputStream;
+import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.PrintStream;
 import java.math.BigInteger;
+import java.security.InvalidKeyException;
+import java.security.Key;
 import java.security.KeyStore;
 import java.security.KeyStoreException;
+import java.security.NoSuchAlgorithmException;
+import java.security.NoSuchProviderException;
+import java.security.SignatureException;
 import java.security.cert.Certificate;
 import java.security.cert.CertificateException;
 import java.security.cert.CertificateFactory;
 import java.security.cert.X509Certificate;
+import java.util.Enumeration;
 import java.util.Random;
 
 import net.sourceforge.jnlp.runtime.JNLPRuntime;
-
-import sun.misc.BASE64Encoder;
+import net.sourceforge.jnlp.runtime.Translator;
+import net.sourceforge.jnlp.util.replacements.BASE64Encoder;
 import sun.security.provider.X509Factory;
 
@@ -114,4 +122,39 @@
     }
 
+    public static void addPKCS12ToKeyStore(File file, KeyStore ks, char[] password)
+            throws Exception {
+        BufferedInputStream bis = new BufferedInputStream(new FileInputStream(file));
+        KeyStore keyStore = KeyStore.getInstance("PKCS12");
+        keyStore.load(bis, password);
+
+        Enumeration<String> aliasList = keyStore.aliases();
+
+        while (aliasList.hasMoreElements()) {
+            String alias = aliasList.nextElement();
+            Certificate[] certChain = keyStore.getCertificateChain(alias);
+            Key key = keyStore.getKey(alias, password);
+            addPKCS12ToKeyStore(certChain, key, ks);
+        }
+    }
+
+    public static void addPKCS12ToKeyStore(Certificate[] certChain, Key key, KeyStore ks)
+            throws KeyStoreException {
+        String alias = null;
+
+        // does this certificate already exist?
+        alias = ks.getCertificateAlias(certChain[0]);
+        if (alias != null) {
+            return;
+        }
+
+        // create a unique alias for this new certificate
+        Random random = new Random();
+        do {
+            alias = new BigInteger(20, random).toString();
+        } while (ks.getCertificate(alias) != null);
+
+        ks.setKeyEntry(alias, key, KeyStores.getPassword(), certChain);
+    }
+
     /**
      * Checks whether an X509Certificate is already in one of the keystores
@@ -123,10 +166,20 @@
         for (int i = 0; i < keyStores.length; i++) {
             try {
-                if (keyStores[i].getCertificateAlias(c) != null) {
-                    if (JNLPRuntime.isDebug()) {
-                        System.out.println(c.getSubjectX500Principal().getName() + " found in cacerts");
-                    }
-                    return true;
+                // Check against all certs
+                Enumeration<String> aliases = keyStores[i].aliases();
+                while (aliases.hasMoreElements()) {
+
+                    // Verify against this entry
+                    String alias = aliases.nextElement();
+
+                    if (c.equals(keyStores[i].getCertificate(alias))) {
+                        if (JNLPRuntime.isDebug()) {
+                            System.out.println(Translator.R("LCertFoundIn", c.getSubjectX500Principal().getName(), KeyStores.getPathToKeystore(keyStores[i].hashCode())));
+                        }
+
+                        return true;
+                    } // else continue
                 }
+
             } catch (KeyStoreException e) {
                 e.printStackTrace();
@@ -149,3 +202,14 @@
         out.println(X509Factory.END_CERT);
     }
+
+    public static void dumpPKCS12(String alias, File file, KeyStore ks, char[] password)
+            throws Exception {
+        Certificate[] certChain = ks.getCertificateChain(alias);
+        Key key = ks.getKey(alias, KeyStores.getPassword());
+        BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(file));
+        KeyStore keyStore = KeyStore.getInstance("PKCS12");
+        keyStore.load(null, null);
+        keyStore.setKeyEntry(alias, key, password, certChain);
+        keyStore.store(bos, password);
+    }
 }
Index: /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/security/CertsInfoPane.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/security/CertsInfoPane.java	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/security/CertsInfoPane.java	(revision 416)
@@ -85,5 +85,5 @@
      */
     void buildTree() {
-        certPath = parent.getJarSigner().getCertPath();
+        certPath = parent.getCertVerifier().getCertPath();
         X509Certificate firstCert =
                         ((X509Certificate) certPath.getCertificates().get(0));
Index: /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/security/KeyStores.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/security/KeyStores.java	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/security/KeyStores.java	(revision 416)
@@ -48,5 +48,7 @@
 import java.security.cert.CertificateException;
 import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 import java.util.StringTokenizer;
 
@@ -76,4 +78,6 @@
     }
 
+    public static final Map<Integer,String> keystoresPaths=new HashMap<Integer, String>();
+
     private static DeploymentConfiguration config = null;
 
@@ -134,8 +138,19 @@
         try {
             ks = createKeyStoreFromFile(new File(location), create, DEFAULT_PASSWORD);
+            //hashcode is used instead of instance so when no references are left
+            //to keystore, then this will not be blocker for garbage collection
+            keystoresPaths.put(ks.hashCode(),location);
         } catch (Exception e) {
             e.printStackTrace();
         }
         return ks;
+    }
+
+    public static String getPathToKeystore(int k) {
+        String s = keystoresPaths.get(k);
+        if (s == null) {
+            return "unknown keystore location";
+        }
+        return s;
     }
 
Index: /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/security/MoreInfoPane.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/security/MoreInfoPane.java	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/security/MoreInfoPane.java	(revision 416)
@@ -62,6 +62,9 @@
 public class MoreInfoPane extends SecurityDialogPanel {
 
+    private boolean showSignedJNLPWarning;
+
     public MoreInfoPane(SecurityDialog x, CertVerifier certVerifier) {
         super(x, certVerifier);
+        showSignedJNLPWarning= x.requiresSignedJNLPWarning();
         addComponents();
     }
@@ -73,4 +76,9 @@
         ArrayList<String> details = certVerifier.getDetails();
 
+        // Show signed JNLP warning if the signed main jar does not have a
+        // signed JNLP file and the launching JNLP file contains special properties
+        if(showSignedJNLPWarning)
+            details.add(R("SJNLPFileIsNotSigned"));
+            
         int numLabels = details.size();
         JPanel errorPanel = new JPanel(new GridLayout(numLabels, 1));
@@ -89,4 +97,9 @@
             errorPanel.add(new JLabel(htmlWrap(details.get(i)), icon, SwingConstants.LEFT));
         }
+        
+        // Removes signed JNLP warning after it has been used. This will avoid
+        // any alteration to certVerifier.
+        if(showSignedJNLPWarning)
+            details.remove(details.size()-1);
 
         JPanel buttonsPanel = new JPanel(new BorderLayout());
@@ -106,5 +119,5 @@
     private class CertInfoButtonListener implements ActionListener {
         public void actionPerformed(ActionEvent e) {
-            SecurityDialog.showCertInfoDialog(parent.getJarSigner(),
+            SecurityDialog.showCertInfoDialog(parent.getCertVerifier(),
                                 parent);
         }
Index: /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/security/SecurityDialog.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/security/SecurityDialog.java	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/security/SecurityDialog.java	(revision 416)
@@ -42,4 +42,5 @@
 import net.sourceforge.jnlp.security.SecurityDialogs.AccessType;
 import net.sourceforge.jnlp.security.SecurityDialogs.DialogType;
+import net.sourceforge.jnlp.util.ImageResources;
 
 import java.awt.*;
@@ -93,15 +94,22 @@
     private Object value;
 
-    SecurityDialog(DialogType dialogType, AccessType accessType,
-                JNLPFile file, CertVerifier jarSigner, X509Certificate cert, Object[] extras) {
+    /** Should show signed JNLP file warning */
+    private boolean requiresSignedJNLPWarning;
+
+    SecurityDialog(DialogType dialogType, AccessType accessType,
+                JNLPFile file, CertVerifier JarCertVerifier, X509Certificate cert, Object[] extras) {
         super();
+        setIconImages(ImageResources.INSTANCE.getApplicationImages());
         this.dialogType = dialogType;
         this.accessType = accessType;
         this.file = file;
-        this.certVerifier = jarSigner;
+        this.certVerifier = JarCertVerifier;
         this.cert = cert;
         this.extras = extras;
         initialized = true;
 
+        if(file != null)
+            requiresSignedJNLPWarning= file.requiresSignedJNLPWarning();
+
         initDialog();
     }
@@ -119,6 +127,6 @@
      */
     SecurityDialog(DialogType dialogType, AccessType accessType,
-                        JNLPFile file, CertVerifier jarSigner) {
-        this(dialogType, accessType, file, jarSigner, null, null);
+                        JNLPFile file, CertVerifier certVerifier) {
+        this(dialogType, accessType, file, certVerifier, null, null);
     }
 
@@ -159,13 +167,14 @@
      * Shows more information regarding jar code signing
      *
-     * @param jarSigner the JarSigner used to verify this application
+     * @param certVerifier the JarCertVerifier used to verify this application
      * @param parent the parent option pane
      */
     public static void showMoreInfoDialog(
-                CertVerifier jarSigner, SecurityDialog parent) {
-
+                CertVerifier certVerifier, SecurityDialog parent) {
+
+        JNLPFile file= parent.getFile();
         SecurityDialog dialog =
-                        new SecurityDialog(DialogType.MORE_INFO, null, null,
-                                jarSigner);
+                        new SecurityDialog(DialogType.MORE_INFO, null, file,
+                                certVerifier);
         dialog.setModalityType(ModalityType.APPLICATION_MODAL);
         dialog.setVisible(true);
@@ -176,11 +185,11 @@
      * Displays CertPath information in a readable table format.
      *
-     * @param jarSigner the JarSigner used to verify this application
+     * @param certVerifier the JarCertVerifier used to verify this application
      * @param parent the parent option pane
      */
-    public static void showCertInfoDialog(CertVerifier jarSigner,
+    public static void showCertInfoDialog(CertVerifier certVerifier,
                 SecurityDialog parent) {
         SecurityDialog dialog = new SecurityDialog(DialogType.CERT_INFO,
-                        null, null, jarSigner);
+                        null, null, certVerifier);
         dialog.setLocationRelativeTo(parent);
         dialog.setModalityType(ModalityType.APPLICATION_MODAL);
@@ -208,7 +217,10 @@
 
         String dialogTitle = "";
-        if (dialogType == DialogType.CERT_WARNING)
-            dialogTitle = "Warning - Security";
-        else if (dialogType == DialogType.MORE_INFO)
+        if (dialogType == DialogType.CERT_WARNING) {
+            if (accessType == AccessType.VERIFIED)
+                dialogTitle = "Security Approval Required";
+            else
+                dialogTitle = "Security Warning";
+        } else if (dialogType == DialogType.MORE_INFO)
             dialogTitle = "More Information";
         else if (dialogType == DialogType.CERT_INFO)
@@ -267,5 +279,5 @@
     }
 
-    public CertVerifier getJarSigner() {
+    public CertVerifier getCertVerifier() {
         return certVerifier;
     }
@@ -370,4 +382,9 @@
         listeners.add(listener);
     }
+    
+    public boolean requiresSignedJNLPWarning()
+    {
+        return requiresSignedJNLPWarning;
+    }
 
 }
Index: /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/security/SecurityDialogs.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/security/SecurityDialogs.java	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/security/SecurityDialogs.java	(revision 416)
@@ -181,8 +181,10 @@
      * @param accessType the type of warning dialog to show
      * @param file the JNLPFile associated with this warning
-     * @param jarSigner the JarSigner used to verify this application
+     * @param certVerifier the JarCertVerifier used to verify this application
+     *
+     * @return true if the user accepted the certificate
      */
     public static boolean showCertWarningDialog(AccessType accessType,
-            JNLPFile file, CertVerifier jarSigner) {
+            JNLPFile file, CertVerifier certVerifier) {
 
         if (!shouldPromptUser()) {
@@ -194,5 +196,5 @@
         message.accessType = accessType;
         message.file = file;
-        message.certVerifier = jarSigner;
+        message.certVerifier = certVerifier;
 
         Object selectedValue = getUserResponse(message);
Index: /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/security/VariableX509TrustManager.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/security/VariableX509TrustManager.java	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/security/VariableX509TrustManager.java	(revision 416)
@@ -38,5 +38,7 @@
 package net.sourceforge.jnlp.security;
 
+import java.security.AccessController;
 import java.security.KeyStore;
+import java.security.PrivilegedAction;
 import java.security.cert.Certificate;
 import java.security.cert.CertificateException;
@@ -54,4 +56,5 @@
 
 import com.sun.net.ssl.internal.ssl.X509ExtendedTrustManager;
+import net.sourceforge.jnlp.runtime.JNLPRuntime;
 
 import net.sourceforge.jnlp.security.SecurityDialogs.AccessType;
@@ -380,12 +383,21 @@
      * @return user's response
      */
-    private boolean askUser(X509Certificate[] chain, String authType,
-                            boolean isTrusted, boolean hostMatched,
-                            String hostName) {
-        return SecurityDialogs.showCertWarningDialog(
+    private boolean askUser(final X509Certificate[] chain, final String authType,
+                            final boolean isTrusted, final boolean hostMatched,
+                            final String hostName) {
+        if (JNLPRuntime.isTrustAll()){
+            return true;
+        }
+        final VariableX509TrustManager trustManager = this;
+        return AccessController.doPrivileged(new PrivilegedAction<Boolean>() {
+            @Override
+            public Boolean run() {
+                return SecurityDialogs.showCertWarningDialog(
                         AccessType.UNVERIFIED, null,
-                        new HttpsCertVerifier(this, chain, authType,
+                        new HttpsCertVerifier(trustManager, chain, authType,
                                               isTrusted, hostMatched,
                                               hostName));
+            }
+        });
     }
 
Index: /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/security/viewer/CertificatePane.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/security/viewer/CertificatePane.java	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/security/viewer/CertificatePane.java	(revision 416)
@@ -67,4 +67,5 @@
 import javax.swing.JOptionPane;
 import javax.swing.JPanel;
+import javax.swing.JPasswordField;
 import javax.swing.JScrollPane;
 import javax.swing.JTabbedPane;
@@ -101,4 +102,5 @@
             new CertificateType(KeyStores.Type.CERTS),
             new CertificateType(KeyStores.Type.JSSE_CERTS),
+            new CertificateType(KeyStores.Type.CLIENT_CERTS)
         };
 
@@ -302,4 +304,16 @@
     }
 
+    private char[] getPassword(final String label) {
+        JPasswordField jpf = new JPasswordField();
+        int result = JOptionPane.showConfirmDialog(parent,
+                                new Object[]{label, jpf},  R("CVPasswordTitle"),
+                                JOptionPane.OK_CANCEL_OPTION,
+                                JOptionPane.INFORMATION_MESSAGE);
+        if (result == JOptionPane.OK_OPTION)
+            return jpf.getPassword();
+        else
+            return null;
+    }
+
     /** Allows storing KeyStores.Types in a JComponent */
     private static class CertificateType {
@@ -365,5 +379,15 @@
                 try {
                     KeyStore ks = keyStore;
-                    CertificateUtils.addToKeyStore(chooser.getSelectedFile(), ks);
+                    if (currentKeyStoreType == KeyStores.Type.CLIENT_CERTS) {
+                        char[] password = getPassword(R("CVImportPasswordMessage"));
+                        if (password != null) {
+                            CertificateUtils.addPKCS12ToKeyStore(
+                                       chooser.getSelectedFile(), ks, password);
+                        } else {
+                            return;
+                        }
+                    } else {
+                        CertificateUtils.addToKeyStore(chooser.getSelectedFile(), ks);
+                    }
                     File keyStoreFile = new File(KeyStores
                                         .getKeyStoreLocation(currentKeyStoreLevel, currentKeyStoreType));
@@ -409,7 +433,13 @@
                                                         .get(selectedRow));
                         if (alias != null) {
-                            Certificate c = keyStore.getCertificate(alias);
-                            PrintStream ps = new PrintStream(chooser.getSelectedFile().getAbsolutePath());
-                            CertificateUtils.dump(c, ps);
+                            if (currentKeyStoreType == KeyStores.Type.CLIENT_CERTS) {
+                                char[] password = getPassword(R("CVExportPasswordMessage"));
+                                if (password != null)
+                                    CertificateUtils.dumpPKCS12(alias, chooser.getSelectedFile(), keyStore, password);
+                            } else {
+                                Certificate c = keyStore.getCertificate(alias);
+                                PrintStream ps = new PrintStream(chooser.getSelectedFile().getAbsolutePath());
+                                CertificateUtils.dump(c, ps);
+                            }
                             repopulateTables();
                         }
Index: /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/security/viewer/CertificateViewer.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/security/viewer/CertificateViewer.java	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/security/viewer/CertificateViewer.java	(revision 416)
@@ -52,4 +52,5 @@
 
 import net.sourceforge.jnlp.runtime.JNLPRuntime;
+import net.sourceforge.jnlp.util.ImageResources;
 
 public class CertificateViewer extends JDialog {
@@ -62,4 +63,5 @@
     public CertificateViewer() {
         super((Frame) null, dialogTitle, true);
+        setIconImages(ImageResources.INSTANCE.getApplicationImages());
 
         Container contentPane = getContentPane();
Index: /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/services/ServiceUtil.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/services/ServiceUtil.java	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/services/ServiceUtil.java	(revision 416)
@@ -236,39 +236,13 @@
                 Object... extras) {
 
-        if (app == null)
-            app = JNLPRuntime.getApplication();
-
-        boolean codeTrusted = true;
-
-        StackTraceElement[] stack = Thread.currentThread().getStackTrace();
-
-        for (int i = 0; i < stack.length; i++) {
-
-            Class c = null;
-
-            try {
-                c = Class.forName(stack[i].getClassName());
-            } catch (Exception e1) {
-                try {
-                    c = Class.forName(stack[i].getClassName(), false, app.getClassLoader());
-                } catch (Exception e2) {
-                    System.err.println(e2.getMessage());
-                }
-            }
-
-            // Everything up to the desired class/method must be trusted
-            if (c == null || // class not found
-                    (c.getProtectionDomain().getCodeSource() != null && // class is not in bootclasspath
-                    c.getProtectionDomain().getCodeSource().getCodeSigners() == null) // class is trusted
-            ) {
-                codeTrusted = false;
-            }
-        }
-
-        if (!codeTrusted) {
+        boolean trusted = isSigned(app);
+
+        if (!trusted) {
 
             if (!shouldPromptUser()) {
                 return false;
             }
+            if (app == null)
+                app = JNLPRuntime.getApplication();
 
             final AccessType tmpType = type;
@@ -308,4 +282,47 @@
         });
     }
+    
+    /**
+     * Returns whether the app requesting a JNLP service is a trusted
+     * application
+     * 
+     * @param app
+     *            the application which is requesting the check. If null, the
+     *            current application is used.
+     * @return true, if the app is a trusted application; false otherwise
+     */
+
+    public static boolean isSigned(ApplicationInstance app) {
+
+        if (app == null)
+            app = JNLPRuntime.getApplication();
+
+        StackTraceElement[] stack = Thread.currentThread().getStackTrace();
+
+        for (int i = 0; i < stack.length; i++) {
+
+            Class c = null;
+
+            try {
+                c = Class.forName(stack[i].getClassName());
+            } catch (Exception e1) {
+                try {
+                    c = Class.forName(stack[i].getClassName(), false,
+                            app.getClassLoader());
+                } catch (Exception e2) {
+                    System.err.println(e2.getMessage());
+                }
+            }
+
+            // Everything up to the desired class/method must be trusted
+            if (c == null || // class not found
+                    (c.getProtectionDomain().getCodeSource() != null && // class is not in bootclasspath
+                    c.getProtectionDomain().getCodeSource().getCodeSigners() == null) // class is trusted
+            ) {
+                return false;
+            }
+        }
+        return true;
+    }
 
 }
Index: /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/services/XPersistenceService.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/services/XPersistenceService.java	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/services/XPersistenceService.java	(revision 416)
@@ -53,7 +53,10 @@
 
         URL source = app.getJNLPFile().getCodeBase();
+        
+        if (!source.getHost().equalsIgnoreCase(location.getHost())
+                && !ServiceUtil.isSigned(app)) // Allow trusted application to have access to data from a different host
+            throw new MalformedURLException(
+                    "Untrusted application cannot access data from a different host.");
 
-        if (!source.getHost().equalsIgnoreCase(location.getHost()))
-            throw new MalformedURLException("Cannot access data from a different host.");
 
         // test for above codebase, not perfect but works for now
@@ -70,6 +73,8 @@
         }
 
-        if (!source.getFile().startsWith(requestPath))
-            throw new MalformedURLException("Cannot access data below source URL path.");
+        if (!source.getFile().startsWith(requestPath) 
+                && !ServiceUtil.isSigned(app)) // Allow trusted application to have access to data below source URL path
+            throw new MalformedURLException(
+                    "Cannot access data below source URL path.");
     }
 
@@ -123,7 +128,8 @@
 
         File file = toCacheFile(location);
-        if (!file.exists())
+        if (!file.exists()) {
             throw new FileNotFoundException("Persistence store for "
                     + location.toString() + " is not found.");
+        }
         FileUtils.createParentDir(file, "Persistence store for "
                     + location.toString());
Index: /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/tools/JarCertVerifier.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/tools/JarCertVerifier.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/tools/JarCertVerifier.java	(revision 416)
@@ -0,0 +1,535 @@
+/*
+ * Copyright 1997-2007 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code 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
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package net.sourceforge.jnlp.tools;
+
+import static net.sourceforge.jnlp.runtime.Translator.R;
+
+import java.io.*;
+import java.util.*;
+import java.util.jar.*;
+import java.security.cert.Certificate;
+import java.security.cert.X509Certificate;
+import java.security.cert.CertPath;
+import java.security.*;
+import sun.security.x509.*;
+import sun.security.util.*;
+
+import net.sourceforge.jnlp.*;
+import net.sourceforge.jnlp.cache.*;
+import net.sourceforge.jnlp.security.*;
+
+/**
+ * <p>The jar certificate verifier utility.
+ *
+ * @author Roland Schemers
+ * @author Jan Luehe
+ */
+
+public class JarCertVerifier implements CertVerifier {
+
+    private static final String META_INF = "META-INF/";
+
+    // prefix for new signature-related files in META-INF directory
+    private static final String SIG_PREFIX = META_INF + "SIG-";
+
+    private static final long SIX_MONTHS = 180 * 24 * 60 * 60 * 1000L; //milliseconds
+
+    static enum verifyResult {
+        UNSIGNED, SIGNED_OK, SIGNED_NOT_OK
+    }
+
+    // signer's certificate chain (when composing)
+    X509Certificate[] certChain;
+
+    boolean verbose = false; // verbose output when signing/verifying
+    boolean showcerts = false; // show certs when verifying
+
+    private boolean hasExpiredCert = false;
+    private boolean hasExpiringCert = false;
+    private boolean notYetValidCert = false;
+
+    private boolean badKeyUsage = false;
+    private boolean badExtendedKeyUsage = false;
+    private boolean badNetscapeCertType = false;
+
+    private boolean alreadyTrustPublisher = false;
+    private boolean rootInCacerts = false;
+
+    /**
+     * The single certPath used in this JarSiging. We're only keeping
+     * track of one here, since in practice there's only one signer
+     * for a JNLP Application.
+     */
+    private CertPath certPath = null;
+
+    private boolean noSigningIssues = true;
+
+    private boolean anyJarsSigned = false;
+
+    /** all of the jar files that were verified */
+    private ArrayList<String> verifiedJars = null;
+
+    /** all of the jar files that were not verified */
+    private ArrayList<String> unverifiedJars = null;
+
+    /** the certificates used for jar verification */
+    private HashMap<CertPath, Integer> certs = new HashMap<CertPath, Integer>();
+
+    /** details of this signing */
+    private ArrayList<String> details = new ArrayList<String>();
+
+    private int totalSignableEntries = 0;
+
+    /* (non-Javadoc)
+     * @see net.sourceforge.jnlp.tools.CertVerifier2#getAlreadyTrustPublisher()
+     */
+    public boolean getAlreadyTrustPublisher() {
+        return alreadyTrustPublisher;
+    }
+
+    /* (non-Javadoc)
+     * @see net.sourceforge.jnlp.tools.CertVerifier2#getRootInCacerts()
+     */
+    public boolean getRootInCacerts() {
+        return rootInCacerts;
+    }
+
+    public CertPath getCertPath() {
+        return certPath;
+    }
+
+    /* (non-Javadoc)
+     * @see net.sourceforge.jnlp.tools.CertVerifier2#hasSigningIssues()
+     */
+    public boolean hasSigningIssues() {
+        return hasExpiredCert || notYetValidCert || badKeyUsage
+                || badExtendedKeyUsage || badNetscapeCertType;
+    }
+
+    /* (non-Javadoc)
+     * @see net.sourceforge.jnlp.tools.CertVerifier2#noSigningIssues()
+     */
+    public boolean noSigningIssues() {
+        return noSigningIssues;
+    }
+
+    public boolean anyJarsSigned() {
+        return anyJarsSigned;
+    }
+
+    /* (non-Javadoc)
+     * @see net.sourceforge.jnlp.tools.CertVerifier2#getDetails()
+     */
+    public ArrayList<String> getDetails() {
+        return details;
+    }
+
+    /* (non-Javadoc)
+     * @see net.sourceforge.jnlp.tools.CertVerifier2#getCerts()
+     */
+    public ArrayList<CertPath> getCerts() {
+        return new ArrayList<CertPath>(certs.keySet());
+    }
+
+    /**
+     * Returns whether or not all entries have a common signer.
+     *  
+     * It is possible to create jars where only some entries are signed. In 
+     * such cases, we should not prompt the user to accept anything, as the whole 
+     * application must be treated as unsigned. This method should be called by a 
+     * caller before it is about to ask the user to accept a cert and determine 
+     * whether the application is trusted or not.
+     *  
+     * @return Whether or not all entries have a common signer
+     */
+    public boolean isFullySignedByASingleCert() {
+
+        for (CertPath cPath : certs.keySet()) {
+            // If this cert has signed everything, return true
+            if (certs.get(cPath) == totalSignableEntries)
+                return true;
+        }
+
+        // No cert found that signed all entries. Return false.
+        return false;
+    }
+
+    public void verifyJars(List<JARDesc> jars, ResourceTracker tracker)
+            throws Exception {
+
+        verifiedJars = new ArrayList<String>();
+        unverifiedJars = new ArrayList<String>();
+
+        for (JARDesc jar : jars) {
+
+            try {
+
+                File jarFile = tracker.getCacheFile(jar.getLocation());
+
+                // some sort of resource download/cache error. Nothing to add
+                // in that case ... but don't fail here
+                if (jarFile == null) {
+                    continue;
+                }
+
+                String localFile = jarFile.getAbsolutePath();
+                verifyResult result = verifyJar(localFile);
+
+                if (result == verifyResult.UNSIGNED) {
+                    unverifiedJars.add(localFile);
+                } else if (result == verifyResult.SIGNED_NOT_OK) {
+                    noSigningIssues = false;
+                    verifiedJars.add(localFile);
+                } else if (result == verifyResult.SIGNED_OK) {
+                    verifiedJars.add(localFile);
+                }
+            } catch (Exception e) {
+                // We may catch exceptions from using verifyJar()
+                // or from checkTrustedCerts
+                throw e;
+            }
+        }
+
+        //we really only want the first certPath
+        for (CertPath cPath : certs.keySet()) {
+
+            if (certs.get(cPath) != totalSignableEntries)
+                continue;
+            else
+                certPath = cPath;
+
+            // check if the certs added above are in the trusted path
+            checkTrustedCerts();
+
+            if (alreadyTrustPublisher || rootInCacerts)
+                break;
+        }
+
+    }
+
+    private verifyResult verifyJar(String jarName) throws Exception {
+        boolean anySigned = false;
+        boolean hasUnsignedEntry = false;
+        JarFile jarFile = null;
+
+        try {
+            jarFile = new JarFile(jarName, true);
+            Vector<JarEntry> entriesVec = new Vector<JarEntry>();
+            byte[] buffer = new byte[8192];
+
+            Enumeration<JarEntry> entries = jarFile.entries();
+            while (entries.hasMoreElements()) {
+                JarEntry je = entries.nextElement();
+                entriesVec.addElement(je);
+
+                InputStream is = jarFile.getInputStream(je);
+                try {
+                    int n;
+                    while ((n = is.read(buffer, 0, buffer.length)) != -1) {
+                        // we just read. this will throw a SecurityException
+                        // if  a signature/digest check fails.
+                    }
+                } finally {
+                    if (is != null) {
+                        is.close();
+                    }
+                }
+            }
+
+            if (jarFile.getManifest() != null) {
+                if (verbose)
+                    System.out.println();
+
+                long now = System.currentTimeMillis();
+
+                for (JarEntry je : entriesVec) {
+                    String name = je.getName();
+                    CodeSigner[] signers = je.getCodeSigners();
+                    boolean isSigned = (signers != null);
+                    anySigned |= isSigned;
+
+                    boolean shouldHaveSignature = !je.isDirectory()
+                                                && !isMetaInfFile(name);
+
+                    hasUnsignedEntry |= shouldHaveSignature &&  !isSigned;
+
+                    if (shouldHaveSignature)
+                        totalSignableEntries++;
+
+                    if (shouldHaveSignature && isSigned) {
+                        for (int i = 0; i < signers.length; i++) {
+                            CertPath certPath = signers[i].getSignerCertPath();
+                            if (!certs.containsKey(certPath))
+                                certs.put(certPath, 1);
+                            else
+                                certs.put(certPath, certs.get(certPath) + 1);
+
+                            Certificate cert = signers[i].getSignerCertPath()
+                                    .getCertificates().get(0);
+                            if (cert instanceof X509Certificate) {
+                                checkCertUsage((X509Certificate) cert, null);
+                                if (!showcerts) {
+                                    long notBefore = ((X509Certificate) cert)
+                                                     .getNotBefore().getTime();
+                                    long notAfter = ((X509Certificate) cert)
+                                                    .getNotAfter().getTime();
+
+                                    if (now < notBefore) {
+                                        notYetValidCert = true;
+                                    }
+
+                                    if (notAfter < now) {
+                                        hasExpiredCert = true;
+                                    } else if (notAfter < now + SIX_MONTHS) {
+                                        hasExpiringCert = true;
+                                    }
+                                }
+                            }
+                        }
+                    }
+                } //while e has more elements
+            } else { //if man not null
+
+                // Else increment totalEntries by 1 so that unsigned jars with 
+                // no manifests can't sneak in
+                totalSignableEntries++;
+            }
+
+            //Alert the user if any of the following are true.
+            if (!anySigned) {
+                return verifyResult.UNSIGNED;
+            } else {
+                anyJarsSigned = true;
+
+                //warnings
+                if (hasUnsignedEntry || hasExpiredCert || hasExpiringCert ||
+                        badKeyUsage || badExtendedKeyUsage || badNetscapeCertType ||
+                        notYetValidCert) {
+
+                    addToDetails(R("SRunWithoutRestrictions"));
+
+                    if (badKeyUsage)
+                        addToDetails(R("SBadKeyUsage"));
+                    if (badExtendedKeyUsage)
+                        addToDetails(R("SBadExtendedKeyUsage"));
+                    if (badNetscapeCertType)
+                        addToDetails(R("SBadNetscapeCertType"));
+                    if (hasUnsignedEntry)
+                        addToDetails(R("SHasUnsignedEntry"));
+                    if (hasExpiredCert)
+                        addToDetails(R("SHasExpiredCert"));
+                    if (hasExpiringCert)
+                        addToDetails(R("SHasExpiringCert"));
+                    if (notYetValidCert)
+                        addToDetails(R("SNotYetValidCert"));
+                }
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+            throw e;
+        } finally { // close the resource
+            if (jarFile != null) {
+                jarFile.close();
+            }
+        }
+
+        //anySigned does not guarantee that all files were signed.
+        return (anySigned && !(hasUnsignedEntry || hasExpiredCert
+                              || badKeyUsage || badExtendedKeyUsage || badNetscapeCertType || notYetValidCert)) ? verifyResult.SIGNED_OK : verifyResult.SIGNED_NOT_OK;
+    }
+
+    /**
+     * Checks the user's trusted.certs file and the cacerts file to see
+     * if a publisher's and/or CA's certificate exists there.
+     */
+    private void checkTrustedCerts() throws Exception {
+        if (certPath != null) {
+            try {
+                X509Certificate publisher = (X509Certificate) getPublisher();
+                KeyStore[] certKeyStores = KeyStores.getCertKeyStores();
+                alreadyTrustPublisher = CertificateUtils.inKeyStores(publisher, certKeyStores);
+                X509Certificate root = (X509Certificate) getRoot();
+                KeyStore[] caKeyStores = KeyStores.getCAKeyStores();
+                // Check entire cert path for a trusted CA
+                for (Certificate c : certPath.getCertificates()) {
+                	if ((rootInCacerts = CertificateUtils.inKeyStores(
+                            (X509Certificate) c, caKeyStores))) {
+                        break;
+                    }
+                }
+            } catch (Exception e) {
+                // TODO: Warn user about not being able to
+                // look through their cacerts/trusted.certs
+                // file depending on exception.
+                throw e;
+            }
+
+            if (!rootInCacerts)
+                addToDetails(R("SUntrustedCertificate"));
+            else
+                addToDetails(R("STrustedCertificate"));
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see net.sourceforge.jnlp.tools.CertVerifier2#getPublisher()
+     */
+    public Certificate getPublisher() {
+        if (certPath != null) {
+            List<? extends Certificate> certList = certPath.getCertificates();
+            if (certList.size() > 0) {
+                return certList.get(0);
+            } else {
+                return null;
+            }
+        } else {
+            return null;
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see net.sourceforge.jnlp.tools.CertVerifier2#getRoot()
+     */
+    public Certificate getRoot() {
+        if (certPath != null) {
+            List<? extends Certificate> certList = certPath.getCertificates();
+            if (certList.size() > 0) {
+                return certList.get(certList.size() - 1);
+            } else {
+                return null;
+            }
+        } else {
+            return null;
+        }
+    }
+
+    private void addToDetails(String detail) {
+        if (!details.contains(detail))
+            details.add(detail);
+    }
+
+    /**
+     * Returns whether a file is in META-INF, and thus does not require signing.
+     *
+     * Signature-related files under META-INF include:
+     * . META-INF/MANIFEST.MF
+     * . META-INF/SIG-*
+     * . META-INF/*.SF
+     * . META-INF/*.DSA
+     * . META-INF/*.RSA
+     */
+    static boolean isMetaInfFile(String name) {
+        String ucName = name.toUpperCase();
+        return ucName.startsWith(META_INF);
+    }
+
+    /**
+     * Check if userCert is designed to be a code signer
+     * @param userCert the certificate to be examined
+     * @param bad 3 booleans to show if the KeyUsage, ExtendedKeyUsage,
+     *            NetscapeCertType has codeSigning flag turned on.
+     *            If null, the class field badKeyUsage, badExtendedKeyUsage,
+     *            badNetscapeCertType will be set.
+     *
+     * Required for verifyJar()
+     */
+    void checkCertUsage(X509Certificate userCert, boolean[] bad) {
+
+        // Can act as a signer?
+        // 1. if KeyUsage, then [0] should be true
+        // 2. if ExtendedKeyUsage, then should contains ANY or CODE_SIGNING
+        // 3. if NetscapeCertType, then should contains OBJECT_SIGNING
+        // 1,2,3 must be true
+
+        if (bad != null) {
+            bad[0] = bad[1] = bad[2] = false;
+        }
+
+        boolean[] keyUsage = userCert.getKeyUsage();
+        if (keyUsage != null) {
+            if (keyUsage.length < 1 || !keyUsage[0]) {
+                if (bad != null) {
+                    bad[0] = true;
+                } else {
+                    badKeyUsage = true;
+                }
+            }
+        }
+
+        try {
+            List<String> xKeyUsage = userCert.getExtendedKeyUsage();
+            if (xKeyUsage != null) {
+                if (!xKeyUsage.contains("2.5.29.37.0") // anyExtendedKeyUsage
+                        && !xKeyUsage.contains("1.3.6.1.5.5.7.3.3")) { // codeSigning
+                    if (bad != null) {
+                        bad[1] = true;
+                    } else {
+                        badExtendedKeyUsage = true;
+                    }
+                }
+            }
+        } catch (java.security.cert.CertificateParsingException e) {
+            // shouldn't happen
+        }
+
+        try {
+            // OID_NETSCAPE_CERT_TYPE
+            byte[] netscapeEx = userCert.getExtensionValue
+                                ("2.16.840.1.113730.1.1");
+            if (netscapeEx != null) {
+                DerInputStream in = new DerInputStream(netscapeEx);
+                byte[] encoded = in.getOctetString();
+                encoded = new DerValue(encoded).getUnalignedBitString()
+                        .toByteArray();
+
+                NetscapeCertTypeExtension extn =
+                        new NetscapeCertTypeExtension(encoded);
+
+                Boolean val = (Boolean) extn.get(
+                                  NetscapeCertTypeExtension.OBJECT_SIGNING);
+                if (!val) {
+                    if (bad != null) {
+                        bad[2] = true;
+                    } else {
+                        badNetscapeCertType = true;
+                    }
+                }
+            }
+        } catch (IOException e) {
+            //
+        }
+    }
+
+    /**
+     * Returns if all jars are signed.
+     *
+     * @return True if all jars are signed, false if there are one or more unsigned jars
+     */
+    public boolean allJarsSigned() {
+        return this.unverifiedJars.size() == 0;
+    }
+
+}
Index: anches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/tools/JarSigner.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/tools/JarSigner.java	(revision 415)
+++ 	(revision )
@@ -1,543 +1,0 @@
-/*
- * Copyright 1997-2007 Sun Microsystems, Inc.  All Rights Reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Sun designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Sun in the LICENSE file that accompanied this code.
- *
- * This code 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
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
- */
-
-package net.sourceforge.jnlp.tools;
-
-import static net.sourceforge.jnlp.runtime.Translator.R;
-
-import java.io.*;
-import java.util.*;
-import java.util.jar.*;
-import java.security.cert.Certificate;
-import java.security.cert.X509Certificate;
-import java.security.cert.CertPath;
-import java.security.*;
-import sun.security.x509.*;
-import sun.security.util.*;
-
-import net.sourceforge.jnlp.*;
-import net.sourceforge.jnlp.cache.*;
-import net.sourceforge.jnlp.security.*;
-
-/**
- * <p>The jarsigner utility.
- *
- * @author Roland Schemers
- * @author Jan Luehe
- */
-
-public class JarSigner implements CertVerifier {
-
-    private static final String META_INF = "META-INF/";
-
-    // prefix for new signature-related files in META-INF directory
-    private static final String SIG_PREFIX = META_INF + "SIG-";
-
-    private static final long SIX_MONTHS = 180 * 24 * 60 * 60 * 1000L; //milliseconds
-
-    static enum verifyResult {
-        UNSIGNED, SIGNED_OK, SIGNED_NOT_OK
-    }
-
-    // signer's certificate chain (when composing)
-    X509Certificate[] certChain;
-
-    boolean verbose = false; // verbose output when signing/verifying
-    boolean showcerts = false; // show certs when verifying
-
-    private boolean hasExpiredCert = false;
-    private boolean hasExpiringCert = false;
-    private boolean notYetValidCert = false;
-
-    private boolean badKeyUsage = false;
-    private boolean badExtendedKeyUsage = false;
-    private boolean badNetscapeCertType = false;
-
-    private boolean alreadyTrustPublisher = false;
-    private boolean rootInCacerts = false;
-
-    /**
-     * The single certPath used in this JarSiging. We're only keeping
-     * track of one here, since in practice there's only one signer
-     * for a JNLP Application.
-     */
-    private CertPath certPath = null;
-
-    private boolean noSigningIssues = true;
-
-    private boolean anyJarsSigned = false;
-
-    /** all of the jar files that were verified */
-    private ArrayList<String> verifiedJars = null;
-
-    /** all of the jar files that were not verified */
-    private ArrayList<String> unverifiedJars = null;
-
-    /** the certificates used for jar verification */
-    private HashMap<CertPath, Integer> certs = new HashMap<CertPath, Integer>();
-
-    /** details of this signing */
-    private ArrayList<String> details = new ArrayList<String>();
-
-    private int totalSignableEntries = 0;
-
-    /* (non-Javadoc)
-     * @see net.sourceforge.jnlp.tools.CertVerifier2#getAlreadyTrustPublisher()
-     */
-    public boolean getAlreadyTrustPublisher() {
-        return alreadyTrustPublisher;
-    }
-
-    /* (non-Javadoc)
-     * @see net.sourceforge.jnlp.tools.CertVerifier2#getRootInCacerts()
-     */
-    public boolean getRootInCacerts() {
-        return rootInCacerts;
-    }
-
-    public CertPath getCertPath() {
-        return certPath;
-    }
-
-    /* (non-Javadoc)
-     * @see net.sourceforge.jnlp.tools.CertVerifier2#hasSigningIssues()
-     */
-    public boolean hasSigningIssues() {
-        return hasExpiredCert || notYetValidCert || badKeyUsage
-                || badExtendedKeyUsage || badNetscapeCertType;
-    }
-
-    /* (non-Javadoc)
-     * @see net.sourceforge.jnlp.tools.CertVerifier2#noSigningIssues()
-     */
-    public boolean noSigningIssues() {
-        return noSigningIssues;
-    }
-
-    public boolean anyJarsSigned() {
-        return anyJarsSigned;
-    }
-
-    /* (non-Javadoc)
-     * @see net.sourceforge.jnlp.tools.CertVerifier2#getDetails()
-     */
-    public ArrayList<String> getDetails() {
-        return details;
-    }
-
-    /* (non-Javadoc)
-     * @see net.sourceforge.jnlp.tools.CertVerifier2#getCerts()
-     */
-    public ArrayList<CertPath> getCerts() {
-        return new ArrayList<CertPath>(certs.keySet());
-    }
-
-    /**
-     * Returns whether or not all entries have a common signer.
-     *  
-     * It is possible to create jars where only some entries are signed. In 
-     * such cases, we should not prompt the user to accept anything, as the whole 
-     * application must be treated as unsigned. This method should be called by a 
-     * caller before it is about to ask the user to accept a cert and determine 
-     * whether the application is trusted or not.
-     *  
-     * @return Whether or not all entries have a common signer
-     */
-    public boolean isFullySignedByASingleCert() {
-
-        for (CertPath cPath : certs.keySet()) {
-            // If this cert has signed everything, return true
-            if (certs.get(cPath) == totalSignableEntries)
-                return true;
-        }
-
-        // No cert found that signed all entries. Return false.
-        return false;
-    }
-
-    public void verifyJars(List<JARDesc> jars, ResourceTracker tracker)
-            throws Exception {
-
-        verifiedJars = new ArrayList<String>();
-        unverifiedJars = new ArrayList<String>();
-
-        for (int i = 0; i < jars.size(); i++) {
-
-            JARDesc jar = jars.get(i);
-
-            try {
-
-                File jarFile = tracker.getCacheFile(jar.getLocation());
-
-                // some sort of resource download/cache error. Nothing to add
-                // in that case ... but don't fail here
-                if (jarFile == null) {
-                    return;
-                }
-
-                String localFile = jarFile.getAbsolutePath();
-                verifyResult result = verifyJar(localFile);
-
-                if (result == verifyResult.UNSIGNED) {
-                    unverifiedJars.add(localFile);
-                } else if (result == verifyResult.SIGNED_NOT_OK) {
-                    noSigningIssues = false;
-                    verifiedJars.add(localFile);
-                } else if (result == verifyResult.SIGNED_OK) {
-                    verifiedJars.add(localFile);
-                }
-            } catch (Exception e) {
-                // We may catch exceptions from using verifyJar()
-                // or from checkTrustedCerts
-                throw e;
-            }
-        }
-
-        //we really only want the first certPath
-        for (CertPath cPath : certs.keySet()) {
-
-            if (certs.get(cPath) != totalSignableEntries)
-                continue;
-            else
-                certPath = cPath;
-
-            // check if the certs added above are in the trusted path
-            checkTrustedCerts();
-
-            if (alreadyTrustPublisher || rootInCacerts)
-                break;
-        }
-
-    }
-
-    private verifyResult verifyJar(String jarName) throws Exception {
-        boolean anySigned = false;
-        boolean hasUnsignedEntry = false;
-        JarFile jarFile = null;
-
-        try {
-            jarFile = new JarFile(jarName, true);
-            Vector<JarEntry> entriesVec = new Vector<JarEntry>();
-            byte[] buffer = new byte[8192];
-
-            JarEntry je;
-            Enumeration<JarEntry> entries = jarFile.entries();
-            while (entries.hasMoreElements()) {
-                je = entries.nextElement();
-                entriesVec.addElement(je);
-
-                InputStream is = jarFile.getInputStream(je);
-                try {
-                    int n;
-                    while ((n = is.read(buffer, 0, buffer.length)) != -1) {
-                        // we just read. this will throw a SecurityException
-                        // if  a signature/digest check fails.
-                    }
-                } finally {
-                    if (is != null) {
-                        is.close();
-                    }
-                }
-            }
-
-            if (jarFile.getManifest() != null) {
-                if (verbose)
-                    System.out.println();
-                Enumeration<JarEntry> e = entriesVec.elements();
-
-                long now = System.currentTimeMillis();
-
-                while (e.hasMoreElements()) {
-                    je = e.nextElement();
-                    String name = je.getName();
-                    CodeSigner[] signers = je.getCodeSigners();
-                    boolean isSigned = (signers != null);
-                    anySigned |= isSigned;
-
-                    boolean shouldHaveSignature = !je.isDirectory()
-                                                && !signatureRelated(name);
-
-                    hasUnsignedEntry |= shouldHaveSignature &&  !isSigned;
-
-                    if (shouldHaveSignature)
-                        totalSignableEntries++;
-
-                    if (shouldHaveSignature && isSigned) {
-                        for (int i = 0; i < signers.length; i++) {
-                            CertPath certPath = signers[i].getSignerCertPath();
-                            if (!certs.containsKey(certPath))
-                                certs.put(certPath, 1);
-                            else
-                                certs.put(certPath, certs.get(certPath) + 1);
-
-                            Certificate cert = signers[i].getSignerCertPath()
-                                    .getCertificates().get(0);
-                            if (cert instanceof X509Certificate) {
-                                checkCertUsage((X509Certificate) cert, null);
-                                if (!showcerts) {
-                                    long notAfter = ((X509Certificate) cert)
-                                                    .getNotAfter().getTime();
-
-                                    if (notAfter < now) {
-                                        hasExpiredCert = true;
-                                    } else if (notAfter < now + SIX_MONTHS) {
-                                        hasExpiringCert = true;
-                                    }
-                                }
-                            }
-                        }
-                    }
-                } //while e has more elements
-            } else { //if man not null
-
-                // Else increment totalEntries by 1 so that unsigned jars with 
-                // no manifests can't sneak in
-                totalSignableEntries++;
-            }
-
-            //Alert the user if any of the following are true.
-            if (!anySigned) {
-                return verifyResult.UNSIGNED;
-            } else {
-                anyJarsSigned = true;
-
-                //warnings
-                if (hasUnsignedEntry || hasExpiredCert || hasExpiringCert ||
-                        badKeyUsage || badExtendedKeyUsage || badNetscapeCertType ||
-                        notYetValidCert) {
-
-                    addToDetails(R("SRunWithoutRestrictions"));
-
-                    if (badKeyUsage)
-                        addToDetails(R("SBadKeyUsage"));
-                    if (badExtendedKeyUsage)
-                        addToDetails(R("SBadExtendedKeyUsage"));
-                    if (badNetscapeCertType)
-                        addToDetails(R("SBadNetscapeCertType"));
-                    if (hasUnsignedEntry)
-                        addToDetails(R("SHasUnsignedEntry"));
-                    if (hasExpiredCert)
-                        addToDetails(R("SHasExpiredCert"));
-                    if (hasExpiringCert)
-                        addToDetails(R("SHasExpiringCert"));
-                    if (notYetValidCert)
-                        addToDetails(R("SNotYetValidCert"));
-                }
-            }
-
-        } catch (Exception e) {
-            e.printStackTrace();
-            throw e;
-        } finally { // close the resource
-            if (jarFile != null) {
-                jarFile.close();
-            }
-        }
-
-        //anySigned does not guarantee that all files were signed.
-        return (anySigned && !(hasUnsignedEntry || hasExpiredCert
-                              || badKeyUsage || badExtendedKeyUsage || badNetscapeCertType || notYetValidCert)) ? verifyResult.SIGNED_OK : verifyResult.SIGNED_NOT_OK;
-    }
-
-    /**
-     * Checks the user's trusted.certs file and the cacerts file to see
-     * if a publisher's and/or CA's certificate exists there.
-     */
-    private void checkTrustedCerts() throws Exception {
-        if (certPath != null) {
-            try {
-                X509Certificate publisher = (X509Certificate) getPublisher();
-                KeyStore[] certKeyStores = KeyStores.getCertKeyStores();
-                alreadyTrustPublisher = CertificateUtils.inKeyStores(publisher, certKeyStores);
-                X509Certificate root = (X509Certificate) getRoot();
-                KeyStore[] caKeyStores = KeyStores.getCAKeyStores();
-                rootInCacerts = CertificateUtils.inKeyStores(root, caKeyStores);
-            } catch (Exception e) {
-                // TODO: Warn user about not being able to
-                // look through their cacerts/trusted.certs
-                // file depending on exception.
-                throw e;
-            }
-
-            if (!rootInCacerts)
-                addToDetails(R("SUntrustedCertificate"));
-            else
-                addToDetails(R("STrustedCertificate"));
-        }
-    }
-
-    /* (non-Javadoc)
-     * @see net.sourceforge.jnlp.tools.CertVerifier2#getPublisher()
-     */
-    public Certificate getPublisher() {
-        if (certPath != null) {
-            List<? extends Certificate> certList = certPath.getCertificates();
-            if (certList.size() > 0) {
-                return certList.get(0);
-            } else {
-                return null;
-            }
-        } else {
-            return null;
-        }
-    }
-
-    /* (non-Javadoc)
-     * @see net.sourceforge.jnlp.tools.CertVerifier2#getRoot()
-     */
-    public Certificate getRoot() {
-        if (certPath != null) {
-            List<? extends Certificate> certList = certPath.getCertificates();
-            if (certList.size() > 0) {
-                return certList.get(certList.size() - 1);
-            } else {
-                return null;
-            }
-        } else {
-            return null;
-        }
-    }
-
-    private void addToDetails(String detail) {
-        if (!details.contains(detail))
-            details.add(detail);
-    }
-
-    /**
-     * signature-related files include:
-     * . META-INF/MANIFEST.MF
-     * . META-INF/SIG-*
-     * . META-INF/*.SF
-     * . META-INF/*.DSA
-     * . META-INF/*.RSA
-     *
-     * Required for verifyJar()
-     */
-    private boolean signatureRelated(String name) {
-        String ucName = name.toUpperCase();
-        if (ucName.equals(JarFile.MANIFEST_NAME) ||
-                ucName.equals(META_INF) ||
-                (ucName.startsWith(SIG_PREFIX) &&
-                 ucName.indexOf("/") == ucName.lastIndexOf("/"))) {
-            return true;
-        }
-
-        if (ucName.startsWith(META_INF) &&
-                SignatureFileVerifier.isBlockOrSF(ucName)) {
-            // .SF/.DSA/.RSA files in META-INF subdirs
-            // are not considered signature-related
-            return (ucName.indexOf("/") == ucName.lastIndexOf("/"));
-        }
-
-        return false;
-    }
-
-    /**
-     * Check if userCert is designed to be a code signer
-     * @param userCert the certificate to be examined
-     * @param bad 3 booleans to show if the KeyUsage, ExtendedKeyUsage,
-     *            NetscapeCertType has codeSigning flag turned on.
-     *            If null, the class field badKeyUsage, badExtendedKeyUsage,
-     *            badNetscapeCertType will be set.
-     *
-     * Required for verifyJar()
-     */
-    void checkCertUsage(X509Certificate userCert, boolean[] bad) {
-
-        // Can act as a signer?
-        // 1. if KeyUsage, then [0] should be true
-        // 2. if ExtendedKeyUsage, then should contains ANY or CODE_SIGNING
-        // 3. if NetscapeCertType, then should contains OBJECT_SIGNING
-        // 1,2,3 must be true
-
-        if (bad != null) {
-            bad[0] = bad[1] = bad[2] = false;
-        }
-
-        boolean[] keyUsage = userCert.getKeyUsage();
-        if (keyUsage != null) {
-            if (keyUsage.length < 1 || !keyUsage[0]) {
-                if (bad != null) {
-                    bad[0] = true;
-                } else {
-                    badKeyUsage = true;
-                }
-            }
-        }
-
-        try {
-            List<String> xKeyUsage = userCert.getExtendedKeyUsage();
-            if (xKeyUsage != null) {
-                if (!xKeyUsage.contains("2.5.29.37.0") // anyExtendedKeyUsage
-                        && !xKeyUsage.contains("1.3.6.1.5.5.7.3.3")) { // codeSigning
-                    if (bad != null) {
-                        bad[1] = true;
-                    } else {
-                        badExtendedKeyUsage = true;
-                    }
-                }
-            }
-        } catch (java.security.cert.CertificateParsingException e) {
-            // shouldn't happen
-        }
-
-        try {
-            // OID_NETSCAPE_CERT_TYPE
-            byte[] netscapeEx = userCert.getExtensionValue
-                                ("2.16.840.1.113730.1.1");
-            if (netscapeEx != null) {
-                DerInputStream in = new DerInputStream(netscapeEx);
-                byte[] encoded = in.getOctetString();
-                encoded = new DerValue(encoded).getUnalignedBitString()
-                        .toByteArray();
-
-                NetscapeCertTypeExtension extn =
-                        new NetscapeCertTypeExtension(encoded);
-
-                Boolean val = (Boolean) extn.get(
-                                  NetscapeCertTypeExtension.OBJECT_SIGNING);
-                if (!val) {
-                    if (bad != null) {
-                        bad[2] = true;
-                    } else {
-                        badNetscapeCertType = true;
-                    }
-                }
-            }
-        } catch (IOException e) {
-            //
-        }
-    }
-
-    /**
-     * Returns if all jars are signed.
-     *
-     * @return True if all jars are signed, false if there are one or more unsigned jars
-     */
-    public boolean allJarsSigned() {
-        return this.unverifiedJars.size() == 0;
-    }
-
-}
Index: /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/tools/KeyStoreUtil.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/tools/KeyStoreUtil.java	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/tools/KeyStoreUtil.java	(revision 416)
@@ -34,5 +34,5 @@
 
     // Class and methods marked as public so that they can be
-    // accessed by JarSigner, which although lies in a package
+    // accessed by JarCertVerifier, which although lies in a package
     // with the same name, but bundled in tools.jar and loaded
     // by another class loader, hence in a different *runtime*
Index: /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/util/BasicExceptionDialog.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/util/BasicExceptionDialog.java	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/util/BasicExceptionDialog.java	(revision 416)
@@ -83,4 +83,5 @@
         JOptionPane optionPane = new JOptionPane(mainPanel, JOptionPane.ERROR_MESSAGE);
         final JDialog errorDialog = optionPane.createDialog(R("Error"));
+        errorDialog.setIconImages(ImageResources.INSTANCE.getApplicationImages());
 
         final JPanel quickInfoPanel = new JPanel();
Index: /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/util/ImageResources.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/util/ImageResources.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/util/ImageResources.java	(revision 416)
@@ -0,0 +1,101 @@
+/* ImageResources.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; 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. */
+
+package net.sourceforge.jnlp.util;
+
+import java.awt.Image;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.imageio.ImageIO;
+
+public enum ImageResources {
+
+    INSTANCE;
+
+    private static final String APPLICATION_ICON_PATH = "net/sourceforge/jnlp/resources/netx-icon.png";
+
+    private final Map<String, Image> cache = new HashMap<String, Image>();
+
+    private ImageResources() {}
+
+    /* this is for testing ONLY */
+    void clearCache() {
+        cache.clear();
+    }
+
+    /**
+     * Returns an appropriate image, or null if there are errors loading the image.
+     */
+    private Image getApplicationImage() {
+        if (cache.containsKey(APPLICATION_ICON_PATH)) {
+            return cache.get(APPLICATION_ICON_PATH);
+        }
+
+        ClassLoader cl = this.getClass().getClassLoader();
+        if (cl == null) {
+            cl = ClassLoader.getSystemClassLoader();
+        }
+
+        InputStream in = cl.getResourceAsStream(APPLICATION_ICON_PATH);
+        try {
+            Image image = ImageIO.read(in);
+            cache.put(APPLICATION_ICON_PATH, image);
+            return image;
+        } catch (IOException ioe) {
+            ioe.printStackTrace();
+            return null;
+        }
+    }
+
+    /**
+     * Returns an appropriate image, or null if there are errors loading the image.
+     */
+    public List<Image> getApplicationImages() {
+        List<Image> images = new ArrayList<Image>();
+        Image appImage = getApplicationImage();
+        if (appImage != null) {
+            images.add(appImage);
+        }
+        return images;
+    }
+
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/util/PropertiesFile.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/util/PropertiesFile.java	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/util/PropertiesFile.java	(revision 416)
@@ -36,7 +36,7 @@
     /** the header string */
     String header = "netx file";
-
-    /** lazy loaded on getProperty */
-    boolean loaded = false;
+    
+    /** time of last modification, lazy loaded on getProperty */
+    long lastStore;
 
     /**
@@ -65,5 +65,5 @@
      */
     public String getProperty(String key) {
-        if (!loaded)
+        if (lastStore == 0)
             load();
 
@@ -76,5 +76,5 @@
      */
     public String getProperty(String key, String defaultValue) {
-        if (!loaded)
+        if (lastStore == 0)
             load();
 
@@ -88,5 +88,5 @@
      */
     public Object setProperty(String key, String value) {
-        if (!loaded)
+        if (lastStore == 0)
             load();
 
@@ -105,22 +105,43 @@
      * loaded; call this method before calling any method defined by
      * a superclass.
+     * 
+     * @return true, if file was (re-)loaded
+     *         false, if file was still current
      */
-    public void load() {
-        loaded = true;
+    public boolean load() {
 
-        InputStream s = null;
-        try {
-            if (!file.exists())
-                return;
+        if (!file.exists()) {
+            return false;
+        }
 
+        long currentStore = file.lastModified();
+        long currentTime = System.currentTimeMillis();
+
+        /* (re)load file, if
+         *  - it wasn't loaded/stored, yet (lastStore == 0)
+         *  - current file modification timestamp has changed since last store (currentStore != lastStore) OR
+         *  - current file modification timestamp has not changed since last store AND current system time equals current file modification timestamp
+         *    This is necessary because some filesystems seems only to provide accuracy of the timestamp on the level of seconds!
+         */
+        if(lastStore == 0 || currentStore != lastStore || (currentStore == lastStore && currentStore / 1000 == currentTime / 1000)) {
+            InputStream s = null;
             try {
-                s = new FileInputStream(file);
-                load(s);
-            } finally {
-                if (s != null) s.close();
+
+                try {
+                    s = new FileInputStream(file);
+                    load(s);
+                } finally {
+                    if (s != null) {
+                        s.close();
+                        lastStore=currentStore;
+                        return true;
+                    }
+                }
+            } catch (IOException ex) {
+                ex.printStackTrace();
             }
-        } catch (IOException ex) {
-            ex.printStackTrace();
         }
+
+        return false;
     }
 
@@ -129,12 +150,15 @@
      */
     public void store() {
-        if (!loaded)
-            return; // nothing could have changed so save unnecessary load/save
 
-        OutputStream s = null;
+        FileOutputStream s = null;
         try {
             try {
+                file.getParentFile().mkdirs();
                 s = new FileOutputStream(file);
                 store(s, header);
+
+                // fsync()
+                s.getChannel().force(true);
+                lastStore = file.lastModified();
             } finally {
                 if (s != null) s.close();
Index: /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/util/replacements/BASE64Encoder.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/util/replacements/BASE64Encoder.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/util/replacements/BASE64Encoder.java	(revision 416)
@@ -0,0 +1,110 @@
+/*
+ * Copyright (c) 1995, 1997, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code 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
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package net.sourceforge.jnlp.util.replacements;
+
+import java.io.OutputStream;
+import java.io.IOException;
+
+/**
+ * This class implements a BASE64 Character encoder as specified in RFC1521.
+ * This RFC is part of the MIME specification as published by the Internet
+ * Engineering Task Force (IETF). Unlike some other encoding schemes there
+ * is nothing in this encoding that indicates
+ * where a buffer starts or ends.
+ *
+ * This means that the encoded text will simply start with the first line
+ * of encoded text and end with the last line of encoded text.
+ *
+ * @author      Chuck McManis
+ * @see         CharacterEncoder
+ * @see         BASE64Decoder
+ */
+
+public class BASE64Encoder extends CharacterEncoder {
+
+    /** this class encodes three bytes per atom. */
+    protected int bytesPerAtom() {
+        return (3);
+    }
+
+    /**
+     * this class encodes 57 bytes per line. This results in a maximum
+     * of 57/3 * 4 or 76 characters per output line. Not counting the
+     * line termination.
+     */
+    protected int bytesPerLine() {
+        return (57);
+    }
+
+    /** This array maps the characters to their 6 bit values */
+    private final static char pem_array[] = {
+        //       0   1   2   3   4   5   6   7
+                'A','B','C','D','E','F','G','H', // 0
+                'I','J','K','L','M','N','O','P', // 1
+                'Q','R','S','T','U','V','W','X', // 2
+                'Y','Z','a','b','c','d','e','f', // 3
+                'g','h','i','j','k','l','m','n', // 4
+                'o','p','q','r','s','t','u','v', // 5
+                'w','x','y','z','0','1','2','3', // 6
+                '4','5','6','7','8','9','+','/'  // 7
+        };
+
+    /**
+     * encodeAtom - Take three bytes of input and encode it as 4
+     * printable characters. Note that if the length in len is less
+     * than three is encodes either one or two '=' signs to indicate
+     * padding characters.
+     */
+    protected void encodeAtom(OutputStream outStream, byte data[], int offset, int len)
+        throws IOException {
+        byte a, b, c;
+
+        if (len == 1) {
+            a = data[offset];
+            b = 0;
+            c = 0;
+            outStream.write(pem_array[(a >>> 2) & 0x3F]);
+            outStream.write(pem_array[((a << 4) & 0x30) + ((b >>> 4) & 0xf)]);
+            outStream.write('=');
+            outStream.write('=');
+        } else if (len == 2) {
+            a = data[offset];
+            b = data[offset+1];
+            c = 0;
+            outStream.write(pem_array[(a >>> 2) & 0x3F]);
+            outStream.write(pem_array[((a << 4) & 0x30) + ((b >>> 4) & 0xf)]);
+            outStream.write(pem_array[((b << 2) & 0x3c) + ((c >>> 6) & 0x3)]);
+            outStream.write('=');
+        } else {
+            a = data[offset];
+            b = data[offset+1];
+            c = data[offset+2];
+            outStream.write(pem_array[(a >>> 2) & 0x3F]);
+            outStream.write(pem_array[((a << 4) & 0x30) + ((b >>> 4) & 0xf)]);
+            outStream.write(pem_array[((b << 2) & 0x3c) + ((c >>> 6) & 0x3)]);
+            outStream.write(pem_array[c & 0x3F]);
+        }
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/util/replacements/CharacterEncoder.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/util/replacements/CharacterEncoder.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/util/replacements/CharacterEncoder.java	(revision 416)
@@ -0,0 +1,354 @@
+/*
+ * Copyright (c) 1995, 2005, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code 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
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package net.sourceforge.jnlp.util.replacements;
+
+import java.io.InputStream;
+import java.io.ByteArrayInputStream;
+import java.io.OutputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.PrintStream;
+import java.io.IOException;
+import java.nio.ByteBuffer;
+
+
+/**
+ * This class defines the encoding half of character encoders.
+ * A character encoder is an algorithim for transforming 8 bit binary
+ * data into text (generally 7 bit ASCII or 8 bit ISO-Latin-1 text)
+ * for transmition over text channels such as e-mail and network news.
+ *
+ * The character encoders have been structured around a central theme
+ * that, in general, the encoded text has the form:
+ *
+ * <pre>
+ *      [Buffer Prefix]
+ *      [Line Prefix][encoded data atoms][Line Suffix]
+ *      [Buffer Suffix]
+ * </pre>
+ *
+ * In the CharacterEncoder and CharacterDecoder classes, one complete
+ * chunk of data is referred to as a <i>buffer</i>. Encoded buffers
+ * are all text, and decoded buffers (sometimes just referred to as
+ * buffers) are binary octets.
+ *
+ * To create a custom encoder, you must, at a minimum,  overide three
+ * abstract methods in this class.
+ * <DL>
+ * <DD>bytesPerAtom which tells the encoder how many bytes to
+ * send to encodeAtom
+ * <DD>encodeAtom which encodes the bytes sent to it as text.
+ * <DD>bytesPerLine which tells the encoder the maximum number of
+ * bytes per line.
+ * </DL>
+ *
+ * Several useful encoders have already been written and are
+ * referenced in the See Also list below.
+ *
+ * @author      Chuck McManis
+ * @see         CharacterDecoder;
+ * @see         UCEncoder
+ * @see         UUEncoder
+ * @see         BASE64Encoder
+ */
+public abstract class CharacterEncoder {
+
+    /** Stream that understands "printing" */
+    protected PrintStream pStream;
+
+    /** Return the number of bytes per atom of encoding */
+    abstract protected int bytesPerAtom();
+
+    /** Return the number of bytes that can be encoded per line */
+    abstract protected int bytesPerLine();
+
+    /**
+     * Encode the prefix for the entire buffer. By default is simply
+     * opens the PrintStream for use by the other functions.
+     */
+    protected void encodeBufferPrefix(OutputStream aStream) throws IOException {
+        pStream = new PrintStream(aStream);
+    }
+
+    /**
+     * Encode the suffix for the entire buffer.
+     */
+    protected void encodeBufferSuffix(OutputStream aStream) throws IOException {
+    }
+
+    /**
+     * Encode the prefix that starts every output line.
+     */
+    protected void encodeLinePrefix(OutputStream aStream, int aLength)
+    throws IOException {
+    }
+
+    /**
+     * Encode the suffix that ends every output line. By default
+     * this method just prints a <newline> into the output stream.
+     */
+    protected void encodeLineSuffix(OutputStream aStream) throws IOException {
+        pStream.println();
+    }
+
+    /** Encode one "atom" of information into characters. */
+    abstract protected void encodeAtom(OutputStream aStream, byte someBytes[],
+                int anOffset, int aLength) throws IOException;
+
+    /**
+     * This method works around the bizarre semantics of BufferedInputStream's
+     * read method.
+     */
+    protected int readFully(InputStream in, byte buffer[])
+        throws java.io.IOException {
+        for (int i = 0; i < buffer.length; i++) {
+            int q = in.read();
+            if (q == -1)
+                return i;
+            buffer[i] = (byte)q;
+        }
+        return buffer.length;
+    }
+
+    /**
+     * Encode bytes from the input stream, and write them as text characters
+     * to the output stream. This method will run until it exhausts the
+     * input stream, but does not print the line suffix for a final
+     * line that is shorter than bytesPerLine().
+     */
+    public void encode(InputStream inStream, OutputStream outStream)
+        throws IOException {
+        int     j;
+        int     numBytes;
+        byte    tmpbuffer[] = new byte[bytesPerLine()];
+
+        encodeBufferPrefix(outStream);
+
+        while (true) {
+            numBytes = readFully(inStream, tmpbuffer);
+            if (numBytes == 0) {
+                break;
+            }
+            encodeLinePrefix(outStream, numBytes);
+            for (j = 0; j < numBytes; j += bytesPerAtom()) {
+
+                if ((j + bytesPerAtom()) <= numBytes) {
+                    encodeAtom(outStream, tmpbuffer, j, bytesPerAtom());
+                } else {
+                    encodeAtom(outStream, tmpbuffer, j, (numBytes)- j);
+                }
+            }
+            if (numBytes < bytesPerLine()) {
+                break;
+            } else {
+                encodeLineSuffix(outStream);
+            }
+        }
+        encodeBufferSuffix(outStream);
+    }
+
+    /**
+     * Encode the buffer in <i>aBuffer</i> and write the encoded
+     * result to the OutputStream <i>aStream</i>.
+     */
+    public void encode(byte aBuffer[], OutputStream aStream)
+    throws IOException {
+        ByteArrayInputStream inStream = new ByteArrayInputStream(aBuffer);
+        encode(inStream, aStream);
+    }
+
+    /**
+     * A 'streamless' version of encode that simply takes a buffer of
+     * bytes and returns a string containing the encoded buffer.
+     */
+    public String encode(byte aBuffer[]) {
+        ByteArrayOutputStream   outStream = new ByteArrayOutputStream();
+        ByteArrayInputStream    inStream = new ByteArrayInputStream(aBuffer);
+        String retVal = null;
+        try {
+            encode(inStream, outStream);
+            // explicit ascii->unicode conversion
+            retVal = outStream.toString("8859_1");
+        } catch (Exception IOException) {
+            // This should never happen.
+            throw new Error("CharacterEncoder.encode internal error");
+        }
+        return (retVal);
+    }
+
+    /**
+     * Return a byte array from the remaining bytes in this ByteBuffer.
+     * <P>
+     * The ByteBuffer's position will be advanced to ByteBuffer's limit.
+     * <P>
+     * To avoid an extra copy, the implementation will attempt to return the
+     * byte array backing the ByteBuffer.  If this is not possible, a
+     * new byte array will be created.
+     */
+    private byte [] getBytes(ByteBuffer bb) {
+        /*
+         * This should never return a BufferOverflowException, as we're
+         * careful to allocate just the right amount.
+         */
+        byte [] buf = null;
+
+        /*
+         * If it has a usable backing byte buffer, use it.  Use only
+         * if the array exactly represents the current ByteBuffer.
+         */
+        if (bb.hasArray()) {
+            byte [] tmp = bb.array();
+            if ((tmp.length == bb.capacity()) &&
+                    (tmp.length == bb.remaining())) {
+                buf = tmp;
+                bb.position(bb.limit());
+            }
+        }
+
+        if (buf == null) {
+            /*
+             * This class doesn't have a concept of encode(buf, len, off),
+             * so if we have a partial buffer, we must reallocate
+             * space.
+             */
+            buf = new byte[bb.remaining()];
+
+            /*
+             * position() automatically updated
+             */
+            bb.get(buf);
+        }
+
+        return buf;
+    }
+
+    /**
+     * Encode the <i>aBuffer</i> ByteBuffer and write the encoded
+     * result to the OutputStream <i>aStream</i>.
+     * <P>
+     * The ByteBuffer's position will be advanced to ByteBuffer's limit.
+     */
+    public void encode(ByteBuffer aBuffer, OutputStream aStream)
+        throws IOException {
+        byte [] buf = getBytes(aBuffer);
+        encode(buf, aStream);
+    }
+
+    /**
+     * A 'streamless' version of encode that simply takes a ByteBuffer
+     * and returns a string containing the encoded buffer.
+     * <P>
+     * The ByteBuffer's position will be advanced to ByteBuffer's limit.
+     */
+    public String encode(ByteBuffer aBuffer) {
+        byte [] buf = getBytes(aBuffer);
+        return encode(buf);
+    }
+
+    /**
+     * Encode bytes from the input stream, and write them as text characters
+     * to the output stream. This method will run until it exhausts the
+     * input stream. It differs from encode in that it will add the
+     * line at the end of a final line that is shorter than bytesPerLine().
+     */
+    public void encodeBuffer(InputStream inStream, OutputStream outStream)
+        throws IOException {
+        int     j;
+        int     numBytes;
+        byte    tmpbuffer[] = new byte[bytesPerLine()];
+
+        encodeBufferPrefix(outStream);
+
+        while (true) {
+            numBytes = readFully(inStream, tmpbuffer);
+            if (numBytes == 0) {
+                break;
+            }
+            encodeLinePrefix(outStream, numBytes);
+            for (j = 0; j < numBytes; j += bytesPerAtom()) {
+                if ((j + bytesPerAtom()) <= numBytes) {
+                    encodeAtom(outStream, tmpbuffer, j, bytesPerAtom());
+                } else {
+                    encodeAtom(outStream, tmpbuffer, j, (numBytes)- j);
+                }
+            }
+            encodeLineSuffix(outStream);
+            if (numBytes < bytesPerLine()) {
+                break;
+            }
+        }
+        encodeBufferSuffix(outStream);
+    }
+
+    /**
+     * Encode the buffer in <i>aBuffer</i> and write the encoded
+     * result to the OutputStream <i>aStream</i>.
+     */
+    public void encodeBuffer(byte aBuffer[], OutputStream aStream)
+    throws IOException {
+        ByteArrayInputStream inStream = new ByteArrayInputStream(aBuffer);
+        encodeBuffer(inStream, aStream);
+    }
+
+    /**
+     * A 'streamless' version of encode that simply takes a buffer of
+     * bytes and returns a string containing the encoded buffer.
+     */
+    public String encodeBuffer(byte aBuffer[]) {
+        ByteArrayOutputStream   outStream = new ByteArrayOutputStream();
+        ByteArrayInputStream    inStream = new ByteArrayInputStream(aBuffer);
+        try {
+            encodeBuffer(inStream, outStream);
+        } catch (Exception IOException) {
+            // This should never happen.
+            throw new Error("CharacterEncoder.encodeBuffer internal error");
+        }
+        return (outStream.toString());
+    }
+
+    /**
+     * Encode the <i>aBuffer</i> ByteBuffer and write the encoded
+     * result to the OutputStream <i>aStream</i>.
+     * <P>
+     * The ByteBuffer's position will be advanced to ByteBuffer's limit.
+     */
+    public void encodeBuffer(ByteBuffer aBuffer, OutputStream aStream)
+        throws IOException {
+        byte [] buf = getBytes(aBuffer);
+        encodeBuffer(buf, aStream);
+    }
+
+    /**
+     * A 'streamless' version of encode that simply takes a ByteBuffer
+     * and returns a string containing the encoded buffer.
+     * <P>
+     * The ByteBuffer's position will be advanced to ByteBuffer's limit.
+     */
+    public String encodeBuffer(ByteBuffer aBuffer) {
+        byte [] buf = getBytes(aBuffer);
+        return encodeBuffer(buf);
+    }
+
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/nanoxml/XMLElement.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/nanoxml/XMLElement.java	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/nanoxml/XMLElement.java	(revision 416)
@@ -1167,5 +1167,5 @@
      *             xml file.
      */
-    public void sanitizeInput(InputStreamReader isr, PipedOutputStream pout) {
+    public void sanitizeInput(Reader isr, OutputStream pout) {
         try {
             PrintStream out = new PrintStream(pout);
@@ -1221,9 +1221,33 @@
                 this.sanitizeCharReadTooMuch = next;
 
-                // If the next char is a ? or !, then we've hit a special tag,
+                // If the next chars are !--, then we've hit a comment tag,
                 // and should skip it.
-                if (prev == '<' && (next == '!' || next == '?')) {
-                    this.skipSpecialTag(0);
-                    this.sanitizeCharReadTooMuch = '\0';
+                if (ch == '<' && sanitizeCharReadTooMuch == '!') {
+                    ch = (char) this.reader.read();
+                    if (ch == '-') {
+                        ch = (char) this.reader.read();
+                        if (ch == '-') {
+                            this.skipComment();
+                            this.sanitizeCharReadTooMuch = '\0';
+                        } else {
+                            out.print('<');
+                            out.print('!');
+                            out.print('-');
+                            this.sanitizeCharReadTooMuch = ch;
+                            if (JNLPRuntime.isDebug()) {
+                                System.out.print('<');
+                                System.out.print('!');
+                                System.out.print('-');
+                            }
+                        }
+                    } else {
+                        out.print('<');
+                        out.print('!');
+                        this.sanitizeCharReadTooMuch = ch;
+                        if (JNLPRuntime.isDebug()) {
+                            System.out.print('<');
+                            System.out.print('!');
+                        }
+                    }
                 }
                 // Otherwise we haven't hit a comment, and we should write ch.
Index: /branches/vendor/sourceforge/icedtea-web/current/plugin/icedteanp/IcedTeaJavaRequestProcessor.cc
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/plugin/icedteanp/IcedTeaJavaRequestProcessor.cc	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/plugin/icedteanp/IcedTeaJavaRequestProcessor.cc	(revision 416)
@@ -905,9 +905,5 @@
     {
     	className = "java.lang.String";
-#if MOZILLA_VERSION_COLLAPSED < 1090200
-    	stringArg += NPVARIANT_TO_STRING(variant).utf8characters;
-#else
-    	stringArg += NPVARIANT_TO_STRING(variant).UTF8Characters;
-#endif
+    	stringArg = IcedTeaPluginUtilities::NPVariantAsString(variant);
     } else if (NPVARIANT_IS_OBJECT(variant))
     {
@@ -922,4 +918,5 @@
             PLUGIN_DEBUG("NPObject is not a Java object\n");
             NPIdentifier length_id = browser_functions.getstringidentifier("length");
+            bool isJSObjectArray = false;
 
             // FIXME: We currently only handle <= 2 dim arrays. Do we really need more though?
@@ -937,5 +934,5 @@
                 IcedTeaPluginUtilities::itoa(NPVARIANT_TO_INT32(length), &length_str);
 
-                if (NPVARIANT_TO_INT32(length) > 0)
+                if (NPVARIANT_TO_INT32(length) >= 0)
                 {
                     NPIdentifier id_0 = browser_functions.getintidentifier(0);
@@ -957,6 +954,12 @@
                         getArrayTypeForJava(instance, first_element, &java_array_type);
                     }
-                } else
-                    java_array_type.append("jsobject");
+                }
+
+                // For JSObject arrays, we create a regular object (accessible via JSObject.getSlot())
+                if (NPVARIANT_TO_INT32(length) < 0 || !java_array_type.compare("jsobject"))
+                {
+                    isJSObjectArray = true;
+                    goto createRegularObject;
+                }
 
                 java_result = java_request.newArray(java_array_type, length_str);
@@ -996,5 +999,8 @@
                 // Got here => no errors above. We're good to return!
                 return;
-            } else // Else it is not an array
+            }
+
+            createRegularObject:
+            if (!IcedTeaPluginUtilities::isObjectJSArray(instance, obj) || isJSObjectArray) // Else it is not an array
             {
 
Index: /branches/vendor/sourceforge/icedtea-web/current/plugin/icedteanp/IcedTeaNPPlugin.cc
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/plugin/icedteanp/IcedTeaNPPlugin.cc	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/plugin/icedteanp/IcedTeaNPPlugin.cc	(revision 416)
@@ -90,4 +90,16 @@
 #define PLUGIN_FULL_NAME PLUGIN_NAME " (using " PLUGIN_VERSION ")"
 #define PLUGIN_DESC "The <a href=\"" PACKAGE_URL "\">" PLUGIN_NAME "</a> executes Java applets."
+
+#ifdef HAVE_JAVA7
+ #define JPI_VERSION "1.7.0_" JDK_UPDATE_VERSION
+ #define PLUGIN_APPLET_MIME_DESC7 \
+  "application/x-java-applet;version=1.7:class,jar:IcedTea;"
+ #define PLUGIN_BEAN_MIME_DESC7 \
+  "application/x-java-bean;version=1.7:class,jar:IcedTea;"
+#else
+ #define JPI_VERSION "1.6.0_" JDK_UPDATE_VERSION
+ #define PLUGIN_APPLET_MIME_DESC7
+ #define PLUGIN_BEAN_MIME_DESC7
+#endif
 
 #define PLUGIN_MIME_DESC                                               \
@@ -108,5 +120,6 @@
   "application/x-java-applet;version=1.5:class,jar:IcedTea;"           \
   "application/x-java-applet;version=1.6:class,jar:IcedTea;"           \
-  "application/x-java-applet;jpi-version=1.6.0_" JDK_UPDATE_VERSION ":class,jar:IcedTea;"  \
+  PLUGIN_APPLET_MIME_DESC7 \
+  "application/x-java-applet;jpi-version=" JPI_VERSION ":class,jar:IcedTea;"  \
   "application/x-java-bean:class,jar:IcedTea;"                         \
   "application/x-java-bean;version=1.1:class,jar:IcedTea;"             \
@@ -124,5 +137,6 @@
   "application/x-java-bean;version=1.5:class,jar:IcedTea;"             \
   "application/x-java-bean;version=1.6:class,jar:IcedTea;"             \
-  "application/x-java-bean;jpi-version=1.6.0_" JDK_UPDATE_VERSION ":class,jar:IcedTea;"    \
+  PLUGIN_BEAN_MIME_DESC7 \
+  "application/x-java-bean;jpi-version=" JPI_VERSION ":class,jar:IcedTea;"    \
   "application/x-java-vm-npruntime::IcedTea;"
 
@@ -250,4 +264,43 @@
 pthread_cond_t cond_message_available = PTHREAD_COND_INITIALIZER;
 
+
+#ifdef LEGACY_GLIB
+// Returns key from first item stored in hashtable
+gboolean
+find_first_item_in_hash_table(gpointer key, gpointer value, gpointer user_data)
+{
+    user_data = key;
+    return (gboolean)TRUE;
+}
+
+int
+g_strcmp0(char *str1, char *str2)
+{
+   if (str1 != NULL)
+     return str2 != NULL ? strcmp(str1, str2) : 1;
+   else // str1 == NULL
+     return str2 != NULL ? 1 : 0;
+}
+
+
+#endif
+
+
+/* 
+ * Find first member in GHashTable* depending on version of glib
+ */
+gpointer getFirstInTableInstance(GHashTable* table)
+{
+      gpointer id, instance;
+      #ifndef LEGACY_GLIB
+        GHashTableIter iter;
+        g_hash_table_iter_init (&iter, table);
+        g_hash_table_iter_next (&iter, &instance, &id);
+      #else
+        g_hash_table_find(table, (GHRFunc)find_first_item_in_hash_table, &instance);
+      #endif
+        return instance;
+}
+
 // Functions prefixed by ITNP_ are instance functions.  They are called
 // by the browser and operate on instances of ITNPPluginData.
@@ -375,5 +428,5 @@
 
  cleanup_appletviewer_mutex:
-  g_free (data->appletviewer_mutex);
+  g_mutex_free (data->appletviewer_mutex);
   data->appletviewer_mutex = NULL;
 
@@ -873,4 +926,9 @@
 get_cookie_info(const char* siteAddr, char** cookieString, uint32_t* len)
 {
+  // Only attempt to perform this operation if there is a valid plugin instance
+  if (g_hash_table_size(instance_to_id_map) <= 0)
+  {
+    return NPERR_GENERIC_ERROR;
+  }
 #if MOZILLA_VERSION_COLLAPSED < 1090100
   nsresult rv;
@@ -916,10 +974,5 @@
   if (browser_functions.getvalueforurl)
   {
-      GHashTableIter iter;
-      gpointer id, instance;
-
-      g_hash_table_iter_init (&iter, instance_to_id_map);
-      g_hash_table_iter_next (&iter, &instance, &id);
-
+      gpointer instance=getFirstInTableInstance(instance_to_id_map);
       return browser_functions.getvalueforurl((NPP) instance, NPNURLVCookie, siteAddr, cookieString, len);
   } else
@@ -931,4 +984,19 @@
 
   return NPERR_NO_ERROR;
+}
+
+static NPError
+set_cookie_info(const char* siteAddr, const char* cookieString, uint32_t len)
+{
+  // Only attempt to perform this operation if there is a valid plugin instance
+  if (g_hash_table_size(instance_to_id_map) > 0 && browser_functions.getvalueforurl)
+  {
+      // We arbitrarily use the first valid instance we can grab
+      // For an explanation of the logic behind this, see get_cookie_info
+      gpointer instance = getFirstInTableInstance(instance_to_id_map);
+      return browser_functions.setvalueforurl((NPP) instance, NPNURLVCookie, siteAddr, cookieString, len);
+  }
+
+  return NPERR_GENERIC_ERROR;;
 }
 
@@ -1046,20 +1114,6 @@
                                href_id, &href);
 
-  // Strip everything after the last "/"
-#if MOZILLA_VERSION_COLLAPSED < 1090200
-  gchar** parts = g_strsplit (NPVARIANT_TO_STRING(href).utf8characters, "/", -1);
-#else
-  gchar** parts = g_strsplit (NPVARIANT_TO_STRING(href).UTF8Characters, "/", -1);
-#endif
-  guint parts_sz = g_strv_length (parts);
-
-  std::string location_str;
-  for (int i=0; i < parts_sz - 1; i++)
-  {
-      location_str += parts[i];
-      location_str += "/";
-  }
-
-  documentbase_copy = g_strdup (location_str.c_str());
+  std::string href_str = IcedTeaPluginUtilities::NPVariantAsString(href);
+  documentbase_copy = g_strdup (href_str.c_str());
 
   // Release references.
@@ -1151,4 +1205,97 @@
 }
 
+static
+void consume_plugin_message(gchar* message) {
+  // internal plugin related message
+  gchar** parts = g_strsplit (message, " ", 5);
+  if (g_str_has_prefix(parts[1], "PluginProxyInfo"))
+  {
+    gchar* proxy;
+    uint32_t len;
+
+    gchar* decoded_url = (gchar*) calloc(strlen(parts[4]) + 1, sizeof(gchar));
+    IcedTeaPluginUtilities::decodeURL(parts[4], &decoded_url);
+    PLUGIN_DEBUG("parts[0]=%s, parts[1]=%s, reference, parts[3]=%s, parts[4]=%s -- decoded_url=%s\n", parts[0], parts[1], parts[3], parts[4], decoded_url);
+
+    gchar* proxy_info;
+
+#if MOZILLA_VERSION_COLLAPSED < 1090100
+	proxy = (char*) malloc(sizeof(char)*2048);
+#endif
+
+    proxy_info = g_strconcat ("plugin PluginProxyInfo reference ", parts[3], " ", NULL);
+    if (get_proxy_info(decoded_url, &proxy, &len) == NPERR_NO_ERROR)
+      {
+        proxy_info = g_strconcat (proxy_info, proxy, NULL);
+      }
+
+    PLUGIN_DEBUG("Proxy info: %s\n", proxy_info);
+    plugin_send_message_to_appletviewer(proxy_info);
+
+    free(decoded_url);
+    decoded_url = NULL;
+    g_free(proxy_info);
+    proxy_info = NULL;
+
+#if MOZILLA_VERSION_COLLAPSED < 1090100
+	g_free(proxy);
+	proxy = NULL;
+#endif
+
+  } else if (g_str_has_prefix(parts[1], "PluginCookieInfo"))
+  {
+    gchar* decoded_url = (gchar*) calloc(strlen(parts[4])+1, sizeof(gchar));
+    IcedTeaPluginUtilities::decodeURL(parts[4], &decoded_url);
+
+    gchar* cookie_info = g_strconcat ("plugin PluginCookieInfo reference ", parts[3], " ", NULL);
+    gchar* cookie_string;
+    uint32_t len;
+    if (get_cookie_info(decoded_url, &cookie_string, &len) == NPERR_NO_ERROR)
+    {
+        cookie_info = g_strconcat (cookie_info, cookie_string, NULL);
+    }
+
+    PLUGIN_DEBUG("Cookie info: %s\n", cookie_info);
+    plugin_send_message_to_appletviewer(cookie_info);
+
+    free(decoded_url);
+    decoded_url = NULL;
+    g_free(cookie_info);
+    cookie_info = NULL;
+  } else if (g_str_has_prefix(parts[1], "PluginSetCookie"))
+  {
+    // Message structure: plugin PluginSetCookie reference -1 <url> <cookie>
+    gchar** cookie_parts = g_strsplit (message, " ", 6);
+
+    if (g_strv_length(cookie_parts) < 6)
+    {
+       g_strfreev (parts);
+       g_strfreev (cookie_parts);
+       return; // Defensive, message _should_ be properly formatted
+    }
+
+    gchar* decoded_url = (gchar*) calloc(strlen(cookie_parts[4])+1, sizeof(gchar));
+    IcedTeaPluginUtilities::decodeURL(cookie_parts[4], &decoded_url);
+
+    gchar* cookie_string = cookie_parts[5];
+    uint32_t len = strlen(cookie_string);
+    if (set_cookie_info(decoded_url, cookie_string, len) == NPERR_NO_ERROR)
+    {
+  	  PLUGIN_DEBUG("Setting cookie for URL %s to %s\n", decoded_url, cookie_string);
+    } else
+    {
+  	  PLUGIN_DEBUG("Not able to set cookie for URL %s to %s\n", decoded_url, cookie_string);
+    }
+
+    free(decoded_url);
+    decoded_url = NULL;
+    g_strfreev (cookie_parts);
+    cookie_parts = NULL;
+  }
+
+  g_strfreev (parts);
+  parts = NULL;
+}
+
 void consume_message(gchar* message) {
 
@@ -1180,7 +1327,7 @@
 
           // clear the "instance X status" parts
-          sprintf(parts[0], "");
-          sprintf(parts[1], "");
-          sprintf(parts[2], "");
+          strcpy(parts[0], "");
+          strcpy(parts[1], "");
+          strcpy(parts[2], "");
 
           // join the rest
@@ -1213,61 +1360,5 @@
   else if (g_str_has_prefix (message, "plugin "))
     {
-      // internal plugin related message
-      gchar** parts = g_strsplit (message, " ", 5);
-      if (g_str_has_prefix(parts[1], "PluginProxyInfo"))
-      {
-        gchar* proxy;
-        uint32_t len;
-
-        gchar* decoded_url = (gchar*) calloc(strlen(parts[4]) + 1, sizeof(gchar));
-        IcedTeaPluginUtilities::decodeURL(parts[4], &decoded_url);
-        PLUGIN_DEBUG("parts[0]=%s, parts[1]=%s, reference, parts[3]=%s, parts[4]=%s -- decoded_url=%s\n", parts[0], parts[1], parts[3], parts[4], decoded_url);
-
-        gchar* proxy_info;
-
-#if MOZILLA_VERSION_COLLAPSED < 1090100
-	proxy = (char*) malloc(sizeof(char)*2048);
-#endif
-
-        proxy_info = g_strconcat ("plugin PluginProxyInfo reference ", parts[3], " ", NULL);
-        if (get_proxy_info(decoded_url, &proxy, &len) == NPERR_NO_ERROR)
-          {
-            proxy_info = g_strconcat (proxy_info, proxy, NULL);
-          }
-
-        PLUGIN_DEBUG("Proxy info: %s\n", proxy_info);
-        plugin_send_message_to_appletviewer(proxy_info);
-
-        g_free(decoded_url);
-        decoded_url = NULL;
-        g_free(proxy_info);
-        proxy_info = NULL;
-
-#if MOZILLA_VERSION_COLLAPSED < 1090100
-	g_free(proxy);
-	proxy = NULL;
-#endif
-
-      } else if (g_str_has_prefix(parts[1], "PluginCookieInfo"))
-      {
-        gchar* decoded_url = (gchar*) calloc(strlen(parts[4])+1, sizeof(gchar));
-        IcedTeaPluginUtilities::decodeURL(parts[4], &decoded_url);
-
-        gchar* cookie_info = g_strconcat ("plugin PluginCookieInfo reference ", parts[3], " ", NULL);
-        gchar* cookie_string;
-        uint32_t len;
-        if (get_cookie_info(decoded_url, &cookie_string, &len) == NPERR_NO_ERROR)
-        {
-            cookie_info = g_strconcat (cookie_info, cookie_string, NULL);
-        }
-
-        PLUGIN_DEBUG("Cookie info: %s\n", cookie_info);
-        plugin_send_message_to_appletviewer(cookie_info);
-
-        g_free(decoded_url);
-        decoded_url = NULL;
-        g_free(cookie_info);
-        cookie_info = NULL;
-      }
+        consume_plugin_message(message);
     }
   else
@@ -1275,4 +1366,5 @@
         g_print ("  Unable to handle message: %s\n", message);
     }
+
 }
 
@@ -1294,4 +1386,9 @@
 get_proxy_info(const char* siteAddr, char** proxy, uint32_t* len)
 {
+  // Only attempt to perform this operation if there is a valid plugin instance
+  if (g_hash_table_size(instance_to_id_map) <= 0)
+  {
+	  return NPERR_GENERIC_ERROR;
+  }
 #if MOZILLA_VERSION_COLLAPSED < 1090100
   nsresult rv;
@@ -1368,10 +1465,5 @@
 
       // As in get_cookie_info, we use the first active instance
-      GHashTableIter iter;
-      gpointer id, instance;
-
-      g_hash_table_iter_init (&iter, instance_to_id_map);
-      g_hash_table_iter_next (&iter, &instance, &id);
-
+      gpointer instance=getFirstInTableInstance(instance_to_id_map);
       browser_functions.getvalueforurl((NPP) instance, NPNURLVProxy, siteAddr, proxy, len);
   } else
@@ -1958,5 +2050,5 @@
 
   // cleanup_appletviewer_mutex:
-  g_free (tofree->appletviewer_mutex);
+  g_mutex_free (tofree->appletviewer_mutex);
   tofree->appletviewer_mutex = NULL;
 
@@ -1981,103 +2073,51 @@
 }
 
-// FACTORY FUNCTIONS
-
-// Provides the browser with pointers to the plugin functions that we
-// implement and initializes a local table with browser functions that
-// we may wish to call.  Called once, after browser startup and before
-// the first plugin instance is created.
-// The field 'initialized' is set to true once this function has
-// finished. If 'initialized' is already true at the beginning of
-// this function, then it is evident that NP_Initialize has already
-// been called. There is no need to call this function more than once and
-// this workaround avoids any duplicate calls.
-NPError
-NP_Initialize (NPNetscapeFuncs* browserTable, NPPluginFuncs* pluginTable)
-{
-  PLUGIN_DEBUG ("NP_Initialize\n");
-
-  if ((browserTable == NULL) || (pluginTable == NULL))
+static bool
+initialize_browser_functions(const NPNetscapeFuncs* browserTable)
+{
+#if MOZILLA_VERSION_COLLAPSED < 1090100
+#define NPNETSCAPEFUNCS_LAST_FIELD_USED (browserTable->pluginthreadasynccall)
+#else
+#define NPNETSCAPEFUNCS_LAST_FIELD_USED (browserTable->setvalueforurl)
+#endif
+
+  //Determine the size in bytes, as a difference of the address past the last used field
+  //And the browser table address
+  size_t usedSize = (char*)(1 + &NPNETSCAPEFUNCS_LAST_FIELD_USED) - (char*)browserTable;
+
+  // compare the reported size versus the size we required
+  if (browserTable->size < usedSize)
   {
-    PLUGIN_ERROR ("Browser or plugin function table is NULL.");
-
-    return NPERR_INVALID_FUNCTABLE_ERROR;
+    return false;
   }
 
-  // Ensure that the major version of the plugin API that the browser
-  // expects is not more recent than the major version of the API that
-  // we've implemented.
-  if ((browserTable->version >> 8) > NP_VERSION_MAJOR)
-    {
-      PLUGIN_ERROR ("Incompatible version.");
-
-      return NPERR_INCOMPATIBLE_VERSION_ERROR;
-    }
-
-  // Ensure that the plugin function table we've received is large
-  // enough to store the number of functions that we may provide.
-  if (pluginTable->size < sizeof (NPPluginFuncs))
-    {
-      PLUGIN_ERROR ("Invalid plugin function table.");
-
-      return NPERR_INVALID_FUNCTABLE_ERROR;
-    }
-
-  // Ensure that the browser function table is large enough to store
-  // the number of browser functions that we may use.
-  if (browserTable->size < sizeof (NPNetscapeFuncs))
-    {
-      fprintf (stderr, "ERROR: Invalid browser function table. Some functionality may be restricted.\n");
-    }
-
-  // Store in a local table the browser functions that we may use.
-  browser_functions.size                    = browserTable->size;
-  browser_functions.version                 = browserTable->version;
-  browser_functions.geturlnotify            = browserTable->geturlnotify;
-  browser_functions.geturl                  = browserTable->geturl;
-  browser_functions.posturlnotify           = browserTable->posturlnotify;
-  browser_functions.posturl                 = browserTable->posturl;
-  browser_functions.requestread             = browserTable->requestread;
-  browser_functions.newstream               = browserTable->newstream;
-  browser_functions.write                   = browserTable->write;
-  browser_functions.destroystream           = browserTable->destroystream;
-  browser_functions.status                  = browserTable->status;
-  browser_functions.uagent                  = browserTable->uagent;
-  browser_functions.memalloc                = browserTable->memalloc;
-  browser_functions.memfree                 = browserTable->memfree;
-  browser_functions.memflush                = browserTable->memflush;
-  browser_functions.reloadplugins           = browserTable->reloadplugins;
-  browser_functions.getJavaEnv              = browserTable->getJavaEnv;
-  browser_functions.getJavaPeer             = browserTable->getJavaPeer;
-  browser_functions.getvalue                = browserTable->getvalue;
-  browser_functions.setvalue                = browserTable->setvalue;
-  browser_functions.invalidaterect          = browserTable->invalidaterect;
-  browser_functions.invalidateregion        = browserTable->invalidateregion;
-  browser_functions.forceredraw             = browserTable->forceredraw;
-  browser_functions.getstringidentifier     = browserTable->getstringidentifier;
-  browser_functions.getstringidentifiers    = browserTable->getstringidentifiers;
-  browser_functions.getintidentifier        = browserTable->getintidentifier;
-  browser_functions.identifierisstring      = browserTable->identifierisstring;
-  browser_functions.utf8fromidentifier      = browserTable->utf8fromidentifier;
-  browser_functions.intfromidentifier       = browserTable->intfromidentifier;
-  browser_functions.createobject            = browserTable->createobject;
-  browser_functions.retainobject            = browserTable->retainobject;
-  browser_functions.releaseobject           = browserTable->releaseobject;
-  browser_functions.invoke                  = browserTable->invoke;
-  browser_functions.invokeDefault           = browserTable->invokeDefault;
-  browser_functions.evaluate                = browserTable->evaluate;
-  browser_functions.getproperty             = browserTable->getproperty;
-  browser_functions.setproperty             = browserTable->setproperty;
-  browser_functions.removeproperty          = browserTable->removeproperty;
-  browser_functions.hasproperty             = browserTable->hasproperty;
-  browser_functions.hasmethod               = browserTable->hasmethod;
-  browser_functions.releasevariantvalue     = browserTable->releasevariantvalue;
-  browser_functions.setexception            = browserTable->setexception;
-  browser_functions.pluginthreadasynccall   = browserTable->pluginthreadasynccall;
-#if MOZILLA_VERSION_COLLAPSED >= 1090100
-  browser_functions.getvalueforurl          = browserTable->getvalueforurl;
-  browser_functions.setvalueforurl          = browserTable->setvalueforurl;
-#endif
-
-  // Return to the browser the plugin functions that we implement.
+  //Ensure any unused fields are NULL
+  memset(&browser_functions, 0, sizeof(NPNetscapeFuncs));
+
+  //browserTable->size can be larger than sizeof(NPNetscapeFuncs) (PR1106)
+  size_t copySize = browserTable->size < sizeof(NPNetscapeFuncs) ?
+                    browserTable->size : sizeof(NPNetscapeFuncs);
+
+  //Copy fields according to given size
+  memcpy(&browser_functions, browserTable, copySize);
+
+  return true;
+}
+
+/* Set the plugin table to the correct contents, taking care not to write past
+ * the provided object space */
+static bool
+initialize_plugin_table(NPPluginFuncs* pluginTable)
+{
+#define NPPLUGINFUNCS_LAST_FIELD_USED (pluginTable->getvalue)
+
+  //Determine the size in bytes, as a difference of the address past the last used field
+  //And the browser table address
+  size_t usedSize = (char*)(1 + &NPPLUGINFUNCS_LAST_FIELD_USED) - (char*)pluginTable;
+
+  // compare the reported size versus the size we required
+  if (pluginTable->size < usedSize)
+    return false;
+
   pluginTable->version = (NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR;
   pluginTable->size = sizeof (NPPluginFuncs);
@@ -2109,4 +2149,66 @@
 #endif
 
+  return true;
+}
+
+// FACTORY FUNCTIONS
+
+// Provides the browser with pointers to the plugin functions that we
+// implement and initializes a local table with browser functions that
+// we may wish to call.  Called once, after browser startup and before
+// the first plugin instance is created.
+// The field 'initialized' is set to true once this function has
+// finished. If 'initialized' is already true at the beginning of
+// this function, then it is evident that NP_Initialize has already
+// been called. There is no need to call this function more than once and
+// this workaround avoids any duplicate calls.
+NPError
+NP_Initialize (NPNetscapeFuncs* browserTable, NPPluginFuncs* pluginTable)
+{
+  PLUGIN_DEBUG ("NP_Initialize\n");
+
+  if ((browserTable == NULL) || (pluginTable == NULL))
+  {
+    PLUGIN_ERROR ("Browser or plugin function table is NULL.");
+
+    return NPERR_INVALID_FUNCTABLE_ERROR;
+  }
+
+  // Ensure that the major version of the plugin API that the browser
+  // expects is not more recent than the major version of the API that
+  // we've implemented.
+  if ((browserTable->version >> 8) > NP_VERSION_MAJOR)
+    {
+      PLUGIN_ERROR ("Incompatible version.");
+
+      return NPERR_INCOMPATIBLE_VERSION_ERROR;
+    }
+
+  // Copy into a global table (browser_functions) the browser functions that we may use.
+  // If the browser functions needed change, update NPNETSCAPEFUNCS_LAST_FIELD_USED
+  // within this function
+  bool browser_functions_supported = initialize_browser_functions(browserTable);
+
+  // Check if everything we rely on is supported
+  if ( !browser_functions_supported )
+  {
+	PLUGIN_ERROR ("Invalid browser function table.");
+
+	return NPERR_INVALID_FUNCTABLE_ERROR;
+  }
+
+  // Return to the browser the plugin functions that we implement.
+  // If the plugin functions needed change, update NPPLUGINFUNCS_LAST_FIELD_USED
+  // within this function
+  bool plugin_functions_supported = initialize_plugin_table(pluginTable);
+
+  // Check if everything we rely on is supported
+  if ( !plugin_functions_supported )
+  {
+    PLUGIN_ERROR ("Invalid plugin function table.");
+
+    return NPERR_INVALID_FUNCTABLE_ERROR;
+  }
+
   // Re-setting the above tables multiple times is OK (as the 
   // browser may change its function locations). However 
@@ -2263,5 +2365,9 @@
 // Returns a string describing the MIME type that this plugin
 // handles.
-char*
+#ifdef LEGACY_XULRUNNERAPI
+  char* 
+#else
+  const char* 
+#endif
 NP_GetMIMEDescription ()
 {
Index: /branches/vendor/sourceforge/icedtea-web/current/plugin/icedteanp/IcedTeaPluginRequestProcessor.cc
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/plugin/icedteanp/IcedTeaPluginRequestProcessor.cc	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/plugin/icedteanp/IcedTeaPluginRequestProcessor.cc	(revision 416)
@@ -124,4 +124,10 @@
             this->sendWindow(message_parts);
             return true;
+        } else if (!command->find("Finalize"))
+        {
+            // Object can be finalized from the main thread only. And this
+        	// call returns immediately, so we do it in the same thread.
+            this->finalize(message_parts);
+            return true;
         } else if (!command->find("GetMember") ||
                    !command->find("SetMember") ||
@@ -131,5 +137,4 @@
                    !command->find("SetSlot") ||
                    !command->find("Eval") ||
-                   !command->find("Finalize") ||
                    !command->find("LoadURL"))
         {
@@ -242,11 +247,7 @@
     IcedTeaPluginUtilities::callAndWaitForResult(instance, &_eval, &thread_data);
 
-    NPVariant* result_variant = (NPVariant*) IcedTeaPluginUtilities::stringToJSID(thread_data.result);
-    std::string result_variant_jniid = std::string();
-    createJavaObjectFromVariant(instance, *result_variant, &result_variant_jniid);
-
     IcedTeaPluginUtilities::constructMessagePrefix(0, reference, &response);
     response += " JavaScriptEval ";
-    response += result_variant_jniid;
+    response += thread_data.result;
 
     plugin_to_java_bus->post(response.c_str());
@@ -275,5 +276,5 @@
     NPVariant* result_variant;
     std::string result_variant_jniid = std::string();
-    NPVariant* args_array;
+    NPVariant* args_array = NULL;
     AsyncCallThreadData thread_data = AsyncCallThreadData();
 
@@ -331,17 +332,7 @@
     IcedTeaPluginUtilities::callAndWaitForResult(instance, &_call, &thread_data);
 
-    result_variant = (NPVariant*) IcedTeaPluginUtilities::stringToJSID(thread_data.result);
-
-    if (result_variant)
-    {
-        createJavaObjectFromVariant(instance, *result_variant, &result_variant_jniid);
-    } else
-    {
-        result_variant_jniid = "0";
-    }
-
     IcedTeaPluginUtilities::constructMessagePrefix(0, reference, &response);
     response += " JavaScriptCall ";
-    response += result_variant_jniid;
+    response += thread_data.result;
 
     plugin_to_java_bus->post(response.c_str());
@@ -410,5 +401,6 @@
     NPP instance;
     NPVariant* member;
-    NPIdentifier property_identifier;
+    std::string property_id = std::string();
+    bool int_identifier;
 
     JavaRequestProcessor java_request = JavaRequestProcessor();
@@ -440,5 +432,6 @@
     if (*(message_parts->at(4)) == "SetSlot")
     {
-        property_identifier = browser_functions.getintidentifier(atoi(message_parts->at(6)->c_str()));
+    	property_id.append(*(message_parts->at(6)));
+    	int_identifier = true;
     } else
     {
@@ -452,5 +445,6 @@
         }
 
-        property_identifier = browser_functions.getstringidentifier(java_result->return_string->c_str());
+        property_id.append(*(java_result->return_string));
+    	int_identifier = false;
     }
 
@@ -462,6 +456,7 @@
     thread_data.parameters.push_back(instance);
     thread_data.parameters.push_back(NPVARIANT_TO_OBJECT(*member));
-    thread_data.parameters.push_back(&property_identifier);
+    thread_data.parameters.push_back(&property_id);
     thread_data.parameters.push_back(&value);
+    thread_data.parameters.push_back(&int_identifier);
 
     IcedTeaPluginUtilities::callAndWaitForResult(instance, &_setMember, &thread_data);
@@ -478,5 +473,5 @@
  * can only be requested from the main thread in Mozilla, this function
  * does whatever it can seperately, and then makes an internal request that
- * causes _sendMember to do the rest of the work.
+ * causes _getMember to do the rest of the work.
  *
  * @param message_parts The request message
@@ -491,10 +486,10 @@
     JavaResultData* java_result;
     NPVariant* parent_ptr;
+    NPVariant* member_ptr;
 
     //int reference;
     std::string member_id = std::string();
-    std::string jsObjectClassID = std::string();
-    std::string jsObjectConstructorID = std::string();
     std::string response = std::string();
+    std::string result_id = std::string();
 
     NPIdentifier member_identifier;
@@ -503,4 +498,5 @@
     int instance_id;
     int reference;
+    bool int_identifier;
 
     // debug printout of parent thread data
@@ -517,5 +513,5 @@
     if (*(message_parts->at(4)) == "GetSlot")
     {
-        member_identifier = browser_functions.getintidentifier(atoi(member_id.c_str()));
+    	int_identifier=true;
     } else
     {
@@ -530,5 +526,6 @@
         }
 
-        member_identifier = browser_functions.getstringidentifier(java_result->return_string->c_str());
+        member_id.assign(*(java_result->return_string));
+    	int_identifier=false;
     }
 
@@ -546,63 +543,17 @@
     thread_data.parameters.push_back(instance);
     thread_data.parameters.push_back(NPVARIANT_TO_OBJECT(*parent_ptr));
-    thread_data.parameters.push_back(&member_identifier);
+    thread_data.parameters.push_back(&member_id);
+    thread_data.parameters.push_back(&int_identifier);
 
     IcedTeaPluginUtilities::callAndWaitForResult(instance, &_getMember, &thread_data);
 
-    PLUGIN_DEBUG("Member PTR after internal request: %s\n", thread_data.result.c_str());
-
-    java_result = java_request.findClass(0, "netscape.javascript.JSObject");
-
-    // the result we want is in result_string (assuming there was no error)
-    if (java_result->error_occurred)
-    {
-        printf("Unable to process getMember request. Error occurred: %s\n", java_result->error_msg->c_str());
-        //goto cleanup;
-    }
-
-    jsObjectClassID.append(*(java_result->return_string));
-
-    args = std::vector<std::string>();
-    std::string longArg = "J";
-    args.push_back(longArg);
-
-    java_result = java_request.getMethodID(jsObjectClassID,
-                                           browser_functions.getstringidentifier("<init>"),
-                                           args);
-
-    // the result we want is in result_string (assuming there was no error)
-    if (java_result->error_occurred)
-    {
-        printf("Unable to process getMember request. Error occurred: %s\n", java_result->error_msg->c_str());
-        //goto cleanup;
-    }
-
-    jsObjectConstructorID.append(*(java_result->return_string));
-
-    // We have the method id. Now create a new object.
-
-    args.clear();
-    args.push_back(thread_data.result);
-    java_result = java_request.newObjectWithConstructor("",
-                                         jsObjectClassID,
-                                         jsObjectConstructorID,
-                                         args);
-
-    // the result we want is in result_string (assuming there was no error)
-    if (java_result->error_occurred)
-    {
-        printf("Unable to process getMember request. Error occurred: %s\n", java_result->error_msg->c_str());
-        //goto cleanup;
-    }
-
-
     IcedTeaPluginUtilities::constructMessagePrefix(0, reference, &response);
-    if (*(message_parts->at(2)) == "GetSlot")
-    {
+    if (*(message_parts->at(4)) == "GetSlot")
+    {
+        response.append(" JavaScriptGetSlot ");
+    } else {
         response.append(" JavaScriptGetMember ");
-    } else {
-        response.append(" JavaScriptGetSlot ");
-    }
-    response.append(java_result->return_string->c_str());
+    }
+    response.append(thread_data.result);
     plugin_to_java_bus->post(response.c_str());
 }
@@ -756,10 +707,4 @@
                 processor->setMember(message_parts);
                 pthread_mutex_unlock(&syn_write_mutex);
-            } else if (command == "Finalize")
-            {
-                // write methods are synchronized
-                pthread_mutex_lock(&syn_write_mutex);
-                processor->finalize(message_parts);
-                pthread_mutex_unlock(&syn_write_mutex);
             } else if (command == "LoadURL") // For instance X url <url> <target>
             {
@@ -804,17 +749,24 @@
     NPVariant value_variant = NPVariant();
     NPObject* member;
-    NPIdentifier* property;
+    NPIdentifier property_identifier;
+
 
     std::vector<void*> parameters = ((AsyncCallThreadData*) data)->parameters;
     instance = (NPP) parameters.at(0);
     member = (NPObject*) parameters.at(1);
-    property = (NPIdentifier*) parameters.at(2);
+    std::string*  property_id = (std::string*) parameters.at(2);
     value = (std::string*) parameters.at(3);
-
-    PLUGIN_DEBUG("Setting %s on instance %p, object %p to value %s\n", browser_functions.utf8fromidentifier(*property), instance, member, value->c_str());
+    bool* int_identifier = (bool*) parameters.at(4);
+
+    if(*int_identifier==true)
+    	property_identifier = browser_functions.getintidentifier(atoi(property_id->c_str()));
+    else
+    	property_identifier = browser_functions.getstringidentifier(property_id->c_str());
+
+    PLUGIN_DEBUG("Setting %s on instance %p, object %p to value %s\n", browser_functions.utf8fromidentifier(property_identifier), instance, member, value->c_str());
 
     IcedTeaPluginUtilities::javaResultToNPVariant(instance, value, &value_variant);
 
-    ((AsyncCallThreadData*) data)->call_successful = browser_functions.setproperty(instance, member, *property, &value_variant);
+    ((AsyncCallThreadData*) data)->call_successful = browser_functions.setproperty(instance, member, property_identifier, &value_variant);
 
     ((AsyncCallThreadData*) data)->result_ready = true;
@@ -833,14 +785,22 @@
     instance = (NPP) parameters.at(0);
     parent_ptr = (NPObject*) parameters.at(1);
-    NPIdentifier* member_identifier = (NPIdentifier*) parameters.at(2);
+    std::string*  member_id = (std::string*) parameters.at(2);
+    NPIdentifier member_identifier;
+
+    bool* int_identifier = (bool*) parameters.at(3);
+
+    if(*int_identifier==true)
+    	member_identifier = browser_functions.getintidentifier(atoi(member_id->c_str()));
+    else
+    	member_identifier = browser_functions.getstringidentifier(member_id->c_str());
 
     // Get the NPVariant corresponding to this member
-    PLUGIN_DEBUG("Looking for %p %p %p (%s)\n", instance, parent_ptr, member_identifier, browser_functions.utf8fromidentifier(*member_identifier));
-
-    if (!browser_functions.hasproperty(instance, parent_ptr, *member_identifier))
-    {
-        printf("%s not found!\n", browser_functions.utf8fromidentifier(*member_identifier));
-    }
-    ((AsyncCallThreadData*) data)->call_successful = browser_functions.getproperty(instance, parent_ptr, *member_identifier, member_ptr);
+    PLUGIN_DEBUG("Looking for %p %p %p (%s)\n", instance, parent_ptr, member_identifier, browser_functions.utf8fromidentifier(member_identifier));
+
+    if (!browser_functions.hasproperty(instance, parent_ptr, member_identifier))
+    {
+        printf("%s not found!\n", browser_functions.utf8fromidentifier(member_identifier));
+    }
+    ((AsyncCallThreadData*) data)->call_successful = browser_functions.getproperty(instance, parent_ptr, member_identifier, member_ptr);
 
     IcedTeaPluginUtilities::printNPVariant(*member_ptr);
@@ -848,6 +808,7 @@
     if (((AsyncCallThreadData*) data)->call_successful)
     {
-        IcedTeaPluginUtilities::JSIDToString(member_ptr, &member_ptr_str);
+        createJavaObjectFromVariant(instance, *member_ptr, &member_ptr_str);
         ((AsyncCallThreadData*) data)->result.append(member_ptr_str);
+
     }
     ((AsyncCallThreadData*) data)->result_ready = true;
@@ -867,6 +828,6 @@
     NPIdentifier script_identifier;
     NPString script = NPString();
-    NPVariant* eval_result = new NPVariant();
-    std::string eval_result_ptr_str = std::string();
+    NPVariant* eval_variant = new NPVariant();
+    std::string eval_variant_str = std::string();
 
     PLUGIN_DEBUG("_eval called\n");
@@ -882,20 +843,30 @@
     script.utf8length = script_str->size();
 
-    PLUGIN_DEBUG("Evaluating: %s\n", script.utf8characters);
+    PLUGIN_DEBUG("Evaluating: %s\n", script_str->c_str());
 #else
     script.UTF8Characters = script_str->c_str();
     script.UTF8Length = script_str->size();
 
-    PLUGIN_DEBUG("Evaluating: %s\n", script.UTF8Characters);
+    PLUGIN_DEBUG("Evaluating: %s\n", script_str->c_str());
 #endif
 
-    ((AsyncCallThreadData*) data)->call_successful = browser_functions.evaluate(instance, window_ptr, &script, eval_result);
-    IcedTeaPluginUtilities::printNPVariant(*eval_result);
+    ((AsyncCallThreadData*) data)->call_successful = browser_functions.evaluate(instance, window_ptr, &script, eval_variant);
+    IcedTeaPluginUtilities::printNPVariant(*eval_variant);
 
     if (((AsyncCallThreadData*) data)->call_successful)
     {
-        IcedTeaPluginUtilities::JSIDToString(eval_result, &eval_result_ptr_str);
-        ((AsyncCallThreadData*) data)->result.append(eval_result_ptr_str);
-    }
+        if (eval_variant)
+        {
+            createJavaObjectFromVariant(instance, *eval_variant, &eval_variant_str);
+        } else
+        {
+            eval_variant_str = "0";
+        }
+    } else
+    {
+        eval_variant_str = "0";
+    }
+
+    ((AsyncCallThreadData*) data)->result.append(eval_variant_str);
     ((AsyncCallThreadData*) data)->result_ready = true;
 
@@ -940,8 +911,18 @@
     if (((AsyncCallThreadData*) data)->call_successful)
     {
-        IcedTeaPluginUtilities::JSIDToString(call_result, &call_result_ptr_str);
-        ((AsyncCallThreadData*) data)->result.append(call_result_ptr_str);
-    }
-
+
+        if (call_result)
+        {
+            createJavaObjectFromVariant(instance, *call_result, &call_result_ptr_str);
+        } else
+        {
+        	call_result_ptr_str = "0";
+        }
+    } else
+    {
+        call_result_ptr_str = "0";
+    }
+
+    ((AsyncCallThreadData*) data)->result.append(call_result_ptr_str);
     ((AsyncCallThreadData*) data)->result_ready = true;
 
@@ -1014,5 +995,5 @@
     ((AsyncCallThreadData*) data)->result_ready = true;
 
-    g_free(decoded_url);
+    free(decoded_url);
     decoded_url = NULL;
 
Index: /branches/vendor/sourceforge/icedtea-web/current/plugin/icedteanp/IcedTeaPluginUtils.cc
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/plugin/icedteanp/IcedTeaPluginUtils.cc	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/plugin/icedteanp/IcedTeaPluginUtils.cc	(revision 416)
@@ -147,14 +147,13 @@
 IcedTeaPluginUtilities::JSIDToString(void* id, std::string* result)
 {
-
-	char* id_str = (char*) malloc(sizeof(char)*20); // max = long long = 8446744073709551615 == 19 chars
+	char id_str[NUM_STR_BUFFER_SIZE];
 
 	if (sizeof(void*) == sizeof(long long))
 	{
-		sprintf(id_str, "%llu", id);
+		snprintf(id_str, NUM_STR_BUFFER_SIZE, "%llu", id);
 	}
 	else
 	{
-		sprintf(id_str, "%lu", id); // else use long
+		snprintf(id_str, NUM_STR_BUFFER_SIZE, "%lu", id); // else use long
 	}
 
@@ -162,5 +161,4 @@
 
 	PLUGIN_DEBUG("Converting pointer %p to %s\n", id, id_str);
-	free(id_str);
 }
 
@@ -258,10 +256,7 @@
 IcedTeaPluginUtilities::itoa(int i, std::string* result)
 {
-	// largest possible integer is 10 digits long
-	char* int_str = (char*) malloc(sizeof(char)*11);
-	sprintf(int_str, "%d", i);
+	char int_str[NUM_STR_BUFFER_SIZE];
+	snprintf(int_str, NUM_STR_BUFFER_SIZE, "%d", i);
 	result->append(int_str);
-
-	free(int_str);
 }
 
@@ -293,5 +288,5 @@
  * @param str The string to split
  * @param The delimiters to split on
- * @return A string vector containing the aplit components
+ * @return A string vector containing the split components
  */
 
@@ -303,5 +298,5 @@
 	char* copy;
 
-	// Tokening is done on a copy
+	// Tokenization is done on a copy
 	copy = (char*) malloc (sizeof(char)*strlen(str) + 1);
 	strcpy(copy, str);
@@ -314,9 +309,10 @@
 	    // Allocation on heap since caller has no way to knowing how much will
 	    // be needed. Make sure caller cleans up!
-		std::string* s = new std::string();
-		s->append(tok_ptr);
-		v->push_back(s);
-		tok_ptr = strtok (NULL, " ");
+	    std::string* s = new std::string();
+	    s->append(tok_ptr);
+	    v->push_back(s);
+	    tok_ptr = strtok (NULL, delim);
 	}
+        free(copy);
 
 	return v;
@@ -372,10 +368,9 @@
 	ostream << length;
 
-	// UTF-8 characters are 4-bytes max + space + '\0'
-	char* hex_value = (char*) malloc(sizeof(char)*10);
+	char hex_value[NUM_STR_BUFFER_SIZE];
 
 	for (int i = 0; i < str->length(); i++)
 	{
-		sprintf(hex_value, " %hx", str->at(i));
+		snprintf(hex_value, NUM_STR_BUFFER_SIZE," %hx", str->at(i));
 		ostream << hex_value;
 	}
@@ -384,5 +379,4 @@
 	*utf_str = ostream.str();
 
-	free(hex_value);
 	PLUGIN_DEBUG("Converted %s to UTF-8 string %s\n", str->c_str(), utf_str->c_str());
 }
@@ -669,9 +663,6 @@
     else if (NPVARIANT_IS_STRING(variant))
     {
-#if MOZILLA_VERSION_COLLAPSED < 1090200
-    	PLUGIN_DEBUG("STRING: %s\n", NPVARIANT_TO_STRING(variant).utf8characters);
-#else
-    	PLUGIN_DEBUG("STRING: %s\n", NPVARIANT_TO_STRING(variant).UTF8Characters);
-#endif
+    	std::string str = IcedTeaPluginUtilities::NPVariantAsString(variant);
+    	PLUGIN_DEBUG("STRING: %s (length=%d)\n", str.c_str(), str.size());
     }
     else
@@ -684,47 +675,43 @@
 IcedTeaPluginUtilities::NPVariantToString(NPVariant variant, std::string* result)
 {
-	char* str = (char*) malloc(sizeof(char)*32); // enough for everything except string
-
-    if (NPVARIANT_IS_VOID(variant))
-    {
-        sprintf(str, "%p", variant);
-    }
-    else if (NPVARIANT_IS_NULL(variant))
-    {
-    	sprintf(str, "NULL");
-    }
-    else if (NPVARIANT_IS_BOOLEAN(variant))
-    {
-    	if (NPVARIANT_TO_BOOLEAN(variant))
-    		sprintf(str, "true");
-    	else
-    		sprintf(str, "false");
-    }
-    else if (NPVARIANT_IS_INT32(variant))
-    {
-    	sprintf(str, "%d", NPVARIANT_TO_INT32(variant));
-    }
-    else if (NPVARIANT_IS_DOUBLE(variant))
-    {
-    	sprintf(str, "%f", NPVARIANT_TO_DOUBLE(variant));;
-    }
-    else if (NPVARIANT_IS_STRING(variant))
-    {
-    	free(str);
-#if MOZILLA_VERSION_COLLAPSED < 1090200
-    	str = (char*) malloc(sizeof(char)*NPVARIANT_TO_STRING(variant).utf8length);
-    	sprintf(str, "%s", NPVARIANT_TO_STRING(variant).utf8characters);
-#else
-        str = (char*) malloc(sizeof(char)*NPVARIANT_TO_STRING(variant).UTF8Length);
-        sprintf(str, "%s", NPVARIANT_TO_STRING(variant).UTF8Characters);
-#endif
-    }
+  char conv_str[NUM_STR_BUFFER_SIZE]; // conversion buffer
+  bool was_string_already = false;
+
+  if (NPVARIANT_IS_STRING(variant))
+  {
+    result->append(IcedTeaPluginUtilities::NPVariantAsString(variant));
+    was_string_already = true;
+  }
+  else if (NPVARIANT_IS_VOID(variant))
+  {
+    snprintf(conv_str, NUM_STR_BUFFER_SIZE, "%p", variant);
+  }
+  else if (NPVARIANT_IS_NULL(variant))
+  {
+    snprintf(conv_str, NUM_STR_BUFFER_SIZE, "NULL");
+  }
+  else if (NPVARIANT_IS_BOOLEAN(variant))
+  {
+    if (NPVARIANT_TO_BOOLEAN(variant))
+      snprintf(conv_str, NUM_STR_BUFFER_SIZE, "true");
     else
-    {
-        sprintf(str, "[Object %p]", variant);
-    }
-
-    result->append(str);
-    free(str);
+      snprintf(conv_str, NUM_STR_BUFFER_SIZE, "false");
+  }
+  else if (NPVARIANT_IS_INT32(variant))
+  {
+    snprintf(conv_str, NUM_STR_BUFFER_SIZE, "%d", NPVARIANT_TO_INT32(variant));
+  }
+  else if (NPVARIANT_IS_DOUBLE(variant))
+  {
+    snprintf(conv_str, NUM_STR_BUFFER_SIZE, "%f", NPVARIANT_TO_DOUBLE(variant));
+  }
+  else
+  {
+    snprintf(conv_str, NUM_STR_BUFFER_SIZE, "[Object %p]", variant);
+  }
+
+  if (!was_string_already){
+    result->append(conv_str);
+  }
 }
 
@@ -865,11 +852,5 @@
     IcedTeaPluginUtilities::printNPVariant(constructor_str);
 
-    std::string constructor_name = std::string();
-
-#if MOZILLA_VERSION_COLLAPSED < 1090200
-    constructor_name.append(NPVARIANT_TO_STRING(constructor_str).utf8characters);
-#else
-    constructor_name.append(NPVARIANT_TO_STRING(constructor_str).UTF8Characters);
-#endif
+    std::string constructor_name = IcedTeaPluginUtilities::NPVariantAsString(constructor_str);
 
     PLUGIN_DEBUG("Constructor for NPObject is %s\n", constructor_name.c_str());
@@ -914,4 +895,18 @@
 }
 
+/* Copies a variant data type into a C++ string */
+std::string
+IcedTeaPluginUtilities::NPVariantAsString(NPVariant variant)
+{
+#if MOZILLA_VERSION_COLLAPSED < 1090200
+  return std::string(
+    NPVARIANT_TO_STRING(variant).utf8characters,
+    NPVARIANT_TO_STRING(variant).utf8length);
+#else
+  return std::string(
+    NPVARIANT_TO_STRING(variant).UTF8Characters,
+    NPVARIANT_TO_STRING(variant).UTF8Length);
+#endif
+}
 
 /**
@@ -1067,5 +1062,5 @@
 		PLUGIN_DEBUG("Error: Unable to initialize message queue mutex: %d\n", ret);
 
-	PLUGIN_DEBUG("Mutexs %p and %p initialized\n", &subscriber_mutex, &msg_queue_mutex);
+	PLUGIN_DEBUG("Mutexes %p and %p initialized\n", &subscriber_mutex, &msg_queue_mutex);
 }
 
@@ -1131,19 +1126,15 @@
 MessageBus::post(const char* message)
 {
-	char* msg = (char*) malloc(sizeof(char)*strlen(message) + 1);
 	bool message_consumed = false;
-
-	// consumer frees this memory
-	strcpy(msg, message);
 
 	PLUGIN_DEBUG("Trying to lock %p...\n", &msg_queue_mutex);
 	pthread_mutex_lock(&subscriber_mutex);
 
-    PLUGIN_DEBUG("Message %s received on bus. Notifying subscribers.\n", msg);
+    PLUGIN_DEBUG("Message %s received on bus. Notifying subscribers.\n", message);
 
     std::list<BusSubscriber*>::const_iterator i;
     for( i = subscribers.begin(); i != subscribers.end() && !message_consumed; ++i ) {
-    	PLUGIN_DEBUG("Notifying subscriber %p of %s\n", *i, msg);
-    	message_consumed = ((BusSubscriber*) *i)->newMessageOnBus(msg);
+    	PLUGIN_DEBUG("Notifying subscriber %p of %s\n", *i, message);
+    	message_consumed = ((BusSubscriber*) *i)->newMessageOnBus(message);
     }
 
@@ -1151,5 +1142,5 @@
 
     if (!message_consumed)
-    	PLUGIN_DEBUG("Warning: No consumer found for message %s\n", msg);
+    	PLUGIN_DEBUG("Warning: No consumer found for message %s\n", message);
 
     PLUGIN_DEBUG("%p unlocked...\n", &msg_queue_mutex);
Index: /branches/vendor/sourceforge/icedtea-web/current/plugin/icedteanp/IcedTeaPluginUtils.h
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/plugin/icedteanp/IcedTeaPluginUtils.h	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/plugin/icedteanp/IcedTeaPluginUtils.h	(revision 416)
@@ -97,4 +97,8 @@
      (*c >= 'A' && *c <= 'F'))
 
+//long long max ~ 19 chars + terminator
+//leave some room for converting strings like "<var> = %d"
+const size_t NUM_STR_BUFFER_SIZE = 32;
+
 /*
  * This struct holds data specific to a Java operation requested by the plugin
@@ -206,4 +210,7 @@
     	static void itoa(int i, std::string* result);
 
+    	/* Copies a variant data type into a C++ string */
+    	static std::string NPVariantAsString(NPVariant variant);
+
     	/* Frees the given vector and the strings that its contents point to */
     	static void freeStringPtrVector(std::vector<std::string*>* v);
Index: /branches/vendor/sourceforge/icedtea-web/current/plugin/icedteanp/java/netscape/javascript/JSObject.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/plugin/icedteanp/java/netscape/javascript/JSObject.java	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/plugin/icedteanp/java/netscape/javascript/JSObject.java	(revision 416)
@@ -131,7 +131,7 @@
             boolean mayProceed = false;
 
-            for (int i = 0; i < stack.length; i++) {
-                if (stack[i].getClassName().equals("netscape.javascript.JSObject") &&
-                        stack[i].getMethodName().equals("getWindow")) {
+            for (StackTraceElement element : stack) {
+                if (element.getClassName().equals("netscape.javascript.JSObject") &&
+                        element.getMethodName().equals("getWindow")) {
                     mayProceed = true;
                 }
@@ -210,6 +210,7 @@
 
         PluginDebug.debug("JSObject.call ", methodName);
-        for (int i = 0; i < args.length; i++)
-            PluginDebug.debug(" ", args[i]);
+        for (Object arg : args) {
+            PluginDebug.debug(" ", arg);
+        }
         PluginDebug.debug("");
         return PluginAppletViewer.call(internal, methodName, args);
Index: /branches/vendor/sourceforge/icedtea-web/current/plugin/icedteanp/java/sun/applet/AppletSecurityContextManager.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/plugin/icedteanp/java/sun/applet/AppletSecurityContextManager.java	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/plugin/icedteanp/java/sun/applet/AppletSecurityContextManager.java	(revision 416)
@@ -1,3 +1,5 @@
-/* VoidPluginCallRequest -- represent Java-to-JavaScript requests
+/* AppletSecurityContextManager -- handles messages in an appropriate security
+ context
+
    Copyright (C) 2008  Red Hat
 
Index: /branches/vendor/sourceforge/icedtea-web/current/plugin/icedteanp/java/sun/applet/GetMemberPluginCallRequest.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/plugin/icedteanp/java/sun/applet/GetMemberPluginCallRequest.java	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/plugin/icedteanp/java/sun/applet/GetMemberPluginCallRequest.java	(revision 416)
@@ -51,5 +51,5 @@
         // FIXME: Is it even possible to distinguish between null and void
         // here?
-        if (args[3] != "null" && args[3] != "void")
+        if (!"null".equals(args[3]) && !"void".equals(args[3]))
             object = AppletSecurityContextManager.getSecurityContext(0).getObject(Integer.parseInt(args[3]));
         setDone(true);
Index: /branches/vendor/sourceforge/icedtea-web/current/plugin/icedteanp/java/sun/applet/JavaConsole.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/plugin/icedteanp/java/sun/applet/JavaConsole.java	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/plugin/icedteanp/java/sun/applet/JavaConsole.java	(revision 416)
@@ -66,4 +66,5 @@
 import net.sourceforge.jnlp.config.DeploymentConfiguration;
 import net.sourceforge.jnlp.runtime.JNLPRuntime;
+import net.sourceforge.jnlp.util.ImageResources;
 
 /**
@@ -93,4 +94,5 @@
 
         consoleWindow = new JFrame("Java Console");
+        consoleWindow.setIconImages(ImageResources.INSTANCE.getApplicationImages());
 
         JPanel contentPanel = new JPanel();
@@ -307,6 +309,6 @@
         boolean toShowConsole = false;
 
-        for (int i = 0; i < args.length; i++) {
-            if (args[i] == "--show-console") {
+        for (String arg : args) {
+            if ("--show-console".equals(arg)) {
                 toShowConsole = true;
             }
Index: /branches/vendor/sourceforge/icedtea-web/current/plugin/icedteanp/java/sun/applet/PluginAppletSecurityContext.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/plugin/icedteanp/java/sun/applet/PluginAppletSecurityContext.java	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/plugin/icedteanp/java/sun/applet/PluginAppletSecurityContext.java	(revision 416)
@@ -244,5 +244,5 @@
         if (System.getSecurityManager() == null) {
             JNLPRuntime.initialize(/* isApplication */false);
-            JNLPRuntime.setDefaultLaunchHandler(new DefaultLaunchHandler());
+            JNLPRuntime.setDefaultLaunchHandler(new DefaultLaunchHandler(System.err));
         }
 
@@ -1296,7 +1296,5 @@
         Permissions grantedPermissions = new Permissions();
 
-        for (int i = 0; i < nsPrivilegeList.length; i++) {
-            String privilege = nsPrivilegeList[i];
-
+        for (String privilege : nsPrivilegeList) {
             if (privilege.equals("UniversalBrowserRead")) {
                 BrowserReadPermission bp = new BrowserReadPermission();
Index: /branches/vendor/sourceforge/icedtea-web/current/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java	(revision 416)
@@ -124,8 +124,8 @@
 
     public AppletPanel createPanel(PluginStreamHandler streamhandler,
-                                    int identifier,
-                                    long handle, int x, int y,
-                                    final URL doc,
-                                    final Hashtable<String, String> atts) {
+                                   final int identifier,
+                                   final long handle, int x, int y,
+                                   final URL doc,
+                                   final Hashtable<String, String> atts) {
         final NetxPanel panel = AccessController.doPrivileged(new PrivilegedAction<NetxPanel>() {
             public NetxPanel run() {
@@ -137,11 +137,27 @@
         });
 
-        // create the frame.
-        PluginAppletViewer.framePanel(identifier, handle, panel);
-
-        panel.init();
-
-        // Start the applet
-        initEventQueue(panel);
+        // Framing the panel needs to happen in a thread whose thread group
+        // is the same as the threadgroup of the applet thread. If this
+        // isn't the case, the awt eventqueue thread's context classloader
+        // won't be set to a JNLPClassLoader, and when an applet class needs
+        // to be loaded from the awt eventqueue, it won't be found.
+        Thread panelInit = new Thread(panel.getThreadGroup(), new Runnable() {
+            @Override public void run() {
+                panel.createNewAppContext();
+                // create the frame.
+                PluginAppletViewer.framePanel(identifier, handle, panel);
+                panel.init();
+                // Start the applet
+                initEventQueue(panel);
+            }
+        }, "NetXPanel initializer");
+
+        panelInit.start();
+        while(panelInit.isAlive()) {
+            try {
+                panelInit.join();
+            } catch (InterruptedException e) {
+            }
+        }
 
         // Wait for the panel to initialize
@@ -222,25 +238,25 @@
             String[] events = eventList.split(",");
 
-            for (int i = 0; i < events.length; i++) {
-                PluginDebug.debug("Adding event to queue: ", events[i]);
-                if (events[i].equals("dispose"))
+            for (String event : events) {
+                PluginDebug.debug("Adding event to queue: ", event);
+                if ("dispose".equals(event))
                     panel.sendEvent(AppletPanel.APPLET_DISPOSE);
-                else if (events[i].equals("load"))
+                else if ("load".equals(event))
                     panel.sendEvent(AppletPanel.APPLET_LOAD);
-                else if (events[i].equals("init"))
+                else if ("init".equals(event))
                     panel.sendEvent(AppletPanel.APPLET_INIT);
-                else if (events[i].equals("start"))
+                else if ("start".equals(event))
                     panel.sendEvent(AppletPanel.APPLET_START);
-                else if (events[i].equals("stop"))
+                else if ("stop".equals(event))
                     panel.sendEvent(AppletPanel.APPLET_STOP);
-                else if (events[i].equals("destroy"))
+                else if ("destroy".equals(event))
                     panel.sendEvent(AppletPanel.APPLET_DESTROY);
-                else if (events[i].equals("quit"))
+                else if ("quit".equals(event))
                     panel.sendEvent(AppletPanel.APPLET_QUIT);
-                else if (events[i].equals("error"))
+                else if ("error".equals(event))
                     panel.sendEvent(AppletPanel.APPLET_ERROR);
                 else
                     // non-fatal error if we get an unrecognized event
-                    PluginDebug.debug("Unrecognized event name: ", events[i]);
+                    PluginDebug.debug("Unrecognized event name: ", event);
             }
 
@@ -1610,4 +1626,7 @@
                 appletShutdown(p);
                 appletPanels.removeElement(p);
+                
+                // Mark classloader unusable
+                ((JNLPClassLoader) cl).decrementLoaderUseCount();
 
                 try {
@@ -1905,7 +1924,4 @@
                         String att = t.get("name");
 
-                        if (atts.containsKey(att))
-                            continue;
-
                         if (att == null) {
                             statusMsgStream.println(requiresNameWarning);
Index: /branches/vendor/sourceforge/icedtea-web/current/plugin/icedteanp/java/sun/applet/PluginCallRequest.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/plugin/icedteanp/java/sun/applet/PluginCallRequest.java	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/plugin/icedteanp/java/sun/applet/PluginCallRequest.java	(revision 416)
@@ -38,6 +38,4 @@
 package sun.applet;
 
-// FIXME: for each type of request extend a new (anonymous?)
-// PluginCallRequest.
 public abstract class PluginCallRequest {
     private String message;
Index: /branches/vendor/sourceforge/icedtea-web/current/plugin/icedteanp/java/sun/applet/PluginCallRequestFactory.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/plugin/icedteanp/java/sun/applet/PluginCallRequestFactory.java	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/plugin/icedteanp/java/sun/applet/PluginCallRequestFactory.java	(revision 416)
@@ -1,3 +1,4 @@
-/* VoidPluginCallRequest -- represent Java-to-JavaScript requests
+/* PluginCallRequestFactory -- contains factory methods for dispatching
+ an appropriate PluginCallRequest.
    Copyright (C) 2008  Red Hat
 
@@ -42,13 +43,13 @@
     public PluginCallRequest getPluginCallRequest(String id, String message, Long reference) {
 
-        if (id == "member") {
+        if ("member".equals(id)) {
             return new GetMemberPluginCallRequest(message, reference);
-        } else if (id == "void") {
+        } else if ("void".equals(id)) {
             return new VoidPluginCallRequest(message, reference);
-        } else if (id == "window") {
+        } else if ("window".equals(id)) {
             return new GetWindowPluginCallRequest(message, reference);
-        } else if (id == "proxyinfo") {
+        } else if ("proxyinfo".equals(id)) {
             return new PluginProxyInfoRequest(message, reference);
-        } else if (id == "cookieinfo") {
+        } else if ("cookieinfo".equals(id)) {
             return new PluginCookieInfoRequest(message, reference);
         } else {
Index: /branches/vendor/sourceforge/icedtea-web/current/plugin/icedteanp/java/sun/applet/PluginCookieManager.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/plugin/icedteanp/java/sun/applet/PluginCookieManager.java	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/plugin/icedteanp/java/sun/applet/PluginCookieManager.java	(revision 416)
@@ -46,5 +46,14 @@
 import java.util.Map;
 
+import com.sun.jndi.toolkit.url.UrlUtil;
+
 public class PluginCookieManager extends CookieManager {
+    private PluginStreamHandler streamHandler;
+
+    public PluginCookieManager(PluginStreamHandler streamHandler) {
+        this.streamHandler = streamHandler;
+    }
+
+    @Override
     public Map<String, List<String>> get(URI uri,
             Map<String, List<String>> requestHeaders) throws IOException {
@@ -85,3 +94,20 @@
         return false;
     }
+
+    @Override
+    public void put(URI uri,
+            Map<String, List<String>> responseHeaders) throws IOException {
+        super.put(uri, responseHeaders);
+
+        for (Map.Entry<String, List<String>> headerEntry : responseHeaders.entrySet()) {
+            String type = headerEntry.getKey();
+            if ("Set-Cookie".equalsIgnoreCase(type) || "Set-Cookie2".equalsIgnoreCase(type)) {
+                List<String> cookies = headerEntry.getValue();
+                for (String cookie : cookies) {
+                    streamHandler.write("plugin PluginSetCookie reference -1 " + UrlUtil.encode(uri.toString(), "UTF-8") + " " + cookie);
+                }
+            }
+
+        }
+    }
 }
Index: /branches/vendor/sourceforge/icedtea-web/current/plugin/icedteanp/java/sun/applet/PluginException.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/plugin/icedteanp/java/sun/applet/PluginException.java	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/plugin/icedteanp/java/sun/applet/PluginException.java	(revision 416)
@@ -1,3 +1,3 @@
-/* VoidPluginCallRequest -- represent Java-to-JavaScript requests
+/* PluginException -- represents an exception in handling a plugin message
    Copyright (C) 2008  Red Hat
 
Index: /branches/vendor/sourceforge/icedtea-web/current/plugin/icedteanp/java/sun/applet/PluginMain.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/plugin/icedteanp/java/sun/applet/PluginMain.java	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/plugin/icedteanp/java/sun/applet/PluginMain.java	(revision 416)
@@ -119,4 +119,7 @@
             // Streams set. Start processing.
             streamHandler.startProcessing();
+
+            setCookieHandler(streamHandler);
+
         } catch (Exception e) {
             e.printStackTrace();
@@ -200,6 +203,8 @@
         // override the proxy selector set by JNLPRuntime
         ProxySelector.setDefault(new PluginProxySelector());
-
-        CookieManager ckManager = new PluginCookieManager();
+    }
+
+    private static void setCookieHandler(PluginStreamHandler streamHandler) {
+        CookieManager ckManager = new PluginCookieManager(streamHandler);
         CookieHandler.setDefault(ckManager);
     }
Index: /branches/vendor/sourceforge/icedtea-web/current/plugin/icedteanp/java/sun/applet/PluginMessageHandlerWorker.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/plugin/icedteanp/java/sun/applet/PluginMessageHandlerWorker.java	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/plugin/icedteanp/java/sun/applet/PluginMessageHandlerWorker.java	(revision 416)
@@ -1,3 +1,3 @@
-/* VoidPluginCallRequest -- represent Java-to-JavaScript requests
+/* PluginMessageHandlerWorker -- worker thread for handling messages
    Copyright (C) 2008  Red Hat
 
Index: /branches/vendor/sourceforge/icedtea-web/current/plugin/icedteanp/java/sun/applet/PluginStreamHandler.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/plugin/icedteanp/java/sun/applet/PluginStreamHandler.java	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/plugin/icedteanp/java/sun/applet/PluginStreamHandler.java	(revision 416)
@@ -60,5 +60,5 @@
 
     private PluginMessageConsumer consumer;
-    private Boolean shuttingDown = false;
+    private volatile boolean shuttingDown = false;
 
 
@@ -323,7 +323,5 @@
 
             if (message == null || message.equals("shutdown")) {
-                synchronized (shuttingDown) {
-                    shuttingDown = true;
-                }
+                shuttingDown = true;
                 try {
                     // Close input/output channels to plugin.
@@ -363,8 +361,6 @@
                 // if we are shutting down, ignore write failures as 
                 // pipe may have closed
-                synchronized (shuttingDown) {
-                    if (!shuttingDown) {
-                        e.printStackTrace();
-                    }
+                if (!shuttingDown) {
+                    e.printStackTrace();
                 }
 
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/junit-runner/CommandLine.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/junit-runner/CommandLine.java	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/junit-runner/CommandLine.java	(revision 416)
@@ -8,4 +8,5 @@
  */
 
+import java.io.File;
 import java.util.ArrayList;
 import java.util.List;
@@ -35,4 +36,6 @@
         for (String each : args) {
             try {
+                if (each.contains("$")) continue;
+                if (each.toLowerCase().endsWith(".jnlp")) continue;
                 classes.add(Class.forName(each));
             } catch (ClassNotFoundException e) {
@@ -40,4 +43,6 @@
             }
         }
+        RunListener jXmlOutput = new JunitLikeXmlOutputListener(system, new File("tests-output.xml"));
+        addListener(jXmlOutput);
         RunListener listener = new LessVerboseTextListener(system);
         addListener(listener);
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/junit-runner/JunitLikeXmlOutputListener.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/junit-runner/JunitLikeXmlOutputListener.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/junit-runner/JunitLikeXmlOutputListener.java	(revision 416)
@@ -0,0 +1,445 @@
+/*
+ * Copyright 2011 Red Hat, Inc.
+ *
+ * This file is made available under the terms of the Common Public License
+ * v1.0 which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ */
+
+import java.io.BufferedWriter;
+import java.io.File;
+
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStreamWriter;
+import java.lang.reflect.Method;
+import java.text.DecimalFormat;
+import java.text.NumberFormat;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Set;
+import java.util.concurrent.TimeUnit;
+import net.sourceforge.jnlp.annotations.Bug;
+import net.sourceforge.jnlp.annotations.KnownToFail;
+
+
+import org.junit.internal.JUnitSystem;
+import org.junit.runner.Description;
+import org.junit.runner.Result;
+import org.junit.runner.notification.Failure;
+import org.junit.runner.notification.RunListener;
+
+/**
+ * This class listens for events in junit testsuite and wrote output to xml.
+ * Xml tryes to follow ant-tests schema, and is enriched for by-class statistics
+ * stdout and err elements are added, but must be filled from elsewhere (eg tee
+ * in make) as junit suite and listener run from our executer have no access to
+ * them.
+ * 
+ */
+public class JunitLikeXmlOutputListener extends RunListener {
+
+    private BufferedWriter writer;
+    private Failure testFailed = null;
+    private static final String ROOT = "testsuite";
+    private static final String DATE_ELEMENT = "date";
+    private static final String TEST_ELEMENT = "testcase";
+    private static final String BUGS = "bugs";
+    private static final String BUG = "bug";
+    private static final String K2F = "known-to-fail";
+    private static final String TEST_NAME_ATTRIBUTE = "name";
+    private static final String TEST_TIME_ATTRIBUTE = "time";
+    private static final String TEST_IGNORED_ATTRIBUTE = "ignored";
+    private static final String TEST_ERROR_ELEMENT = "error";
+    private static final String TEST_CLASS_ATTRIBUTE = "classname";
+    private static final String ERROR_MESSAGE_ATTRIBUTE = "message";
+    private static final String ERROR_TYPE_ATTRIBUTE = "type";
+    private static final String SOUT_ELEMENT = "system-out";
+    private static final String SERR_ELEMENT = "system-err";
+    private static final String CDATA_START = "<![CDATA[";
+    private static final String CDATA_END = "]]>";
+    private static final String TEST_CLASS_ELEMENT = "class";
+    private static final String STATS_ELEMENT = "stats";
+    private static final String CLASSES_ELEMENT = "classes";
+    private static final String SUMMARY_ELEMENT = "summary";
+    private static final String SUMMARY_TOTAL_ELEMENT = "total";
+    private static final String SUMMARY_PASSED_ELEMENT = "passed";
+    private static final String SUMMARY_FAILED_ELEMENT = "failed";
+    private static final String SUMMARY_IGNORED_ELEMENT = "ignored";
+    private long testStart;
+
+    private int  failedK2F=0;
+    private int  passedK2F=0;
+    private int  ignoredK2F=0;
+
+    private class ClassStat {
+
+        Class c;
+        int total;
+        int failed;
+        int passed;
+        int ignored;
+        long time = 0;
+        int  totalK2F=0;
+        int  failedK2F=0;
+        int  passedK2F=0;
+        int  ignoredK2F=0;
+    }
+    Map<String, ClassStat> classStats = new HashMap<String, ClassStat>();
+
+    public JunitLikeXmlOutputListener(JUnitSystem system, File f) {
+        try {
+            writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(f), "UTF-8"));
+        } catch (Exception ex) {
+            throw new RuntimeException(ex);
+        }
+    }
+
+    @Override
+    public void testRunStarted(Description description) throws Exception {
+        openElement(ROOT);
+        writeElement(DATE_ELEMENT, new Date().toString());
+    }
+
+    private void openElement(String name) throws IOException {
+        openElement(name, null);
+    }
+
+    private void openElement(String name, Map<String, String> atts) throws IOException {
+        StringBuilder attString = new StringBuilder();
+        if (atts != null) {
+            attString.append(" ");
+            Set<Entry<String, String>> entries = atts.entrySet();
+            for (Entry<String, String> entry : entries) {
+                String k = entry.getKey();
+                String v = entry.getValue();
+                if (v == null) {
+                    v = "null";
+                }
+                attString.append(k).append("=\"").append(attributize(v)).append("\"");
+                attString.append(" ");
+            }
+        }
+        writer.write("<" + name + attString.toString() + ">");
+        writer.newLine();
+    }
+
+    private static String attributize(String s) {
+        return s.replace("&", "&amp;").replace("<", "&lt;").replace("\"", "&quot;");
+    }
+
+    private void closeElement(String name) throws IOException {
+        writer.newLine();
+        writer.write("</" + name + ">");
+        writer.newLine();
+    }
+
+    private void writeContent(String content) throws IOException {
+        writer.write(CDATA_START + content + CDATA_END);
+    }
+
+    private void writeElement(String name, String content) throws IOException {
+        writeElement(name, content, null);
+    }
+
+    private void writeElement(String name, String content, Map<String, String> atts) throws IOException {
+        openElement(name, atts);
+        writeContent(content);
+        closeElement(name);
+    }
+
+    @Override
+    public void testStarted(Description description) throws Exception {
+        testFailed = null;
+        testStart = System.nanoTime();
+    }
+
+    @Override
+    public void testFailure(Failure failure) throws IOException {
+        testFailed = failure;
+    }
+
+    @Override
+    public void testIgnored(Description description) throws Exception {
+        testDone(description, 0, 0, true);
+    }
+
+    @Override
+    public void testFinished(org.junit.runner.Description description) throws Exception {
+        long testTime = TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - testStart);
+        double testTimeSeconds = ((double) testTime) / 1000d;
+        testDone(description, testTime, testTimeSeconds, false);
+    }
+
+    private void testDone(Description description, long testTime, double testTimeSeconds, boolean ignored) throws Exception {
+        Class testClass = null;
+        Method testMethod = null;
+        try {
+            testClass = description.getTestClass();
+            String qs = description.getMethodName();
+            //handling @Browser'bugsIds marking of used browser
+            if (qs.contains(" - ")) {
+                qs = qs.replaceAll(" - .*", "");
+            }
+            testMethod = testClass.getMethod(qs);
+        } catch (Exception ex) {
+            ex.printStackTrace();
+        }
+        Map<String, String> testcaseAtts = new HashMap<String, String>(4);
+        NumberFormat formatter = new DecimalFormat("#0.0000");
+        String stringedTime = formatter.format(testTimeSeconds);
+        stringedTime.replace(",", ".");
+        testcaseAtts.put(TEST_TIME_ATTRIBUTE, stringedTime);
+        testcaseAtts.put(TEST_CLASS_ATTRIBUTE, description.getClassName());
+        testcaseAtts.put(TEST_NAME_ATTRIBUTE, description.getMethodName());
+        if (ignored){
+            testcaseAtts.put(TEST_IGNORED_ATTRIBUTE, Boolean.TRUE.toString());
+        }
+        KnownToFail k2f=null;
+        try {
+            if (testClass != null && testMethod != null) {
+                k2f = testMethod.getAnnotation(KnownToFail.class);
+                if (k2f != null) {
+                    testcaseAtts.put(K2F, Boolean.TRUE.toString());
+                }
+            }
+        } catch (Exception ex) {
+            ex.printStackTrace();
+        }
+        openElement(TEST_ELEMENT, testcaseAtts);
+        if (testFailed != null) {
+            if (k2f != null) {
+                failedK2F++;
+            }
+            Map<String, String> errorAtts = new HashMap<String, String>(3);
+
+            errorAtts.put(ERROR_MESSAGE_ATTRIBUTE, testFailed.getMessage());
+            int i = testFailed.getTrace().indexOf(":");
+            if (i >= 0) {
+                errorAtts.put(ERROR_TYPE_ATTRIBUTE, testFailed.getTrace().substring(0, i));
+            } else {
+                errorAtts.put(ERROR_TYPE_ATTRIBUTE, "?");
+            }
+
+            writeElement(TEST_ERROR_ELEMENT, testFailed.getTrace(), errorAtts);
+        } else {
+            if (k2f != null) {
+                if (ignored) {
+                    ignoredK2F++;
+                } else {
+                    passedK2F++;
+
+                }
+            }
+        }
+        try {
+            if (testClass != null && testMethod != null) {
+                Bug bug = testMethod.getAnnotation(Bug.class);
+                if (bug != null) {
+                    openElement(BUGS);
+                    String[] bugsIds = bug.id();
+                    for (String bugId : bugsIds) {
+                        String idAndUrl[] = createBug(bugId);
+                        Map<String, String> visibleNameAtt = new HashMap<String, String>(1);
+                        visibleNameAtt.put("visibleName", idAndUrl[0]);
+                        openElement(BUG, visibleNameAtt);
+                        writer.write(idAndUrl[1]);
+                        closeElement(BUG);
+                    }
+                    closeElement(BUGS);
+                }
+            }
+        } catch (Exception ex) {
+            ex.printStackTrace();
+        }
+        closeElement(TEST_ELEMENT);
+        writer.flush();
+
+        ClassStat classStat = classStats.get(description.getClassName());
+        if (classStat == null) {
+            classStat = new ClassStat();
+            classStat.c = description.getTestClass();
+            classStats.put(description.getClassName(), classStat);
+        }
+        classStat.total++;
+        if (k2f != null) {
+            classStat.totalK2F++;
+        }
+        classStat.time += testTime;
+        if (testFailed == null) {
+            if (ignored) {
+                classStat.ignored++;
+                if (k2f != null) {
+                    classStat.ignoredK2F++;
+                }
+            } else {
+                classStat.passed++;
+                if (k2f != null) {
+                    classStat.passedK2F++;
+                }
+            }
+        } else {
+            classStat.failed++;
+            if (k2f != null) {
+                classStat.failedK2F++;
+            }
+        }
+    }
+
+    @Override
+    public void testRunFinished(Result result) throws Exception {
+
+        writeElement(SOUT_ELEMENT, "@sout@");
+        writeElement(SERR_ELEMENT, "@serr@");
+        openElement(STATS_ELEMENT);
+        openElement(SUMMARY_ELEMENT);
+        int passed = result.getRunCount() - result.getFailureCount() - result.getIgnoreCount();
+        int failed = result.getFailureCount();
+        int ignored = result.getIgnoreCount();
+        writeElement(SUMMARY_TOTAL_ELEMENT, String.valueOf(result.getRunCount()),createKnownToFailSumamryAttribute(failedK2F+passedK2F+ignoredK2F));
+        writeElement(SUMMARY_FAILED_ELEMENT, String.valueOf(failed),createKnownToFailSumamryAttribute(failedK2F));
+        writeElement(SUMMARY_IGNORED_ELEMENT, String.valueOf(ignored),createKnownToFailSumamryAttribute(ignoredK2F));
+        writeElement(SUMMARY_PASSED_ELEMENT, String.valueOf(passed),createKnownToFailSumamryAttribute(passedK2F));
+        closeElement(SUMMARY_ELEMENT);
+        openElement(CLASSES_ELEMENT);
+        Set<Entry<String, ClassStat>> e = classStats.entrySet();
+        for (Entry<String, ClassStat> entry : e) {
+
+            Map<String, String> testcaseAtts = new HashMap<String, String>(3);
+            testcaseAtts.put(TEST_NAME_ATTRIBUTE, entry.getKey());
+            testcaseAtts.put(TEST_TIME_ATTRIBUTE, String.valueOf(entry.getValue().time));
+
+            openElement(TEST_CLASS_ELEMENT, testcaseAtts);
+            writeElement(SUMMARY_PASSED_ELEMENT, String.valueOf(entry.getValue().passed),createKnownToFailSumamryAttribute(entry.getValue().passedK2F));
+            writeElement(SUMMARY_FAILED_ELEMENT, String.valueOf(entry.getValue().failed),createKnownToFailSumamryAttribute(entry.getValue().failedK2F));
+            writeElement(SUMMARY_IGNORED_ELEMENT, String.valueOf(entry.getValue().ignored),createKnownToFailSumamryAttribute(entry.getValue().ignoredK2F));
+            writeElement(SUMMARY_TOTAL_ELEMENT, String.valueOf(entry.getValue().total),createKnownToFailSumamryAttribute(entry.getValue().totalK2F));
+            try {
+                Bug b = null;
+                if (entry.getValue().c != null) {
+                    b = (Bug) entry.getValue().c.getAnnotation(Bug.class);
+                }
+                if (b != null) {
+                    openElement(BUGS);
+                    String[] s = b.id();
+                    for (String string : s) {
+                        String ss[] = createBug(string);
+                        Map<String, String> visibleNameAtt = new HashMap<String, String>(1);
+                        visibleNameAtt.put("visibleName", ss[0]);
+                        openElement(BUG, visibleNameAtt);
+                        writer.write(ss[1]);
+                        closeElement(BUG);
+                    }
+                    closeElement(BUGS);
+                }
+            } catch (Exception ex) {
+                ex.printStackTrace();
+            }
+            closeElement(TEST_CLASS_ELEMENT);
+        }
+        closeElement(CLASSES_ELEMENT);
+        closeElement(STATS_ELEMENT);
+
+        closeElement(ROOT);
+        writer.flush();
+        writer.close();
+
+    }
+
+    public Map<String, String> createKnownToFailSumamryAttribute(int count) {
+        Map<String, String> atts = new HashMap<String, String>(1);
+        atts.put(K2F, String.valueOf(count));
+        return atts;
+    }
+
+    /**
+     * When declare for suite class or for Test-marked method,
+     * should be interpreted by report generating tool to links.
+     * Known shortcuts are
+     * SX  - http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=X
+     * PRX - http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=X
+     * RHX - https://bugzilla.redhat.com/show_bug.cgi?id=X
+     * DX  - http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=X
+     * GX  - http://bugs.gentoo.org/show_bug.cgi?id=X
+     * CAX - http://server.complang.tuwien.ac.at/cgi-bin/bugzilla/show_bug.cgi?id=X
+     * LPX - https://bugs.launchpad.net/bugs/X
+     *
+     * http://mail.openjdk.java.net/pipermail/distro-pkg-dev/
+     * and http://mail.openjdk.java.net/pipermail/ are proceed differently
+     *
+     * You just put eg @Bug(id="RH12345",id="http:/my.bukpage.com/terribleNew")
+     * and  RH12345 will be transalated as
+     * <a href="https://bugzilla.redhat.com/show_bug.cgi?id=123456">123456<a> or
+     * similar, the url will be inclueded as is. Both added to proper tests or suites
+     *
+     * @return Strng[2]{nameToBeShown, hrefValue}
+     */
+    public static String[] createBug(String string) {
+        String[] r = {"ex", string};
+        String[] prefixes = {
+            "S",
+            "PR",
+            "RH",
+            "D",
+            "G",
+            "CA",
+            "LP",};
+        String[] urls = {
+            "http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=",
+            "http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=",
+            "https://bugzilla.redhat.com/show_bug.cgi?id=",
+            "http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=",
+            "http://bugs.gentoo.org/show_bug.cgi?id=",
+            "http://server.complang.tuwien.ac.at/cgi-bin/bugzilla/show_bug.cgi?id",
+            "https://bugs.launchpad.net/bugs/",};
+
+        for (int i = 0; i < urls.length; i++) {
+            if (string.startsWith(prefixes[i])) {
+                r[0] = string;
+                r[1] = urls[i] + string.substring(prefixes[i].length());
+                return r;
+            }
+
+        }
+
+        String distro = "http://mail.openjdk.java.net/pipermail/distro-pkg-dev/";
+        String openjdk = "http://mail.openjdk.java.net/pipermail/";
+        if (string.startsWith(distro)) {
+            r[0] = "distro-pkg";
+            return r;
+        }
+        if (string.startsWith(openjdk)) {
+            r[0] = "openjdk";
+            return r;
+        }
+        return r;
+
+    }
+
+    public static void main(String[] args) {
+        String[] q = createBug("PR608");
+        System.out.println(q[0] + " : " + q[1]);
+        q = createBug("S4854");
+        System.out.println(q[0] + " : " + q[1]);
+        q = createBug("RH649423");
+        System.out.println(q[0] + " : " + q[1]);
+        q = createBug("D464");
+        System.out.println(q[0] + " : " + q[1]);
+        q = createBug("G6554");
+        System.out.println(q[0] + " : " + q[1]);
+        q = createBug("CA1654");
+        System.out.println(q[0] + " : " + q[1]);
+        q = createBug("LP5445");
+        System.out.println(q[0] + " : " + q[1]);
+
+        q = createBug("http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2011-November/016178.html");
+        System.out.println(q[0] + " : " + q[1]);
+        q = createBug("http://mail.openjdk.java.net/pipermail/awt-dev/2012-March/002324.html");
+        System.out.println(q[0] + " : " + q[1]);
+
+        q = createBug("http://lists.fedoraproject.org/pipermail/chinese/2012-January/008868.html");
+        System.out.println(q[0] + " : " + q[1]);
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/junit-runner/LessVerboseTextListener.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/junit-runner/LessVerboseTextListener.java	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/junit-runner/LessVerboseTextListener.java	(revision 416)
@@ -7,4 +7,6 @@
  */
 import java.io.PrintStream;
+import java.lang.reflect.Method;
+import net.sourceforge.jnlp.annotations.KnownToFail;
 
 import org.junit.internal.JUnitSystem;
@@ -18,4 +20,8 @@
     private PrintStream writer;
     private boolean testFailed = false;
+    private int  totalK2F=0;
+    private int  failedK2F=0;
+    private int  passedK2F=0;
+    private int  ignoredK2F=0;
 
     public LessVerboseTextListener(JUnitSystem system) {
@@ -29,7 +35,15 @@
 
     @Override
+    public void testIgnored(Description description) throws Exception {
+        writer.println("Ignored: " + description.getClassName() + "." + description.getMethodName());
+        printK2F(writer, null, description);
+    }
+
+
+    @Override
     public void testFailure(Failure failure) {
         testFailed = true;
         writer.println("FAILED: " + failure.getTestHeader() + " " + failure.getMessage());
+        printK2F(writer,true,failure.getDescription());
     }
 
@@ -38,4 +52,5 @@
         if (!testFailed) {
             writer.println("Passed: " + description.getClassName() + "." + description.getMethodName());
+            printK2F(writer,false,description);
         }
     }
@@ -46,5 +61,56 @@
         int failed = result.getFailureCount();
         int ignored = result.getIgnoreCount();
+        writer.println("Total tests run: "+result.getRunCount()+"; From  those : " + totalK2F + " known to fail");
+        writer.println("Test known to fail: passed: " + passedK2F + "; failed: " + failedK2F + "; ignored: " + ignoredK2F);
         writer.println("Test results: passed: " + passed + "; failed: " + failed + "; ignored: " + ignored);
+
+    }
+
+    private void printK2F(PrintStream writer, Boolean failed, Description description) {
+        try {
+            KnownToFail k2f = getK2F(description);
+            if (k2f != null) {
+                totalK2F++;
+                if (failed != null) {
+                    if (failed) {
+                        failedK2F++;
+                    } else {
+                        passedK2F++;
+                    }
+                } else {
+                    ignoredK2F++;
+                }
+                if (failed != null && !failed) {
+                    writer.println(" - WARNING This test is known to fail, but have passed!");
+                } else {
+                    writer.println(" - This test is known to fail");
+                }
+            }
+
+
+        } catch (Exception ex) {
+            ex.printStackTrace();
+        }
+    }
+
+    public static  KnownToFail getK2F(Description description) {
+        try {
+            Class q = description.getTestClass();
+            if (q != null) {
+                String qs = description.getMethodName();
+                if (qs.contains(" - ")) {
+                    qs = qs.replaceAll(" - .*", "");
+                }
+                Method qm = q.getMethod(qs);
+                if (qm != null) {
+                    KnownToFail k2f = qm.getAnnotation(KnownToFail.class);
+                    return k2f;
+
+                }
+            }
+        } catch (Exception ex) {
+            ex.printStackTrace();
+        }
+        return null;
     }
 
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/netx/pac/pac-funcs-test.js
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/netx/pac/pac-funcs-test.js	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/netx/pac/pac-funcs-test.js	(revision 416)
@@ -22,7 +22,9 @@
 	testDnsDomainLevels();
 	testShExpMatch();
-	testWeekdayRange();
 	testDateRange();
 	testTimeRange();
+	testWeekdayRange();
+	testDateRange2();
+	testDateRange3();
 
 	java.lang.System.out.println("Test results: passed: " + testsPassed + "; failed: " + testsFailed + ";");
@@ -30,27 +32,29 @@
 
 function runTests(name, tests) {
-
 	var undefined_var;
-
 	for ( var i = 0; i < tests.length; i++) {
-
-		var expectedVal = tests[i][0];
-		var args = tests[i].slice(1);
-		var returnVal;
-		try {
-			returnVal = name.apply(null, args);
-		} catch (e) {
-			returnVal = e;
-		}
-		if (returnVal === expectedVal) {
-			java.lang.System.out.println("Passed: " + name.name + "(" + args.join(", ") + ")");
-			testsPassed++;
-		} else {
-			java.lang.System.out.println("FAILED: " + name.name + "(" + args.join(", ") + ")");
-			java.lang.System.out.println("        Expected '" + expectedVal + "' but got '" + returnVal + "'");
-			testsFailed++;
-		}
+		runTest(name, tests[i]);
 	}
 }
+
+function runTest(name, test) {
+    var expectedVal = test[0];
+    var args = test.slice(1);
+    var returnVal;
+    try {
+        returnVal = name.apply(null, args);
+    } catch (e) {
+        returnVal = e;
+    }
+    if (returnVal === expectedVal) {
+        java.lang.System.out.println("Passed: " + name.name + "(" + args.join(", ") + ")");
+        testsPassed++;
+    } else {
+        java.lang.System.out.println("FAILED: " + name.name + "(" + args.join(", ") + ")");
+        java.lang.System.out.println("        Expected '" + expectedVal + "' but got '" + returnVal + "'");
+        testsFailed++;
+    }
+}
+
 
 function testIsPlainHostName() {
@@ -236,136 +240,300 @@
        [ false, dayToStr(day-1) ],
     ];
+
+    runTests(weekdayRange, tests);
+}
+
+/** Returns an array: [day, month, year] */
+function incDate() {
+    if ((arguments.length >= 3) && (arguments.length % 2 === 1)) {
+        var date = arguments[0];
+        var result = date;
+        var index = 1;
+        while (index < arguments.length) {
+            var whichThing = arguments[index];
+            var by = arguments[index+1];
+            switch (whichThing) {
+                case 'year':
+                    result = new Date(result.getFullYear()+by, result.getMonth(), result.getDate());
+                    break;
+                case 'month':
+                    result = new Date(result.getFullYear(), result.getMonth()+by, result.getDate());
+                    break;
+                case 'day':
+                    result = new Date(result.getFullYear(), result.getMonth(), result.getDate()+by);
+                    break;
+            }
+            index += 2;
+        }
+        return [result.getDate(), result.getMonth(), result.getFullYear()];
+    }
+    throw "Please call incDate properly";
+}
+
+function monthToStr(month) {
+    switch (month) {
+        case -1: return "DEC";
+        case 0: return "JAN";
+        case 1: return "FEB";
+        case 2: return "MAR";
+        case 3: return "APR";
+        case 4: return "MAY";
+        case 5: return "JUN";
+        case 6: return "JUL";
+        case 7: return "AUG";
+        case 8: return "SEP";
+        case 9: return "OCT";
+        case 10: return "NOV";
+        case 11: return "DEC";
+        case 12: return "JAN";
+        default: throw "Invalid Month" + month;
+    }
 }
 
 function testDateRange() {
 
-    function incDate(date) {
-        return (date + 1 - 1) % 31 +1 ;
-    }
-
-    function decDate(date) {
-        return (date - 1 - 1 + 31) % 31 + 1;
-    }
-
-    function monthToStr(month) {
-        switch (month) {
-            case -1: return "DEC";
-            case 0: return "JAN";
-            case 1: return "FEB";
-            case 2: return "MAR";
-            case 3: return "APR";
-            case 4: return "MAY";
-            case 5: return "JUN";
-            case 6: return "JUL";
-            case 7: return "AUG";
-            case 8: return "SEP";
-            case 9: return "OCT";
-            case 10: return "NOV";
-            case 11: return "DEC";
-            case 12: return "JAN";
-            default: throw "Invalid Month";
-        }
-    }
-
-    var today = new Date();
-    var date = today.getDate();
-    var month = today.getMonth();
-    var year = today.getYear();
-
-    var tests = [
-        [ true, date ],
-        [ false, incDate(date) ],
-        [ false, decDate(date) ],
-
-        [ true, monthToStr(month) ],
-        [ false, monthToStr(month+1) ],
-        [ false, monthToStr(month-1) ],
-
-        [ true, year ],
-        [ false, year - 1],
-        [ false, year + 1],
-
-        [ true, date, date ],
-        [ true, date, incDate(date) ],
-        [ true, decDate(date), date ],
-        [ true, decDate(date), incDate(date) ],
-        [ false, incDate(date), decDate(date) ],
-        [ false, decDate(decDate(date)), decDate(date) ],
-        [ false, incDate(date), incDate(incDate(date)) ],
-
-        [ true, monthToStr(month), monthToStr(month) ],
-        [ true, monthToStr(month), monthToStr(month+1) ],
-        [ true, monthToStr(month-1), monthToStr(month) ],
-        [ true, monthToStr(month-1), monthToStr(month+1) ],
-        [ true, "JAN", "DEC" ],
-        [ true, "DEC", "NOV" ],
-        [ true, "JUL", "JUN"],
-        [ false, monthToStr(month+1), monthToStr(month+1) ],
-        [ false, monthToStr(month-1), monthToStr(month-1) ],
-        [ false, monthToStr(month+1), monthToStr(month-1) ],
-
-        [ true, year, year ],
-        [ true, year, year+1 ],
-        [ true, year-1, year ],
-        [ true, year-1, year+1 ],
-        [ false, year-2, year-1 ],
-        [ false, year+1, year+1 ],
-        [ false, year+1, year+2 ],
-        [ false, year+1, year-1 ],
-
-        [ true, date, monthToStr(month) , date, monthToStr(month) ],
-        [ true, decDate(date), monthToStr(month) , date, monthToStr(month) ],
-        [ false, decDate(date), monthToStr(month) , decDate(date), monthToStr(month) ],
-        [ true, date, monthToStr(month) , incDate(date), monthToStr(month) ],
-        [ false, incDate(date), monthToStr(month) , incDate(date), monthToStr(month) ],
-        [ true, decDate(date), monthToStr(month) , incDate(date), monthToStr(month) ],
-        [ false, incDate(date), monthToStr(month) , decDate(date), monthToStr(month) ],
-        [ true, date, monthToStr(month-1) , date, monthToStr(month) ],
-        [ true, date, monthToStr(month) , date, monthToStr(month+1) ],
-        [ true, date, monthToStr(month-1) , date, monthToStr(month+1) ],
-        [ true, incDate(date), monthToStr(month-1) , date, monthToStr(month+1) ],
-        [ true, date, monthToStr(month-1) , decDate(date), monthToStr(month+1) ],
-        [ false, date, monthToStr(month+1) , date, monthToStr(month-1) ],
-        [ false, incDate(date), monthToStr(month+1) , incDate(date), monthToStr(month-1) ],
-        [ false, decDate(date), monthToStr(month+1) , decDate(date), monthToStr(month-1) ],
-        [ true, 1, "JAN", 31, "DEC" ],
-        [ true, 2, "JAN", 1, "JAN" ],
-        [ false, 1, monthToStr(month+1), 31, monthToStr(month+1) ],
-        [ false, 1, monthToStr(month-1), 31, monthToStr(month-1) ],
-
-        [ true, monthToStr(month), year, monthToStr(month), year ],
-        [ true, monthToStr(month-1), year, monthToStr(month), year ],
-        [ true, monthToStr(month), year, monthToStr(month+1), year ],
-        [ true, monthToStr(month-1), year, monthToStr(month+1), year ],
-        [ true, monthToStr(0), year, monthToStr(11), year ],
-        [ false, monthToStr(month+1), year, monthToStr(month-1), year ],
-        [ false, monthToStr(month+1), year, monthToStr(month+1), year ],
-        [ false, monthToStr(month-1), year, monthToStr(month-1), year ],
-        [ false, monthToStr(month), year-1, monthToStr(month-1), year ],
-        [ true, monthToStr(month), year, monthToStr(month), year + 1 ],
-        [ true, monthToStr(month), year-1, monthToStr(month), year ],
-        [ true, monthToStr(month), year-1, monthToStr(month), year+1 ],
-        [ true, monthToStr(0), year, monthToStr(0), year+1 ],
-        [ true, monthToStr(0), year-1, monthToStr(0), year+1 ],
-        [ false, monthToStr(0), year-1, monthToStr(11), year-1 ],
-        [ false, monthToStr(0), year+1, monthToStr(11), year+1 ],
-
-        [ true, date, monthToStr(month), year, date, monthToStr(month), year ],
-        [ true, decDate(date), monthToStr(month), year, incDate(date), monthToStr(month), year ],
-        [ true, decDate(date), monthToStr(month-1), year, incDate(date), monthToStr(month+1), year ],
-        [ true, decDate(date), monthToStr(month-1), year-1, incDate(date), monthToStr(month+1), year+1 ],
-        [ true, incDate(date), monthToStr(month-1), year-1, incDate(date), monthToStr(month+1), year+1 ],
-        [ false, incDate(date), monthToStr(month), year, incDate(date), monthToStr(month+1), year+1 ],
-        [ false, date, monthToStr(month+1), year, incDate(date), monthToStr(month+1), year+1 ],
-        [ true, 1, monthToStr(0), 0, 31, monthToStr(11), 100000 ],
-        [ true, 1, monthToStr(0), year, 31, monthToStr(11), year ],
-        [ true, 1, monthToStr(0), year-1, 31, monthToStr(11), year+1 ],
-        [ false, 1, monthToStr(0), year-1, 31, monthToStr(11), year-1 ],
-        [ false, 1, monthToStr(0), year+1, 31, monthToStr(11), year+1 ],
-
-    ];
-
-    runTests(dateRange, tests);
-
+    {
+        var current = new Date();
+        var date = current.getDate();
+        var month = current.getMonth();
+        var year = current.getFullYear();
+
+        var today = incDate(current, 'day', 0);
+        var tomorrow = incDate(current, 'day', 1);
+        var yesterday = incDate(current, 'day', -1);
+
+        runTest(dateRange, [ true, date ]);
+        runTest(dateRange, [ false, tomorrow[0] ]);
+        runTest(dateRange, [ false, yesterday[0] ]);
+
+        runTest(dateRange, [ true, monthToStr(month) ]);
+        runTest(dateRange, [ false, monthToStr(month+1) ]);
+        runTest(dateRange, [ false, monthToStr(month-1) ]);
+
+        runTest(dateRange, [ true, year ]);
+        runTest(dateRange, [ false, year - 1]);
+        runTest(dateRange, [ false, year + 1]);
+
+        runTest(dateRange, [ true, date, date ]);
+        runTest(dateRange, [ true, today[0], tomorrow[0] ]);
+        runTest(dateRange, [ true, yesterday[0], today[0] ]);
+        runTest(dateRange, [ true, yesterday[0], tomorrow[0] ]);
+        runTest(dateRange, [ false, tomorrow[0], yesterday[0] ]);
+        runTest(dateRange, [ false, incDate(current,'day',-2)[0], yesterday[0] ]);
+        runTest(dateRange, [ false, tomorrow[0], incDate(current,'day',2)[0] ]);
+
+        runTest(dateRange, [ true, monthToStr(month), monthToStr(month) ]);
+        runTest(dateRange, [ true, monthToStr(month), monthToStr(month+1) ]);
+        runTest(dateRange, [ true, monthToStr(month-1), monthToStr(month) ]);
+        runTest(dateRange, [ true, monthToStr(month-1), monthToStr(month+1) ]);
+        runTest(dateRange, [ true, "JAN", "DEC" ]);
+        runTest(dateRange, [ true, "FEB", "JAN" ]);
+        runTest(dateRange, [ true, "DEC", "NOV" ]);
+        runTest(dateRange, [ true, "JUL", "JUN"]);
+        runTest(dateRange, [ false, monthToStr(month+1), monthToStr(month+1) ]);
+        runTest(dateRange, [ false, monthToStr(month-1), monthToStr(month-1) ]);
+        runTest(dateRange, [ false, monthToStr(month+1), monthToStr(month-1) ]);
+
+        runTest(dateRange, [ true, year, year ]);
+        runTest(dateRange, [ true, year, year+1 ]);
+        runTest(dateRange, [ true, year-1, year ]);
+        runTest(dateRange, [ true, year-1, year+1 ]);
+        runTest(dateRange, [ false, year-2, year-1 ]);
+        runTest(dateRange, [ false, year+1, year+1 ]);
+        runTest(dateRange, [ false, year+1, year+2 ]);
+        runTest(dateRange, [ false, year+1, year-1 ]);
+
+        runTest(dateRange, [ true, date, monthToStr(month) , date, monthToStr(month) ]);
+        runTest(dateRange, [ true, yesterday[0], monthToStr(yesterday[1]) , date, monthToStr(month) ]);
+        runTest(dateRange, [ false, yesterday[0], monthToStr(yesterday[1]) , yesterday[0], monthToStr(yesterday[1]) ]);
+        runTest(dateRange, [ true, date, monthToStr(month) , tomorrow[0], monthToStr(tomorrow[1]) ]);
+        runTest(dateRange, [ false, tomorrow[0], monthToStr(tomorrow[1]) , tomorrow[0], monthToStr(tomorrow[1]) ]);
+        runTest(dateRange, [ true, yesterday[0], monthToStr(yesterday[1]) , tomorrow[0], monthToStr(tomorrow[1]) ]);
+        runTest(dateRange, [ false, tomorrow[0], monthToStr(tomorrow[1]) , yesterday[0], monthToStr(yesterday[1]) ]);
+    }
+
+    {
+        var lastMonth = incDate(new Date(), 'month', -1);
+        var thisMonth = incDate(new Date(), 'month', 0);
+        var nextMonth = incDate(new Date(), 'month', +1);
+        runTest(dateRange, [ true, lastMonth[0], monthToStr(lastMonth[1]) , thisMonth[0], monthToStr(thisMonth[1]) ]);
+        runTest(dateRange, [ true, thisMonth[0], monthToStr(thisMonth[1]) , nextMonth[0], monthToStr(nextMonth[1]) ]);
+        runTest(dateRange, [ true, lastMonth[0], monthToStr(lastMonth[1]) , nextMonth[0], monthToStr(nextMonth[1]) ]);
+        var date1 = incDate(new Date(), 'day', +1, 'month', -1);
+        var date2 = incDate(new Date(), 'day', -1, 'month', +1);
+        runTest(dateRange, [ true, date1[0], monthToStr(date1[1]) , nextMonth[0], monthToStr(nextMonth[1]) ]);
+        runTest(dateRange, [ true, lastMonth[0], monthToStr(lastMonth[1]) , date2[0], monthToStr(date2[1]) ]);
+        runTest(dateRange, [ false, nextMonth[0], monthToStr(nextMonth[1]) , lastMonth[0], monthToStr(lastMonth[1]) ]);
+        var date3 = incDate(new Date(), 'day', +1, 'month', +1);
+        var date4 = incDate(new Date(), 'day', +1, 'month', -1);
+        runTest(dateRange, [ false, date3[0], monthToStr(date3[1]) , date4[0], monthToStr(date4[1]) ]);
+
+        var date5 = incDate(new Date(), 'day', -1, 'month', -1);
+        runTest(dateRange, [ false, date2[0], monthToStr(date2[1]) , date5[0], monthToStr(date5[1]) ]);
+
+        runTest(dateRange, [ true, 1, "JAN", 31, "DEC" ]);
+        runTest(dateRange, [ true, 2, "JAN", 1, "JAN" ]);
+
+        var month = new Date().getMonth();
+        runTest(dateRange, [ false, 1, monthToStr(month+1), 31, monthToStr(month+1) ]);
+        runTest(dateRange, [ false, 1, monthToStr(month-1), 31, monthToStr(month-1) ]);
+    }
+
+
+    {
+        var lastMonth = incDate(new Date(), 'month', -1);
+        var thisMonth = incDate(new Date(), 'month', 0);
+        var nextMonth = incDate(new Date(), 'month', +1);
+        runTest(dateRange, [ true, monthToStr(thisMonth[1]), thisMonth[2], monthToStr(thisMonth[1]), thisMonth[2] ]);
+        runTest(dateRange, [ true, monthToStr(lastMonth[1]), lastMonth[2], monthToStr(thisMonth[1]), thisMonth[2] ]);
+        runTest(dateRange, [ true, monthToStr(thisMonth[1]), thisMonth[2], monthToStr(nextMonth[1]), nextMonth[2] ]);
+        runTest(dateRange, [ true, monthToStr(lastMonth[1]), lastMonth[2], monthToStr(nextMonth[1]), nextMonth[2] ]);
+        runTest(dateRange, [ true, monthToStr(0), year, monthToStr(11), year ]);
+
+        runTest(dateRange, [ false, monthToStr(nextMonth[1]), nextMonth[2], monthToStr(lastMonth[1]), lastMonth[2] ]);
+        runTest(dateRange, [ false, monthToStr(nextMonth[1]), nextMonth[2], monthToStr(nextMonth[1]), nextMonth[2] ]);
+        runTest(dateRange, [ false, monthToStr(lastMonth[1]), lastMonth[2], monthToStr(lastMonth[1]), lastMonth[2] ]);
+
+        var lastYear = incDate(new Date(), 'year', -1);
+        var nextYear = incDate(new Date(), 'year', +1);
+
+        runTest(dateRange, [ false, monthToStr(lastYear[1]), lastYear[2], monthToStr(lastMonth[1]), lastMonth[2] ]);
+        runTest(dateRange, [ true, monthToStr(thisMonth[1]), thisMonth[2], monthToStr(nextYear[1]), nextYear[2] ]);
+
+        var year = new Date().getFullYear();
+        var month = new Date().getMonth();
+
+        runTest(dateRange, [ true, monthToStr(month), year-1, monthToStr(month), year ]);
+        runTest(dateRange, [ true, monthToStr(month), year-1, monthToStr(month), year+1 ]);
+        runTest(dateRange, [ true, monthToStr(0), year, monthToStr(0), year+1 ]);
+        runTest(dateRange, [ true, monthToStr(0), year-1, monthToStr(0), year+1 ]);
+        runTest(dateRange, [ false, monthToStr(0), year-1, monthToStr(11), year-1 ]);
+        runTest(dateRange, [ false, monthToStr(0), year+1, monthToStr(11), year+1 ]);
+    }
+
+    {
+        var today = incDate(new Date(), 'day', 0);
+        var yesterday = incDate(new Date(), 'day', -1);
+        var tomorrow = incDate(new Date(), 'day', +1);
+        runTest(dateRange, [ true,
+            today[0], monthToStr(today[1]), today[2], today[0], monthToStr(today[1]), today[2] ]);
+        runTest(dateRange, [ true,
+            yesterday[0], monthToStr(yesterday[1]), yesterday[2], tomorrow[0], monthToStr(tomorrow[1]), tomorrow[2] ]);
+    }
+
+    {
+        var dayLastMonth = incDate(new Date(), 'day', -1, 'month', -1);
+        var dayNextMonth = incDate(new Date(), 'day', +1, 'month', +1);
+        runTest(dateRange, [ true,
+            dayLastMonth[0], monthToStr(dayLastMonth[1]), dayLastMonth[2], dayNextMonth[0], monthToStr(dayNextMonth[1]), dayNextMonth[2] ]);
+    }
+
+    {
+        var dayLastYear = incDate(new Date(), 'day', -1, 'month', -1, 'year', -1);
+        var dayNextYear = incDate(new Date(), 'day', +1, 'month', +1, 'year', +1);
+        runTest(dateRange, [ true,
+            dayLastYear[0], monthToStr(dayLastYear[1]), dayLastYear[2], dayNextYear[0], monthToStr(dayNextYear[1]), dayNextYear[2] ]);
+    }
+
+    {
+        var dayLastYear = incDate(new Date(), 'day', +1, 'month', -1, 'year', -1);
+        var dayNextYear = incDate(new Date(), 'day', +1, 'month', +1, 'year', +1);
+        runTest(dateRange, [ true,
+            dayLastYear[0], monthToStr(dayLastYear[1]), dayLastYear[2], dayNextYear[0], monthToStr(dayNextYear[1]), dayNextYear[2] ]);
+    }
+
+    {
+        var tomorrow = incDate(new Date(), 'day', +1);
+        var dayNextYear = incDate(new Date(), 'day', +1, 'month', +1, 'year', +1);
+        runTest(dateRange, [ false,
+            tomorrow[0], monthToStr(tomorrow[1]), tomorrow[2], dayNextYear[0], monthToStr(dayNextYear[1]), dayNextYear[2] ]);
+
+    }
+
+    {
+        var nextMonth = incDate(new Date(), 'month', +1);
+        var nextYear = incDate(new Date(), 'day', +1, 'month', +1, 'year', +1);
+        runTest(dateRange, [ false,
+            nextMonth[0], monthToStr(nextMonth[1]), nextMonth[2], nextYear[0], monthToStr(nextYear[1]), nextYear[2] ]);
+    }
+
+    {
+        runTest(dateRange, [ true, 1, monthToStr(0), 0, 31, monthToStr(11), 100000 ]);
+        runTest(dateRange, [ true, 1, monthToStr(0), year, 31, monthToStr(11), year ]);
+        runTest(dateRange, [ true, 1, monthToStr(0), year-1, 31, monthToStr(11), year+1 ]);
+        runTest(dateRange, [ false, 1, monthToStr(0), year-1, 31, monthToStr(11), year-1 ]);
+        runTest(dateRange, [ false, 1, monthToStr(0), year+1, 31, monthToStr(11), year+1 ]);
+     }
+
+}
+
+function testDateRange2() {
+
+  var dates = [   
+	new Date("January 31, 2011 3:33:33"),
+	new Date("February 28, 2011 3:33:33"),
+	new Date("February 29, 2012 3:33:33"),
+	new Date("March 31, 2011 3:33:33"),
+	new Date("April 30, 2011 3:33:33"),
+	new Date("May 31, 2011 3:33:33"),
+	new Date("June 30, 2011 3:33:33"),
+	new Date("July 31, 2011 3:33:33"),
+	new Date("August 31, 2011 3:33:33"),
+	new Date("September 30, 2011 3:33:33"),
+	new Date("October 31, 2011 3:33:33"),
+	new Date("November 30, 2011 3:33:33"),
+	new Date("December 31, 2011 3:33:33"),
+]
+  for (var i = 0; i < dates.length; i++)  {
+      var current = dates[i];
+      var today = incDate(current, 'day', 0);
+      var yesterday = incDate(current, 'day', -1);
+      var tomorrow = incDate(current, 'day', 1);
+      var aYearFromNow = new Date(current.getFullYear()+1, current.getMonth()+1, current.getDate()+1);
+      var later = [aYearFromNow.getDate(), aYearFromNow.getMonth(), aYearFromNow.getFullYear()];
+
+      runTest(isDateInRange_internallForIcedTeaWebTesting, [ true, current,
+        today[0], monthToStr(today[1]) , tomorrow[0], monthToStr(tomorrow[1]) ]);
+      runTest(isDateInRange_internallForIcedTeaWebTesting, [ true, current,
+        yesterday[0], monthToStr(yesterday[1]) , tomorrow[0], monthToStr(tomorrow[1]) ]);
+      runTest(isDateInRange_internallForIcedTeaWebTesting, [ true, current,
+        yesterday[0], monthToStr(yesterday[1]), yesterday[2], tomorrow[0], monthToStr(tomorrow[1]), tomorrow[2] ]);
+      runTest(isDateInRange_internallForIcedTeaWebTesting, [ false, current,
+        tomorrow[0], monthToStr(tomorrow[1]), tomorrow[2], later[0], monthToStr(later[1]), later[2] ]);
+  }
+
+}
+
+function testDateRange3() {
+  var dates = [   
+	new Date("January 1, 2011 1:11:11"),
+	new Date("February 1, 2011 1:11:11"),
+	new Date("March 1, 2011 1:11:11"),
+	new Date("April 1, 2011 1:11:11"),
+	new Date("May 1, 2011 1:11:11"),
+	new Date("June 1, 2011 1:11:11"),
+	new Date("July 1, 2011 1:11:11"),
+	new Date("August 1, 2011 1:11:11"),
+	new Date("September 1, 2011 1:11:11"),
+	new Date("October 1, 2011 1:11:11"),
+	new Date("November 1, 2011 1:11:11"),
+	new Date("December 1, 2011 1:11:11"),
+
+    ]
+
+
+
+  for (var i = 0; i < dates.length; i++)  {
+    var current = dates[i];
+    var yesterday = incDate(current,'day',-1);
+    var today = incDate(current,'day',0);
+    var tomorrow = incDate(current,'day',1);
+    runTest(isDateInRange_internallForIcedTeaWebTesting, [ true, current,
+      yesterday[0], monthToStr(yesterday[1]) , today[0], monthToStr(today[1]) ]);
+    runTest(isDateInRange_internallForIcedTeaWebTesting, [ true, current,
+      yesterday[0], monthToStr(yesterday[1]) , tomorrow[0], monthToStr(tomorrow[1]) ]);
+    runTest(isDateInRange_internallForIcedTeaWebTesting, [ true, current,
+      yesterday[0], monthToStr(yesterday[1]), yesterday[2], tomorrow[0], monthToStr(tomorrow[1]), tomorrow[2] ]);
+  }
 }
 
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/DefaultLaunchHandlerTest.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/DefaultLaunchHandlerTest.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/DefaultLaunchHandlerTest.java	(revision 416)
@@ -0,0 +1,133 @@
+/* DefaultLaunchHandlerTest.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; 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. */
+
+package net.sourceforge.jnlp;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.io.ByteArrayOutputStream;
+import java.io.PrintStream;
+
+import org.junit.Test;
+
+public class DefaultLaunchHandlerTest {
+
+    @Test
+    public void testBasicLaunch() {
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        DefaultLaunchHandler handler = new DefaultLaunchHandler(new PrintStream(baos));
+
+        // all no-ops with no output
+        handler.launchInitialized(null);
+        handler.launchStarting(null);
+        handler.launchCompleted(null);
+
+        String output = baos.toString();
+        assertEquals("", output);
+    }
+
+    @Test
+    public void testLaunchWarning() {
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        DefaultLaunchHandler handler = new DefaultLaunchHandler(new PrintStream(baos));
+
+        LaunchException warning = new LaunchException(null, null,
+                "severe", "warning type", "test warning", "this is a test of the warning");
+        boolean continueLaunch = handler.launchWarning(warning);
+
+        assertTrue(continueLaunch);
+        String output = baos.toString();
+        assertEquals("netx: warning type: test warning\n", output);
+    }
+
+    @Test
+    public void testLaunchError() {
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        DefaultLaunchHandler handler = new DefaultLaunchHandler(new PrintStream(baos));
+
+        LaunchException error = new LaunchException(null, null,
+                "severe", "error type", "test error", "this is a test of the error");
+        handler.launchError(error);
+
+        String output = baos.toString();
+        assertEquals("netx: error type: test error\n", output);
+    }
+
+    @Test
+    public void testLaunchErrorWithCause() {
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        DefaultLaunchHandler handler = new DefaultLaunchHandler(new PrintStream(baos));
+
+        ParseException parse = new ParseException("no information element");
+        LaunchException error = new LaunchException(null, parse,
+                "severe", "error type", "test error", "this is a test of the error");
+        handler.launchError(error);
+
+        String output = baos.toString();
+        assertEquals("netx: error type: test error (no information element)\n", output);
+    }
+
+    @Test
+    public void testLaunchErrorWithNestedCause() {
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        DefaultLaunchHandler handler = new DefaultLaunchHandler(new PrintStream(baos));
+
+        ParseException parse = new ParseException("no information element");
+        RuntimeException runtime = new RuntimeException("programmer made a mistake", parse);
+        LaunchException error = new LaunchException(null, runtime,
+                "severe", "error type", "test error", "this is a test of the error");
+        handler.launchError(error);
+
+        String output = baos.toString();
+        assertEquals("netx: error type: test error (programmer made a mistake (no information element))\n", output);
+    }
+
+
+    @Test
+    public void testValidationError() {
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        DefaultLaunchHandler handler = new DefaultLaunchHandler(new PrintStream(baos));
+
+        LaunchException error = new LaunchException(null, null,
+                "severe", "validation-error type", "test validation-error", "this is a test of a validation error");
+        handler.validationError(error);
+
+        String output = baos.toString();
+        assertEquals("netx: validation-error type: test validation-error\n", output);
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/JNLPFileTest.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/JNLPFileTest.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/JNLPFileTest.java	(revision 416)
@@ -0,0 +1,106 @@
+/* JNLPFileTest.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.
+ */
+
+package net.sourceforge.jnlp;
+
+import java.util.Locale;
+
+import net.sourceforge.jnlp.JNLPFile.Match;
+import net.sourceforge.jnlp.mock.MockJNLPFile;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+public class JNLPFileTest {
+    Locale jvmLocale = new Locale("en", "CA", "utf8");
+    MockJNLPFile file = new MockJNLPFile(jvmLocale);
+
+    @Test
+    public void testCompareAll() {
+        Locale[] correctAvailable = { new Locale("en", "CA", "utf8") };
+        Assert.assertTrue("Entire locale should match but did not.",
+                file.localeMatches(jvmLocale, correctAvailable, Match.LANG_COUNTRY_VARIANT));
+
+        Locale[] mismatchedAvailable = { new Locale("en", "CA", "utf16") };
+        Assert.assertFalse("Should not match variant but did.",
+                file.localeMatches(jvmLocale, mismatchedAvailable, Match.LANG_COUNTRY_VARIANT));
+    }
+
+    @Test
+    public void testLangAndCountry() {
+        Locale[] correctAvailable = { new Locale("en", "CA") };
+        Assert.assertTrue("Should match language and country, ignoring variant but did not.",
+                file.localeMatches(jvmLocale, correctAvailable, Match.LANG_COUNTRY));
+
+        Locale[] mismatchedAvailable = { new Locale("en", "EN") };
+        Assert.assertFalse("Should not match country but did.",
+                file.localeMatches(jvmLocale, mismatchedAvailable, Match.LANG_COUNTRY));
+
+        Locale[] extraMismatched = { new Locale("en", "CA", "utf16") };
+        Assert.assertFalse("Should not match because of extra variant but did.",
+                file.localeMatches(jvmLocale, extraMismatched, Match.LANG_COUNTRY));
+    }
+
+    @Test
+    public void testLangOnly() {
+        Locale[] correctAvailable = { new Locale("en") };
+        Assert.assertTrue("Should match only language but did not.",
+                file.localeMatches(jvmLocale, correctAvailable, Match.LANG));
+
+        Locale[] mismatchedAvailable = { new Locale("fr", "CA", "utf8") };
+        Assert.assertFalse("Should not match language but did.",
+                file.localeMatches(jvmLocale, mismatchedAvailable, Match.LANG));
+
+        Locale[] extraMismatched = { new Locale("en", "EN") };
+        Assert.assertFalse("Should not match because of extra country but did.",
+                file.localeMatches(jvmLocale, extraMismatched, Match.LANG));
+    }
+
+    @Test
+    public void testNoLocalAvailable() {
+        Assert.assertTrue("Null locales should match but did not.",
+                file.localeMatches(jvmLocale, null, Match.GENERALIZED));
+
+        Locale[] emptyAvailable = {};
+        Assert.assertTrue("Empty locales list should match but did not.",
+                file.localeMatches(jvmLocale, emptyAvailable, Match.GENERALIZED));
+
+        Locale[] mismatchAvailable = { new Locale("fr", "FR", "utf16") };
+        Assert.assertFalse("Locales list should not match generalized case but did.",
+                file.localeMatches(jvmLocale, mismatchAvailable, Match.GENERALIZED));
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/JNLPMatcherTest.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/JNLPMatcherTest.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/JNLPMatcherTest.java	(revision 416)
@@ -0,0 +1,500 @@
+/* JNLPMatcherTest.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.
+ */
+
+package net.sourceforge.jnlp;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.StringReader;
+import java.util.Random;
+import net.sourceforge.jnlp.annotations.KnownToFail;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+public class JNLPMatcherTest {
+
+    final String tests[] = {
+            "Testing template with CDATA",
+            "Testing template with an exact duplicate of the launching JNLP file",
+            "Testing template with wildchars as attribute/element values",
+            "Testing template with attributes/elements in different order",
+            "Testing template with wildchars as ALL element/attribute values",
+            "Testing template with comments",
+            "Testing template with different attribute/element values",
+            "Testing template by adding an additional children to element",
+            "Testing template by removing children from element",
+            "Testing template with a complete different JNLP template file ",
+            "Testing application with CDATA",
+            "Testing application with an exact duplicate of the launching JNLP file",
+            "Testing application with the same element/attribute name and value pair in different orders",
+            "Testing application with comments",
+            "Testing application with wildchars as attribute/element values",
+            "Testing application with a different codebase attribute value",
+            "Testing application by adding additional children to element",
+            "Testing application by removing children from element",
+            "Testing application with a complete different JNLP application file",
+            "Testing by calling JNLPMatcher.match() multiple times. Checking to see if the returns value is consistent" };
+
+    final ClassLoader cl = JNLPMatcherTest.class.getClassLoader();
+
+    private InputStreamReader getLaunchReader() {
+        InputStream launchStream = cl
+                .getResourceAsStream("net/sourceforge/jnlp/launchApp.jnlp");
+        return new InputStreamReader(launchStream);
+    }
+
+    @Test
+    @KnownToFail
+    public void testTemplateCDATA() throws JNLPMatcherException, IOException {
+
+        InputStreamReader launchReader = this.getLaunchReader();
+
+        InputStream fileStream = cl
+                .getResourceAsStream("net/sourceforge/jnlp/templates/template0.jnlp");
+        InputStreamReader fileReader = new InputStreamReader(fileStream);
+
+        JNLPMatcher test = new JNLPMatcher(fileReader, launchReader, true);
+
+        Assert.assertEquals(tests[0], true, test.isMatch());
+        fileReader.close();
+        launchReader.close();
+    }
+
+    @Test
+    public void testTemplateDuplicate() throws JNLPMatcherException, IOException {
+
+        InputStreamReader launchReader = this.getLaunchReader();
+
+        InputStream fileStream = cl
+                .getResourceAsStream("net/sourceforge/jnlp/templates/template1.jnlp");
+        InputStreamReader fileReader = new InputStreamReader(fileStream);
+
+        JNLPMatcher test = new JNLPMatcher(fileReader, launchReader, true);
+
+        Assert.assertEquals(tests[1], true, test.isMatch());
+        fileReader.close();
+        launchReader.close();
+    }
+
+    @Test
+    public void testTemplateWildCharsRandom() throws JNLPMatcherException, IOException {
+
+        InputStreamReader launchReader = this.getLaunchReader();
+
+        InputStream fileStream = cl
+                .getResourceAsStream("net/sourceforge/jnlp/templates/template2.jnlp");
+        InputStreamReader fileReader = new InputStreamReader(fileStream);
+
+        JNLPMatcher test = new JNLPMatcher(fileReader, launchReader, true);
+
+        Assert.assertEquals(tests[2], true, test.isMatch());
+        fileReader.close();
+        launchReader.close();
+    }
+
+    @Test
+    public void testTemplateDifferentOrder() throws JNLPMatcherException, IOException {
+
+        InputStreamReader launchReader = this.getLaunchReader();
+
+        InputStream fileStream = cl
+                .getResourceAsStream("net/sourceforge/jnlp/templates/template3.jnlp");
+        InputStreamReader fileReader = new InputStreamReader(fileStream);
+
+        JNLPMatcher test = new JNLPMatcher(fileReader, launchReader, true);
+
+        Assert.assertEquals(tests[3], true, test.isMatch());
+        fileReader.close();
+        launchReader.close();
+    }
+
+    @Test
+    public void testTemplateWildCharsAsAllValues() throws JNLPMatcherException,
+            IOException {
+
+        InputStreamReader launchReader = this.getLaunchReader();
+
+        InputStream fileStream = cl
+                .getResourceAsStream("net/sourceforge/jnlp/templates/template4.jnlp");
+        InputStreamReader fileReader = new InputStreamReader(fileStream);
+
+        JNLPMatcher test = new JNLPMatcher(fileReader, launchReader, true);
+
+        Assert.assertEquals(tests[4], true, test.isMatch());
+        fileReader.close();
+        launchReader.close();
+    }
+
+    @Test
+    public void testTemplateComments() throws JNLPMatcherException, IOException {
+
+        InputStreamReader launchReader = this.getLaunchReader();
+
+        InputStream fileStream = cl
+                .getResourceAsStream("net/sourceforge/jnlp/templates/template5.jnlp");
+        InputStreamReader fileReader = new InputStreamReader(fileStream);
+
+        JNLPMatcher test = new JNLPMatcher(fileReader, launchReader, true);
+
+        Assert.assertEquals(tests[5], true, test.isMatch());
+        fileReader.close();
+        launchReader.close();
+    }
+
+    @Test
+    public void testTemplateDifferentValues() throws JNLPMatcherException, IOException {
+
+        InputStreamReader launchReader = this.getLaunchReader();
+
+        InputStream fileStream = cl
+                .getResourceAsStream("net/sourceforge/jnlp/templates/template6.jnlp");
+        InputStreamReader fileReader = new InputStreamReader(fileStream);
+
+        JNLPMatcher test = new JNLPMatcher(fileReader, launchReader, true);
+
+        Assert.assertEquals(tests[6], false, test.isMatch());
+        fileReader.close();
+        launchReader.close();
+    }
+
+    @Test
+    public void testTemplateExtraChild() throws JNLPMatcherException, IOException {
+
+        InputStreamReader launchReader = this.getLaunchReader();
+
+        InputStream fileStream = cl
+                .getResourceAsStream("net/sourceforge/jnlp/templates/template7.jnlp");
+        InputStreamReader fileReader = new InputStreamReader(fileStream);
+
+        JNLPMatcher test = new JNLPMatcher(fileReader, launchReader, true);
+
+        Assert.assertEquals(tests[7], false, test.isMatch());
+        fileReader.close();
+        launchReader.close();
+    }
+
+    @Test
+    public void testTemplateFewerChild() throws JNLPMatcherException, IOException {
+
+        InputStreamReader launchReader = this.getLaunchReader();
+
+        InputStream fileStream = cl
+                .getResourceAsStream("net/sourceforge/jnlp/templates/template8.jnlp");
+        InputStreamReader fileReader = new InputStreamReader(fileStream);
+
+        JNLPMatcher test = new JNLPMatcher(fileReader, launchReader, true);
+
+        Assert.assertEquals(tests[8], false, test.isMatch());
+        fileReader.close();
+        launchReader.close();
+    }
+
+    @Test
+    public void testTemplateDifferentFile() throws JNLPMatcherException, IOException {
+
+        InputStreamReader launchReader = this.getLaunchReader();
+
+        InputStream fileStream = cl
+                .getResourceAsStream("net/sourceforge/jnlp/templates/template9.jnlp");
+        InputStreamReader fileReader = new InputStreamReader(fileStream);
+
+        JNLPMatcher test = new JNLPMatcher(fileReader, launchReader, true);
+
+        Assert.assertEquals(tests[9], false, test.isMatch());
+        fileReader.close();
+        launchReader.close();
+    }
+
+    @Test
+    @KnownToFail
+    public void testApplicationCDATA() throws JNLPMatcherException, IOException {
+
+        InputStreamReader launchReader = this.getLaunchReader();
+
+        InputStream fileStream = cl
+                .getResourceAsStream("net/sourceforge/jnlp/application/application0.jnlp");
+        InputStreamReader fileReader = new InputStreamReader(fileStream);
+
+        JNLPMatcher test = new JNLPMatcher(fileReader, launchReader, false);
+
+        Assert.assertEquals(tests[10], true, test.isMatch());
+        fileReader.close();
+        launchReader.close();
+    }
+
+    @Test
+    public void testApplicationDuplicate() throws JNLPMatcherException, IOException {
+
+        InputStreamReader launchReader = this.getLaunchReader();
+
+        InputStream fileStream = cl
+                .getResourceAsStream("net/sourceforge/jnlp/application/application1.jnlp");
+        InputStreamReader fileReader = new InputStreamReader(fileStream);
+
+        JNLPMatcher test = new JNLPMatcher(fileReader, launchReader, false);
+
+        Assert.assertEquals(tests[11], true, test.isMatch());
+        fileReader.close();
+        launchReader.close();
+    }
+
+    @Test
+    public void testApplicationDifferentOrder() throws JNLPMatcherException, IOException {
+
+        InputStreamReader launchReader = this.getLaunchReader();
+
+        InputStream fileStream = cl
+                .getResourceAsStream("net/sourceforge/jnlp/application/application2.jnlp");
+        InputStreamReader fileReader = new InputStreamReader(fileStream);
+
+        JNLPMatcher test = new JNLPMatcher(fileReader, launchReader, false);
+
+        Assert.assertEquals(tests[12], true, test.isMatch());
+        fileReader.close();
+        launchReader.close();
+    }
+
+    @Test
+    public void testApplicationComments() throws JNLPMatcherException, IOException {
+
+        InputStreamReader launchReader = this.getLaunchReader();
+
+        InputStream fileStream = cl
+                .getResourceAsStream("net/sourceforge/jnlp/application/application3.jnlp");
+        InputStreamReader fileReader = new InputStreamReader(fileStream);
+
+        JNLPMatcher test = new JNLPMatcher(fileReader, launchReader, false);
+
+        Assert.assertEquals(tests[13], true, test.isMatch());
+        fileReader.close();
+        launchReader.close();
+    }
+
+    @Test
+    public void testApplicationWildCharsRandom() throws JNLPMatcherException, IOException {
+
+        InputStreamReader launchReader = this.getLaunchReader();
+
+        InputStream fileStream = cl
+                .getResourceAsStream("net/sourceforge/jnlp/application/application4.jnlp");
+        InputStreamReader fileReader = new InputStreamReader(fileStream);
+
+        JNLPMatcher test = new JNLPMatcher(fileReader, launchReader, false);
+
+        Assert.assertEquals(tests[14], false, test.isMatch());
+        fileReader.close();
+        launchReader.close();
+    }
+
+    @Test
+    public void testApplicationDifferentCodebaseValue() throws JNLPMatcherException,
+            IOException {
+
+        InputStreamReader launchReader = this.getLaunchReader();
+
+        InputStream fileStream = cl
+                .getResourceAsStream("net/sourceforge/jnlp/application/application5.jnlp");
+        InputStreamReader fileReader = new InputStreamReader(fileStream);
+
+        JNLPMatcher test = new JNLPMatcher(fileReader, launchReader, false);
+
+        Assert.assertEquals(tests[15], false, test.isMatch());
+        fileReader.close();
+        launchReader.close();
+    }
+
+    @Test
+    public void testApplicationExtraChild() throws JNLPMatcherException, IOException {
+
+        InputStreamReader launchReader = this.getLaunchReader();
+
+        InputStream fileStream = cl
+                .getResourceAsStream("net/sourceforge/jnlp/application/application6.jnlp");
+        InputStreamReader fileReader = new InputStreamReader(fileStream);
+
+        JNLPMatcher test = new JNLPMatcher(fileReader, launchReader, false);
+
+        Assert.assertEquals(tests[16], false, test.isMatch());
+        fileReader.close();
+        launchReader.close();
+    }
+
+    @Test
+    public void testApplicationFewerChild() throws JNLPMatcherException, IOException {
+
+        InputStreamReader launchReader = this.getLaunchReader();
+
+        InputStream fileStream = cl
+                .getResourceAsStream("net/sourceforge/jnlp/application/application7.jnlp");
+        InputStreamReader fileReader = new InputStreamReader(fileStream);
+
+        JNLPMatcher test = new JNLPMatcher(fileReader, launchReader, false);
+
+        Assert.assertEquals(tests[17], false, test.isMatch());
+        fileReader.close();
+        launchReader.close();
+    }
+
+    @Test
+    public void testApplicationDifferentFile() throws JNLPMatcherException, IOException {
+
+        InputStreamReader launchReader = this.getLaunchReader();
+
+        InputStream fileStream = cl
+                .getResourceAsStream("net/sourceforge/jnlp/application/application8.jnlp");
+        InputStreamReader fileReader = new InputStreamReader(fileStream);
+
+        JNLPMatcher test = new JNLPMatcher(fileReader, launchReader, false);
+
+        Assert.assertEquals(tests[18], false, test.isMatch());
+        fileReader.close();
+        launchReader.close();
+    }
+
+    @SuppressWarnings("unused")
+    @Test
+    public void testNullJNLPFiles() throws IOException {
+
+        Exception expectedException = null;
+        InputStreamReader launchReader = this.getLaunchReader();
+
+        InputStream fileStream = cl
+                .getResourceAsStream("net/sourceforge/jnlp/application/application8.jnlp");
+        InputStreamReader fileReader = new InputStreamReader(fileStream);
+
+        try {
+            JNLPMatcher test = new JNLPMatcher(null, launchReader, false);
+        } catch (Exception e) {
+            expectedException = e;
+        }
+        Assert.assertEquals(
+                "Checking exception after trying to create an instance with null signed application/template reader",
+                expectedException.getClass().getName(),
+                "net.sourceforge.jnlp.JNLPMatcherException");
+
+        try {
+            JNLPMatcher test = new JNLPMatcher(fileReader, null, false);
+        } catch (Exception e) {
+            expectedException = e;
+        }
+        Assert.assertEquals(
+                "Checking exception after trying to create an instance with null launching JNLP file reader",
+                expectedException.getClass().getName(),
+                "net.sourceforge.jnlp.JNLPMatcherException");
+
+        try {
+            JNLPMatcher test = new JNLPMatcher(null, null, false);
+        } catch (Exception e) {
+            expectedException = e;
+        }
+        Assert.assertEquals(
+                "Checking exception after trying to create an instance with both readers being null",
+                expectedException.getClass().getName(),
+                "net.sourceforge.jnlp.JNLPMatcherException");
+
+        launchReader.close();
+        fileReader.close();
+    }
+
+    @Test
+    public void testCallingMatchMultiple() throws JNLPMatcherException, IOException {
+
+        // Check with application
+        InputStreamReader launchReader = this.getLaunchReader();
+
+        InputStream fileStream = cl
+                .getResourceAsStream("net/sourceforge/jnlp/application/application8.jnlp");
+        InputStreamReader fileReader = new InputStreamReader(fileStream);
+
+        JNLPMatcher test = new JNLPMatcher(fileReader, launchReader, false);
+
+        Assert.assertEquals(tests[19], false, test.isMatch());
+        Assert.assertEquals(tests[19], false, test.isMatch());
+
+        fileReader.close();
+        launchReader.close();
+
+        // Check with template
+        launchReader = this.getLaunchReader();
+
+        fileStream = cl
+                .getResourceAsStream("net/sourceforge/jnlp/templates/template6.jnlp");
+        fileReader = new InputStreamReader(fileStream);
+
+        test = new JNLPMatcher(fileReader, launchReader, true);
+
+        Assert.assertEquals(tests[19], false, test.isMatch());
+        Assert.assertEquals(tests[19], false, test.isMatch());
+
+        fileReader.close();
+        launchReader.close();
+    }
+
+    @Test (timeout=1000 /*ms*/)
+    public void testIsMatchDoesNotHangOnLargeData() throws JNLPMatcherException {
+        /* construct an alphabet containing characters 'a' to 'z' */
+        final int ALPHABET_SIZE = 26;
+        char[] alphabet = new char[ALPHABET_SIZE];
+        for (int i = 0; i < ALPHABET_SIZE; i++) {
+            alphabet[i] = (char)('a' + i);
+        }
+        /* generate a long but random string using the alphabet */
+        final Random r = new Random();
+        final int STRING_SIZE = 1024 * 1024; // 1 MB
+        StringBuilder descriptionBuilder = new StringBuilder(STRING_SIZE);
+        for (int i = 0; i < STRING_SIZE; i++) {
+            descriptionBuilder.append(alphabet[r.nextInt(ALPHABET_SIZE)]);
+        }
+        String longDescription = descriptionBuilder.toString();
+
+        String file =
+                "<jnlp>\n" +
+                "  <information>\n" +
+                "    <title>JNLPMatcher hanges on large file size</title>\n" +
+                "    <vendor>IcedTea</vendor>\n" +
+                "    <description>" + longDescription + "</description>\n" +
+                "  </information>\n" +
+                "</jnlp>\n";
+
+        StringReader reader1 = new StringReader(file);
+        StringReader reader2 = new StringReader(file);
+        JNLPMatcher matcher = new JNLPMatcher(reader1, reader2, false);
+        Assert.assertTrue(matcher.isMatch());
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/LaunchExceptionTest.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/LaunchExceptionTest.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/LaunchExceptionTest.java	(revision 416)
@@ -0,0 +1,68 @@
+/* LaunchExceptionTest.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; 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. */
+
+package net.sourceforge.jnlp;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.io.ByteArrayOutputStream;
+import java.io.PrintStream;
+
+import org.junit.Test;
+
+public class LaunchExceptionTest {
+
+    @Test
+    public void testPrintStackTrace() {
+        NullPointerException cause = new NullPointerException("test");
+        LaunchException exception = new LaunchException(null, cause, "severe", "category", "test exception", "test description");
+
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        exception.printStackTrace(new PrintStream(baos));
+        String output = baos.toString();
+        assertNotNull(output);
+        assertFalse(output.trim().length() == 0);
+        assertTrue(output.contains("LaunchException: severe: category: test exception test description"));
+        assertTrue(output.contains("NullPointerException: test"));
+        int causedByAt = output.indexOf("Caused by:");
+        assertTrue(causedByAt != -1);
+        causedByAt = output.indexOf("Caused by:", causedByAt+1);
+        assertTrue(causedByAt == -1);
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/ParserCornerCases.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/ParserCornerCases.java	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/ParserCornerCases.java	(revision 416)
@@ -39,12 +39,89 @@
 
 import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.StringReader;
+import net.sourceforge.jnlp.annotations.KnownToFail;
 
-import org.junit.After;
+import net.sourceforge.nanoxml.XMLElement;
+import net.sourceforge.nanoxml.XMLParseException;
+
 import org.junit.Assert;
-import org.junit.Before;
 import org.junit.Test;
 
 /** Test various corner cases of the parser */
 public class ParserCornerCases {
+
+    @Test
+    public void testCdata() throws ParseException, XMLParseException, IOException {
+        String data = "<argument><![CDATA[<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?> <!DOCTYPE properties SYSTEM \"http://java.sun.com/dtd/properties.dtd\"> <properties> <entry key=\"key\">value</entry> </properties> ]]></argument>";
+        XMLElement elem = new XMLElement();
+        elem.parseFromReader(new StringReader(data));
+        XMLElement target = elem;
+        Assert.assertEquals("argument", target.getName());
+        Assert.assertTrue("too small", target.getContent().length() > 20);
+        Assert.assertTrue(target.getContent().contains("xml"));
+        Assert.assertTrue(target.getContent().contains("DOCTYPE"));
+        Assert.assertTrue(target.getContent().contains("<entry key=\"key\">value</entry>"));
+
+        Node node = Parser.getRootNode(new ByteArrayInputStream(data.getBytes()));
+        Assert.assertEquals("argument", node.getNodeName());
+        String contents = node.getNodeValue();
+        Assert.assertTrue(contents.contains("xml"));
+        Assert.assertTrue(contents.contains("DOCTYPE"));
+        Assert.assertTrue(contents.contains("<entry key=\"key\">value</entry>"));
+    }
+
+    @Test
+    public void testCdataNested() throws ParseException, XMLParseException, IOException {
+        String data = "<jnlp>\n" +
+                "<application-desc>\n" +
+                "<argument>\n" +
+                "<![CDATA[<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?> <!DOCTYPE properties SYSTEM \"http://java.sun.com/dtd/properties.dtd\"> <properties> <entry key=\"key\">value</entry> </properties> ]]>" +
+                "</argument>\n" +
+                "<argument>1</argument>\n" +
+                "</application-desc>\n" +
+                "</jnlp>";
+        XMLElement elem = new XMLElement();
+        elem.parseFromReader(new StringReader(data));
+        XMLElement target = (XMLElement) ((XMLElement) elem.enumerateChildren().nextElement()).enumerateChildren().nextElement();
+        Assert.assertEquals("argument", target.getName());
+        Assert.assertTrue("too small", target.getContent().length() > 20);
+        Assert.assertTrue(target.getContent().contains("xml"));
+        Assert.assertTrue(target.getContent().contains("DOCTYPE"));
+        Assert.assertTrue(target.getContent().contains("<entry key=\"key\">value</entry>"));
+
+        Node node = Parser.getRootNode(new ByteArrayInputStream(data.getBytes()));
+        node = node.getFirstChild().getFirstChild();
+        Assert.assertEquals("argument", node.getNodeName());
+        String contents = node.getNodeValue();
+        Assert.assertTrue(contents.contains("xml"));
+        Assert.assertTrue(contents.contains("DOCTYPE"));
+        Assert.assertTrue(contents.contains("<entry key=\"key\">value</entry>"));
+    }
+
+    @Test
+    @KnownToFail
+    public void testCDataFirstChild() throws XMLParseException, IOException {
+        String xml = "<?xml version=\"1.0\"?>\n" +
+                "<jnlp spec=\"1.5+\">\n" +
+                "<![CDATA[Text you want to escape goes here...<test> random tag test </test>]]>\n" +
+                "<information/>\n" +
+                "</jnlp>";
+        XMLElement elem = new XMLElement();
+        elem.parseFromReader(new StringReader(xml));
+    }
+
+    @Test
+    @KnownToFail
+    public void testCDataSecondChild() throws XMLParseException, IOException {
+        String xml = "<?xml version=\"1.0\"?>\n" +
+                "<jnlp spec=\"1.5+\">\n" +
+                "<information/>\n" +
+                "<![CDATA[Text you want to escape goes here...<test> random tag test </test>]]>\n" +
+                "</jnlp>";
+        XMLElement elem = new XMLElement();
+        elem.parseFromReader(new StringReader(xml));
+    }
+
     @Test
     public void testUnsupportedSpecNumber() throws ParseException {
@@ -72,4 +149,13 @@
 
     @Test
+    public void testCommentInElements2() throws ParseException {
+        String malformedJnlp = "<?xml?><jnlp <!-- comment --> spec='1.0'> </jnlp>";
+        Node root = Parser.getRootNode(new ByteArrayInputStream(malformedJnlp.getBytes()));
+        Parser p = new Parser(null, null, root, false, false);
+        Assert.assertEquals("1.0", p.getSpecVersion().toString());
+    }
+
+    @Test
+    @KnownToFail
     public void testCommentInAttributes() throws ParseException {
         String malformedJnlp = "<?xml?><jnlp spec='<!-- something -->'></jnlp>";
@@ -82,5 +168,6 @@
     public void testNestedComments() throws ParseException {
         String malformedJnlp = "<?xml?>" +
-                "<jnlp><information><description>" +
+                "<jnlp><information><title>testNestedComments</title>" +
+                "<vendor>IcedTea</vendor><description>" +
                 "<!-- outer <!-- inner --> -->" +
                 "</description></information></jnlp>";
@@ -89,3 +176,18 @@
         Assert.assertEquals(" -->", p.getInfo(root).get(0).getDescription());
     }
+
+    @Test
+    public void testDoubleDashesInComments() throws ParseException {
+        String malformedJnlp = "<?xml?>" +
+                "<jnlp> <!-- \n" +
+                " -- a very very long and \n" +
+                " -- multiline comment \n" +
+                " -- that contains double dashes \n" +
+                " -->\n" +
+                "  <information/>" +
+                "</jnlp>";
+        Node root = Parser.getRootNode(new ByteArrayInputStream(malformedJnlp.getBytes()));
+        Parser p = new Parser(null, null, root, false, false);
+    }
+
 }
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/ParserMalformedXml.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/ParserMalformedXml.java	(revision 415)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/ParserMalformedXml.java	(revision 416)
@@ -43,4 +43,5 @@
 import java.io.InputStreamReader;
 import java.io.IOException;
+import net.sourceforge.jnlp.annotations.KnownToFail;
 
 import org.junit.BeforeClass;
@@ -75,4 +76,5 @@
 
     @Test
+    @KnownToFail
     public void testMalformedArguments() throws ParseException {
         String malformedJnlp = originalJnlp.replace("arg2</argument", "arg2<argument");
@@ -81,4 +83,5 @@
 
     @Test
+    @KnownToFail
     public void testTagNotClosed() throws ParseException {
         String malformedJnlp = originalJnlp.replace("</jnlp>", "<jnlp>");
@@ -87,4 +90,5 @@
 
     @Test
+    @KnownToFail
     public void testUnquotedAttributes() throws ParseException {
         String malformedJnlp = originalJnlp.replace("'jnlp.jnlp'", "jnlp.jnlp");
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/ParserTest.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/ParserTest.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/ParserTest.java	(revision 416)
@@ -0,0 +1,1358 @@
+/* ParserTest.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.
+ */
+
+package net.sourceforge.jnlp;
+
+import java.io.ByteArrayInputStream;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Locale;
+
+import net.sourceforge.jnlp.mock.MockJNLPFile;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+/** Test various corner cases of the parser */
+public class ParserTest {
+
+    private static final String LANG = "en";
+    private static final String COUNTRY = "CA";
+    private static final String VARIANT = "utf8";
+    private static final Locale LANG_LOCALE = new Locale(LANG);
+    private static final Locale LANG_COUNTRY_LOCALE = new Locale(LANG, COUNTRY);
+    private static final Locale ALL_LOCALE = new Locale(LANG, COUNTRY, VARIANT);
+
+    @Test(expected = MissingInformationException.class)
+    public void testMissingInfoFullLocale() throws ParseException {
+        String data = "<jnlp></jnlp>\n";
+
+        Node root = Parser.getRootNode(new ByteArrayInputStream(data.getBytes()));
+        Assert.assertEquals("Root name is not jnlp", "jnlp", root.getNodeName());
+
+        MockJNLPFile file = new MockJNLPFile(ALL_LOCALE);
+        Parser parser = new Parser(file, null, root, false, false);
+        parser.getInfo(root);
+    }
+
+    @Test(expected = MissingTitleException.class)
+    public void testEmptyLocalizedInfoFullLocale() throws ParseException {
+        String data = "<jnlp>\n"
+                + "  <information locale='" + LANG + "_" + COUNTRY +  "." + VARIANT + "'>\n"
+                + "  </information>\n"
+                + "</jnlp>\n";
+
+        Node root = Parser.getRootNode(new ByteArrayInputStream(data.getBytes()));
+        Assert.assertEquals("Root name is not jnlp", "jnlp", root.getNodeName());
+
+        MockJNLPFile file = new MockJNLPFile(ALL_LOCALE);
+        Parser parser = new Parser(file, null, root, false, false);
+        List<InformationDesc> infoDescs = new ArrayList<InformationDesc>();
+        infoDescs.addAll(parser.getInfo(root));
+
+        Assert.assertTrue("Exactly one info desc should be found", infoDescs.size() == 1);
+
+        file.setInfo(infoDescs);
+        parser.checkForInformation();
+    }
+
+    @Test
+    public void testOneFullyLocalizedInfoFullLocale() throws ParseException {
+        String data = "<jnlp>\n"
+                + "  <information locale='" + LANG + "_" + COUNTRY +  "." + VARIANT + "'>\n"
+                + "    <title>English_CA_utf8_T</title>\n"
+                + "    <vendor>English_CA_utf8_V</vendor>\n"
+                + "  </information>\n"
+                + "</jnlp>\n";
+
+        Node root = Parser.getRootNode(new ByteArrayInputStream(data.getBytes()));
+        Assert.assertEquals("Root name is not jnlp", "jnlp", root.getNodeName());
+
+        MockJNLPFile file = new MockJNLPFile(ALL_LOCALE);
+        Parser parser = new Parser(file, null, root, false, false);
+        List<InformationDesc> infoDescs = parser.getInfo(root);
+
+        Assert.assertTrue("Exactly one info desc should be found", infoDescs.size() == 1);
+
+        file.setInfo(infoDescs);
+
+        Assert.assertEquals("Title should be `English_CA_utf8_T' but wasn't",
+                "English_CA_utf8_T", file.getTitle());
+        Assert.assertEquals("Vendor should be `English_CA_utf8_V' but wasn't",
+                "English_CA_utf8_V", file.getVendor());
+    }
+
+    @Test
+    public void testOneLangCountryLocalizedInfoFullLocale() throws ParseException {
+        String data = "<jnlp>\n"
+                + "  <information>\n"
+                + "    <title>Generalized_T</title>\n"
+                + "    <vendor>Generalized_V</vendor>\n"
+                + "  </information>\n"
+                + "  <information locale='" + LANG + "_" + COUNTRY + "'>\n"
+                + "    <title>English_CA_T</title>\n"
+                + "    <vendor>English_CA_V</vendor>\n"
+                + "  </information>\n"
+                + "</jnlp>\n";
+
+        Node root = Parser.getRootNode(new ByteArrayInputStream(data.getBytes()));
+        Assert.assertEquals("Root name is not jnlp", "jnlp", root.getNodeName());
+        MockJNLPFile file = new MockJNLPFile(ALL_LOCALE);
+        Parser parser = new Parser(file, null, root, false, false);
+        List<InformationDesc> infoDescs = parser.getInfo(root);
+        Assert.assertTrue("Exactly two info descs should be found", infoDescs.size() == 2);
+
+        file.setInfo(infoDescs);
+        Assert.assertEquals("Title should be `English_CA_T' but wasn't",
+                "English_CA_T", file.getTitle());
+        Assert.assertEquals("Vendor should be `English_CA_V' but wasn't",
+                "English_CA_V", file.getVendor());
+    }
+
+    @Test
+    public void testOneLangLocalizedInfoFullLocale() throws ParseException {
+        String data = "<jnlp>\n"
+                + "  <information>\n"
+                + "    <title>Generalized_T</title>\n"
+                + "    <vendor>Generalized_V</vendor>\n"
+                + "  </information>\n"
+                + "  <information locale='" + LANG + "'>\n"
+                + "    <title>English_T</title>\n"
+                + "    <vendor>English_V</vendor>\n"
+                + "  </information>\n"
+                + "</jnlp>\n";
+
+        Node root = Parser.getRootNode(new ByteArrayInputStream(data.getBytes()));
+        Assert.assertEquals("Root name is not jnlp", "jnlp", root.getNodeName());
+        MockJNLPFile file = new MockJNLPFile(ALL_LOCALE);
+        Parser parser = new Parser(file, null, root, false, false);
+        List<InformationDesc> infoDescs = parser.getInfo(root);
+        Assert.assertTrue("Exactly two info descs should be found", infoDescs.size() == 2);
+
+        file.setInfo(infoDescs);
+        Assert.assertEquals("Title should be `English_T' but wasn't",
+                "English_T", file.getTitle());
+        Assert.assertEquals("Vendor should be `English_V' but wasn't",
+                "English_V", file.getVendor());
+    }
+
+    @Test
+    public void testGeneralizedInfoFullLocale() throws ParseException {
+        String data = "<jnlp>\n"
+                + "  <information>\n"
+                + "    <title>Generalized_T</title>\n"
+                + "    <vendor>Generalized_V</vendor>\n"
+                + "  </information>\n"
+                + "</jnlp>\n";
+
+        Node root = Parser.getRootNode(new ByteArrayInputStream(data.getBytes()));
+        Assert.assertEquals("Root name is not jnlp", "jnlp", root.getNodeName());
+        MockJNLPFile file = new MockJNLPFile(ALL_LOCALE);
+        Parser parser = new Parser(file, null, root, false, false);
+        List<InformationDesc> infoDescs = parser.getInfo(root);
+        Assert.assertTrue("Exactly one info desc should be found", infoDescs.size() == 1);
+
+        file.setInfo(infoDescs);
+        Assert.assertEquals("Title should be `Generalized_T' but wasn't",
+                "Generalized_T", file.getTitle());
+        Assert.assertEquals("Vendor should be `Generalized_V' but wasn't",
+                "Generalized_V", file.getVendor());
+    }
+
+    @Test
+    public void testTwoDifferentLocalizedInfoFullLocale() throws ParseException {
+        String data = "<jnlp>\n"
+                + "  <information>\n"
+                + "    <title>Generalized_T</title>\n"
+                + "    <vendor>Generalized_V</vendor>\n"
+                + "  </information>\n"
+                + "  <information locale='" + LANG + "'>\n"
+                + "    <title>English_T</title>\n"
+                + "    <vendor>English_V</vendor>\n"
+                + "  </information>\n"
+                + "  <information locale='fr'>\n"
+                + "    <title>French_T</title>\n"
+                + "    <vendor>French_V</vendor>\n"
+                + "  </information>\n"
+                + "</jnlp>\n";
+
+        Node root = Parser.getRootNode(new ByteArrayInputStream(data.getBytes()));
+        Assert.assertEquals("Root name is not jnlp", "jnlp", root.getNodeName());
+        MockJNLPFile file = new MockJNLPFile(ALL_LOCALE);
+        Parser parser = new Parser(file, null, root, false, false);
+        List<InformationDesc> infoDescs = parser.getInfo(root);
+        Assert.assertTrue("Exactly three info descs should be found", infoDescs.size() == 3);
+
+        file.setInfo(infoDescs);
+        Assert.assertEquals("Title should be `English_T' but wasn't",
+                "English_T", file.getTitle());
+        Assert.assertEquals("Vendor should be `English_V' but wasn't",
+                "English_V", file.getVendor());
+    }
+
+    @Test
+    public void testTwoLocalizedWithSameLangInfoFullLocale() throws ParseException {
+        String data = "<jnlp>\n"
+                + "  <information>\n"
+                + "    <title>Generalized_T</title>\n"
+                + "    <vendor>Generalized_V</vendor>\n"
+                + "  </information>\n"
+                + "  <information locale='" + LANG + "'>\n"
+                + "    <title>English_T</title>\n"
+                + "    <vendor>English_V</vendor>\n"
+                + "  </information>\n"
+                + "  <information locale='" + LANG + "_" + COUNTRY + "'>\n"
+                + "    <title>English_CA_T</title>\n"
+                + "    <vendor>English_CA_V</vendor>\n"
+                + "  </information>\n"
+                + "</jnlp>\n";
+
+        Node root = Parser.getRootNode(new ByteArrayInputStream(data.getBytes()));
+        Assert.assertEquals("Root name is not jnlp", "jnlp", root.getNodeName());
+        MockJNLPFile file = new MockJNLPFile(ALL_LOCALE);
+        Parser parser = new Parser(file, null, root, false, false);
+        List<InformationDesc> infoDescs = parser.getInfo(root);
+        Assert.assertTrue("Exactly three info descs should be found", infoDescs.size() == 3);
+
+        file.setInfo(infoDescs);
+        Assert.assertEquals("Title should be `English_CA_T' but wasn't",
+                "English_CA_T", file.getTitle());
+        Assert.assertEquals("Vendor should be `English_CA_V' but wasn't",
+                "English_CA_V", file.getVendor());
+    }
+
+    @Test
+    public void testTwoSameLangOneMissingTitleFullLocale() throws ParseException {
+        String data = "<jnlp>\n"
+                + "  <information>\n"
+                + "    <title>Generalized_T</title>\n"
+                + "    <vendor>Generalized_V</vendor>\n"
+                + "  </information>\n"
+                + "  <information locale='" + LANG + "'>\n"
+                + "    <title>English_T</title>\n"
+                + "    <vendor>English_V</vendor>\n"
+                + "  </information>\n"
+                + "  <information locale='" + LANG + "_" + COUNTRY + "'>\n"
+                + "    <vendor>English_CA_V</vendor>\n"
+                + "  </information>\n"
+                + "</jnlp>\n";
+
+        Node root = Parser.getRootNode(new ByteArrayInputStream(data.getBytes()));
+        Assert.assertEquals("Root name is not jnlp", "jnlp", root.getNodeName());
+        MockJNLPFile file = new MockJNLPFile(ALL_LOCALE);
+        Parser parser = new Parser(file, null, root, false, false);
+        List<InformationDesc> infoDescs = parser.getInfo(root);
+        Assert.assertTrue("Exactly three info descs should be found", infoDescs.size() == 3);
+
+        file.setInfo(infoDescs);
+        Assert.assertEquals("Title should be `English_T' but wasn't",
+                "English_T", file.getTitle());
+        Assert.assertEquals("Vendor should be `English_CA_V' but wasn't",
+                "English_CA_V", file.getVendor());
+    }
+
+    @Test
+    public void testTwoSameLangWithGeneralizedTitleFullLocale() throws ParseException {
+        String data = "<jnlp>\n"
+                + "  <information>\n"
+                + "    <title>Generalized_T</title>\n"
+                + "    <vendor>Generalized_V</vendor>\n"
+                + "  </information>\n"
+                + "  <information locale='" + LANG + "'>\n"
+                + "    <vendor>English_V</vendor>\n"
+                + "  </information>\n"
+                + "  <information locale='" + LANG + "_" + COUNTRY + "'>\n"
+                + "    <vendor>English_CA_V</vendor>\n"
+                + "  </information>\n"
+                + "</jnlp>\n";
+
+        Node root = Parser.getRootNode(new ByteArrayInputStream(data.getBytes()));
+        Assert.assertEquals("Root name is not jnlp", "jnlp", root.getNodeName());
+        MockJNLPFile file = new MockJNLPFile(ALL_LOCALE);
+        Parser parser = new Parser(file, null, root, false, false);
+        List<InformationDesc> infoDescs = parser.getInfo(root);
+        Assert.assertTrue("Exactly three info descs should be found", infoDescs.size() == 3);
+
+        file.setInfo(infoDescs);
+        Assert.assertEquals("Title should be `Generalized_T' but wasn't",
+                "Generalized_T", file.getTitle());
+        Assert.assertEquals("Vendor should be `English_CA_V' but wasn't",
+                "English_CA_V", file.getVendor());
+    }
+
+    @Test(expected = MissingTitleException.class)
+    public void testMissingTitleFullLocale() throws ParseException {
+        String data = "<jnlp>\n"
+                + "  <information>\n"
+                + "    <vendor>Generalized_V</vendor>\n"
+                + "  </information>\n"
+                + "  <information locale='" + LANG + "'>\n"
+                + "    <vendor>English_V</vendor>\n"
+                + "  </information>\n"
+                + "  <information locale='" + LANG + "_" + COUNTRY + "'>\n"
+                + "    <vendor>English_CA_V</vendor>\n"
+                + "  </information>\n"
+                + "</jnlp>\n";
+
+        Node root = Parser.getRootNode(new ByteArrayInputStream(data.getBytes()));
+        Assert.assertEquals("Root name is not jnlp", "jnlp", root.getNodeName());
+        MockJNLPFile file = new MockJNLPFile(ALL_LOCALE);
+        Parser parser = new Parser(file, null, root, false, false);
+        List<InformationDesc> infoDescs = new ArrayList<InformationDesc>();
+        infoDescs.addAll(parser.getInfo(root));
+
+        Assert.assertTrue("Exactly three info descs should be found", infoDescs.size() == 3);
+
+        file.setInfo(infoDescs);
+        parser.checkForInformation();
+    }
+
+    @Test(expected = MissingVendorException.class)
+    public void testMissingVendorFullLocale() throws ParseException {
+        String data = "<jnlp>\n"
+                + "  <information>\n"
+                + "    <title>Generalized_T</title>\n"
+                + "  </information>\n"
+                + "  <information locale='" + LANG + "'>\n"
+                + "    <title>English_T</title>\n"
+                + "  </information>\n"
+                + "  <information locale='" + LANG + "_" + COUNTRY + "'>\n"
+                + "    <title>English_CA_T</title>\n"
+                + "  </information>\n"
+                + "</jnlp>\n";
+
+        Node root = Parser.getRootNode(new ByteArrayInputStream(data.getBytes()));
+        Assert.assertEquals("Root name is not jnlp", "jnlp", root.getNodeName());
+        MockJNLPFile file = new MockJNLPFile(ALL_LOCALE);
+        Parser parser = new Parser(file, null, root, false, false);
+        List<InformationDesc> infoDescs = new ArrayList<InformationDesc>();
+        infoDescs.addAll(parser.getInfo(root));
+
+        Assert.assertTrue("Exactly three info descs should be found", infoDescs.size() == 3);
+
+        file.setInfo(infoDescs);
+        parser.checkForInformation();
+    }
+
+    @Test(expected = MissingTitleException.class)
+    public void testMissingLocalizedTitleFullLocale() throws ParseException {
+        String data = "<jnlp>\n"
+                + "  <information>\n"
+                + "    <vendor>Generalized_V</vendor>\n"
+                + "  </information>\n"
+                + "  <information locale='fr'>\n"
+                + "    <vendor>English_CA_V</vendor>\n"
+                + "  </information>\n"
+                + "</jnlp>\n";
+
+        Node root = Parser.getRootNode(new ByteArrayInputStream(data.getBytes()));
+        Assert.assertEquals("Root name is not jnlp", "jnlp", root.getNodeName());
+        MockJNLPFile file = new MockJNLPFile(ALL_LOCALE);
+        Parser parser = new Parser(file, null, root, false, false);
+        List<InformationDesc> infoDescs = new ArrayList<InformationDesc>();
+        infoDescs.addAll(parser.getInfo(root));
+
+        Assert.assertTrue("Exactly two info descs should be found", infoDescs.size() == 2);
+
+        file.setInfo(infoDescs);
+        parser.checkForInformation();
+    }
+
+    @Test(expected = MissingVendorException.class)
+    public void testMissingLocalizedVendorFullLocale() throws ParseException {
+        String data = "<jnlp>\n"
+                + "  <information>\n"
+                + "    <title>Generalized_T</title>\n"
+                + "  </information>\n"
+                + "  <information locale='fr'>\n"
+                + "    <title>English_CA_T</title>\n"
+                + "  </information>\n"
+                + "</jnlp>\n";
+
+        Node root = Parser.getRootNode(new ByteArrayInputStream(data.getBytes()));
+        Assert.assertEquals("Root name is not jnlp", "jnlp", root.getNodeName());
+        MockJNLPFile file = new MockJNLPFile(ALL_LOCALE);
+        Parser parser = new Parser(file, null, root, false, false);
+        List<InformationDesc> infoDescs = new ArrayList<InformationDesc>();
+        infoDescs.addAll(parser.getInfo(root));
+
+        Assert.assertTrue("Exactly two info descs should be found",infoDescs.size() == 2);
+
+        file.setInfo(infoDescs);
+        parser.checkForInformation();
+    }
+
+    @Test(expected = MissingTitleException.class)
+    public void testEmptyLocalizedTitleFullLocale() throws ParseException {
+        String data = "<jnlp>\n"
+                + "  <information locale='" + LANG + "_" + COUNTRY +  "." + VARIANT + "'>\n"
+                + "    <title></title>\n"
+                + "    <vendor>English_CA_utf8_V</vendor>\n"
+                + "  </information>\n"
+                + "</jnlp>\n";
+
+        Node root = Parser.getRootNode(new ByteArrayInputStream(data.getBytes()));
+        Assert.assertEquals("Root name is not jnlp", "jnlp", root.getNodeName());
+
+        MockJNLPFile file = new MockJNLPFile(ALL_LOCALE);
+        Parser parser = new Parser(file, null, root, false, false);
+        List<InformationDesc> infoDescs = new ArrayList<InformationDesc>();
+        infoDescs.addAll(parser.getInfo(root));
+
+        Assert.assertTrue("Exactly one info desc should be found", infoDescs.size() == 1);
+
+        file.setInfo(infoDescs);
+        parser.checkForInformation();
+    }
+
+    @Test(expected = MissingVendorException.class)
+    public void testEmptyLocalizedVendorFullLocale() throws ParseException {
+        String data = "<jnlp>\n"
+                + "  <information locale='" + LANG + "_" + COUNTRY +  "." + VARIANT + "'>\n"
+                + "    <title>English_CA_utf8_T</title>\n"
+                + "    <vendor></vendor>\n"
+                + "  </information>\n"
+                + "</jnlp>\n";
+
+        Node root = Parser.getRootNode(new ByteArrayInputStream(data.getBytes()));
+        Assert.assertEquals("Root name is not jnlp", "jnlp", root.getNodeName());
+
+        MockJNLPFile file = new MockJNLPFile(ALL_LOCALE);
+        Parser parser = new Parser(file, null, root, false, false);
+        List<InformationDesc> infoDescs = new ArrayList<InformationDesc>();
+        infoDescs.addAll(parser.getInfo(root));
+
+        Assert.assertTrue("Exactly one info desc should be found", infoDescs.size() == 1);
+
+        file.setInfo(infoDescs);
+        parser.checkForInformation();
+    }
+
+    @Test
+    public void testFallbackEmptyLocalizedTitleVendorFullLocale() throws ParseException {
+        String data = "<jnlp>\n"
+                + "  <information>\n"
+                + "    <title>Generalized_T</title>\n"
+                + "    <vendor>Generalized_V</vendor>\n"
+                + "  </information>\n"
+                + "  <information locale='" + LANG + "'>\n"
+                + "    <title>English_T</title>\n"
+                + "    <vendor></vendor>\n"
+                + "  </information>\n"
+                + "  <information locale='" + LANG + "_" + COUNTRY + "'>\n"
+                + "    <title></title>\n"
+                + "    <vendor></vendor>\n"
+                + "  </information>\n"
+                + "  <information locale='" + LANG + "_" + COUNTRY +  "." + VARIANT + "'>\n"
+                + "    <title></title>\n"
+                + "    <vendor></vendor>\n"
+                + "  </information>\n"
+                + "  <information locale='fr_" + COUNTRY +  "." + VARIANT + "'>\n"
+                + "    <title>French_CA_utf8_T</title>\n"
+                + "    <vendor>French_CA_utf8_V</vendor>\n"
+                + "  </information>\n"
+                + "</jnlp>\n";
+
+        Node root = Parser.getRootNode(new ByteArrayInputStream(data.getBytes()));
+        Assert.assertEquals("Root name is not jnlp", "jnlp", root.getNodeName());
+
+        MockJNLPFile file = new MockJNLPFile(ALL_LOCALE);
+        Parser parser = new Parser(file, null, root, false, false);
+        List<InformationDesc> infoDescs = parser.getInfo(root);
+
+        Assert.assertTrue("Exactly five info descs should be found", infoDescs.size() == 5);
+
+        file.setInfo(infoDescs);
+
+        Assert.assertEquals("Title should be `English_T' but wasn't",
+                "English_T", file.getTitle());
+        Assert.assertEquals("Vendor should be `Generalized_V' but wasn't",
+                "Generalized_V", file.getVendor());
+
+        parser.checkForInformation();
+    }
+
+    @Test(expected = MissingInformationException.class)
+    public void testMissingInfoLangCountryLocale() throws ParseException {
+        String data = "<jnlp></jnlp>\n";
+
+        Node root = Parser.getRootNode(new ByteArrayInputStream(data.getBytes()));
+        Assert.assertEquals("Root name is not jnlp", "jnlp", root.getNodeName());
+
+        MockJNLPFile file = new MockJNLPFile(LANG_COUNTRY_LOCALE);
+        Parser parser = new Parser(file, null, root, false, false);
+        parser.getInfo(root);
+    }
+
+    @Test(expected = MissingTitleException.class)
+    public void testEmptyLocalizedInfoLangCountryLocale() throws ParseException {
+        String data = "<jnlp>\n"
+                + "  <information locale='" + LANG + "_" + COUNTRY + "'>\n"
+                + "  </information>\n"
+                + "</jnlp>\n";
+
+        Node root = Parser.getRootNode(new ByteArrayInputStream(data.getBytes()));
+        Assert.assertEquals("Root name is not jnlp", "jnlp", root.getNodeName());
+
+        MockJNLPFile file = new MockJNLPFile(LANG_COUNTRY_LOCALE);
+        Parser parser = new Parser(file, null, root, false, false);
+        List<InformationDesc> infoDescs = new ArrayList<InformationDesc>();
+        infoDescs.addAll(parser.getInfo(root));
+
+        Assert.assertTrue("Exactly one info desc should be found", infoDescs.size() == 1);
+
+        file.setInfo(infoDescs);
+        parser.checkForInformation();
+    }
+
+    @Test(expected = MissingTitleException.class)
+    public void testOneFullyLocalizedInfoLangCountryLocale() throws ParseException {
+        String data = "<jnlp>\n"
+                + "  <information locale='" + LANG + "_" + COUNTRY +  "." + VARIANT + "'>\n"
+                + "    <title>English_CA_utf8_T</title>\n"
+                + "    <vendor>English_CA_utf8_V</vendor>\n"
+                + "  </information>\n"
+                + "</jnlp>\n";
+
+        Node root = Parser.getRootNode(new ByteArrayInputStream(data.getBytes()));
+        Assert.assertEquals("Root name is not jnlp", "jnlp", root.getNodeName());
+
+        MockJNLPFile file = new MockJNLPFile(LANG_COUNTRY_LOCALE);
+        Parser parser = new Parser(file, null, root, false, false);
+        List<InformationDesc> infoDescs = parser.getInfo(root);
+
+        Assert.assertTrue("Exactly one info desc should be found", infoDescs.size() == 1);
+
+        file.setInfo(infoDescs);
+        parser.checkForInformation();
+    }
+
+    @Test
+    public void testOneLangCountryLocalizedInfoLangCountryLocale() throws ParseException {
+        String data = "<jnlp>\n"
+                + "  <information>\n"
+                + "    <title>Generalized_T</title>\n"
+                + "    <vendor>Generalized_V</vendor>\n"
+                + "  </information>\n"
+                + "  <information locale='" + LANG + "_" + COUNTRY + "'>\n"
+                + "    <title>English_CA_T</title>\n"
+                + "    <vendor>English_CA_V</vendor>\n"
+                + "  </information>\n"
+                + "</jnlp>\n";
+
+        Node root = Parser.getRootNode(new ByteArrayInputStream(data.getBytes()));
+        Assert.assertEquals("Root name is not jnlp", "jnlp", root.getNodeName());
+        MockJNLPFile file = new MockJNLPFile(LANG_COUNTRY_LOCALE);
+        Parser parser = new Parser(file, null, root, false, false);
+        List<InformationDesc> infoDescs = parser.getInfo(root);
+        Assert.assertTrue("Exactly two info descs should be found", infoDescs.size() == 2);
+
+        file.setInfo(infoDescs);
+        Assert.assertEquals("Title should be `English_CA_T' but wasn't",
+                "English_CA_T", file.getTitle());
+        Assert.assertEquals("Vendor should be `English_CA_V' but wasn't",
+                "English_CA_V", file.getVendor());
+    }
+
+    @Test
+    public void testOneLangLocalizedInfoLangCountryLocale() throws ParseException {
+        String data = "<jnlp>\n"
+                + "  <information>\n"
+                + "    <title>Generalized_T</title>\n"
+                + "    <vendor>Generalized_V</vendor>\n"
+                + "  </information>\n"
+                + "  <information locale='" + LANG + "'>\n"
+                + "    <title>English_T</title>\n"
+                + "    <vendor>English_V</vendor>\n"
+                + "  </information>\n"
+                + "</jnlp>\n";
+
+        Node root = Parser.getRootNode(new ByteArrayInputStream(data.getBytes()));
+        Assert.assertEquals("Root name is not jnlp", "jnlp", root.getNodeName());
+        MockJNLPFile file = new MockJNLPFile(LANG_COUNTRY_LOCALE);
+        Parser parser = new Parser(file, null, root, false, false);
+        List<InformationDesc> infoDescs = parser.getInfo(root);
+        Assert.assertTrue("Exactly two info descs should be found", infoDescs.size() == 2);
+
+        file.setInfo(infoDescs);
+        Assert.assertEquals("Title should be `English_T' but wasn't",
+                "English_T", file.getTitle());
+        Assert.assertEquals("Vendor should be `English_V' but wasn't",
+                "English_V", file.getVendor());
+    }
+
+    @Test
+    public void testGeneralizedInfoLangCountryLocale() throws ParseException {
+        String data = "<jnlp>\n"
+                + "  <information>\n"
+                + "    <title>Generalized_T</title>\n"
+                + "    <vendor>Generalized_V</vendor>\n"
+                + "  </information>\n"
+                + "</jnlp>\n";
+
+        Node root = Parser.getRootNode(new ByteArrayInputStream(data.getBytes()));
+        Assert.assertEquals("Root name is not jnlp", "jnlp", root.getNodeName());
+        MockJNLPFile file = new MockJNLPFile(LANG_COUNTRY_LOCALE);
+        Parser parser = new Parser(file, null, root, false, false);
+        List<InformationDesc> infoDescs = parser.getInfo(root);
+        Assert.assertTrue("Exactly one info desc should be found", infoDescs.size() == 1);
+
+        file.setInfo(infoDescs);
+        Assert.assertEquals("Title should be `Generalized_T' but wasn't",
+                "Generalized_T", file.getTitle());
+        Assert.assertEquals("Vendor should be `Generalized_V' but wasn't",
+                "Generalized_V", file.getVendor());
+    }
+
+    @Test
+    public void testTwoDifferentLocalizedInfoLangCountryLocale() throws ParseException {
+        String data = "<jnlp>\n"
+                + "  <information>\n"
+                + "    <title>Generalized_T</title>\n"
+                + "    <vendor>Generalized_V</vendor>\n"
+                + "  </information>\n"
+                + "  <information locale='" + LANG + "'>\n"
+                + "    <title>English_T</title>\n"
+                + "    <vendor>English_V</vendor>\n"
+                + "  </information>\n"
+                + "  <information locale='fr'>\n"
+                + "    <title>French_T</title>\n"
+                + "    <vendor>French_V</vendor>\n"
+                + "  </information>\n"
+                + "</jnlp>\n";
+
+        Node root = Parser.getRootNode(new ByteArrayInputStream(data.getBytes()));
+        Assert.assertEquals("Root name is not jnlp", "jnlp", root.getNodeName());
+        MockJNLPFile file = new MockJNLPFile(LANG_COUNTRY_LOCALE);
+        Parser parser = new Parser(file, null, root, false, false);
+        List<InformationDesc> infoDescs = parser.getInfo(root);
+        Assert.assertTrue("Exactly three info descs should be found", infoDescs.size() == 3);
+
+        file.setInfo(infoDescs);
+        Assert.assertEquals("Title should be `English_T' but wasn't",
+                "English_T", file.getTitle());
+        Assert.assertEquals("Vendor should be `English_V' but wasn't",
+                "English_V", file.getVendor());
+    }
+
+    @Test
+    public void testTwoLocalizedWithSameLangInfoLangCountryLocale() throws ParseException {
+        String data = "<jnlp>\n"
+                + "  <information>\n"
+                + "    <title>Generalized_T</title>\n"
+                + "    <vendor>Generalized_V</vendor>\n"
+                + "  </information>\n"
+                + "  <information locale='" + LANG + "'>\n"
+                + "    <title>English_T</title>\n"
+                + "    <vendor>English_V</vendor>\n"
+                + "  </information>\n"
+                + "  <information locale='" + LANG + "_" + COUNTRY + "'>\n"
+                + "    <title>English_CA_T</title>\n"
+                + "    <vendor>English_CA_V</vendor>\n"
+                + "  </information>\n"
+                + "</jnlp>\n";
+
+        Node root = Parser.getRootNode(new ByteArrayInputStream(data.getBytes()));
+        Assert.assertEquals("Root name is not jnlp", "jnlp", root.getNodeName());
+        MockJNLPFile file = new MockJNLPFile(LANG_COUNTRY_LOCALE);
+        Parser parser = new Parser(file, null, root, false, false);
+        List<InformationDesc> infoDescs = parser.getInfo(root);
+        Assert.assertTrue("Exactly three info descs should be found", infoDescs.size() == 3);
+
+        file.setInfo(infoDescs);
+        Assert.assertEquals("Title should be `English_CA_T' but wasn't",
+                "English_CA_T", file.getTitle());
+        Assert.assertEquals("Vendor should be `English_CA_V' but wasn't",
+                "English_CA_V", file.getVendor());
+    }
+
+    @Test
+    public void testTwoSameLangOneMissingTitleLangCountryLocale() throws ParseException {
+        String data = "<jnlp>\n"
+                + "  <information>\n"
+                + "    <title>Generalized_T</title>\n"
+                + "    <vendor>Generalized_V</vendor>\n"
+                + "  </information>\n"
+                + "  <information locale='" + LANG + "'>\n"
+                + "    <title>English_T</title>\n"
+                + "    <vendor>English_V</vendor>\n"
+                + "  </information>\n"
+                + "  <information locale='" + LANG + "_" + COUNTRY + "'>\n"
+                + "    <vendor>English_CA_V</vendor>\n"
+                + "  </information>\n"
+                + "</jnlp>\n";
+
+        Node root = Parser.getRootNode(new ByteArrayInputStream(data.getBytes()));
+        Assert.assertEquals("Root name is not jnlp", "jnlp", root.getNodeName());
+        MockJNLPFile file = new MockJNLPFile(LANG_COUNTRY_LOCALE);
+        Parser parser = new Parser(file, null, root, false, false);
+        List<InformationDesc> infoDescs = parser.getInfo(root);
+        Assert.assertTrue("Exactly three info descs should be found", infoDescs.size() == 3);
+
+        file.setInfo(infoDescs);
+        Assert.assertEquals("Title should be `English_T' but wasn't",
+                "English_T", file.getTitle());
+        Assert.assertEquals("Vendor should be `English_CA_V' but wasn't",
+                "English_CA_V", file.getVendor());
+    }
+
+    @Test
+    public void testTwoSameLangWithGeneralizedTitleLangCountryLocale() throws ParseException {
+        String data = "<jnlp>\n"
+                + "  <information>\n"
+                + "    <title>Generalized_T</title>\n"
+                + "    <vendor>Generalized_V</vendor>\n"
+                + "  </information>\n"
+                + "  <information locale='" + LANG + "'>\n"
+                + "    <vendor>English_V</vendor>\n"
+                + "  </information>\n"
+                + "  <information locale='" + LANG + "_" + COUNTRY + "'>\n"
+                + "    <vendor>English_CA_V</vendor>\n"
+                + "  </information>\n"
+                + "</jnlp>\n";
+
+        Node root = Parser.getRootNode(new ByteArrayInputStream(data.getBytes()));
+        Assert.assertEquals("Root name is not jnlp", "jnlp", root.getNodeName());
+        MockJNLPFile file = new MockJNLPFile(LANG_COUNTRY_LOCALE);
+        Parser parser = new Parser(file, null, root, false, false);
+        List<InformationDesc> infoDescs = parser.getInfo(root);
+        Assert.assertTrue("Exactly three info descs should be found", infoDescs.size() == 3);
+
+        file.setInfo(infoDescs);
+        Assert.assertEquals("Title should be `Generalized_T' but wasn't",
+                "Generalized_T", file.getTitle());
+        Assert.assertEquals("Vendor should be `English_CA_V' but wasn't",
+                "English_CA_V", file.getVendor());
+    }
+
+    @Test(expected = MissingTitleException.class)
+    public void testMissingTitleLangCountryLocale() throws ParseException {
+        String data = "<jnlp>\n"
+                + "  <information>\n"
+                + "    <vendor>Generalized_V</vendor>\n"
+                + "  </information>\n"
+                + "  <information locale='" + LANG + "'>\n"
+                + "    <vendor>English_V</vendor>\n"
+                + "  </information>\n"
+                + "  <information locale='" + LANG + "_" + COUNTRY + "'>\n"
+                + "    <vendor>English_CA_V</vendor>\n"
+                + "  </information>\n"
+                + "</jnlp>\n";
+
+        Node root = Parser.getRootNode(new ByteArrayInputStream(data.getBytes()));
+        Assert.assertEquals("Root name is not jnlp", "jnlp", root.getNodeName());
+        MockJNLPFile file = new MockJNLPFile(LANG_COUNTRY_LOCALE);
+        Parser parser = new Parser(file, null, root, false, false);
+        List<InformationDesc> infoDescs = new ArrayList<InformationDesc>();
+        infoDescs.addAll(parser.getInfo(root));
+
+        Assert.assertTrue("Exactly three info descs should be found", infoDescs.size() == 3);
+
+        file.setInfo(infoDescs);
+        parser.checkForInformation();
+    }
+
+    @Test(expected = MissingVendorException.class)
+    public void testMissingVendorLangCountryLocale() throws ParseException {
+        String data = "<jnlp>\n"
+                + "  <information>\n"
+                + "    <title>Generalized_T</title>\n"
+                + "  </information>\n"
+                + "  <information locale='" + LANG + "'>\n"
+                + "    <title>English_T</title>\n"
+                + "  </information>\n"
+                + "  <information locale='" + LANG + "_" + COUNTRY + "'>\n"
+                + "    <title>English_CA_T</title>\n"
+                + "  </information>\n"
+                + "</jnlp>\n";
+
+        Node root = Parser.getRootNode(new ByteArrayInputStream(data.getBytes()));
+        Assert.assertEquals("Root name is not jnlp", "jnlp", root.getNodeName());
+        MockJNLPFile file = new MockJNLPFile(LANG_COUNTRY_LOCALE);
+        Parser parser = new Parser(file, null, root, false, false);
+        List<InformationDesc> infoDescs = new ArrayList<InformationDesc>();
+        infoDescs.addAll(parser.getInfo(root));
+
+        Assert.assertTrue("Exactly three info descs should be found", infoDescs.size() == 3);
+
+        file.setInfo(infoDescs);
+        parser.checkForInformation();
+    }
+
+    @Test(expected = MissingTitleException.class)
+    public void testMissingLocalizedTitleLangCountryLocale() throws ParseException {
+        String data = "<jnlp>\n"
+                + "  <information>\n"
+                + "    <vendor>Generalized_V</vendor>\n"
+                + "  </information>\n"
+                + "  <information locale='fr'>\n"
+                + "    <vendor>English_CA_V</vendor>\n"
+                + "  </information>\n"
+                + "</jnlp>\n";
+
+        Node root = Parser.getRootNode(new ByteArrayInputStream(data.getBytes()));
+        Assert.assertEquals("Root name is not jnlp", "jnlp", root.getNodeName());
+        MockJNLPFile file = new MockJNLPFile(LANG_COUNTRY_LOCALE);
+        Parser parser = new Parser(file, null, root, false, false);
+        List<InformationDesc> infoDescs = new ArrayList<InformationDesc>();
+        infoDescs.addAll(parser.getInfo(root));
+
+        Assert.assertTrue("Exactly two info descs should be found", infoDescs.size() == 2);
+
+        file.setInfo(infoDescs);
+        parser.checkForInformation();
+    }
+
+    @Test(expected = MissingVendorException.class)
+    public void testMissingLocalizedVendorLangCountryLocale() throws ParseException {
+        String data = "<jnlp>\n"
+                + "  <information>\n"
+                + "    <title>Generalized_T</title>\n"
+                + "  </information>\n"
+                + "  <information locale='fr'>\n"
+                + "    <title>English_CA_T</title>\n"
+                + "  </information>\n"
+                + "</jnlp>\n";
+
+        Node root = Parser.getRootNode(new ByteArrayInputStream(data.getBytes()));
+        Assert.assertEquals("Root name is not jnlp", "jnlp", root.getNodeName());
+        MockJNLPFile file = new MockJNLPFile(LANG_COUNTRY_LOCALE);
+        Parser parser = new Parser(file, null, root, false, false);
+        List<InformationDesc> infoDescs = new ArrayList<InformationDesc>();
+        infoDescs.addAll(parser.getInfo(root));
+
+        Assert.assertTrue("Exactly two info descs should be found",infoDescs.size() == 2);
+
+        file.setInfo(infoDescs);
+        parser.checkForInformation();
+    }
+
+    @Test(expected = MissingTitleException.class)
+    public void testEmptyLocalizedTitleLangCountryLocale() throws ParseException {
+        String data = "<jnlp>\n"
+                + "  <information locale='" + LANG + "_" + COUNTRY + "'>\n"
+                + "    <title></title>\n"
+                + "    <vendor>English_CA_utf8_V</vendor>\n"
+                + "  </information>\n"
+                + "</jnlp>\n";
+
+        Node root = Parser.getRootNode(new ByteArrayInputStream(data.getBytes()));
+        Assert.assertEquals("Root name is not jnlp", "jnlp", root.getNodeName());
+
+        MockJNLPFile file = new MockJNLPFile(LANG_COUNTRY_LOCALE);
+        Parser parser = new Parser(file, null, root, false, false);
+        List<InformationDesc> infoDescs = new ArrayList<InformationDesc>();
+        infoDescs.addAll(parser.getInfo(root));
+
+        Assert.assertTrue("Exactly one info desc should be found", infoDescs.size() == 1);
+
+        file.setInfo(infoDescs);
+        parser.checkForInformation();
+    }
+
+    @Test(expected = MissingVendorException.class)
+    public void testEmptyLocalizedVendorLangCountryLocale() throws ParseException {
+        String data = "<jnlp>\n"
+                + "  <information locale='" + LANG + "_" + COUNTRY + "'>\n"
+                + "    <title>English_CA_utf8_T</title>\n"
+                + "    <vendor></vendor>\n"
+                + "  </information>\n"
+                + "</jnlp>\n";
+
+        Node root = Parser.getRootNode(new ByteArrayInputStream(data.getBytes()));
+        Assert.assertEquals("Root name is not jnlp", "jnlp", root.getNodeName());
+
+        MockJNLPFile file = new MockJNLPFile(LANG_COUNTRY_LOCALE);
+        Parser parser = new Parser(file, null, root, false, false);
+        List<InformationDesc> infoDescs = new ArrayList<InformationDesc>();
+        infoDescs.addAll(parser.getInfo(root));
+
+        Assert.assertTrue("Exactly one info desc should be found", infoDescs.size() == 1);
+
+        file.setInfo(infoDescs);
+        parser.checkForInformation();
+    }
+
+    @Test
+    public void testFallbackEmptyLocalizedTitleVendorLangCountryLocale() throws ParseException {
+        String data = "<jnlp>\n"
+                + "  <information>\n"
+                + "    <title>Generalized_T</title>\n"
+                + "    <vendor>Generalized_V</vendor>\n"
+                + "  </information>\n"
+                + "  <information locale='" + LANG + "'>\n"
+                + "    <title>English_T</title>\n"
+                + "    <vendor></vendor>\n"
+                + "  </information>\n"
+                + "  <information locale='" + LANG + "_" + COUNTRY + "'>\n"
+                + "    <title></title>\n"
+                + "    <vendor></vendor>\n"
+                + "  </information>\n"
+                + "  <information locale='" + LANG + "_" + COUNTRY +  "." + VARIANT + "'>\n"
+                + "    <title></title>\n"
+                + "    <vendor></vendor>\n"
+                + "  </information>\n"
+                + "  <information locale='fr_" + COUNTRY +  "." + VARIANT + "'>\n"
+                + "    <title>French_CA_utf8_T</title>\n"
+                + "    <vendor>French_CA_utf8_V</vendor>\n"
+                + "  </information>\n"
+                + "</jnlp>\n";
+
+        Node root = Parser.getRootNode(new ByteArrayInputStream(data.getBytes()));
+        Assert.assertEquals("Root name is not jnlp", "jnlp", root.getNodeName());
+
+        MockJNLPFile file = new MockJNLPFile(LANG_COUNTRY_LOCALE);
+        Parser parser = new Parser(file, null, root, false, false);
+        List<InformationDesc> infoDescs = parser.getInfo(root);
+
+        Assert.assertTrue("Exactly five info descs should be found", infoDescs.size() == 5);
+
+        file.setInfo(infoDescs);
+
+        Assert.assertEquals("Title should be `English_T' but wasn't",
+                "English_T", file.getTitle());
+        Assert.assertEquals("Vendor should be `Generalized_V' but wasn't",
+                "Generalized_V", file.getVendor());
+
+        parser.checkForInformation();
+    }
+
+    @Test(expected = MissingInformationException.class)
+    public void testMissingInfoLangLocale() throws ParseException {
+        String data = "<jnlp></jnlp>\n";
+
+        Node root = Parser.getRootNode(new ByteArrayInputStream(data.getBytes()));
+        Assert.assertEquals("Root name is not jnlp", "jnlp", root.getNodeName());
+
+        MockJNLPFile file = new MockJNLPFile(LANG_LOCALE);
+        Parser parser = new Parser(file, null, root, false, false);
+        parser.getInfo(root);
+    }
+
+    @Test(expected = MissingTitleException.class)
+    public void testEmptyLocalizedInfoLangLocale() throws ParseException {
+        String data = "<jnlp>\n"
+                + "  <information locale='" + LANG + "'>\n"
+                + "  </information>\n"
+                + "</jnlp>\n";
+
+        Node root = Parser.getRootNode(new ByteArrayInputStream(data.getBytes()));
+        Assert.assertEquals("Root name is not jnlp", "jnlp", root.getNodeName());
+
+        MockJNLPFile file = new MockJNLPFile(LANG_LOCALE);
+        Parser parser = new Parser(file, null, root, false, false);
+        List<InformationDesc> infoDescs = new ArrayList<InformationDesc>();
+        infoDescs.addAll(parser.getInfo(root));
+
+        Assert.assertTrue("Exactly one info desc should be found", infoDescs.size() == 1);
+
+        file.setInfo(infoDescs);
+        parser.checkForInformation();
+    }
+
+    @Test(expected = MissingTitleException.class)
+    public void testOneFullyLocalizedInfoLangLocale() throws ParseException {
+        String data = "<jnlp>\n"
+                + "  <information locale='" + LANG + "_" + COUNTRY +  "." + VARIANT + "'>\n"
+                + "    <title>English_CA_utf8_T</title>\n"
+                + "    <vendor>English_CA_utf8_V</vendor>\n"
+                + "  </information>\n"
+                + "</jnlp>\n";
+
+        Node root = Parser.getRootNode(new ByteArrayInputStream(data.getBytes()));
+        Assert.assertEquals("Root name is not jnlp", "jnlp", root.getNodeName());
+
+        MockJNLPFile file = new MockJNLPFile(LANG_LOCALE);
+        Parser parser = new Parser(file, null, root, false, false);
+        List<InformationDesc> infoDescs = parser.getInfo(root);
+
+        Assert.assertTrue("Exactly one info desc should be found", infoDescs.size() == 1);
+
+        file.setInfo(infoDescs);
+        parser.checkForInformation();
+    }
+
+    @Test(expected = MissingTitleException.class)
+    public void testOneLangCountryLocalizedInfoLangLocale() throws ParseException {
+        String data = "<jnlp>\n"
+                + "  <information locale='" + LANG + "_" + COUNTRY + "'>\n"
+                + "    <title>English_CA_T</title>\n"
+                + "    <vendor>English_CA_V</vendor>\n"
+                + "  </information>\n"
+                + "</jnlp>\n";
+
+        Node root = Parser.getRootNode(new ByteArrayInputStream(data.getBytes()));
+        Assert.assertEquals("Root name is not jnlp", "jnlp", root.getNodeName());
+        MockJNLPFile file = new MockJNLPFile(LANG_LOCALE);
+        Parser parser = new Parser(file, null, root, false, false);
+        List<InformationDesc> infoDescs = parser.getInfo(root);
+        Assert.assertTrue("Exactly one info desc should be found", infoDescs.size() == 1);
+
+        file.setInfo(infoDescs);
+        parser.checkForInformation();
+    }
+
+    @Test
+    public void testOneLangLocalizedInfoLangLocale() throws ParseException {
+        String data = "<jnlp>\n"
+                + "  <information>\n"
+                + "    <title>Generalized_T</title>\n"
+                + "    <vendor>Generalized_V</vendor>\n"
+                + "  </information>\n"
+                + "  <information locale='" + LANG + "'>\n"
+                + "    <title>English_T</title>\n"
+                + "    <vendor>English_V</vendor>\n"
+                + "  </information>\n"
+                + "</jnlp>\n";
+
+        Node root = Parser.getRootNode(new ByteArrayInputStream(data.getBytes()));
+        Assert.assertEquals("Root name is not jnlp", "jnlp", root.getNodeName());
+        MockJNLPFile file = new MockJNLPFile(LANG_LOCALE);
+        Parser parser = new Parser(file, null, root, false, false);
+        List<InformationDesc> infoDescs = parser.getInfo(root);
+        Assert.assertTrue("Exactly two info descs should be found", infoDescs.size() == 2);
+
+        file.setInfo(infoDescs);
+        Assert.assertEquals("Title should be `English_T' but wasn't",
+                "English_T", file.getTitle());
+        Assert.assertEquals("Vendor should be `English_V' but wasn't",
+                "English_V", file.getVendor());
+    }
+
+    @Test
+    public void testGeneralizedInfoLangLocale() throws ParseException {
+        String data = "<jnlp>\n"
+                + "  <information>\n"
+                + "    <title>Generalized_T</title>\n"
+                + "    <vendor>Generalized_V</vendor>\n"
+                + "  </information>\n"
+                + "</jnlp>\n";
+
+        Node root = Parser.getRootNode(new ByteArrayInputStream(data.getBytes()));
+        Assert.assertEquals("Root name is not jnlp", "jnlp", root.getNodeName());
+        MockJNLPFile file = new MockJNLPFile(LANG_LOCALE);
+        Parser parser = new Parser(file, null, root, false, false);
+        List<InformationDesc> infoDescs = parser.getInfo(root);
+        Assert.assertTrue("Exactly one info desc should be found", infoDescs.size() == 1);
+
+        file.setInfo(infoDescs);
+        Assert.assertEquals("Title should be `Generalized_T' but wasn't",
+                "Generalized_T", file.getTitle());
+        Assert.assertEquals("Vendor should be `Generalized_V' but wasn't",
+                "Generalized_V", file.getVendor());
+    }
+
+    @Test
+    public void testTwoDifferentLocalizedInfoLangLocale() throws ParseException {
+        String data = "<jnlp>\n"
+                + "  <information>\n"
+                + "    <title>Generalized_T</title>\n"
+                + "    <vendor>Generalized_V</vendor>\n"
+                + "  </information>\n"
+                + "  <information locale='" + LANG + "'>\n"
+                + "    <title>English_T</title>\n"
+                + "    <vendor>English_V</vendor>\n"
+                + "  </information>\n"
+                + "  <information locale='fr'>\n"
+                + "    <title>French_T</title>\n"
+                + "    <vendor>French_V</vendor>\n"
+                + "  </information>\n"
+                + "</jnlp>\n";
+
+        Node root = Parser.getRootNode(new ByteArrayInputStream(data.getBytes()));
+        Assert.assertEquals("Root name is not jnlp", "jnlp", root.getNodeName());
+        MockJNLPFile file = new MockJNLPFile(LANG_LOCALE);
+        Parser parser = new Parser(file, null, root, false, false);
+        List<InformationDesc> infoDescs = parser.getInfo(root);
+        Assert.assertTrue("Exactly three info descs should be found", infoDescs.size() == 3);
+
+        file.setInfo(infoDescs);
+        Assert.assertEquals("Title should be `English_T' but wasn't",
+                "English_T", file.getTitle());
+        Assert.assertEquals("Vendor should be `English_V' but wasn't",
+                "English_V", file.getVendor());
+    }
+
+    @Test
+    public void testTwoLocalizedWithSameLangInfoLangLocale() throws ParseException {
+        String data = "<jnlp>\n"
+                + "  <information>\n"
+                + "    <title>Generalized_T</title>\n"
+                + "    <vendor>Generalized_V</vendor>\n"
+                + "  </information>\n"
+                + "  <information locale='" + LANG + "'>\n"
+                + "    <title>English_T</title>\n"
+                + "    <vendor>English_V</vendor>\n"
+                + "  </information>\n"
+                + "  <information locale='" + LANG + "_" + COUNTRY + "'>\n"
+                + "    <title>English_CA_T</title>\n"
+                + "    <vendor>English_CA_V</vendor>\n"
+                + "  </information>\n"
+                + "</jnlp>\n";
+
+        Node root = Parser.getRootNode(new ByteArrayInputStream(data.getBytes()));
+        Assert.assertEquals("Root name is not jnlp", "jnlp", root.getNodeName());
+        MockJNLPFile file = new MockJNLPFile(LANG_LOCALE);
+        Parser parser = new Parser(file, null, root, false, false);
+        List<InformationDesc> infoDescs = parser.getInfo(root);
+        Assert.assertTrue("Exactly three info descs should be found", infoDescs.size() == 3);
+
+        file.setInfo(infoDescs);
+        Assert.assertEquals("Title should be `English_T' but wasn't",
+                "English_T", file.getTitle());
+        Assert.assertEquals("Vendor should be `English_V' but wasn't",
+                "English_V", file.getVendor());
+    }
+
+    @Test
+    public void testTwoSameLangOneMissingTitleLangLocale() throws ParseException {
+        String data = "<jnlp>\n"
+                + "  <information>\n"
+                + "    <title>Generalized_T</title>\n"
+                + "    <vendor>Generalized_V</vendor>\n"
+                + "  </information>\n"
+                + "  <information locale='" + LANG + "'>\n"
+                + "    <title>English_T</title>\n"
+                + "  </information>\n"
+                + "</jnlp>\n";
+
+        Node root = Parser.getRootNode(new ByteArrayInputStream(data.getBytes()));
+        Assert.assertEquals("Root name is not jnlp", "jnlp", root.getNodeName());
+        MockJNLPFile file = new MockJNLPFile(LANG_LOCALE);
+        Parser parser = new Parser(file, null, root, false, false);
+        List<InformationDesc> infoDescs = parser.getInfo(root);
+        Assert.assertTrue("Exactly two info descs should be found", infoDescs.size() == 2);
+
+        file.setInfo(infoDescs);
+        Assert.assertEquals("Title should be `English_T' but wasn't",
+                "English_T", file.getTitle());
+        Assert.assertEquals("Vendor should be `Generalized_V' but wasn't",
+                "Generalized_V", file.getVendor());
+    }
+
+    @Test(expected = MissingTitleException.class)
+    public void testMissingTitleLangLocale() throws ParseException {
+        String data = "<jnlp>\n"
+                + "  <information>\n"
+                + "    <vendor>Generalized_V</vendor>\n"
+                + "  </information>\n"
+                + "  <information locale='" + LANG + "'>\n"
+                + "    <vendor>English_V</vendor>\n"
+                + "  </information>\n"
+                + "  <information locale='" + LANG + "_" + COUNTRY + "'>\n"
+                + "    <vendor>English_CA_V</vendor>\n"
+                + "  </information>\n"
+                + "</jnlp>\n";
+
+        Node root = Parser.getRootNode(new ByteArrayInputStream(data.getBytes()));
+        Assert.assertEquals("Root name is not jnlp", "jnlp", root.getNodeName());
+        MockJNLPFile file = new MockJNLPFile(LANG_LOCALE);
+        Parser parser = new Parser(file, null, root, false, false);
+        List<InformationDesc> infoDescs = new ArrayList<InformationDesc>();
+        infoDescs.addAll(parser.getInfo(root));
+
+        Assert.assertTrue("Exactly three info descs should be found", infoDescs.size() == 3);
+
+        file.setInfo(infoDescs);
+        parser.checkForInformation();
+    }
+
+    @Test(expected = MissingVendorException.class)
+    public void testMissingVendorLangLocale() throws ParseException {
+        String data = "<jnlp>\n"
+                + "  <information>\n"
+                + "    <title>Generalized_T</title>\n"
+                + "  </information>\n"
+                + "  <information locale='" + LANG + "'>\n"
+                + "    <title>English_T</title>\n"
+                + "  </information>\n"
+                + "  <information locale='" + LANG + "_" + COUNTRY + "'>\n"
+                + "    <title>English_CA_T</title>\n"
+                + "  </information>\n"
+                + "</jnlp>\n";
+
+        Node root = Parser.getRootNode(new ByteArrayInputStream(data.getBytes()));
+        Assert.assertEquals("Root name is not jnlp", "jnlp", root.getNodeName());
+        MockJNLPFile file = new MockJNLPFile(LANG_LOCALE);
+        Parser parser = new Parser(file, null, root, false, false);
+        List<InformationDesc> infoDescs = new ArrayList<InformationDesc>();
+        infoDescs.addAll(parser.getInfo(root));
+
+        Assert.assertTrue("Exactly three info descs should be found", infoDescs.size() == 3);
+
+        file.setInfo(infoDescs);
+        parser.checkForInformation();
+    }
+
+    @Test(expected = MissingTitleException.class)
+    public void testMissingLocalizedTitleLangLocale() throws ParseException {
+        String data = "<jnlp>\n"
+                + "  <information>\n"
+                + "    <vendor>Generalized_V</vendor>\n"
+                + "  </information>\n"
+                + "  <information locale='fr'>\n"
+                + "    <vendor>English_CA_V</vendor>\n"
+                + "  </information>\n"
+                + "</jnlp>\n";
+
+        Node root = Parser.getRootNode(new ByteArrayInputStream(data.getBytes()));
+        Assert.assertEquals("Root name is not jnlp", "jnlp", root.getNodeName());
+        MockJNLPFile file = new MockJNLPFile(LANG_LOCALE);
+        Parser parser = new Parser(file, null, root, false, false);
+        List<InformationDesc> infoDescs = new ArrayList<InformationDesc>();
+        infoDescs.addAll(parser.getInfo(root));
+
+        Assert.assertTrue("Exactly two info descs should be found", infoDescs.size() == 2);
+
+        file.setInfo(infoDescs);
+        parser.checkForInformation();
+    }
+
+    @Test(expected = MissingVendorException.class)
+    public void testMissingLocalizedVendorLangLocale() throws ParseException {
+        String data = "<jnlp>\n"
+                + "  <information>\n"
+                + "    <title>Generalized_T</title>\n"
+                + "  </information>\n"
+                + "  <information locale='fr'>\n"
+                + "    <title>English_CA_T</title>\n"
+                + "  </information>\n"
+                + "</jnlp>\n";
+
+        Node root = Parser.getRootNode(new ByteArrayInputStream(data.getBytes()));
+        Assert.assertEquals("Root name is not jnlp", "jnlp", root.getNodeName());
+        MockJNLPFile file = new MockJNLPFile(LANG_LOCALE);
+        Parser parser = new Parser(file, null, root, false, false);
+        List<InformationDesc> infoDescs = new ArrayList<InformationDesc>();
+        infoDescs.addAll(parser.getInfo(root));
+
+        Assert.assertTrue("Exactly two info descs should be found",infoDescs.size() == 2);
+
+        file.setInfo(infoDescs);
+        parser.checkForInformation();
+    }
+
+    @Test(expected = MissingTitleException.class)
+    public void testEmptyLocalizedTitleLangLocale() throws ParseException {
+        String data = "<jnlp>\n"
+                + "  <information locale='" + LANG + "'>\n"
+                + "    <title></title>\n"
+                + "    <vendor>English_CA_utf8_V</vendor>\n"
+                + "  </information>\n"
+                + "</jnlp>\n";
+
+        Node root = Parser.getRootNode(new ByteArrayInputStream(data.getBytes()));
+        Assert.assertEquals("Root name is not jnlp", "jnlp", root.getNodeName());
+
+        MockJNLPFile file = new MockJNLPFile(LANG_LOCALE);
+        Parser parser = new Parser(file, null, root, false, false);
+        List<InformationDesc> infoDescs = new ArrayList<InformationDesc>();
+        infoDescs.addAll(parser.getInfo(root));
+
+        Assert.assertTrue("Exactly one info desc should be found", infoDescs.size() == 1);
+
+        file.setInfo(infoDescs);
+        parser.checkForInformation();
+    }
+
+    @Test(expected = MissingVendorException.class)
+    public void testEmptyLocalizedVendorLangLocale() throws ParseException {
+        String data = "<jnlp>\n"
+                + "  <information locale='" + LANG + "'>\n"
+                + "    <title>English_CA_utf8_T</title>\n"
+                + "    <vendor></vendor>\n"
+                + "  </information>\n"
+                + "</jnlp>\n";
+
+        Node root = Parser.getRootNode(new ByteArrayInputStream(data.getBytes()));
+        Assert.assertEquals("Root name is not jnlp", "jnlp", root.getNodeName());
+
+        MockJNLPFile file = new MockJNLPFile(LANG_LOCALE);
+        Parser parser = new Parser(file, null, root, false, false);
+        List<InformationDesc> infoDescs = new ArrayList<InformationDesc>();
+        infoDescs.addAll(parser.getInfo(root));
+
+        Assert.assertTrue("Exactly one info desc should be found", infoDescs.size() == 1);
+
+        file.setInfo(infoDescs);
+        parser.checkForInformation();
+    }
+
+    @Test
+    public void testFallbackEmptyLocalizedTitleVendorLangLocale() throws ParseException {
+        String data = "<jnlp>\n"
+                + "  <information>\n"
+                + "    <title>Generalized_T</title>\n"
+                + "    <vendor>Generalized_V</vendor>\n"
+                + "  </information>\n"
+                + "  <information locale='" + LANG + "'>\n"
+                + "    <title>English_T</title>\n"
+                + "    <vendor></vendor>\n"
+                + "  </information>\n"
+                + "  <information locale='" + LANG + "_" + COUNTRY + "'>\n"
+                + "    <title></title>\n"
+                + "    <vendor></vendor>\n"
+                + "  </information>\n"
+                + "  <information locale='" + LANG + "_" + COUNTRY +  "." + VARIANT + "'>\n"
+                + "    <title></title>\n"
+                + "    <vendor></vendor>\n"
+                + "  </information>\n"
+                + "  <information locale='fr_" + COUNTRY +  "." + VARIANT + "'>\n"
+                + "    <title>French_CA_utf8_T</title>\n"
+                + "    <vendor>French_CA_utf8_V</vendor>\n"
+                + "  </information>\n"
+                + "</jnlp>\n";
+
+        Node root = Parser.getRootNode(new ByteArrayInputStream(data.getBytes()));
+        Assert.assertEquals("Root name is not jnlp", "jnlp", root.getNodeName());
+
+        MockJNLPFile file = new MockJNLPFile(LANG_LOCALE);
+        Parser parser = new Parser(file, null, root, false, false);
+        List<InformationDesc> infoDescs = parser.getInfo(root);
+
+        Assert.assertTrue("Exactly five info descs should be found", infoDescs.size() == 5);
+
+        file.setInfo(infoDescs);
+
+        Assert.assertEquals("Title should be `English_T' but wasn't",
+                "English_T", file.getTitle());
+        Assert.assertEquals("Vendor should be `Generalized_V' but wasn't",
+                "Generalized_V", file.getVendor());
+
+        parser.checkForInformation();
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/PluginBridgeTest.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/PluginBridgeTest.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/PluginBridgeTest.java	(revision 416)
@@ -0,0 +1,99 @@
+/*
+ * Copyright 2012 Red Hat, Inc.
+ * This file is part of IcedTea, http://icedtea.classpath.org
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code 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
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+package net.sourceforge.jnlp;
+
+import static org.junit.Assert.assertEquals;
+
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Hashtable;
+
+import net.sourceforge.jnlp.cache.UpdatePolicy;
+
+import org.junit.Test;
+
+public class PluginBridgeTest {
+    private class MockJNLPCreator extends JNLPCreator {
+
+        private URL JNLPHref;
+
+        public URL getJNLPHref() {
+            return JNLPHref;
+        }
+
+        public JNLPFile create(URL location, Version version, boolean strict,
+                UpdatePolicy policy, URL forceCodebase) throws IOException, ParseException {
+            JNLPHref = location;
+            return new MockJNLPFile();
+        }
+    }
+
+    private class MockJNLPFile extends JNLPFile {
+        public AppletDesc getApplet() {
+            return new AppletDesc(null, null, null, 0, 0, new HashMap<String, String>());
+        }
+
+        public ResourcesDesc getResources() {
+            return new ResourcesDesc(null, null, null, null);
+        }
+    }
+
+    @Test
+    public void testAbsoluteJNLPHref() throws MalformedURLException, Exception {
+        URL codeBase = new URL("http://undesired.absolute.codebase.com");
+        String absoluteLocation = "http://absolute.href.com/test.jnlp";
+        Hashtable<String, String> atts = new Hashtable<String, String>();
+        atts.put("jnlp_href", absoluteLocation);
+        MockJNLPCreator mockCreator = new MockJNLPCreator();
+        PluginBridge pb = new PluginBridge(codeBase, null, "", "", 0, 0, atts, "", mockCreator);
+        assertEquals(absoluteLocation, mockCreator.getJNLPHref().toExternalForm());
+    }
+
+    @Test
+    public void testRelativeJNLPHref() throws MalformedURLException, Exception {
+        URL codeBase = new URL("http://desired.absolute.codebase.com/");
+        String relativeLocation = "sub/dir/test.jnlp";
+        Hashtable<String, String> atts = new Hashtable<String, String>();
+        atts.put("jnlp_href", relativeLocation);
+        MockJNLPCreator mockCreator = new MockJNLPCreator();
+        PluginBridge pb = new PluginBridge(codeBase, null, "", "", 0, 0, atts, "", mockCreator);
+        assertEquals(codeBase.toExternalForm() + relativeLocation,
+                     mockCreator.getJNLPHref().toExternalForm());
+    }
+
+    @Test
+    public void testNoSubDirInCodeBase() throws MalformedURLException, Exception {
+        String desiredDomain = "http://desired.absolute.codebase.com";
+        URL codeBase = new URL(desiredDomain + "/undesired/sub/dir");
+        String relativeLocation = "/app/test/test.jnlp";
+        Hashtable<String, String> atts = new Hashtable<String, String>();
+        atts.put("jnlp_href", relativeLocation);
+        MockJNLPCreator mockCreator = new MockJNLPCreator();
+        PluginBridge pb = new PluginBridge(codeBase, null, "", "", 0, 0, atts, "", mockCreator);
+        assertEquals(desiredDomain + relativeLocation,
+                     mockCreator.getJNLPHref().toExternalForm());
+    }
+
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/application/application0.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/application/application0.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/application/application0.jnlp	(revision 416)
@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+<jnlp spec="1.5+" 
+      codebase="file" 
+      href="www.redhat.com"    
+      >
+  
+   <![CDATA[
+    Text you want to escape goes here...
+    <test> random tag test </test>
+  ]]>
+  
+ <information>
+    <title>Sample Test</title>
+    <vendor>RedHat</vendor>
+    <offline-allowed/>
+
+  </information>
+
+
+  <resources>
+    <j2se version='1.6+' />
+    <jar href='myResource.jar' main='true' />
+  </resources>
+
+
+  <application-desc main-class='Test' />
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/application/application1.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/application/application1.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/application/application1.jnlp	(revision 416)
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<jnlp spec="1.5+" codebase="file" href="www.redhat.com">
+  <information>
+    <title>Sample Test</title>
+    <vendor>RedHat</vendor>
+    <offline-allowed />
+  </information>
+  <resources>
+    <j2se version='1.6+' />
+    <jar href='myResource.jar' main='true' />
+  </resources>
+  <application-desc main-class='Test' />
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/application/application2.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/application/application2.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/application/application2.jnlp	(revision 416)
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<jnlp spec="1.5+" href="www.redhat.com" codebase="file">
+  <resources>
+    <jar main='true' href='myResource.jar' />
+    <j2se version='1.6+' />
+  </resources>
+  <information>
+    <vendor>RedHat</vendor>
+    <title>Sample Test</title>
+    <offline-allowed />
+  </information>
+  <application-desc main-class='Test' />
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/application/application3.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/application/application3.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/application/application3.jnlp	(revision 416)
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<jnlp spec="1.5+" codebase="file" href="www.redhat.com">
+  <information>
+    <!-- This is my comment-->
+    <title>Sample Test</title>
+    <vendor>RedHat</vendor>
+    <offline-allowed />
+    <!-- This is my comment-->
+  </information>
+  <!-- This is my comment-->
+  <resources>
+    <j2se version='1.6+' />
+    <jar href='myResource.jar' main='true' />
+  </resources>
+  <!-- This is my comment-->
+  <application-desc main-class='Test' />
+</jnlp>
+<!-- This is my comment-->
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/application/application4.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/application/application4.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/application/application4.jnlp	(revision 416)
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<jnlp spec="1.5+" codebase="file" href="*">
+  <information>
+    <title>Sample Test</title>
+    <vendor>*</vendor>
+    <offline-allowed />
+  </information>
+  <resources>
+    <j2se version='1.6+' />
+    <jar href='myResource.jar' main='true' />
+  </resources>
+  <application-desc main-class='Test' />
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/application/application5.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/application/application5.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/application/application5.jnlp	(revision 416)
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<jnlp spec="1.5+" codebase="somefile" href="www.redhat.com">
+  <information>
+    <title>Sample Test</title>
+    <vendor>RedHat</vendor>
+    <offline-allowed />
+  </information>
+  <resources>
+    <j2se version='1.6+' />
+    <jar href='myResource.jar' main='true' />
+  </resources>
+  <application-desc main-class='Test' />
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/application/application6.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/application/application6.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/application/application6.jnlp	(revision 416)
@@ -0,0 +1,16 @@
+<?xml version="1.0"?>
+<jnlp spec="1.5+" codebase="file" href="www.redhat.com">
+  <information>
+    <title>Sample Test</title>
+    <vendor>RedHat</vendor>
+    <offline-allowed />
+    <shortcut>
+      <desktop />
+    </shortcut>
+  </information>
+  <resources>
+    <j2se version='1.6+' />
+    <jar href='myResource.jar' main='true' />
+  </resources>
+  <application-desc main-class='Test' />
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/application/application7.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/application/application7.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/application/application7.jnlp	(revision 416)
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>
+<jnlp spec="1.5+" codebase="file" href="www.redhat.com">
+  <information>
+    <title>Sample Test</title>
+    <vendor>RedHat</vendor>
+  </information>
+  <resources>
+    <j2se version='1.6+' />
+  </resources>
+  <application-desc main-class='Test' />
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/application/application8.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/application/application8.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/application/application8.jnlp	(revision 416)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<jnlp spec="1.2+" codebase="file:///home/smohammad/Desktop/Test/" href="Sample2.jnlp">
+  <information>
+    <title>Sample</title>
+    <vendor>RedHat</vendor>
+    <description>This is a sample to test a bug</description>
+    <offline-allowed />
+    <icon href="red.gif" />
+  </information>
+  <resources>
+    <jar version="1.2+" href="myResource2.jar" />
+  </resources>
+  <application-desc main-class="test.Runner" />
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/cache/CacheLRUWrapperTest.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/cache/CacheLRUWrapperTest.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/cache/CacheLRUWrapperTest.java	(revision 416)
@@ -0,0 +1,154 @@
+/* CacheLRUWrapperTest.java
+   Copyright (C) 2012 Thomas Meyer
+
+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.
+*/
+
+package net.sourceforge.jnlp.cache;
+
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+import net.sourceforge.jnlp.ServerAccess;
+
+import net.sourceforge.jnlp.config.DeploymentConfiguration;
+import net.sourceforge.jnlp.runtime.JNLPRuntime;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+public class CacheLRUWrapperTest {
+
+    private final CacheLRUWrapper clw = CacheLRUWrapper.getInstance();
+    private final String cacheDir = new File(JNLPRuntime.getConfiguration()
+            .getProperty(DeploymentConfiguration.KEY_USER_CACHE_DIR)).getPath();
+
+    // does no DeploymentConfiguration exist for this file name? 
+    private final String cacheIndexFileName = "recently_used";
+
+    private final int noEntriesCacheFile = 1000;
+
+    @BeforeClass
+    static public void setupJNLPRuntimeConfig() {
+        JNLPRuntime.getConfiguration().setProperty(DeploymentConfiguration.KEY_USER_CACHE_DIR, System.getProperty("java.io.tmpdir"));
+    }
+    
+    @Test
+    public void testLoadStoreTiming() throws InterruptedException {
+
+        int noLoops = 1000;
+
+        long time[] = new long[noLoops];
+
+        clw.lock();
+        clearCacheIndexFile();
+
+        fillCacheIndexFile(noEntriesCacheFile);
+        clw.store();
+
+        // FIXME: wait a second, because of file modification timestamp only provides accuracy on seconds.
+        Thread.sleep(1000);
+
+        long sum = 0;
+        for(int i=0; i < noLoops - 1; i++) {
+            time[i]= System.nanoTime();
+            clw.load();
+            time[i+1]= System.nanoTime();
+            if(i==0)
+                continue;
+            sum = sum + time[i] - time[i-1];
+        }
+        
+        double avg = sum / time.length;
+        ServerAccess.logErrorReprint("Average = " + avg + "ns");
+
+        // wait more than 100 microseconds for noLoops = 1000 and noEntries=1000 is bad
+        assertTrue("load() must not take longer than 100 Âµs, but took in avg " + avg/1000 + "Âµs", avg < 100 * 1000);
+
+        clw.unlock();
+    }
+
+    private void fillCacheIndexFile(int noEntries) {
+
+        // fill cache index file
+        for(int i = 0; i < noEntries; i++) {
+            String path = cacheDir + File.separatorChar + i + File.separatorChar + "test" + i + ".jar";
+            String key = clw.generateKey(path);
+            clw.addEntry(key, path);
+        }
+    }
+
+    @Test
+    public void testModTimestampAfterStore() throws InterruptedException {
+
+        final File cacheIndexFile = new File(cacheDir + File.separator + cacheIndexFileName);
+
+        clw.lock();
+        
+        // 1. clear cache entries + store
+        long lmBefore = cacheIndexFile.lastModified();
+        clearCacheIndexFile();
+        long lmAfter = cacheIndexFile.lastModified();
+        assertTrue("modification timestamp hasn't changed! Before = " + lmBefore + " After = " + lmAfter, lmBefore < lmAfter);
+
+        // FIXME: wait a second, because of file modification timestamp only provides accuracy on seconds.
+        Thread.sleep(1000);
+
+        // 2. load cache file
+        lmBefore = cacheIndexFile.lastModified();
+        clw.load();
+        lmAfter = cacheIndexFile.lastModified();
+        assertTrue("modification timestamp has changed!", lmBefore == lmAfter);
+
+        // 3. add some cache entries and store
+        lmBefore = cacheIndexFile.lastModified();
+        fillCacheIndexFile(noEntriesCacheFile);
+        clw.store();
+        lmAfter = cacheIndexFile.lastModified();
+        assertTrue("modification timestamp hasn't changed! Before = " + lmBefore + " After = " + lmAfter, lmBefore < lmAfter);
+
+        clw.unlock();
+    }
+    
+    private void clearCacheIndexFile() {
+
+        clw.lock();
+
+        // clear cache + store file
+        clw.clearLRUSortedEntries();
+        clw.store();
+
+        clw.unlock();
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/cache/CacheUtilTest.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/cache/CacheUtilTest.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/cache/CacheUtilTest.java	(revision 416)
@@ -0,0 +1,55 @@
+/* CacheUtilTest.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.
+ */
+package net.sourceforge.jnlp.cache;
+
+import java.net.URL;
+import org.junit.Assert;
+import org.junit.Test;
+
+/** Test various corner cases of the parser */
+public class CacheUtilTest {
+
+    @Test
+    public void testNormalizeUrlComparsions() throws Exception {
+        URL[] u = ResourceTrackerTest.getUrls();
+        URL[] n = ResourceTrackerTest.getNormalizedUrls();
+        for (int i = 0; i < u.length; i++) {
+            Assert.assertTrue("url " + i + " must CacheUtil.urlEquals to its normalized form " + i, CacheUtil.urlEquals(u[i], n[i]));
+            Assert.assertTrue("normalized form " + i + " must CacheUtil.urlEquals to its original " + i, CacheUtil.urlEquals(n[i], u[i]));
+        }
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/cache/ResourceTrackerTest.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/cache/ResourceTrackerTest.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/cache/ResourceTrackerTest.java	(revision 416)
@@ -0,0 +1,98 @@
+/* ResourceTrackerTest.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.
+ */
+package net.sourceforge.jnlp.cache;
+
+import java.io.UnsupportedEncodingException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import org.junit.Assert;
+import org.junit.Test;
+
+/** Test various corner cases of the parser */
+public class ResourceTrackerTest {
+
+    @Test
+    public void testNormalizeUrl() throws Exception {
+        URL[] u = getUrls();
+
+        URL[] n = getNormalizedUrls();
+
+        Assert.assertNull("first url should be null", u[0]);
+        Assert.assertNull("first normalized url should be null", n[0]);
+        for (int i = 1; i < CHANGE_BORDER; i++) {
+            Assert.assertTrue("url " + i + " must be equals too normlaized url " + i, u[i].equals(n[i]));
+        }
+        for (int i = CHANGE_BORDER; i < n.length; i++) {
+            Assert.assertFalse("url " + i + " must be normalized (and so not equals) too normlaized url " + i, u[i].equals(n[i]));
+        }
+    }
+
+    private static URL normalizeUrl(URL uRL) throws MalformedURLException, UnsupportedEncodingException {
+        return ResourceTracker.normalizeUrl(uRL, false);
+    }
+    public static final int CHANGE_BORDER = 7;
+
+    public static URL[] getUrls() throws MalformedURLException {
+        URL[] u = {
+            /*constant*/
+            null,
+            new URL("http://localhost:44321/Spaces%20Can%20Be%20Everyw%2Fhere1.jnlp"),
+            new URL("file:///home/jvanek/Desktop/icedtea-web/tests.build/jnlp_test_server/Spaces%20can%20be%20everywhere2.jnlp"),
+            new URL("http://localhost/Spaces+Can+Be+Everywhere1.jnlp"),
+            new URL("http://localhost:44321/SpacesCanBeEverywhere1.jnlp"),
+            new URL("http:///SpacesCanBeEverywhere1.jnlp"),
+            new URL("file://localhost/home/jvanek/Desktop/icedtea-web/tests.build/jnlp_test_server/Spaces can be everywhere2.jnlp"),
+            /*changing*/
+            new URL("http://localhost/SpacesC anBeEverywhere1.jnlp?a=5&b=10#df"),
+            new URL("http:///oook.jnlp?a=5&b=ahoj Å¡Å¡ dd#df"),
+            new URL("http://localhost/SpacesÄÄÅ¡ÅŸÅ¡ÅÃœÅŸÄÅÃº can !@^*(){}[].jnlp?a=5&ahoj Å¡Å¡ dd#df"),
+            new URL("http://localhost:44321/SpaÅ cesCan Be Everywhere1.jnlp"),
+            new URL("http:/SpacesCanB eEverywhere1.jnlp")};
+        return u;
+    }
+
+    public static URL[] getNormalizedUrls() throws MalformedURLException, UnsupportedEncodingException {
+        URL[] u = getUrls();
+
+        URL[] n = new URL[u.length];
+        for (int i = 0; i < n.length; i++) {
+            n[i] = normalizeUrl(u[i]);
+        }
+        return n;
+
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/launchApp.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/launchApp.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/launchApp.jnlp	(revision 416)
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<jnlp spec="1.5+" 
+      codebase="file" 
+      href="www.redhat.com"    
+      >
+ 
+ <information>
+    <title>Sample Test</title>
+    <vendor>RedHat</vendor>
+    <offline-allowed/>
+
+  </information>
+
+
+  <resources>
+    <j2se version='1.6+' />
+    <jar href='myResource.jar' main='true' />
+  </resources>
+
+
+  <application-desc main-class='Test' />
+</jnlp>
+
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/runtime/CodeBaseClassLoaderTest.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/runtime/CodeBaseClassLoaderTest.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/runtime/CodeBaseClassLoaderTest.java	(revision 416)
@@ -0,0 +1,191 @@
+/* CodeBaseClassLoaderTest.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.
+*/
+
+package net.sourceforge.jnlp.runtime;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Locale;
+
+import net.sourceforge.jnlp.JNLPFile;
+import net.sourceforge.jnlp.LaunchException;
+import net.sourceforge.jnlp.ParseException;
+import net.sourceforge.jnlp.ResourcesDesc;
+import net.sourceforge.jnlp.SecurityDesc;
+import net.sourceforge.jnlp.ServerAccess;
+import net.sourceforge.jnlp.runtime.JNLPClassLoader;
+import net.sourceforge.jnlp.runtime.JNLPClassLoader.CodeBaseClassLoader;
+import net.sourceforge.jnlp.annotations.Bug;
+
+import org.junit.Test;
+
+public class CodeBaseClassLoaderTest {
+
+    @Bug(id={"PR895",
+            "http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2012-March/017626.html",
+            "http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2012-March/017667.html"})
+    @Test
+    public void testResourceLoadSuccessCaching() throws LaunchException, ClassNotFoundException, IOException, ParseException {
+        final URL JAR_URL = new URL("http://icedtea.classpath.org/netx/about.jar");
+        final URL CODEBASE_URL = new URL("http://icedtea.classpath.org/netx/");
+
+        JNLPFile dummyJnlpFile = new JNLPFile() {
+            @Override
+            public ResourcesDesc getResources() {
+                return new ResourcesDesc(null, new Locale[0], new String[0], new String[0]);
+            }
+
+            @Override
+            public URL getCodeBase() {
+                return CODEBASE_URL;
+            }
+
+            @Override
+            public SecurityDesc getSecurity() {
+                return new SecurityDesc(null, SecurityDesc.SANDBOX_PERMISSIONS, null);
+            }
+        };
+
+        JNLPClassLoader parent = new JNLPClassLoader(dummyJnlpFile, null);
+        CodeBaseClassLoader classLoader = new CodeBaseClassLoader(new URL[] { JAR_URL, CODEBASE_URL }, parent);
+
+        long startTime, stopTime;
+
+        startTime = System.nanoTime();
+        classLoader.findResource("net/sourceforge/jnlp/about/Main.class");
+        stopTime = System.nanoTime();
+        long timeOnFirstTry = stopTime - startTime;
+        ServerAccess.logErrorReprint(""+timeOnFirstTry);
+
+        startTime = System.nanoTime();
+        classLoader.findResource("net/sourceforge/jnlp/about/Main.class");
+        stopTime = System.nanoTime();
+        long timeOnSecondTry = stopTime - startTime;
+        ServerAccess.logErrorReprint(""+timeOnSecondTry);
+
+        assertTrue(timeOnSecondTry < (timeOnFirstTry / 10));
+    }
+
+    @Bug(id={"PR895",
+            "http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2012-March/017626.html",
+            "http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2012-March/017667.html"})
+    @Test
+    public void testResourceLoadFailureCaching() throws LaunchException, ClassNotFoundException, IOException, ParseException {
+        final URL JAR_URL = new URL("http://icedtea.classpath.org/netx/about.jar");
+        final URL CODEBASE_URL = new URL("http://icedtea.classpath.org/netx/");
+
+        JNLPFile dummyJnlpFile = new JNLPFile() {
+            @Override
+            public ResourcesDesc getResources() {
+                return new ResourcesDesc(null, new Locale[0], new String[0], new String[0]);
+            }
+
+            @Override
+            public URL getCodeBase() {
+                return CODEBASE_URL;
+            }
+
+            @Override
+            public SecurityDesc getSecurity() {
+                return new SecurityDesc(null, SecurityDesc.SANDBOX_PERMISSIONS, null);
+            }
+        };
+
+        JNLPClassLoader parent = new JNLPClassLoader(dummyJnlpFile, null);
+        CodeBaseClassLoader classLoader = new CodeBaseClassLoader(new URL[] { JAR_URL, CODEBASE_URL }, parent);
+
+        long startTime, stopTime;
+
+        startTime = System.nanoTime();
+        classLoader.findResource("net/sourceforge/jnlp/about/Main_FOO_.class");
+        stopTime = System.nanoTime();
+        long timeOnFirstTry = stopTime - startTime;
+        ServerAccess.logErrorReprint(""+timeOnFirstTry);
+
+        startTime = System.nanoTime();
+        classLoader.findResource("net/sourceforge/jnlp/about/Main_FOO_.class");
+        stopTime = System.nanoTime();
+        long timeOnSecondTry = stopTime - startTime;
+        ServerAccess.logErrorReprint(""+timeOnSecondTry);
+
+        assertTrue(timeOnSecondTry < (timeOnFirstTry / 10));
+    }
+
+    @Test
+    public void testParentClassLoaderIsAskedForClasses() throws MalformedURLException, LaunchException {
+        final URL JAR_URL = new URL("http://icedtea.classpath.org/netx/about.jar");
+        final URL CODEBASE_URL = new URL("http://icedtea.classpath.org/netx/");
+
+        JNLPFile dummyJnlpFile = new JNLPFile() {
+            @Override
+            public ResourcesDesc getResources() {
+                return new ResourcesDesc(null, new Locale[0], new String[0], new String[0]);
+            }
+
+            @Override
+            public URL getCodeBase() {
+                return CODEBASE_URL;
+            }
+
+            @Override
+            public SecurityDesc getSecurity() {
+                return new SecurityDesc(null, SecurityDesc.SANDBOX_PERMISSIONS, null);
+            }
+        };
+
+        final boolean[] parentWasInvoked = new boolean[1];
+
+        JNLPClassLoader parent = new JNLPClassLoader(dummyJnlpFile, null) {
+            @Override
+            protected Class<?> findClass(String name) throws ClassNotFoundException {
+                parentWasInvoked[0] = true;
+                throw new ClassNotFoundException(name);
+            }
+        };
+        CodeBaseClassLoader classLoader = new CodeBaseClassLoader(new URL[] { JAR_URL, CODEBASE_URL }, parent);
+        try {
+            classLoader.findClass("foo");
+            assertFalse("should not happen", true);
+        } catch (ClassNotFoundException cnfe) { /* ignore */ }
+
+        assertTrue(parentWasInvoked[0]);
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/templates/template0.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/templates/template0.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/templates/template0.jnlp	(revision 416)
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+<jnlp spec="1.5+" 
+      codebase="file" 
+      href="*"    
+      >
+ 
+ <information>
+    <title>Sample Test</title>
+    <vendor>RedHat</vendor>
+    <offline-allowed/>
+
+  </information>
+
+
+  <![CDATA[
+    Text you want to escape goes here...
+    <test> random tag test </test>
+  ]]>
+  
+  
+  <resources>
+    <j2se version='1.6+' />
+    <jar href='myResource.jar' main='true' />
+  </resources>
+
+
+  <application-desc main-class='Test' />
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/templates/template1.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/templates/template1.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/templates/template1.jnlp	(revision 416)
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<jnlp spec="1.5+" codebase="file" href="*">
+  <information>
+    <title>Sample Test</title>
+    <vendor>RedHat</vendor>
+    <offline-allowed />
+  </information>
+  <resources>
+    <j2se version='1.6+' />
+    <jar href='myResource.jar' main='true' />
+  </resources>
+  <application-desc main-class='Test' />
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/templates/template2.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/templates/template2.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/templates/template2.jnlp	(revision 416)
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<jnlp spec="1.5+" codebase="file" href="*">
+  <information>
+    <title>Sample Test</title>
+    <vendor>*</vendor>
+    <offline-allowed />
+  </information>
+  <resources>
+    <j2se version='1.6+' />
+    <jar href='myResource.jar' main='true' />
+  </resources>
+  <application-desc main-class='Test' />
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/templates/template3.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/templates/template3.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/templates/template3.jnlp	(revision 416)
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<jnlp spec="1.5+" codebase="file" href="*">
+  <resources>
+    <j2se version='1.6+' />
+    <jar href='myResource.jar' main='true' />
+  </resources>
+  <information>
+    <vendor>RedHat</vendor>
+    <title>Sample Test</title>
+    <offline-allowed />
+  </information>
+  <application-desc main-class='Test' />
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/templates/template4.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/templates/template4.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/templates/template4.jnlp	(revision 416)
@@ -0,0 +1,13 @@
+<?xml version="*"?>
+<jnlp spec="*" codebase="*" href="*">
+  <information>
+    <title>*</title>
+    <vendor>*</vendor>
+    <offline-allowed />
+  </information>
+  <resources>
+    <j2se version='*' />
+    <jar href='*' main='*' />
+  </resources>
+  <application-desc main-class='*' />
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/templates/template5.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/templates/template5.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/templates/template5.jnlp	(revision 416)
@@ -0,0 +1,23 @@
+<?xml version="*"?>
+<jnlp spec="*" 
+      codebase="*" 
+      href="*"    
+      >
+ 
+ <information>
+<!-- This is my comment-->
+    <title>*</title>
+    <vendor>*</vendor>
+    <offline-allowed/>
+  </information>
+
+<!-- This is my comment-->
+
+  <resources>
+    <j2se version='*' />
+    <jar href='*' main='*' />
+  </resources>
+
+
+  <application-desc <!-- This is my comment--> main-class='*' />
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/templates/template6.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/templates/template6.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/templates/template6.jnlp	(revision 416)
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<jnlp spec="1.5+" codebase="randomcodebase" href="*">
+  <information>
+    <title>Test Sample</title>
+    <vendor>RedHat</vendor>
+    <offline-allowed />
+  </information>
+  <resources>
+    <j2se version='22+' />
+    <jar href='myResource2.jar' main='true' />
+  </resources>
+  <application-desc main-class='Test' />
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/templates/template7.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/templates/template7.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/templates/template7.jnlp	(revision 416)
@@ -0,0 +1,16 @@
+<?xml version="1.0"?>
+<jnlp spec="1.5+" codebase="file" href="*">
+  <information>
+    <title>Sample Test</title>
+    <vendor>RedHat</vendor>
+    <shortcut>
+      <desktop />
+    </shortcut>
+    <offline-allowed />
+  </information>
+  <resources>
+    <j2se version='1.6+' />
+    <jar href='myResource.jar' main='true' />
+  </resources>
+  <application-desc main-class='Test' />
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/templates/template8.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/templates/template8.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/templates/template8.jnlp	(revision 416)
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<jnlp spec="1.5+" codebase="file" href="www.redhat.com">
+  <information>
+    <title>Sample Test</title>
+    <vendor>RedHat</vendor>
+  </information>
+  <resources>
+    <j2se version='1.6+' />
+    <jar href='myResource.jar' main='true' />
+  </resources>
+  <application-desc main-class='Test' />
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/templates/template9.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/templates/template9.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/templates/template9.jnlp	(revision 416)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<jnlp spec="1.2+" codebase="file:///home/smohammad/Desktop/Test/" href="Sample2.jnlp">
+  <information>
+    <title>Sample</title>
+    <vendor>RedHat</vendor>
+    <description>This is a sample to test a bug</description>
+    <offline-allowed />
+    <icon href="red.gif" />
+  </information>
+  <resources>
+    <jar version="1.2+" href="myResource2.jar" />
+  </resources>
+  <application-desc main-class="test.Runner" />
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/tools/JarCertVerifierTest.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/tools/JarCertVerifierTest.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/tools/JarCertVerifierTest.java	(revision 416)
@@ -0,0 +1,54 @@
+/* JarCertVerifierTest.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.
+ */
+
+package net.sourceforge.jnlp.tools;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+
+public class JarCertVerifierTest {
+
+    @Test
+    public void testIsMetaInfFile() {
+        final String METAINF ="META-INF";
+        assertFalse(JarCertVerifier.isMetaInfFile("some_dir/" + METAINF + "/filename"));
+        assertFalse(JarCertVerifier.isMetaInfFile(METAINF + "filename"));
+        assertTrue(JarCertVerifier.isMetaInfFile(METAINF + "/filename"));
+    }
+
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/util/ImageResourcesTest.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/util/ImageResourcesTest.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/util/ImageResourcesTest.java	(revision 416)
@@ -0,0 +1,71 @@
+/* ImageResourcesTest.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; 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. */
+
+package net.sourceforge.jnlp.util;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.awt.Image;
+import java.util.List;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+public class ImageResourcesTest {
+
+    @Before
+    public void setUp() {
+        ImageResources.INSTANCE.clearCache();
+    }
+
+    @After
+    public void tearDown() {
+        ImageResources.INSTANCE.clearCache();
+    }
+
+    @Test
+    public void testApplicationImages() {
+        List<Image> images = ImageResources.INSTANCE.getApplicationImages();
+        assertNotNull(images);
+        assertTrue(images.size() > 0);
+        for (Image image : images) {
+            assertNotNull(image);
+        }
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/util/PropertiesFileTest.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/util/PropertiesFileTest.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/util/PropertiesFileTest.java	(revision 416)
@@ -0,0 +1,151 @@
+/*  PropertiesFileTest.java
+   Copyright (C) 2012 Thomas Meyer
+
+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.
+*/
+
+package net.sourceforge.jnlp.util;
+
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+import java.io.IOException;
+import java.nio.channels.FileLock;
+import java.nio.channels.OverlappingFileLockException;
+
+import net.sourceforge.jnlp.config.DeploymentConfiguration;
+import net.sourceforge.jnlp.runtime.JNLPRuntime;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+public class PropertiesFileTest {
+
+    private int lockCount = 0;
+
+    /* lock for the file RecentlyUsed */
+    private FileLock fl = null;
+
+    private final String cacheDir = new File(JNLPRuntime.getConfiguration()
+            .getProperty(DeploymentConfiguration.KEY_USER_CACHE_DIR)).getPath();
+
+    // does no DeploymentConfiguration exist for this file name? 
+    private final String cacheIndexFileName = "recently_used";
+
+    private final PropertiesFile cacheIndexFile = new PropertiesFile(new File(cacheDir + File.separatorChar + cacheIndexFileName));
+    private final int noEntriesCacheFile = 1000;
+
+    @BeforeClass
+    static public void setupJNLPRuntimeConfig() {
+        JNLPRuntime.getConfiguration().setProperty(DeploymentConfiguration.KEY_USER_CACHE_DIR, System.getProperty("java.io.tmpdir"));
+    }
+
+    private void fillCacheIndexFile(int noEntries) {
+
+        // fill cache index file
+        for(int i = 0; i < noEntries; i++) {
+            String path = cacheDir + File.separatorChar + i + File.separatorChar + "test" + i + ".jar";
+            String key = String.valueOf(System.currentTimeMillis());
+            cacheIndexFile.setProperty(key, path);
+        }
+    }
+
+    @Test
+    public void testReloadAfterStore() {
+
+        lock();
+
+        boolean reloaded = false;
+
+        // 1. clear cache entries + store
+        clearCacheIndexFile();
+
+        // 2. load cache file
+        reloaded = cacheIndexFile.load();
+        assertTrue("File was not reloaded!", reloaded);
+
+        // 3. add some cache entries and store
+        fillCacheIndexFile(noEntriesCacheFile);
+        cacheIndexFile.store();
+        reloaded = cacheIndexFile.load();
+        assertTrue("File was not reloaded!", reloaded);
+
+        unlock();
+    }
+    
+    private void clearCacheIndexFile() {
+
+        lock();
+
+        // clear cache + store file
+        cacheIndexFile.clear();
+        cacheIndexFile.store();
+
+        unlock();
+    }
+
+    
+    // add locking, because maybe some JNLP runtime user is running. copy/paste from CacheLRUWrapper
+
+    /**
+     * Lock the file to have exclusive access.
+     */
+    private void lock() {
+        try {
+            fl = FileUtils.getFileLock(cacheIndexFile.getStoreFile().getPath(), false, true);
+        } catch (OverlappingFileLockException e) { // if overlap we just increase the count.
+        } catch (Exception e) { // We didn't get a lock..
+            e.printStackTrace();
+        }
+        if (fl != null) lockCount++;
+    }
+    
+    /**
+     * Unlock the file.
+     */
+    private void unlock() {
+        if (fl != null) {
+            lockCount--;
+            try {
+                if (lockCount == 0) {
+                    fl.release();
+                    fl.channel().close();
+                    fl = null;
+                }
+            } catch (IOException e) {
+                e.printStackTrace();
+            }
+        }
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/util/replacements/BASE64EncoderTest.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/util/replacements/BASE64EncoderTest.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/util/replacements/BASE64EncoderTest.java	(revision 416)
@@ -0,0 +1,129 @@
+/* BASE64EncoderTest.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.
+ */
+package net.sourceforge.jnlp.util.replacements;
+
+import java.io.ByteArrayOutputStream;
+import java.io.OutputStream;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.Arrays;
+import net.sourceforge.jnlp.ServerAccess;
+import org.junit.Assert;
+import org.junit.Test;
+
+/** Test various corner cases of the parser */
+public class BASE64EncoderTest {
+
+    private static final String sSrc = "abcdefgHIJKLMNOPQrstuvwxyz1234567890\r\n"
+            + "-=+_))(**&&&^^%%$$##@@!!~{}][\":'/\\.,><\n"
+            + "+ÄÅ¡ÄÄÅÅŸÃœÃ¡Ã­Ã©=Å¯/ÃºÄÅÅ¥Å¡ÄÅÃ©Ã­Ã¡Ä";
+    private static final byte[] encoded = {89, 87, 74, 106, 90, 71, 86, 109, 90,
+        48, 104, 74, 83, 107, 116, 77, 84, 85, 53, 80, 85, 70, 70, 121, 99, 51,
+        82, 49, 100, 110, 100, 52, 101, 88, 111, 120, 77, 106, 77, 48, 78, 84,
+        89, 51, 79, 68, 107, 119, 68, 81, 111, 116, 80, 83, 116, 102, 75, 83,
+        107, 111, 75, 105, 111, 109, 74, 105, 90, 101, 88, 105, 85, 108, 74, 67,
+        81, 106, 10, 73, 48, 66, 65, 73, 83, 70, 43, 101, 51, 49, 100, 87, 121,
+        73, 54, 74, 121, 57, 99, 76, 105, 119, 43, 80, 65, 111, 114, 120, 74,
+        118, 70, 111, 99, 83, 98, 120, 73, 51, 70, 109, 99, 87, 43, 119, 55, 51,
+        68, 111, 99, 79, 116, 119, 54, 107, 57, 120, 97, 56, 118, 119, 55, 114,
+        69, 109, 56, 87, 90, 120, 97, 88, 70, 111, 99, 83, 80, 10, 120, 89, 106,
+        68, 113, 99, 79, 116, 119, 54, 72, 69, 106, 81, 61, 61, 10};
+    
+    public static final String sunClassE = "sun.misc.BASE64Encoder";
+    public static final String sunClassD = "sun.misc.BASE64Decoder";
+
+    @Test
+    public void testEmbededBase64Encoder() throws Exception {
+        final byte[] data = sSrc.getBytes("utf-8");
+//        ByteArrayOutputStream out1 = new ByteArrayOutputStream();
+//        sun.misc.BASE64Encoder e1 = new sun.misc.BASE64Encoder();
+//        e1.encode(data, out1);
+//        byte[] encoded1 = out1.toByteArray();
+//        ServerAccess.logErrorReprint(Arrays.toString(encoded1));
+        ByteArrayOutputStream out2 = new ByteArrayOutputStream();
+        BASE64Encoder e2 = new BASE64Encoder();
+        e2.encodeBuffer(data, out2);
+        byte[] encoded2 = out2.toByteArray();
+        Assert.assertArrayEquals(encoded, encoded2);
+//      ServerAccess.logErrorReprint(Arrays.toString(encoded2));
+
+
+
+    }
+
+    @Test
+    /*
+     * This test will fail, in case taht sun.misc.BASE64Decoder will be removed from builders java
+     */
+    public void testEmbededBase64EncoderAgainstSunOne() throws Exception {
+        final byte[] data = sSrc.getBytes("utf-8");
+
+        ByteArrayOutputStream out2 = new ByteArrayOutputStream();
+        BASE64Encoder e2 = new BASE64Encoder();
+        e2.encodeBuffer(data, out2);
+        byte[] encoded2 = out2.toByteArray();
+        Object decoder = createInsatnce(sunClassD);
+        byte[] decoded = (byte[]) (getAndInvokeMethod(decoder, "decodeBuffer", new String(encoded, "utf-8")));
+        Assert.assertArrayEquals(data, decoded);
+        Assert.assertEquals(sSrc, new String(decoded, "utf-8"));
+
+
+
+
+    }
+
+    private static Object createInsatnce(String ofCalss) throws ClassNotFoundException, InstantiationException, IllegalAccessException {
+
+        Class classDefinition = Class.forName(ofCalss);
+        return classDefinition.newInstance();
+
+    }
+
+    private static Object getAndInvokeMethod(Object instance, String methodName, Object... params) throws NoSuchMethodException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
+        Class<?>[] cs = new Class<?>[params.length];
+        for (int i = 0; i < params.length; i++) {
+            Object object = params[i];
+            cs[i] = object.getClass();
+            if (object instanceof OutputStream) {
+                cs[i] = OutputStream.class;
+            }
+        }
+        Method m = instance.getClass().getMethod(methodName, cs);
+        return m.invoke(instance, params);
+
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/report-styles/index.js
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/report-styles/index.js	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/report-styles/index.js	(revision 416)
@@ -0,0 +1,102 @@
+function showhideMethods(inElement,toValue) {
+	var e = document.getElementById(inElement);
+	methods=e.getElementsByClassName("method");
+	for ( var i = 0; i < methods.length; i++ ) {
+		methods[i].style.display=toValue
+	}
+}
+function openAnchor() {
+	anchor=self.document.location.hash;
+	if (anchor==null || anchor=="") return;
+	stub=anchor.substring(1);
+	var logs=getLogsArray(stub);
+	logs[0].style.display="inline";
+	logs[1].style.display="inline";
+	recalcArraysWidth(logs);
+	window.location.hash=stub;
+}
+
+function negateIdDisplay(which) {
+	var e = document.getElementById(which);
+	if (e.style.display=="block") {
+		e.style.display="none"
+	} else {
+		e.style.display="block"
+	}
+}
+
+function negateIdDisplayInline(which) {
+	var e = document.getElementById(which);
+	if (e.style.display=="inline") {
+		e.style.display="none"
+	} else {
+		e.style.display="inline"
+	}
+}
+
+function setClassDisplay(which,what) {
+	var e = document.getElementsByClassName(which);
+	for ( var i = 0; i < e.length; i++ ) {
+		e[i].style.display=what
+	}
+}
+
+function negateClassBlocDisplay(which) {
+	var e = document.getElementsByClassName(which);
+	for ( var i = 0; i < e.length; i++ ) {
+		if (e[i].style.display=="block") {
+			e[i].style.display="none"
+		} else {
+			e[i].style.display="block"
+		}
+	}
+}
+
+function negateClassBlocDisplayIn(where,which) {
+	var parent = document.getElementById(where);
+	var e = parent.getElementsByClassName(which);
+	for ( var i = 0; i < e.length; i++ ) {
+		if (e[i].style.display=="block") {
+			e[i].style.display="none"
+		} else {
+			e[i].style.display="block"
+		}
+	}
+}
+
+function getLogsArray(stub) {
+	return new Array(document.getElementById(stub+".out"),document.getElementById(stub+".err"),document.getElementById(stub+".all"));
+}
+
+function recalcLogsWidth(stub) {
+	var logs=getLogsArray(stub)
+	recalcArraysWidth(logs);
+}
+function showAllLogs() {
+	var e = document.getElementsByClassName("method");
+	for ( var i = 0; i < e.length; i++ ) {
+		stub=e[i].id;
+		var logs=getLogsArray(stub)
+		logs[0].style.display="none";
+		logs[1].style.display="none"
+		logs[2].style.display="inline"
+		recalcArraysWidth(logs);
+		
+	}
+}
+
+function recalcArraysWidth(logs) {
+	visible=0;
+	for ( var i = 0; i < logs.length; i++ ) {
+		if (logs[i].style.display!="none"){
+			visible++;
+		}
+	}
+	if (visible==0) return;
+	nwWidth=90/visible;
+	for ( var i = 0; i < logs.length; i++ ) {
+		if (logs[i].style.display!="none"){
+			logs[i].style.width=nwWidth+"%";
+		}
+	}
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/report-styles/jreport.xsl
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/report-styles/jreport.xsl	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/report-styles/jreport.xsl	(revision 416)
@@ -0,0 +1,331 @@
+<?xml version="1.0"?>
+<!--
+
+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.
+
+ -->
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+  <xsl:template match="/">
+<!--
+when parameter is mentioned (no matter of value) eg:
+<xsl:param name="logs">none</xsl:param>
+then xsltproc is not able to change its value since 2008
+This parameter is providing relative path to file with logs which is then linked from this index
+Bad luck that xsltproc is not able to use default values.
+If there is no need for linking, please use value "none" for this variable
+-->
+<html>
+ <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+    </meta>
+    <script src="report-styles/index.js">
+    </script>
+    <link href="report-styles/report.css" rel="stylesheet" type="text/css">
+    </link>
+  </head>
+<body onload='setClassDisplay("trace","none");'>
+    <div id="wholePage">
+    <h3>Date:</h3>
+    <xsl:value-of select="/testsuite/date"/>
+    <br/>
+    <h2>Result: (<xsl:value-of select="round(sum(/testsuite/testcase/@time))"/>s)</h2>
+    <h4>In brackets are KnownToFail values if any</h4>
+    <div class="tablee">
+      <div class="row">
+        <div class="cell1">TOTAL: </div>
+        <div class="cell2">
+          <xsl:value-of select="/testsuite/stats/summary/total"/>
+          <xsl:choose>
+           <xsl:when test="/testsuite/stats/summary/total/@known-to-fail!=0">
+             (<xsl:value-of select="/testsuite/stats/summary/total/@known-to-fail"/>)
+           </xsl:when>
+         </xsl:choose>
+        </div>
+        <div class="space-line"></div>
+      </div>
+      <div class="row passed">
+        <div class="cell1">passed: </div>
+        <div class="cell2">
+          <xsl:value-of select="/testsuite/stats/summary/passed"/>
+          <xsl:choose>
+           <xsl:when test="/testsuite/stats/summary/passed/@known-to-fail!=0">
+             (<xsl:value-of select="/testsuite/stats/summary/passed/@known-to-fail"/>)
+           </xsl:when>
+         </xsl:choose>
+        </div>
+        <div class="space-line"></div>
+      </div>
+      <div class="row failed">
+        <div class="cell1">failed: </div>
+        <div class="cell2">
+          <xsl:value-of select="/testsuite/stats/summary/failed"/>
+          <xsl:choose>
+           <xsl:when test="/testsuite/stats/summary/failed/@known-to-fail!=0">
+             (<xsl:value-of select="/testsuite/stats/summary/failed/@known-to-fail"/>)
+           </xsl:when>
+         </xsl:choose>
+        </div>
+        <div class="space-line"></div>
+      </div>
+      <div class="row ignored">
+        <div class="cell1">ignored: </div>
+        <div class="cell2">
+          <xsl:value-of select="/testsuite/stats/summary/ignored"/>
+          <xsl:choose>
+           <xsl:when test="/testsuite/stats/summary/ignored/@known-to-fail!=0">
+             (<xsl:value-of select="/testsuite/stats/summary/ignored/@known-to-fail"/>)
+           </xsl:when>
+         </xsl:choose>
+        </div>
+        <div class="space-line"></div>
+      </div>
+    </div>
+    <h2>Classes: <button onclick="negateIdDisplay('ccllaasseess')">show/hide</button></h2>
+<div id='ccllaasseess' style="display:block">
+    <xsl:for-each select="/testsuite/stats/classes/class">
+      <div>
+        <xsl:attribute name="class">
+          <xsl:choose>
+            <xsl:when test="passed = total">
+		passed
+	      </xsl:when>
+            <xsl:otherwise>
+	        failed
+	    </xsl:otherwise>
+          </xsl:choose>
+        </xsl:attribute>
+        <a class="classSumaryName"><xsl:attribute name="href">
+    #<xsl:value-of select="@name"/>
+  </xsl:attribute><xsl:value-of select="@name"/>
+(<xsl:value-of select="@time"/>ms):
+</a>
+    <xsl:for-each select="bugs/bug">
+      <a>
+        <xsl:attribute name="href"><xsl:value-of select="normalize-space(.)"/></xsl:attribute>
+        <xsl:value-of select="@visibleName"/>
+      </a>;
+    </xsl:for-each>
+      </div>
+      <blockquote>
+        <div class="tablee">
+          <div class="row">
+            <div class="cell1">TOTAL: </div>
+            <div class="cell2">
+              <xsl:value-of select="total"/>
+              <xsl:choose>
+               <xsl:when test="total/@known-to-fail!=0">
+                 (<xsl:value-of select="total/@known-to-fail"/>)
+               </xsl:when>
+             </xsl:choose>
+            </div>
+            <div class="space-line"></div>
+          </div>
+          <div class="row passed">
+            <div class="cell1">passed: </div>
+            <div class="cell2">
+              <xsl:value-of select="passed"/>
+              <xsl:choose>
+               <xsl:when test="passed/@known-to-fail!=0">
+                 (<xsl:value-of select="passed/@known-to-fail"/>)
+               </xsl:when>
+             </xsl:choose>
+            </div>
+            <div class="space-line"></div>
+          </div>
+          <div class="row failed">
+            <div class="cell1">failed: </div>
+            <div class="cell2">
+              <xsl:value-of select="failed"/>
+              <xsl:choose>
+               <xsl:when test="failed/@known-to-fail!=0">
+                 (<xsl:value-of select="failed/@known-to-fail"/>)
+               </xsl:when>
+             </xsl:choose>
+            </div>
+            <div class="space-line"></div>
+          </div>
+          <div class="row ignored">
+            <div class="cell1">ignored: </div>
+            <div class="cell2">
+              <xsl:value-of select="ignored"/>
+              <xsl:choose>
+               <xsl:when test="ignored/@known-to-fail!=0">
+                 (<xsl:value-of select="ignored/@known-to-fail"/>)
+               </xsl:when>
+             </xsl:choose>
+            </div>
+            <div class="space-line"></div>
+          </div>
+        </div>
+      </blockquote>
+      <hr/>
+    </xsl:for-each>
+</div>
+   
+    <h2>Individual results:</h2>
+    <button onclick="setClassDisplay('trace','none')">NoneTrace</button>
+    <button onclick="setClassDisplay('trace','block')">AllTraces</button>
+    <xsl:for-each select="/testsuite/testcase">
+      <div>
+        <xsl:attribute name="class">
+          <xsl:choose>
+            <xsl:when test="@ignored">
+           ignored
+            </xsl:when>
+            <xsl:when test="error">
+           failed
+            </xsl:when>
+            <xsl:otherwise>
+           passed 
+            </xsl:otherwise>
+          </xsl:choose>
+        </xsl:attribute>
+        <a>
+          <xsl:attribute name="name">
+            <xsl:value-of select="normalize-space(@classname)"/>
+          </xsl:attribute>
+        </a>
+        <div class="lineHeader">
+          <div class="clazz">
+            <xsl:choose>
+              <xsl:when test="$logs!='none'">
+                <a class="logLink" target="new">
+                  <xsl:attribute name="href">
+                    <xsl:value-of select="$logs"/>#<xsl:value-of select="@classname"/>.<xsl:value-of select="@name"/>
+                  </xsl:attribute>
+                  <xsl:value-of select="@classname"/>
+                </a>
+              </xsl:when>
+              <xsl:otherwise>
+                <xsl:value-of select="@classname"/>
+              </xsl:otherwise>
+             </xsl:choose>
+           </div>
+          <xsl:text disable-output-escaping="no"> - </xsl:text>
+          <div class="method">
+            <xsl:value-of select="@name"/>
+            <xsl:for-each select="bugs/bug">
+            <xsl:text disable-output-escaping="no"> - </xsl:text>
+              <a>
+                <xsl:attribute name="href"><xsl:value-of select="normalize-space(.)"/></xsl:attribute>
+                <xsl:value-of select="@visibleName"/>
+              </a>
+            </xsl:for-each>
+          </div>
+        </div>
+        <div class="result">
+          <xsl:choose>
+            <xsl:when test="not(error)">
+              <div class="status">
+         <xsl:choose>
+           <xsl:when test="@ignored">
+             IGNORED (<xsl:value-of select="@time"/>s) 
+           </xsl:when>
+           <xsl:otherwise>
+             PASSED (<xsl:value-of select="@time"/>s) 
+           </xsl:otherwise>
+         </xsl:choose>
+         <xsl:choose>
+           <xsl:when test="@known-to-fail">
+             <xsl:choose>
+               <xsl:when test="@known-to-fail=true">
+                 <xsl:text>" - WARNING This test is known to fail, but have passed!</xsl:text>
+               </xsl:when>
+               <xsl:otherwise>
+                 <xsl:text> - This test is known to fail</xsl:text>
+               </xsl:otherwise>
+             </xsl:choose>
+           </xsl:when>
+         </xsl:choose>
+         </div>
+            </xsl:when>
+            <xsl:otherwise>
+              <div class="status">
+        FAILED (<xsl:value-of select="@time"/>s) 
+         <xsl:choose>
+           <xsl:when test="@known-to-fail">
+             <xsl:text> - This test is known to fail</xsl:text>
+           </xsl:when>
+         </xsl:choose>
+         </div>
+              <div class="wtrace">
+                <div class="theader">
+                  <xsl:value-of select="error/@type"/>  <xsl:text disable-output-escaping="no"> - </xsl:text>
+                  <xsl:value-of select="error/@message"/>  
+                  <button onclick="negateIdDisplay('{generate-id(error)}')">StackTrace</button>
+                </div>
+                <div class="trace" id="{generate-id(error)}">
+                  <pre>
+                    <xsl:value-of select="error"/>
+                  </pre>
+                </div>
+              </div>
+            </xsl:otherwise>
+          </xsl:choose>
+          <div class="space-line"></div>
+        </div>
+        <div class="space-line"></div>
+      </div>
+      <div class="space-line"></div>
+    </xsl:for-each>
+
+          <div class="stbound">
+            <div class="theader stExt2">
+            STD-OUT - <button onclick="negateIdDisplay('{generate-id(/testsuite/system-out)}')">Show/hide</button>
+            </div>
+            <div class="trace stExt3" id="{generate-id(/testsuite/system-out)}">
+              <pre>
+                <xsl:value-of select="/testsuite/system-out"/>
+              </pre>
+            </div>
+          </div>
+ <div class="space-line"></div>
+    <div class="stbound">
+            <div class="theader stExt2">
+            STD-ERR - <button onclick="negateIdDisplay('{generate-id(/testsuite/system-err)}')">Show/hide</button>
+            </div>
+            <div class="trace stExt3" id="{generate-id(/testsuite/system-err)}">
+              <pre>
+                <xsl:value-of select="/testsuite/system-err"/>
+              </pre>
+            </div>
+          </div>
+ <div class="space-line"></div>
+
+      </div>
+    </body>
+   </html>
+  </xsl:template>
+</xsl:stylesheet>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/report-styles/logs.xsl
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/report-styles/logs.xsl	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/report-styles/logs.xsl	(revision 416)
@@ -0,0 +1,153 @@
+<?xml version="1.0"?>
+<!--
+
+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.
+
+ -->
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+  <xsl:template match="/">
+    <html>
+      <head>
+        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+        <script src="report-styles/index.js"/>
+        <link href="report-styles/output.css" rel="stylesheet" type="text/css"/>
+      </head>
+      <body onload="setClassDisplay(&quot;fulltrace&quot;,&quot;none&quot;);setClassDisplay(&quot;stamp&quot;,&quot;none&quot;);setClassDisplay(&quot;output&quot;,&quot;none&quot;);openAnchor();">
+        <div id="wholePage">
+          <button onclick="showAllLogs()">show all</button>
+          <button onclick="setClassDisplay('output','none')">hide all</button>
+          <button onclick="showAllLogs()">show all logs</button>
+          <button onclick="setClassDisplay('output','none')">hide all logs</button>
+          <button onclick="setClassDisplay('method','block')">show all methods</button>
+          <button onclick="setClassDisplay('method','none')">hide all methods</button>
+          <xsl:for-each select="/logs/classlog">
+            <div class="classa">
+              <xsl:attribute name="id">
+                <xsl:value-of select="@className"/>
+              </xsl:attribute>
+              <h1>
+                <a>
+                  <xsl:attribute name="name">
+                    <xsl:value-of select="@className"/>
+                  </xsl:attribute>
+                </a>
+                <xsl:value-of select="@className"/>
+              </h1>
+              <button><xsl:attribute name="onclick">
+                showhideMethods('<xsl:value-of select="@className"/>','none')
+              </xsl:attribute>
+hide methods</button>
+              <button><xsl:attribute name="onclick">
+                showhideMethods('<xsl:value-of select="@className"/>','block')
+              </xsl:attribute>
+show methods</button>
+              <xsl:for-each select="testLog">
+                <div class="method">
+                  <xsl:attribute name="id">
+                    <xsl:value-of select="@fullId"/>
+                  </xsl:attribute>
+                  <h2>
+                    <a>
+                      <xsl:attribute name="name">
+                        <xsl:value-of select="@fullId"/>
+                      </xsl:attribute>
+                      <xsl:value-of select="@testMethod"/>
+                    </a>
+                  </h2>
+                  <button><xsl:attribute name="onclick">
+                negateIdDisplayInline('<xsl:value-of select="@fullId"/>.out');
+                recalcLogsWidth('<xsl:value-of select="@fullId"/>');
+              </xsl:attribute>
+show/hide stdout</button>
+                  <button><xsl:attribute name="onclick">
+                negateIdDisplayInline('<xsl:value-of select="@fullId"/>.err');
+                recalcLogsWidth('<xsl:value-of select="@fullId"/>');
+              </xsl:attribute>
+show/hide stderr</button>
+                  <button><xsl:attribute name="onclick">
+                negateIdDisplayInline('<xsl:value-of select="@fullId"/>.all');
+                recalcLogsWidth('<xsl:value-of select="@fullId"/>');
+              </xsl:attribute>
+show/hide alllog</button>
+                  <button><xsl:attribute name="onclick">
+                negateClassBlocDisplayIn('<xsl:value-of select="@fullId"/>','fulltrace');
+              </xsl:attribute>
+show/hide fulltraces</button>
+                  <button><xsl:attribute name="onclick">
+                negateClassBlocDisplayIn('<xsl:value-of select="@fullId"/>','stamp');
+              </xsl:attribute>
+show/hide stamps</button>
+                  <div class="space-line">
+                    <!-- -->
+                  </div>
+                  <xsl:for-each select="log">
+                    <div class="output">
+                      <xsl:attribute name="id"><xsl:value-of select="../@fullId"/>.<xsl:value-of select="@id"/></xsl:attribute>
+                      <h3>
+                        <xsl:value-of select="@id"/>
+                      </h3>
+                      <xsl:for-each select="item">
+                        <div class="item">
+                          <xsl:attribute name="id"><xsl:value-of select="../../@fullId"/>.<xsl:value-of select="../@id"/>.<xsl:value-of select="@id"/></xsl:attribute>
+                          <div class="stamp"><xsl:value-of select="stamp"/></div>
+                          <div class="fulltrace">
+                            <pre>
+                              <xsl:value-of select="fulltrace"/>
+                            </pre>
+                          </div>
+                          <pre>
+                            <xsl:value-of select="text"/>
+                          </pre>
+                          <!--item-->
+                        </div>
+                      </xsl:for-each>
+                      <!--output-->
+                    </div>
+                  </xsl:for-each>
+                  <div class="space-line">
+                    <!-- -->
+                  </div>
+                  <!--method-->
+                </div>
+              </xsl:for-each>
+              <!--classa-->
+            </div>
+          </xsl:for-each>
+          <!--wholePage-->
+        </div>
+      </body>
+    </html>
+  </xsl:template>
+</xsl:stylesheet>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/report-styles/output.css
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/report-styles/output.css	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/report-styles/output.css	(revision 416)
@@ -0,0 +1,7 @@
+div.space-line {  clear: both; margin: 0; padding: 0; width: auto;}
+div.classa { border: thin solid black; padding: 5px; margin: 5px;}
+div.method {border: thin solid black; padding: 5px; margin: 5px;}
+div.output { border: thin solid black; padding: 5px; margin: 5px; float: left; display: inline; width:30%;  overflow-x: scroll}
+div.item {border-bottom: thin solid black; border-top: thin solid black; border-left: thin solid black; padding: 5px; margin: 5px;}
+div.stamp { border: thin solid black; padding: 5px; margin: 5px;}
+div.fulltrace {border-bottom: thin solid black; border-top: thin solid black; border-left: thin solid black; padding: 5px; margin: 5px;}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/report-styles/report.css
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/report-styles/report.css	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/report-styles/report.css	(revision 416)
@@ -0,0 +1,26 @@
+div.passed {background-color:green;height:auto }
+div.failed {background-color:red ;height:auto}
+div.ignored {background-color:yellow ;height:auto}
+
+div.clazz {display:inline }
+div.method {display:inline }
+
+div.result {display:block; border: thin solid black ;height:auto}
+div.status {display:inline; }
+div.wtrace {display:inline; border: thin solid black; float: right;height:auto}
+div.theader {display:block; border: thin solid black}
+div.trace {display:block; border: thin solid black}
+
+div.space-line {  clear: both; margin: 0; padding: 0; width: auto;}
+
+div.tablee {width:200px; border: thin solid black; }
+div.row { border: thin solid black; }
+div.cell1 {display:inline; float: left;height:auto}
+div.cell2 {display:inline; float: right;height:auto}
+
+a.classSumaryName{font-weight:bold}
+
+a.logLink:link {color: black}
+a.logLink:active {color: black; }
+a.logLink:visited {color: black;}
+a.logLink:hover {color: black;font-weight: bolder;}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/README
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/README	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/README	(revision 416)
@@ -0,0 +1,32 @@
+Each file in directory simple must follows hierarchy conventions and is compiled/jared 
+ automatically into server's working directory and content of resources likewise. 
+ The name of jnlp is independent, and there can be even more jnlps for each future jar.
+Directories are honored in srcs and in resources, but not in testcases.
+Directories in signed handle their content in similar way as simple's content is handled,
+ but in addition final jars are signed with simple testkey.
+Files in custom directory have to care about compilation/packaging and deploying of srcs
+ directory themselves. This can affect also testcase and resources, but testcases and
+ resources are still automatically prepared like they are in the other test types.
+There are three reproducers â simpletest1, simpletest2 and deadlocktest, which tests 
+ testâs suite itself and serve as examples of behaviour.
+
+Directory "signed" is listed in Makefile.am. You can specify as much to-be-signed
+directories as you want. And jars in each of those signed directories will be 
+signed  by their's own unique key (number of signed directories == number of certificates).
+Do not forget to add each this directory into list n Makefile.am
+
+If the name of a folder in simple/signed is composed of dots, then its contents
+ are deployed from under a directory structure such that each part evaluates to
+ a folder. For example, my.dir.reproducer/ will be deployed as jnlp_test_server/my/dir/reproducer.jar.
+
+Inside custom directory are expected directories which are handling themselves.
+ The only strictly necessary file is custom/reproducerName/srcs/Makefile. Upon 
+ all custom/*/srcs are then launched make prepare-reproducer and during cleaning make 
+ clean-reproducer. Those targets are run after all simple and signed reproducers are
+ prepared, so they can reuse components of the simple and signed reproducers, eg 
+ certificates or dependencies. to keep this custom makefiles as simple as possible. 
+ Some comment in makefile or readme file is recommended for each custom reproducer
+ to tell dependencies and what it does. Some readme (or comment in classes) is good
+  advice for any reproducer anyway;)
+Because of automake only small set of variables from icedtea-web Makefile is 
+ available for custom makefiles, but feel free to export others if needed.
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/custom/AppletFolderInArchiveTag/resources/AppletFolderInArchiveTag.html
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/custom/AppletFolderInArchiveTag/resources/AppletFolderInArchiveTag.html	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/custom/AppletFolderInArchiveTag/resources/AppletFolderInArchiveTag.html	(revision 416)
@@ -0,0 +1,42 @@
+<!--
+
+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 bgcolor="blue">
+<p><applet code="AppletFolderInArchiveTag.class" archive="archive_tag_folder_test/">
+</applet></p>
+</body>
+</html>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/custom/AppletFolderInArchiveTag/srcs/AppletFolderInArchiveTag.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/custom/AppletFolderInArchiveTag/srcs/AppletFolderInArchiveTag.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/custom/AppletFolderInArchiveTag/srcs/AppletFolderInArchiveTag.java	(revision 416)
@@ -0,0 +1,58 @@
+import java.applet.Applet;
+
+/*
+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.
+ */
+public class AppletFolderInArchiveTag extends Applet {
+
+    private static class Killer extends Thread {
+        @Override
+        public void run() {
+            try {
+                int n = 2000;
+                Thread.sleep(n);
+                System.exit(0);
+            } catch (Exception ex) {
+            }
+        }
+    }
+
+    @Override
+    public void init() {
+        new Killer().start();
+        System.out.println("This was ran from a folder specified in the archive tag.");
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/custom/AppletFolderInArchiveTag/srcs/Makefile
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/custom/AppletFolderInArchiveTag/srcs/Makefile	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/custom/AppletFolderInArchiveTag/srcs/Makefile	(revision 416)
@@ -0,0 +1,18 @@
+TESTNAME=AppletFolderInArchiveTag
+ARCHIVE_TEST_FOLDER=archive_tag_folder_test
+JAVAC_CLASSPATH=$(JNLP_TESTS_ENGINE_DIR):$(NETX_DIR)/lib/classes.jar
+DEPLOY_SUBDIR=$(JNLP_TESTS_SERVER_DEPLOYDIR)/$(ARCHIVE_TEST_FOLDER)
+INDEX_HTML_BODY="<html><body><h1>Required to recognize folder structure</h1></body></html>"
+
+prepare-reproducer:
+	echo PREPARING REPRODUCER $(TESTNAME)
+	mkdir -p $(DEPLOY_SUBDIR)
+	echo $(INDEX_HTML_BODY) > $(DEPLOY_SUBDIR)/index.html
+	$(EXPORTED_JAVAC) -classpath $(JAVAC_CLASSPATH) -d $(DEPLOY_SUBDIR) $(TESTNAME).java
+	echo PREPARED REPRODUCER $(TESTNAME)
+
+clean-reproducer:
+	echo CLEANING REPRODUCER $(TESTNAME)
+	rm -rf $(DEPLOY_SUBDIR)
+	echo CLEANED REPRODUCER $(TESTNAME)
+
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/custom/AppletFolderInArchiveTag/testcases/AppletFolderInArchiveTagTests.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/custom/AppletFolderInArchiveTag/testcases/AppletFolderInArchiveTagTests.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/custom/AppletFolderInArchiveTag/testcases/AppletFolderInArchiveTagTests.java	(revision 416)
@@ -0,0 +1,61 @@
+/* AppletFolderInArchiveTagTests.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.ServerAccess.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 AppletFolderInArchiveTagTests extends BrowserTest{
+
+
+    @NeedsDisplay
+    @Test
+    @TestInBrowsers(testIn={Browsers.all})
+    @Bug(id="PR1011")
+    public void testClassInAppletFolder() throws Exception {
+        ProcessResult pr = server.executeBrowser("/AppletFolderInArchiveTag.html");
+
+        String s0 = "This was ran from a folder specified in the archive tag.";
+        Assert.assertTrue("Expected '"+s0+"', stdout was: " + pr.stdout, pr.stdout.contains(s0));
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/custom/UnsignedContentInMETAINF/resources/UnsignedContentInMETAINF.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/custom/UnsignedContentInMETAINF/resources/UnsignedContentInMETAINF.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/custom/UnsignedContentInMETAINF/resources/UnsignedContentInMETAINF.jnlp	(revision 416)
@@ -0,0 +1,56 @@
+<!--
+
+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.
+
+ -->
+<!-- Uses version of signed/ReadPropertiesSigned with unsigned content in META-INF -->
+<?xml version="1.0" encoding="utf-8"?> 
+<jnlp spec="1.0"
+      codebase="./"
+      href="UnsignedContentInMETAINF.jnlp">
+    <information>
+        <title>read properties using System.getenv() with unsigned content in META-INF</title>
+        <vendor>IcedTea</vendor>
+    </information>
+    <resources>
+        <jar href="UnsignedContentInMETAINF.jar" main="true"/>
+    </resources>
+    <application-desc main-class="ReadPropertiesSigned">
+      <argument>user.name</argument>
+    </application-desc>
+    <security>
+      <all-permissions/>
+    </security>
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/custom/UnsignedContentInMETAINF/srcs/META-INF/unsigned_file_in_metainf
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/custom/UnsignedContentInMETAINF/srcs/META-INF/unsigned_file_in_metainf	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/custom/UnsignedContentInMETAINF/srcs/META-INF/unsigned_file_in_metainf	(revision 416)
@@ -0,0 +1,1 @@
+This is an unsigned file to be placed in the META-INF/ folder of the copied jar.
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/custom/UnsignedContentInMETAINF/srcs/Makefile
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/custom/UnsignedContentInMETAINF/srcs/Makefile	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/custom/UnsignedContentInMETAINF/srcs/Makefile	(revision 416)
@@ -0,0 +1,21 @@
+TESTNAME=UnsignedContentInMETAINF
+JAVAC_CLASSPATH=$(JNLP_TESTS_ENGINE_DIR):$(NETX_DIR)/lib/classes.jar
+DEPLOY_DIR=$(JNLP_TESTS_SERVER_DEPLOYDIR)
+JAVAC=$(BOOT_DIR)/bin/javac
+JAR=$(BOOT_DIR)/bin/jar
+ABS_SRC_PATH=$(JNLP_TESTS_SRCDIR)/custom/$(TESTNAME)/srcs
+
+prepare-reproducer:
+	echo PREPARING REPRODUCER $(TESTNAME)
+	echo "USING ABSPATH = " $(ABS_SRC_PATH)
+	cp $(DEPLOY_DIR)/ReadPropertiesSigned.jar $(DEPLOY_DIR)/UnsignedContentInMETAINF.jar
+	# Place an unsigned file in the META-INF folder
+	cd $(ABS_SRC_PATH)
+	$(JAR) uf $(DEPLOY_DIR)/UnsignedContentInMETAINF.jar META-INF/
+	echo PREPARED REPRODUCER $(TESTNAME)
+
+clean-reproducer:
+	echo CLEANING REPRODUCER $(TESTNAME)
+	rm -f UnsignedContentInMETAINF.jar
+	echo CLEANED REPRODUCER $(TESTNAME)
+
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/custom/UnsignedContentInMETAINF/testcases/UnsignedContentInMETAINF.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/custom/UnsignedContentInMETAINF/testcases/UnsignedContentInMETAINF.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/custom/UnsignedContentInMETAINF/testcases/UnsignedContentInMETAINF.java	(revision 416)
@@ -0,0 +1,65 @@
+/* UnsignedContentInMETAINF.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.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+import net.sourceforge.jnlp.ServerAccess;
+import org.junit.Assert;
+import org.junit.Test;
+import net.sourceforge.jnlp.ProcessResult;;
+
+public class UnsignedContentInMETAINF {
+
+    private static ServerAccess server = new ServerAccess();
+    private final List<String> l=Collections.unmodifiableList(Arrays.asList(new String[] {"-Xtrustall"}));
+
+    String accessMatcher = "(?s).*java.security.AccessControlException.{0,5}access denied.{0,5}java.util.PropertyPermission.{0,5}" + "user.name.{0,5}read" + ".*";
+
+    @Test
+    public void ReadSignedPropertiesWithUnsignedContentInMETAINF() throws Exception {
+        //request for allpermissions
+        ProcessResult pr=server.executeJavawsHeadless(l,"/UnsignedContentInMETAINF.jnlp");
+        Assert.assertFalse("Stderr should NOT match "+accessMatcher+" but did",pr.stderr.matches(accessMatcher));
+        String ss="ClassNotFoundException";
+        Assert.assertFalse("Stderr should not contain "+ss+" but did",pr.stderr.contains(ss));
+        Assert.assertTrue("Stdout length should be >= 4 but was "+pr.stdout.length(),pr.stdout.length()>=4); // /home/user or /root or anything else :(
+        Assert.assertFalse("Should not be terminated but was",pr.wasTerminated);
+        Assert.assertEquals((Integer)0, pr.returnValue);
+    }
+  }
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/AccessClassInPackageSigned/resources/AccessClassInPackageSignedJAVAXJNLP.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/AccessClassInPackageSigned/resources/AccessClassInPackageSignedJAVAXJNLP.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/AccessClassInPackageSigned/resources/AccessClassInPackageSignedJAVAXJNLP.jnlp	(revision 416)
@@ -0,0 +1,57 @@
+<!--
+
+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"
+      codebase="."
+      href="AccessClassInPackageJAVAXJNLP.jnlp">
+   <information> 
+      <title>Test accessClassInPackage signed</title>
+      <vendor>IcedTea</vendor>
+      <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+      <description>testing access to some javax.jnlp.* package by signed app</description>
+   </information> 
+   <resources>
+      <jar href="AccessClassInPackageSigned.jar" main="true"/>
+   </resources>
+   <application-desc main-class="AccessClassInPackageSigned">
+     <argument>javax.jnlp.ServiceManager</argument>
+   </application-desc>
+   <security>
+     <all-permissions/>
+   </security>
+</jnlp> 
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/AccessClassInPackageSigned/resources/AccessClassInPackageSignedNETSF.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/AccessClassInPackageSigned/resources/AccessClassInPackageSignedNETSF.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/AccessClassInPackageSigned/resources/AccessClassInPackageSignedNETSF.jnlp	(revision 416)
@@ -0,0 +1,57 @@
+<!--
+
+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"
+      codebase="."
+      href="AccessClassInPackageSignedNETSF.jnlp">
+   <information> 
+      <title>Test accessClassInPackage  by signed app</title>
+      <vendor>IcedTea</vendor>
+      <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+      <description>testing access to net.sourceforge.* package  by signed app</description>
+   </information> 
+   <resources>
+      <jar href="AccessClassInPackageSigned.jar" main="true"/>
+   </resources>
+   <application-desc main-class="AccessClassInPackageSigned">
+     <argument>net.sourceforge.jnlp.Parser</argument>
+   </application-desc>
+   <security>
+     <all-permissions/>
+   </security>
+</jnlp> 
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/AccessClassInPackageSigned/resources/AccessClassInPackageSignedSELF.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/AccessClassInPackageSigned/resources/AccessClassInPackageSignedSELF.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/AccessClassInPackageSigned/resources/AccessClassInPackageSignedSELF.jnlp	(revision 416)
@@ -0,0 +1,57 @@
+<!--
+
+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"
+      codebase="."
+      href="AccessClassInPackageSignedSELF.jnlp">
+   <information> 
+      <title>Test accessClassInPackage by signed app</title>
+      <vendor>IcedTea</vendor>
+      <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+      <description>testing aaccess to package's internal class by signed app</description>
+   </information> 
+   <resources>
+      <jar href="AccessClassInPackageSigned.jar" main="true"/>
+   </resources>
+   <application-desc main-class="AccessClassInPackageSigned">
+     <argument>AccessClassInPackageSigned</argument>
+   </application-desc>
+   <security>
+     <all-permissions/>
+   </security>
+</jnlp> 
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/AccessClassInPackageSigned/resources/AccessClassInPackageSignedSUNSEC.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/AccessClassInPackageSigned/resources/AccessClassInPackageSignedSUNSEC.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/AccessClassInPackageSigned/resources/AccessClassInPackageSignedSUNSEC.jnlp	(revision 416)
@@ -0,0 +1,57 @@
+<!--
+
+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"
+      codebase="."
+      href="AccessClassInPackageSignedSUNSEC.jnlp">
+   <information> 
+      <title>Test accessClassInPackage by signed app</title>
+      <vendor>IcedTea</vendor>
+      <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+    <description>testing access to sun.security.* package by signed app</description>
+   </information> 
+   <resources>
+      <jar href="AccessClassInPackageSigned.jar" main="true"/>
+   </resources>
+   <application-desc main-class="AccessClassInPackageSigned">
+     <argument>sun.security.internal.spec.TlsKeyMaterialSpec</argument>
+   </application-desc>
+   <security>
+     <all-permissions/>
+   </security>
+</jnlp> 
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/AccessClassInPackageSigned/srcs/AccessClassInPackageSigned.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/AccessClassInPackageSigned/srcs/AccessClassInPackageSigned.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/AccessClassInPackageSigned/srcs/AccessClassInPackageSigned.java	(revision 416)
@@ -0,0 +1,44 @@
+/* AccessClassInPackage.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.
+ */
+
+public class AccessClassInPackageSigned {
+
+    public static void main(String[] args) throws Exception{
+            Class.forName(args[0]);
+            System.out.println("Class was obtained: "+ args[0]);
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/AppletTestSigned/resources/AppletTestSigned.html
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/AppletTestSigned/resources/AppletTestSigned.html	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/AppletTestSigned/resources/AppletTestSigned.html	(revision 416)
@@ -0,0 +1,46 @@
+<!--
+
+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 bgcolor="red">
+<p>
+  <applet code="AppletTestSigned.class" archive="XslowXAppletTestSigned.jar" codebase="." width="100" height="100">
+    <param name="key1" value="value1">
+    <param name="key2" value="#value2">
+  </applet>
+</p>
+</body>
+</html>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/AppletTestSigned/resources/AppletTestSigned.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/AppletTestSigned/resources/AppletTestSigned.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/AppletTestSigned/resources/AppletTestSigned.jnlp	(revision 416)
@@ -0,0 +1,63 @@
+<!--
+
+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="AppletTestSigned.jnlp" codebase=".">
+    <information>
+        <title>SignedAppletTest</title>
+        <vendor>IcedTea</vendor>
+        <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web "/>
+        <description>SignedAppletTest</description>
+        <offline/>
+    </information>
+    <resources>
+        <j2se version="1.4+"/>
+        <jar href="AppletTestSigned.jar"/>
+    </resources>
+    <applet-desc
+      documentBase="."
+      name="AppletTest"
+      main-class="AppletTestSigned"
+      width="100"
+      height="100">
+        <param name="key1" value="value1"/>
+        <param name="key2" value="value2"/>
+    </applet-desc>
+</jnlp>
+
+
+</applet-desc>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/AppletTestSigned/srcs/AppletTestSigned.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/AppletTestSigned/srcs/AppletTestSigned.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/AppletTestSigned/srcs/AppletTestSigned.java	(revision 416)
@@ -0,0 +1,82 @@
+/* AppletTestSigned.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.applet.Applet;
+
+public class AppletTestSigned extends Applet {
+
+    private class Killer extends Thread {
+
+        public int n = 2000;
+
+        @Override
+        public void run() {
+            try {
+                Thread.sleep(n);
+                System.out.println("AppletTestSigned killing himself after " + n + " ms of life");
+                System.exit(0);
+            } catch (Exception ex) {
+            }
+        }
+    }
+    private Killer killer;
+
+    @Override
+    public void init() {
+        System.out.println("AppletTestSigned was initialised");
+        killer = new Killer();
+    }
+
+    @Override
+    public void start() {
+        System.out.println("AppletTestSigned was started");
+        System.out.println(getParameter("key1"));
+        System.out.println(getParameter("key2"));
+        killer.start();
+        System.out.println("killer was started");
+    }
+
+    @Override
+    public void stop() {
+        System.out.println("AppletTestSigned was stopped");
+    }
+
+    @Override
+    public void destroy() {
+        System.out.println("AppletTestSigned will be destroyed");
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/AppletTestSigned/testcases/AppletTestSignedTests.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/AppletTestSigned/testcases/AppletTestSignedTests.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/AppletTestSigned/testcases/AppletTestSignedTests.java	(revision 416)
@@ -0,0 +1,98 @@
+/* AppletTestSignedTests.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.ProcessResult;
+import net.sourceforge.jnlp.ServerAccess;
+import net.sourceforge.jnlp.browsertesting.BrowserTest;
+import net.sourceforge.jnlp.browsertesting.Browsers;
+import net.sourceforge.jnlp.annotations.TestInBrowsers;
+import org.junit.Assert;
+
+import org.junit.Test;
+
+public class AppletTestSignedTests extends BrowserTest {
+
+    private final List<String> l = Collections.unmodifiableList(Arrays.asList(new String[]{"-Xtrustall"}));
+
+    @Test
+    public void AppletTestSignedTest() throws Exception {
+        ProcessResult pr = server.executeJavawsHeadless(l, "/AppletTestSigned.jnlp");
+        evaluateSignedApplet(pr, true);
+        Assert.assertFalse(pr.wasTerminated);
+        Assert.assertEquals((Integer) 0, pr.returnValue);
+    }
+
+    private void evaluateSignedApplet(ProcessResult pr, boolean javawsApplet) {
+        String s3 = "AppletTestSigned was initialised";
+        Assert.assertTrue("AppletTestSigned stdout should contain " + s3 + " but didn't", pr.stdout.contains(s3));
+        String s0 = "AppletTestSigned was started";
+        Assert.assertTrue("AppletTestSigned stdout should contain " + s0 + " but didn't", pr.stdout.contains(s0));
+        String s1 = "value1";
+        Assert.assertTrue("AppletTestSigned stdout should contain " + s1 + " but didn't", pr.stdout.contains(s1));
+        String s2 = "value2";
+        Assert.assertTrue("AppletTestSigned stdout should contain " + s2 + " but didn't", pr.stdout.contains(s2));
+        String ss = "xception";
+        Assert.assertFalse("AppletTestSigned stderr should not contain " + ss + " but did", pr.stderr.contains(ss));
+        String s7 = "AppletTestSigned killing himself after 2000 ms of life";
+        Assert.assertTrue("AppletTestSigned stdout should contain " + s7 + " but didn't", pr.stdout.contains(s7));
+        if (!javawsApplet) {
+            /*this is working correctly in most browser, but not in all. temporarily disabling
+            String s4 = "AppletTestSigned was stopped";
+            Assert.assertTrue("AppletTestSigned stdout shouldt contain " + s4 + " but did", pr.stdout.contains(s4));
+            String s5 = "AppletTestSigned will be destroyed";
+            Assert.assertTrue("AppletTestSigned stdout shouldt contain " + s5 + " but did", pr.stdout.contains(s5));
+             */
+        }
+    }
+
+    @Test
+    @TestInBrowsers(testIn = {Browsers.all})
+    public void AppletTestSignedFirefoxTest() throws Exception {
+        ServerAccess.PROCESS_TIMEOUT = 30 * 1000;
+        try {
+            ProcessResult pr = server.executeBrowser("/AppletTestSigned.html");
+            evaluateSignedApplet(pr, false);
+            Assert.assertTrue(pr.wasTerminated);
+            //Assert.assertEquals((Integer) 0, pr.returnValue); due to destroy is null
+        } finally {
+            ServerAccess.PROCESS_TIMEOUT = 20 * 1000; //back to normal
+        }
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/CacheReproducer/resources/CacheReproducer1.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/CacheReproducer/resources/CacheReproducer1.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/CacheReproducer/resources/CacheReproducer1.jnlp	(revision 416)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?> 
+<jnlp spec="1.0"
+      codebase="./"
+      href="CacheReproducer1.jnlp">
+    <information>
+        <title>Just prints out "Good simple javaws exapmle" using reflection call from CacheReproducer.jar SimpletestSigned1.jar</title>
+        <vendor>IcedTea</vendor>
+    </information>
+    <resources>
+        <jar href="CacheReproducer.jar" main="true"/>
+        <jar href="SimpletestSigned1.jar" main="false" download="eager"/>  
+    </resources>
+    <application-desc main-class="CacheReproducer"/>
+     <security>
+      <all-permissions/>
+    </security>
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/CacheReproducer/resources/CacheReproducer1_1.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/CacheReproducer/resources/CacheReproducer1_1.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/CacheReproducer/resources/CacheReproducer1_1.jnlp	(revision 416)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?> 
+<jnlp spec="1.0"
+      codebase="./"
+      href="CacheReproducer1_1.jnlp">
+    <information>
+        <title>Just prints out "Good simple javaws exapmle" using reflection call from CacheReproducer.jar SimpletestSigned1.jar</title>
+        <vendor>IcedTea</vendor>
+    </information>
+    <resources>
+        <jar href="CacheReproducer.jar" main="true"/>
+        <jar href="SimpletestSigned1.jar" main="false" download="lazy"/>
+    </resources>
+    <application-desc main-class="CacheReproducer"/>
+     <security>
+      <all-permissions/>
+    </security>
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/CacheReproducer/resources/CacheReproducer2.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/CacheReproducer/resources/CacheReproducer2.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/CacheReproducer/resources/CacheReproducer2.jnlp	(revision 416)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?> 
+<jnlp spec="1.0"
+      codebase="./"
+      href="CacheReproducer2.jnlp">
+    <information>
+        <title>Just prints out "Good simple javaws exapmle" using reflection call from CacheReproducer.jar SimpletestSigned1.jar</title>
+        <vendor>IcedTea</vendor>
+    </information>
+    <resources>
+        <jar href="SimpletestSigned1.jar" main="false" download="eager"/>
+        <jar href="CacheReproducer.jar" main="true"/>
+    </resources>
+    <application-desc main-class="CacheReproducer"/>
+     <security>
+      <all-permissions/>
+    </security>
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/CacheReproducer/resources/CacheReproducer2_1.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/CacheReproducer/resources/CacheReproducer2_1.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/CacheReproducer/resources/CacheReproducer2_1.jnlp	(revision 416)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?> 
+<jnlp spec="1.0"
+      codebase="./"
+      href="CacheReproducer2_1.jnlp">
+    <information>
+        <title>Just prints out "Good simple javaws exapmle" using reflection call from CacheReproducer.jar SimpletestSigned1.jar</title>
+        <vendor>IcedTea</vendor>
+    </information>
+    <resources>
+        <jar href="SimpletestSigned1.jar" main="false" download="lazy"/>
+        <jar href="CacheReproducer.jar" main="true"/>
+    </resources>
+    <application-desc main-class="CacheReproducer"/>
+     <security>
+      <all-permissions/>
+    </security>
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/CacheReproducer/srcs/CacheReproducer.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/CacheReproducer/srcs/CacheReproducer.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/CacheReproducer/srcs/CacheReproducer.java	(revision 416)
@@ -0,0 +1,47 @@
+/* CacheReproducer.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.lang.reflect.*;
+
+public class CacheReproducer{
+
+    public static void main(String[] args) throws Exception{
+        Class c1= Class.forName("SimpletestSigned1");
+        Method m1=c1.getDeclaredMethod("main",args.getClass());
+        m1.invoke((Object) null, (Object)args);
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/CacheReproducer/testcases/CacheReproducerTest.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/CacheReproducer/testcases/CacheReproducerTest.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/CacheReproducer/testcases/CacheReproducerTest.java	(revision 416)
@@ -0,0 +1,478 @@
+/* CacheReproducerTest.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.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.UnsupportedEncodingException;
+import java.util.Arrays;
+import java.util.List;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import net.sourceforge.jnlp.ServerAccess;
+import net.sourceforge.jnlp.ServerAccess.ProcessResult;
+import net.sourceforge.jnlp.annotations.KnownToFail;
+import org.junit.AfterClass;
+import org.junit.Assert;
+
+import org.junit.Test;
+
+public class CacheReproducerTest {
+
+    private static final ServerAccess server = new ServerAccess();
+    private static final List<String> clear = Arrays.asList(new String[]{server.getJavawsLocation(), "-Xclearcache",  ServerAccess.HEADLES_OPTION});
+    private static final List<String> trustedVerboses = Arrays.asList(new String[]{"-Xtrustall", ServerAccess.HEADLES_OPTION,"-verbose"});
+    private static final List<String> verbosed = Arrays.asList(new String[]{"-verbose", ServerAccess.HEADLES_OPTION});
+    private static final String home = System.getProperty("user.home");
+    private static final String name = System.getProperty("user.name");
+    private static final String tmp = System.getProperty("java.io.tmpdir");
+    private static final File icedteaDir = new File(home + "/" + ".icedtea");
+    private static final File icedteaCache = new File(icedteaDir, "cache");
+    private static final File icedteaCacheFile = new File(icedteaCache, "recently_used");
+    private static final File netxLock = new File(tmp + "/" + name + "/netx/locks/netx_running");
+    private static final String lre = "LruCacheException";
+    private static final String ioobe = "IndexOutOfBoundsException";
+    private static final String corruptRegex = "\\d{13}";
+    private static final Pattern corruptPatern = Pattern.compile(corruptRegex);
+    private static final String corruptString = "156dsf1562kd5";
+
+     String testS = "#netx file\n"
+                + "#Mon Dec 12 16:20:46 CET 2011\n"
+                + "1323703236508,0=/home/xp13/.icedtea/cache/0/http/localhost/ReadPropertiesBySignedHack.jnlp\n"
+                + "1323703243086,2=/home/xp14/.icedtea/cache/2/http/localhost/ReadProperties.jar\n"
+                + "1323703243082,1=/home/xp15/.icedtea/cache/1/http/localhost/ReadPropertiesBySignedHack.jar";
+
+    @Test
+    public void cacheIsWorkingTest() throws Exception {
+        clearAndEvaluateCache();
+        evaluateSimpleTest1OkCache(runSimpleTest1());
+        assertCacheIsNotEmpty();
+    }
+
+    @Test
+    public void cacheIsWorkingTestSigned() throws Exception {
+        clearAndEvaluateCache();
+        evaluateSimpleTest1OkCache(runSimpleTest1Signed());
+        assertCacheIsNotEmpty();
+    }
+
+     private class ParallelSimpleTestRunner extends Thread {
+           public boolean b=false;
+            @Override
+            public void run() {
+                try {
+
+                    ServerAccess.ProcessResult pr = runSimpleTest1();
+                    evaluateSimpleTest1OkCache(pr);
+                    b=true;
+                } catch (Exception ex) {
+                    throw new RuntimeException(ex);
+                }
+            }
+        };
+
+    @Test
+    @KnownToFail
+    public void startParallelInstancesUponBrokenCache() throws Exception {
+        clearAndEvaluateCache();
+        evaluateSimpleTest1OkCache(runSimpleTest1());
+        assertCacheIsNotEmpty();
+        breakCache1();
+        ParallelSimpleTestRunner t1=new ParallelSimpleTestRunner();
+        ParallelSimpleTestRunner t2=new ParallelSimpleTestRunner();
+        ParallelSimpleTestRunner t3=new ParallelSimpleTestRunner();
+        t1.start();
+        t2.start();
+        t3.start();
+        int c=0;
+        while(true){
+            c++;
+            Thread.sleep(100);
+            if (c>600) throw new Error("threads have not died in time");
+            if (!t1.isAlive() && !t2.isAlive() && !t3.isAlive()) break;
+        }
+        Thread.sleep(1000);
+        Assert.assertTrue(t1.b);
+        Assert.assertTrue(t2.b);
+        Assert.assertTrue(t3.b);
+    }
+
+
+    private void assertCacheIsNotEmpty() {
+        Assert.assertTrue("icedtea cache " + icedteaCache.getAbsolutePath() + " should exist some any run", icedteaCache.exists());
+        Assert.assertTrue("icedtea cache file " + icedteaCacheFile.getAbsolutePath() + " should exist some any run", icedteaCacheFile.exists());
+        Assert.assertTrue("icedtea cache file " + icedteaCacheFile.getAbsolutePath() + " should not be empty", icedteaCacheFile.length() > 0);
+    }
+
+    /**
+     * This is breaking integer numbers in first part of cache file item
+     * @throws Exception
+     */
+    @Test
+    public void coruptAndRunCache1() throws Exception {
+        clearAndEvaluateCache();
+        evaluateSimpleTest1OkCache(runSimpleTest1());
+        assertCacheIsNotEmpty();
+        breakCache1();
+        ProcessResult pr = runSimpleTest1();
+        assertLruExceptionAppeared(pr);
+        evaluateSimpleTest1OkCache(pr);
+        clearAndEvaluateCache();
+        ProcessResult pr2 = runSimpleTest1();
+        evaluateSimpleTest1OkCache(pr2);
+        assertLruExceptionNOTappeared(pr2);
+    }
+
+    /**
+     * This is breaking integer numbers in first part of cache file item
+     * @throws Exception
+     */
+    @Test
+    public void coruptAndRunCache2() throws Exception {
+        clearAndEvaluateCache();
+        evaluateSimpleTest1OkCache(runSimpleTest1());
+        assertCacheIsNotEmpty();
+        breakCache1();
+        ProcessResult pr = runSimpleTest1();
+        assertLruExceptionAppeared(pr);
+        evaluateSimpleTest1OkCache(pr);
+        ProcessResult pr3 = runSimpleTest1();
+        evaluateSimpleTest1OkCache(pr3);
+        assertLruExceptionNOTappeared(pr3);
+        clearAndEvaluateCache();
+        ProcessResult pr2 = runSimpleTest1();
+        evaluateSimpleTest1OkCache(pr2);
+        assertLruExceptionNOTappeared(pr2);
+    }
+
+    /**
+     * This is breaking paths in second part of cache file item
+     * @throws Exception
+     */
+    @Test
+    public void coruptAndRunCache3() throws Exception {
+        clearAndEvaluateCache();
+        evaluateSimpleTest1OkCache(runSimpleTest1());
+        assertCacheIsNotEmpty();
+        breakCache3();
+        ProcessResult pr = runSimpleTest1();
+        assertAoobNOTappeared(pr);
+        assertLruExceptionAppeared(pr);
+        evaluateSimpleTest1OkCache(pr);
+        ProcessResult pr3 = runSimpleTest1();
+        evaluateSimpleTest1OkCache(pr3);
+        assertLruExceptionNOTappeared(pr3);
+        clearAndEvaluateCache();
+        ProcessResult pr2 = runSimpleTest1();
+        evaluateSimpleTest1OkCache(pr2);
+        assertLruExceptionNOTappeared(pr2);
+    }
+
+     private void assertAoobNOTappeared(ProcessResult pr2) {
+        Assert.assertFalse("serr should NOT contain " + ioobe, pr2.stderr.contains(ioobe));
+    }
+
+    private void assertLruExceptionNOTappeared(ProcessResult pr2) {
+        Assert.assertFalse("serr should NOT contain " + lre, pr2.stderr.contains(lre));
+    }
+
+    private void assertLruExceptionAppeared(ProcessResult pr) {
+        Assert.assertTrue("serr should contain " + lre, pr.stderr.contains(lre));
+    }
+
+    @Test
+    public void coruptAndRunCache1Signed() throws Exception {
+        clearAndEvaluateCache();
+        evaluateSimpleTest1OkCache(runSimpleTest1());
+        assertCacheIsNotEmpty();
+        breakCache1();
+        ProcessResult pr = runSimpleTest1Signed();
+        assertLruExceptionAppeared(pr);
+        evaluateSimpleTest1OkCache(pr);
+        clearAndEvaluateCache();
+        ProcessResult pr2 = runSimpleTest1Signed();
+        evaluateSimpleTest1OkCache(pr2);
+        assertLruExceptionNOTappeared(pr2);
+    }
+
+    @Test
+    public void coruptAndRunCache2Signed() throws Exception {
+        clearAndEvaluateCache();
+        evaluateSimpleTest1OkCache(runSimpleTest1());
+        assertCacheIsNotEmpty();
+        breakCache1();
+        ProcessResult pr = runSimpleTest1Signed();
+        assertLruExceptionAppeared(pr);
+        evaluateSimpleTest1OkCache(pr);
+        ProcessResult pr3 = runSimpleTest1Signed();
+        evaluateSimpleTest1OkCache(pr3);
+        assertLruExceptionNOTappeared(pr3);
+        clearAndEvaluateCache();
+        ProcessResult pr2 = runSimpleTest1Signed();
+        evaluateSimpleTest1OkCache(pr2);
+        assertLruExceptionNOTappeared(pr2);
+    }
+
+    @Test
+    public void clearCacheUnsucessfully() throws Exception {
+        evaluateSimpleTest1OkCache(runSimpleTest1());
+        assertCacheIsNotEmpty();
+        ProcessResult pr;
+        Thread t = new Thread(new Runnable() {
+
+            @Override
+            public void run() {
+                try {
+                    ServerAccess.ProcessResult pr = server.executeJavawsHeadless(verbosed, "/deadlocktest.jnlp");
+                } catch (Exception ex) {
+                    throw new RuntimeException(ex);
+                }
+            }
+        });
+        t.start();
+        Thread.sleep(1000);
+        pr = tryToClearcache();
+        String q = "Can not clear cache at this time";
+        Assert.assertTrue("Stderr should contain " + q + ", but did not.", pr.stderr.contains(q));
+        assertCacheIsNotEmpty();
+    }
+
+     
+    //next four tests are designed to ensure, that corrupted cache will not break already loaded cached files
+    public static final String CR1 = "CacheReproducer1";
+    public static final String CR2 = "CacheReproducer2";
+    public static final String CR11 = "CacheReproducer1_1";
+    public static final String CR21 = "CacheReproducer2_1";
+
+    public void testsBody(String id, int breaker) throws Exception {
+        clearAndEvaluateCache();
+        ProcessResult pr1 = runSimpleTestSigned(id);
+        assertLruExceptionNOTappeared(pr1);
+        evaluateSimpleTest1OkCache(pr1);
+        if (breaker < 0) {
+            breakCache1();
+        } else {
+            breakCache2(breaker);
+        }
+        ProcessResult pr2 = runSimpleTestSigned(id);
+        assertLruExceptionAppeared(pr2);
+        evaluateSimpleTest1OkCache(pr2);
+    }
+
+    @Test
+    public void testAlreadyLoadedCached1() throws Exception {
+        testsBody(CR1, 1);
+        testsBody(CR1, 2);
+        testsBody(CR1, -1);
+    }
+
+    @Test
+    public void testAlreadyLoadedCached2() throws Exception {
+        testsBody(CR2, 1);
+        testsBody(CR2, 2);
+        testsBody(CR2, -1);
+    }
+
+    @Test
+    public void testAlreadyLoadedCached11() throws Exception {
+        testsBody(CR11, 1);
+        testsBody(CR11, 2);
+        testsBody(CR11, -1);
+    }
+
+    @Test
+    public void testAlreadyLoadedCached21() throws Exception {
+        testsBody(CR21, 1);
+        testsBody(CR21, 2);
+        testsBody(CR21, -1);
+    }
+
+    @AfterClass
+    public static void clearCache() throws Exception {
+        clearAndEvaluateCache();
+    }
+
+    private static void clearAndEvaluateCache() throws Exception {
+        clearAndEvaluateCache(true);
+    }
+
+    private static void clearAndEvaluateCache(boolean force) throws Exception {
+        if (force) {
+            if (netxLock.isFile()) {
+                boolean b = netxLock.delete();
+                junit.framework.Assert.assertTrue(b);
+            }
+
+        }
+        tryToClearcache();
+        Assert.assertFalse("icedtea cache " + icedteaCache.getAbsolutePath() + " should not exist after clearing", icedteaCache.exists());
+    }
+
+    private static String loadFile(File f) throws FileNotFoundException, UnsupportedEncodingException, IOException {
+        BufferedReader r = new BufferedReader(new InputStreamReader(new FileInputStream(icedteaCacheFile), "UTF-8"));
+        StringBuilder sb = new StringBuilder();
+        while (true) {
+            String s = r.readLine();
+            if (s == null) {
+                break;
+            }
+            sb.append(s).append("\n");
+
+        }
+        return sb.toString();
+    }
+
+    private static String loadCacheFile() throws IOException {
+        return loadFile(icedteaCacheFile);
+    }
+
+    @Test
+    public void assertBreakers1AreWorking() {
+        String s=testS;
+        String sp[] = s.split("\n");
+        String ss[] = breakAll(s).split("\n");
+        for (int i = 0; i < 2; i++) {
+            Assert.assertEquals(sp[i], ss[i]);
+
+        }
+        for (int i = 2; i < ss.length; i++) {
+            Assert.assertNotSame(sp[i], ss[i]);
+
+        }
+        String sb = breakOne(s, 0);
+        junit.framework.Assert.assertEquals(s, sb);
+        for (int x = 1; x <= 3; x++) {
+            String[] sx = breakOne(s, x).split("\n");
+            for (int i = 0; i < sx.length; i++) {
+                if (i == x + 1) {
+                    Assert.assertNotSame(sp[i], sx[i]);
+                } else {
+                    Assert.assertEquals(sp[i], sx[i]);
+                }
+
+            }
+        }
+        String sbb = breakOne(s, 4);
+        Assert.assertEquals(s, sbb);
+    }
+
+    private static String breakAll(String s) {
+        return s.replaceAll(corruptRegex, corruptString);
+    }
+
+    private static String breakOne(String s, int i) {
+        Matcher m1 = corruptPatern.matcher(s);
+        int x = 0;
+        while (m1.find()) {
+            x++;
+            String r = (m1.group(0));
+            if (x == i) {
+                return s.replace(r, corruptString);
+            }
+        }
+        return s;
+    }
+
+    @Test
+    public void assertBreakers2AreWorking() {
+        String s=testS;
+        String sp[] = s.split("\n");
+        String ss[] = breakPaths    (s).split("\n");
+        for (int i = 0; i < 2; i++) {
+            Assert.assertEquals(sp[i], ss[i]);
+
+        }
+         for (int i = 2; i < ss.length; i++) {
+            Assert.assertNotSame(sp[i], ss[i]);
+
+        }
+    }
+
+    private static String breakPaths(String s) {
+       return s.replaceAll(home+".*", "/ho");
+    }
+
+    private static void breakCache1() throws IOException {
+        String s = loadCacheFile();
+        s = breakAll(s);
+        ServerAccess.saveFile(s, icedteaCacheFile);
+    }
+
+    private static void breakCache2(int i) throws FileNotFoundException, UnsupportedEncodingException, IOException {
+        String s = loadCacheFile();
+        s = breakOne(s, i);
+        ServerAccess.saveFile(s, icedteaCacheFile);
+    }
+
+    private static void breakCache3() throws IOException {
+        String s = loadCacheFile();
+        s = breakPaths(s);
+        ServerAccess.saveFile(s, icedteaCacheFile);
+    }
+
+    private static ServerAccess.ProcessResult runSimpleTest1() throws Exception {
+        return runSimpleTest1(verbosed, "simpletest1");
+    }
+
+    private static ServerAccess.ProcessResult runSimpleTest1(List<String> args, String s) throws Exception {
+        ServerAccess.ProcessResult pr2 = server.executeJavawsHeadless(args, "/" + s + ".jnlp");
+        return pr2;
+    }
+
+    private static ServerAccess.ProcessResult runSimpleTest1Signed() throws Exception {
+        return runSimpleTestSigned("SimpletestSigned1");
+    }
+
+    private static ServerAccess.ProcessResult runSimpleTestSigned(String id) throws Exception {
+        return runSimpleTest1(trustedVerboses, id);
+    }
+
+    private static void evaluateSimpleTest1OkCache(ServerAccess.ProcessResult pr2) throws Exception {
+        String s = "Good simple javaws exapmle";
+        Assert.assertTrue("test stdout should contain " + s + " but didn't", pr2.stdout.contains(s));
+        Assert.assertFalse(pr2.wasTerminated);
+        Assert.assertEquals((Integer) 0, pr2.returnValue);
+    }
+
+    private static ProcessResult tryToClearcache() throws Exception {
+        ServerAccess.ProcessResult pr1 = ServerAccess.executeProcess(clear);
+        return pr1;
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/Classpath.Manifest.Test.Helper/srcs/CheckForClasspath.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/Classpath.Manifest.Test.Helper/srcs/CheckForClasspath.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/Classpath.Manifest.Test.Helper/srcs/CheckForClasspath.java	(revision 416)
@@ -0,0 +1,42 @@
+/* CheckForClasspath.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 CheckForClasspath {
+    public static void checkClasspathAndPrint() {
+        System.out.println("CheckForClasspath found on classpath.");
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/ClasspathManifestTest/resources/ClasspathManifestAppletTest.html
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/ClasspathManifestTest/resources/ClasspathManifestAppletTest.html	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/ClasspathManifestTest/resources/ClasspathManifestAppletTest.html	(revision 416)
@@ -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="ClasspathManifest.class"
+            archive="ClasspathManifestTest.jar"
+            codebase="."
+            width=800
+            height=600>
+    </applet>
+  </body>
+</html>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/ClasspathManifestTest/resources/ClasspathManifestAppletTest.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/ClasspathManifestTest/resources/ClasspathManifestAppletTest.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/ClasspathManifestTest/resources/ClasspathManifestAppletTest.jnlp	(revision 416)
@@ -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.
+
+ -->
+<?xml version="1.0" encoding="utf-8"?>
+<jnlp spec="1.0" href="ClasspathManifestAppletTest.jnlp" codebase=".">
+    <information>
+        <title>Classpath Manifest Applet Test</title>
+        <vendor>IcedTea</vendor>
+        <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+        <description>ClasspathManifest</description>
+        <offline/>
+    </information>
+    <resources>
+        <j2se version="1.4+"/>
+        <jar href="ClasspathManifestTest.jar"/>
+    </resources>
+    <security>
+        <all-permissions />
+    </security>
+    <applet-desc
+      documentBase="."
+      name="ClasspathManifest"
+      main-class="ClasspathManifest"
+      width="100"
+      height="100">
+    </applet-desc>
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/ClasspathManifestTest/resources/ClasspathManifestApplicationTest.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/ClasspathManifestTest/resources/ClasspathManifestApplicationTest.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/ClasspathManifestTest/resources/ClasspathManifestApplicationTest.jnlp	(revision 416)
@@ -0,0 +1,56 @@
+<!--
+
+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="ClasspathManifestApplicationTest.jnlp" codebase=".">
+    <information>
+        <title>ClasspathManifest</title>
+        <vendor>IcedTea</vendor>
+        <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+        <description>ClasspathManifest</description>
+        <offline/>
+    </information>
+    <resources>
+        <j2se version="1.4+"/>
+        <jar href="ClasspathManifestTest.jar"/>
+    </resources>
+    <security>
+        <all-permissions />
+    </security>
+    <application-desc main-class="ClasspathManifest">
+    </application-desc>
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/ClasspathManifestTest/resources/ClasspathManifestJNLPHrefTest.html
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/ClasspathManifestTest/resources/ClasspathManifestJNLPHrefTest.html	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/ClasspathManifestTest/resources/ClasspathManifestJNLPHrefTest.html	(revision 416)
@@ -0,0 +1,46 @@
+<!--
+
+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="ClasspathManifest.class" width=800 height=600>
+      <param name="jnlp_href" value="ClasspathManifestAppletTest.jnlp">
+    </applet>
+  </body>
+</html>
+
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/ClasspathManifestTest/srcs/ClasspathManifest.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/ClasspathManifestTest/srcs/ClasspathManifest.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/ClasspathManifestTest/srcs/ClasspathManifest.java	(revision 416)
@@ -0,0 +1,81 @@
+/* ClasspathManifest.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.applet.Applet;
+import java.lang.reflect.*;
+
+public class ClasspathManifest extends Applet {
+
+    private class Killer extends Thread {
+
+        public int n = 1000;
+
+        @Override
+        public void run() {
+            try {
+                Thread.sleep(n);
+                System.out.println("Applet killing himself after " + n + " ms of life");
+                System.exit(0);
+            } catch (Exception ex) {
+            }
+        }
+    }
+    private Killer killer;
+
+    public static void main(String[] args) {
+        searchForClasspath();
+    }
+
+    @Override
+    public void init() {
+        searchForClasspath();
+        killer = new Killer();
+        killer.start();
+    }
+
+    public static void searchForClasspath() {
+        System.out.println("Searching for CheckForClasspath.");
+        try {
+            Class checkClass = Class.forName("CheckForClasspath");
+            Method checkMethod = checkClass.getDeclaredMethod("checkClasspathAndPrint");
+            checkMethod.invoke((Object) null);
+        } catch (Exception ex) {
+            System.out.println("Exception was thrown, class not found on classpath.");
+            ex.printStackTrace();
+        }
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/ClasspathManifestTest/srcs/META-INF/MANIFEST.MF
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/ClasspathManifestTest/srcs/META-INF/MANIFEST.MF	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/ClasspathManifestTest/srcs/META-INF/MANIFEST.MF	(revision 416)
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path: Classpath/Manifest/Test/Helper.jar
+
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/ClasspathManifestTest/testcases/ClasspathManifestTest.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/ClasspathManifestTest/testcases/ClasspathManifestTest.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/ClasspathManifestTest/testcases/ClasspathManifestTest.java	(revision 416)
@@ -0,0 +1,134 @@
+/* ClasspathManifestTest.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.ArrayList;
+import java.util.List;
+
+import net.sourceforge.jnlp.ServerAccess;
+import net.sourceforge.jnlp.ServerAccess.ProcessResult;
+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 org.junit.Assert;
+import org.junit.Test;
+
+@Bug(id = "PR975")
+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";
+
+    public void checkAppFails(ProcessResult pr, String testName) {
+        Assert.assertTrue("ClasspathManifest." + testName + " stdout should contain " + s1 + " but didn't", pr.stdout.contains(s1));
+        Assert.assertFalse("ClasspathManifest." + testName + " stdout should not contain " + s2 + " but did", pr.stdout.contains(s2));
+        Assert.assertTrue("ClasspathManifest." + testName + " stderr should contain " + ss + " but didn't", pr.stderr.contains(ss));
+    }
+
+    @NeedsDisplay
+    @Test
+    public void ApplicationJNLPRemoteTest() throws Exception {
+        ProcessResult pr = server.executeJavawsHeadless(null, "/ClasspathManifestApplicationTest.jnlp");
+        checkAppFails(pr, "ApplicationJNLPRemoteTest");
+    }
+
+    @NeedsDisplay
+    @KnownToFail
+    @Test
+    public void ApplicationJNLPLocalTest() throws Exception {
+        List<String> commands=new ArrayList<String>(3);
+        commands.add(server.getJavawsLocation());
+        commands.add(ServerAccess.HEADLES_OPTION);
+        commands.add("ClasspathManifestApplicationTest.jnlp");
+        ServerAccess.ProcessResult pr = ServerAccess.executeProcess(commands, server.getDir());
+        checkAppFails(pr, "ApplicationJNLPLocalTest");
+    }
+
+    @NeedsDisplay
+    @Test
+    public void AppletJNLPRemoteTest() throws Exception {
+        ServerAccess.ProcessResult pr = server.executeJavawsHeadless(null, "/ClasspathManifestAppletTest.jnlp");
+        checkAppFails(pr, "AppletJNLPRemoteTest");
+    }
+
+    @NeedsDisplay
+    @KnownToFail
+    @Test
+    public void AppletJNLPRLocalTest() throws Exception {
+        List<String> commands=new ArrayList<String>(3);
+        commands.add(server.getJavawsLocation());
+        commands.add(ServerAccess.HEADLES_OPTION);
+        commands.add("ClasspathManifestAppletTest.jnlp");
+        ServerAccess.ProcessResult pr = ServerAccess.executeProcess(commands, server.getDir());
+        checkAppFails(pr, "AppletJNLPRLocalTest");
+    }
+
+    @NeedsDisplay
+    @TestInBrowsers(testIn = {Browsers.one})
+    @Test
+    public void BrowserJNLPHrefRemoteTest() throws Exception {
+        ServerAccess.ProcessResult pr = server.executeBrowser("/ClasspathManifestJNLPHrefTest.html");
+        checkAppFails(pr, "BrowserJNLPHrefRemoteTest");
+    }
+
+    @NeedsDisplay
+    @TestInBrowsers(testIn = {Browsers.one})
+    @KnownToFail
+    @Test
+    public void BrowserJNLPHrefLocalTest() throws Exception {
+        List<String> commands=new ArrayList<String>(2);
+        commands.add(server.getBrowserLocation());
+        commands.add("ClasspathManifestJNLPHrefTest.html");
+        ServerAccess.ProcessResult pr = ServerAccess.executeProcess(commands, server.getDir());
+        checkAppFails(pr, "BrowserJNLPHrefLocalTest");
+    }
+
+    @NeedsDisplay
+    @TestInBrowsers(testIn = {Browsers.one})
+    @Test
+    public void BrowserAppletRemoteTest() throws Exception {
+        ServerAccess.ProcessResult pr = server.executeBrowser("/ClasspathManifestAppletTest.html");
+        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));
+        Assert.assertFalse("ClasspathManifest.BrowserAppletRemoteTest stderr should not contain " + ss + " but did", pr.stderr.contains(ss));
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/ExtensionJnlp/resources/UsesSignedJar.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/ExtensionJnlp/resources/UsesSignedJar.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/ExtensionJnlp/resources/UsesSignedJar.jnlp	(revision 416)
@@ -0,0 +1,63 @@
+<!--
+
+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.
+
+***********************************************************************
+Uses only the main jar as its resources (SignedJarResource) ; used for testing to check if the jar 
+exists with main
+***********************************************************************
+ -->
+<?xml version="1.0" encoding="utf-8"?>
+<jnlp spec="1.0" href="UsesSignedJar.jnlp" codebase=".">
+  <information>
+    <title>UsesSignedJar</title>
+    <vendor>IcedTea</vendor>
+    <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+    <description>UsesSignedJar</description>
+    <offline/>
+  </information>
+
+  <security>
+      <all-permissions/>
+  </security>
+
+  <resources>
+    <j2se version="1.6+"/>
+    <jar href="SignedJarResource.jar" main="true"/>
+  </resources>
+
+  <application-desc main-class="SignedJarResource">
+  </application-desc>
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/ExtensionJnlp/resources/UsesSignedJarExtension.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/ExtensionJnlp/resources/UsesSignedJarExtension.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/ExtensionJnlp/resources/UsesSignedJarExtension.jnlp	(revision 416)
@@ -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.
+
+***********************************************************************
+Uses only SignedJarExtension as its resources
+***********************************************************************
+ -->
+<?xml version="1.0" encoding="utf-8"?>
+<jnlp spec="1.0" href="UsesSignedJarExtension.jnlp" codebase=".">
+  <information>
+    <title>UseSignedJarExtension</title>
+    <vendor>IcedTea</vendor>
+    <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+    <description>UseSignedJarExtension</description>
+    <offline/>
+  </information>
+
+  <security>
+      <all-permissions/>
+  </security>
+
+  <resources>
+    <j2se version="1.6+"/>
+    <extension name="SignedJarExtension"   href="./SignedJarExtension.jnlp"/>
+  </resources>
+
+  <application-desc main-class="SignedJarResource">
+  </application-desc>
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/ExtensionJnlp/resources/UsesSignedJnlp.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/ExtensionJnlp/resources/UsesSignedJnlp.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/ExtensionJnlp/resources/UsesSignedJnlp.jnlp	(revision 416)
@@ -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.
+
+***********************************************************************
+Uses only MatchingSignedJnlpExtension as its resources
+***********************************************************************
+ -->
+<?xml version="1.0" encoding="utf-8"?>
+<jnlp spec="1.0" href="UsesSignedJnlp.jnlp" codebase=".">
+  <information>
+    <title>UsesSignedJnlp</title>
+    <vendor>IcedTea</vendor>
+    <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+    <description>UsesSignedJnlp</description>
+    <offline/>
+  </information>
+
+  <security>
+      <all-permissions/>
+  </security>
+
+  <resources>
+    <j2se version="1.6+"/>
+    <extension name="MatchingSignedJnlpExtension"   href="./MatchingSignedJnlpExtension.jnlp"/>
+  </resources>
+
+  <application-desc main-class="SignedJnlpResource">
+  </application-desc>
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/ExtensionJnlp/resources/UsesSignedJnlpExtension.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/ExtensionJnlp/resources/UsesSignedJnlpExtension.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/ExtensionJnlp/resources/UsesSignedJnlpExtension.jnlp	(revision 416)
@@ -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.
+
+***********************************************************************
+Uses only UnmatchingSignedJnlpExtension as its resources
+***********************************************************************
+ -->
+<?xml version="1.0" encoding="utf-8"?>
+<jnlp spec="1.0" href="UsesSignedJnlpExtension.jnlp" codebase=".">
+  <information>
+    <title>UsesSignedJnlpExtension</title>
+    <vendor>IcedTea</vendor>
+    <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+    <description>UsesSignedJnlpExtension</description>
+    <offline/>
+  </information>
+
+  <security>
+      <all-permissions/>
+  </security>
+
+  <resources>
+    <j2se version="1.6+"/>
+    <extension name="UnmatchingSignedJnlpExtension"   href="./UnmatchingSignedJnlpExtension.jnlp"/>
+  </resources>
+
+  <application-desc main-class="SignedJnlpResource">
+  </application-desc>
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/ExtensionJnlp/resources/UsesSignedJnlpJarAndSignedJarExtension.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/ExtensionJnlp/resources/UsesSignedJnlpJarAndSignedJarExtension.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/ExtensionJnlp/resources/UsesSignedJnlpJarAndSignedJarExtension.jnlp	(revision 416)
@@ -0,0 +1,63 @@
+<!--
+
+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.
+
+***********************************************************************
+File contains a jar and an extension jnlp (with the main jar) for its resources
+***********************************************************************
+ -->
+<?xml version="1.0" encoding="utf-8"?>
+<jnlp spec="1.0" href="UsesSignedJnlpJarAndSignedJarExtension.jnlp" codebase=".">
+  <information>
+    <title>UsesSignedJnlpJarAndSignedJarExtension</title>
+    <vendor>IcedTea</vendor>
+    <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+    <description>UsesSignedJnlpJarAndSignedJarExtension</description>
+    <offline/>
+  </information>
+
+  <security>
+      <all-permissions/>
+  </security> 
+
+  <resources>
+    <j2se version="1.6+"/>
+    <jar href="SignedJnlpResource.jar" main="false"/>
+    <extension name="SignedJarExtension"   href="./SignedJarExtension.jnlp"/>
+  </resources>
+
+  <application-desc main-class="SignedJarResource">
+  </application-desc>
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/ExtensionJnlp/testcases/ExtensionJnlpTest.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/ExtensionJnlp/testcases/ExtensionJnlpTest.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/ExtensionJnlp/testcases/ExtensionJnlpTest.java	(revision 416)
@@ -0,0 +1,86 @@
+/* ExtensionJnlpTest.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 net.sourceforge.jnlp.annotations.Bug;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+public class ExtensionJnlpTest {
+
+    private static ServerAccess server = new ServerAccess();
+    private final List<String> l = Collections.unmodifiableList(Arrays.asList(new String[] { "-Xtrustall" }));
+    private final String jarOutput = "Running SignedJarResource..";
+    private final String signedJnlpException = "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 checkingForRequiredResources() throws Exception {
+        ServerAccess.ProcessResult pr = server.executeJavawsHeadless(l, "/UsesSignedJar.jnlp");
+        Assert.assertTrue("Could not locate SignedJarResource class within SignedJarResource jar", pr.stdout.contains(jarOutput));
+
+        String s = "Running SignedJnlpResource..";
+        pr = server.executeJavawsHeadless(l, "/UsesSignedJnlp.jnlp");
+        Assert.assertTrue("Could not locate SignedJnlpResource class within SignedJnlpResource jar", pr.stdout.contains(s));
+    }
+
+    @Bug(id = "PR1040")
+    @Test
+    public void usingSignedExtension() throws Exception {
+        ServerAccess.ProcessResult pr = server.executeJavawsHeadless(l, "/UsesSignedJarExtension.jnlp");
+        Assert.assertTrue("Stdout should contain " + jarOutput + " but did not", pr.stdout.contains(jarOutput));
+    }
+
+    @Bug(id = "PR1041")
+    @Test
+    public void mainJarInExtension() throws Exception {
+        ServerAccess.ProcessResult pr = server.executeJavawsHeadless(l, "/UsesSignedJnlpJarAndSignedJarExtension.jnlp");
+        Assert.assertTrue("Stdout should contain " + jarOutput + " but did not", pr.stdout.contains(jarOutput));
+    }
+
+    @Bug(id = "PR1042")
+    @Test
+    public void checkingSignedJnlpInExtension() throws Exception {
+        ServerAccess.ProcessResult pr = server.executeJavawsHeadless(l, "/UsesSignedJnlpExtension.jnlp");
+        Assert.assertTrue("Stdout should contain " + signedJnlpException + " but did not", pr.stderr.contains(signedJnlpException));
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/InternalClassloaderWithDownloadedResource/resources/InternalClassloaderWithDownloadedResource-applet-hack.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/InternalClassloaderWithDownloadedResource/resources/InternalClassloaderWithDownloadedResource-applet-hack.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/InternalClassloaderWithDownloadedResource/resources/InternalClassloaderWithDownloadedResource-applet-hack.jnlp	(revision 416)
@@ -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="InternalClassloaderWithDownloadedResource-applet-hack.jnlp" codebase=".">
+    <information>
+        <title>InternalClassloaderWithDownloadedResource-applet-hack</title>
+        <vendor>IcedTea</vendor>
+        <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+        <description>InternalClassloaderWithDownloadedResource-applet-hack</description>
+        <offline/>
+    </information>
+    <resources>
+        <j2se version="1.4+"/>
+        <jar href="InternalClassloaderWithDownloadedResource.jar"/>
+    </resources>
+    <applet-desc
+      documentBase="."
+      name="InternalClassloaderWithDownloadedResource-applet"
+      main-class="InternalClassloaderWithDownloadedResource"
+      width="100"
+      height="100">
+        <param name="arg" value="hack"/>
+    </applet-desc>
+    <security>
+        <all-permissions/>
+    </security>
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/InternalClassloaderWithDownloadedResource/resources/InternalClassloaderWithDownloadedResource-applet-new.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/InternalClassloaderWithDownloadedResource/resources/InternalClassloaderWithDownloadedResource-applet-new.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/InternalClassloaderWithDownloadedResource/resources/InternalClassloaderWithDownloadedResource-applet-new.jnlp	(revision 416)
@@ -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="InternalClassloaderWithDownloadedResource-applet-new.jnlp" codebase=".">
+    <information>
+        <title>InternalClassloaderWithDownloadedResource-applet-new</title>
+        <vendor>IcedTea</vendor>
+        <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+        <description>InternalClassloaderWithDownloadedResource-applet-new</description>
+        <offline/>
+    </information>
+    <resources>
+        <j2se version="1.4+"/>
+        <jar href="InternalClassloaderWithDownloadedResource.jar"/>
+    </resources>
+    <applet-desc
+      documentBase="."
+      name="InternalClassloaderWithDownloadedResource-applet"
+      main-class="InternalClassloaderWithDownloadedResource"
+      width="100"
+      height="100">
+        <param name="arg" value="new"/>
+    </applet-desc>
+    <security>
+        <all-permissions/>
+    </security>
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/InternalClassloaderWithDownloadedResource/resources/InternalClassloaderWithDownloadedResource-hack.html
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/InternalClassloaderWithDownloadedResource/resources/InternalClassloaderWithDownloadedResource-hack.html	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/InternalClassloaderWithDownloadedResource/resources/InternalClassloaderWithDownloadedResource-hack.html	(revision 416)
@@ -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 bgcolor="red">
+        <p>
+            <applet code="InternalClassloaderWithDownloadedResource.class" archive="InternalClassloaderWithDownloadedResource.jar" codebase="." width="100" height="100">
+                <param name="arg" value="hack"/>
+            </applet>
+        </p>
+    </body>
+</html>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/InternalClassloaderWithDownloadedResource/resources/InternalClassloaderWithDownloadedResource-hack.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/InternalClassloaderWithDownloadedResource/resources/InternalClassloaderWithDownloadedResource-hack.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/InternalClassloaderWithDownloadedResource/resources/InternalClassloaderWithDownloadedResource-hack.jnlp	(revision 416)
@@ -0,0 +1,57 @@
+<!--
+
+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="InternalClassloaderWithDownloadedResource-hack.jnlp" codebase=".">
+    <information>
+        <title>InternalClassloaderWithDownloadedResource-hack</title>
+        <vendor>IcedTea</vendor>
+        <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+        <description>InternalClassloaderWithDownloadedResource-hack</description>
+        <offline/>
+    </information>
+    <resources>
+        <j2se version="1.4+"/>
+        <jar href="InternalClassloaderWithDownloadedResource.jar"/>
+    </resources>
+    <application-desc main-class="InternalClassloaderWithDownloadedResource">
+        <argument>hack</argument>
+    </application-desc>
+    <security>
+        <all-permissions/>
+    </security>
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/InternalClassloaderWithDownloadedResource/resources/InternalClassloaderWithDownloadedResource-new.html
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/InternalClassloaderWithDownloadedResource/resources/InternalClassloaderWithDownloadedResource-new.html	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/InternalClassloaderWithDownloadedResource/resources/InternalClassloaderWithDownloadedResource-new.html	(revision 416)
@@ -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 bgcolor="red">
+        <p>
+            <applet code="InternalClassloaderWithDownloadedResource.class" archive="InternalClassloaderWithDownloadedResource.jar" codebase="." width="100" height="100">
+                <param name="arg" value="new"/>
+            </applet>
+        </p>
+    </body>
+</html>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/InternalClassloaderWithDownloadedResource/resources/InternalClassloaderWithDownloadedResource-new.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/InternalClassloaderWithDownloadedResource/resources/InternalClassloaderWithDownloadedResource-new.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/InternalClassloaderWithDownloadedResource/resources/InternalClassloaderWithDownloadedResource-new.jnlp	(revision 416)
@@ -0,0 +1,57 @@
+<!--
+
+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="InternalClassloaderWithDownloadedResource-new.jnlp" codebase=".">
+    <information>
+        <title>InternalClassloaderWithDownloadedResource-new</title>
+        <vendor>IcedTea</vendor>
+        <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+        <description>InternalClassloaderWithDownloadedResource-new</description>
+        <offline/>
+    </information>
+    <resources>
+        <j2se version="1.4+"/>
+        <jar href="InternalClassloaderWithDownloadedResource.jar"/>
+    </resources>
+    <application-desc main-class="InternalClassloaderWithDownloadedResource">
+        <argument>new</argument>
+    </application-desc>
+    <security>
+        <all-permissions/>
+    </security>
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/InternalClassloaderWithDownloadedResource/srcs/InternalClassloaderWithDownloadedResource.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/InternalClassloaderWithDownloadedResource/srcs/InternalClassloaderWithDownloadedResource.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/InternalClassloaderWithDownloadedResource/srcs/InternalClassloaderWithDownloadedResource.java	(revision 416)
@@ -0,0 +1,164 @@
+/* InternalClassloaderWithDownloadedResource.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.applet.Applet;
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.InputStreamReader;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLClassLoader;
+
+public class InternalClassloaderWithDownloadedResource extends Applet {
+
+    public static void main(String[] args) throws Exception {
+        int port = 44321; //debug default
+        String sPort = System.getProperty("serveraccess.port");
+        if (sPort != null) {
+            port = new Integer(sPort);
+        }
+        if (args.length != 1) {
+            throw new IllegalArgumentException("exactly one argument expected");
+        }
+        resolveArgument(args[0], port);
+
+    }
+
+    private static void downlaodAndExecuteForeignMethod(int port, int classlaoder) throws SecurityException, InvocationTargetException, ClassNotFoundException, NoSuchMethodException, IllegalAccessException, MalformedURLException, IllegalArgumentException {
+        URL url = new URL("http://localhost:" + port + "/SimpletestSigned1.jar");
+        URLClassLoader ucl = null;
+        if (classlaoder == 1) {
+            ucl = (URLClassLoader) InternalClassloaderWithDownloadedResource.class.getClassLoader();
+            System.out.println("Downloading " + url.toString());
+            Method privateStringMethod = URLClassLoader.class.getDeclaredMethod("addURL", URL.class);
+            privateStringMethod.setAccessible(true);
+            privateStringMethod.invoke(ucl, url);
+        } else if (classlaoder == 2) {
+            ucl = new URLClassLoader(new URL[]{url});
+        } else {
+            throw new IllegalArgumentException("just 1 or 2 classlaoder id expected");
+        }
+        executeForeignMethod(port, ucl);
+    }
+
+    private static void executeForeignMethod(int port, URLClassLoader loader) throws SecurityException, InvocationTargetException, ClassNotFoundException, NoSuchMethodException, IllegalAccessException, MalformedURLException, IllegalArgumentException {
+        String className = "SimpletestSigned1";
+        Class<?> cls = loader.loadClass(className);
+        Method m = cls.getMethod("main", new Class[]{new String[0].getClass()});
+        System.out.println("executing " + className + "'s main");
+        m.invoke(null, (Object) new String[0]);
+    }
+
+    private static void resolveArgument(String s, int port) throws Exception {
+        if (s == null) {
+            throw new IllegalArgumentException("arg was null");
+        } else if (s.equalsIgnoreCase("hack")) {
+            downlaodAndExecuteForeignMethod(port, 1);
+        } else if (s.equalsIgnoreCase("new")) {
+            downlaodAndExecuteForeignMethod(port, 2);
+        } else {
+            throw new IllegalArgumentException("hack or new expected as argument");
+        }
+    }
+
+    private class Killer extends Thread {
+
+        public int n = 2000;
+
+        @Override
+        public void run() {
+            try {
+                Thread.sleep(n);
+                System.out.println("Applet killing himself after " + n + " ms of life");
+                System.exit(0);
+            } catch (Exception ex) {
+            }
+        }
+    }
+    private Killer killer;
+
+    @Override
+    public void init() {
+        System.out.println("applet was initialised");
+        killer = new Killer();
+    }
+
+    @Override
+    public void start() {
+        System.out.println("applet was started");
+        killer.start();
+        int port = 44321; //debug default
+        try {
+            File portsFile = new File(System.getProperty("java.io.tmpdir"), "serveraccess.port");
+            if (portsFile.exists()) {
+                String sPort = null;
+                BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(portsFile), "utf-8"));
+                try {
+                    sPort = br.readLine();
+                } finally {
+                    br.close();
+                }
+                if (sPort != null) {
+                    port = new Integer(sPort.trim());
+                }
+            }
+        } catch (Exception ex) {
+            ex.printStackTrace();
+            throw new RuntimeException(ex);
+        }
+        try {
+            resolveArgument(getParameter("arg"), port);
+        } catch (Exception ex) {
+            ex.printStackTrace();
+            throw new RuntimeException(ex);
+        }
+        System.out.println("killer was started");
+    }
+
+    @Override
+    public void stop() {
+        System.out.println("applet was stopped");
+    }
+
+    @Override
+    public void destroy() {
+        System.out.println("applet will be destroyed");
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/InternalClassloaderWithDownloadedResource/testcases/InternalClassloaderWithDownloadedResourceTest.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/InternalClassloaderWithDownloadedResource/testcases/InternalClassloaderWithDownloadedResourceTest.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/InternalClassloaderWithDownloadedResource/testcases/InternalClassloaderWithDownloadedResourceTest.java	(revision 416)
@@ -0,0 +1,140 @@
+/* InternalClassloaderWithDownloadedResourceTest.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.io.File;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+import net.sourceforge.jnlp.ServerAccess;
+import net.sourceforge.jnlp.ServerAccess.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.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+@Bug(id = {"RH816592","PR858"})
+public class InternalClassloaderWithDownloadedResourceTest extends BrowserTest {
+
+    private final List<String> l = Collections.unmodifiableList(Arrays.asList(new String[]{"-verbose", "-Xtrustall", "-J-Dserveraccess.port=" + server.getPort()}));
+    private static final File portsFile = new File(System.getProperty("java.io.tmpdir"), "serveraccess.port");
+
+    @Before
+    public void setUp() {
+        try {
+            ServerAccess.logOutputReprint("Writeing " + server.getPort() + " to " + portsFile.getAbsolutePath());
+            ServerAccess.saveFile("" + server.getPort(), portsFile);
+            ServerAccess.logOutputReprint("done");
+        } catch (Exception ex) {
+            ServerAccess.logException(ex);
+        }
+    }
+
+    @After
+    public void tearDown() {
+        ServerAccess.logOutputReprint("Deleting " + portsFile.getAbsolutePath());
+        boolean b = portsFile.delete();
+        ServerAccess.logOutputReprint("Deletion state (should be true) is " + b);
+    }
+
+    @Test
+    @Bug(id = {"RH816592","PR858"})
+    public void launchInternalClassloaderWithDownloadedResourceAsJnlpApplication() throws Exception {
+        ServerAccess.ProcessResult pr = server.executeJavawsHeadless(l, "/InternalClassloaderWithDownloadedResource-new.jnlp");
+        evaluate(pr);
+        Assert.assertFalse("should not be terminated but was", pr.wasTerminated);
+        Assert.assertEquals((Integer) 0, pr.returnValue);
+    }
+
+    private void evaluate(ProcessResult pr) {
+        String ss = "Good simple javaws exapmle";
+        Assert.assertTrue("Stdout should  contains " + ss + " but didn't", pr.stdout.contains(ss));
+        String s = "xception";
+        Assert.assertFalse("Stderr should  not contains " + s + " but did", pr.stderr.contains(s));
+    }
+
+    @Test
+    @Bug(id = {"RH816592","PR858"})
+    public void launchInternalClassloaderWithDownloadedResourceAsJnlpApplet() throws Exception {
+        ServerAccess.ProcessResult pr = server.executeJavawsHeadless(l, "/InternalClassloaderWithDownloadedResource-applet-new.jnlp");
+        evaluate(pr);
+        Assert.assertFalse("should not be terminated but was", pr.wasTerminated);
+        Assert.assertEquals((Integer) 0, pr.returnValue);
+    }
+
+    @Test
+    @Bug(id = {"RH816592","PR858"})
+    @NeedsDisplay
+    @TestInBrowsers(testIn={Browsers.all})
+    public void launchInternalClassloaderWithDownloadedResourceAsHtmlApplet() throws Exception {
+        ServerAccess.ProcessResult pr = server.executeBrowser("/InternalClassloaderWithDownloadedResource-new.html");
+        evaluate(pr);
+        Assert.assertTrue("should be terminated but was not", pr.wasTerminated);
+    }
+
+    @Test
+    @Bug(id = {"http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2012-May/018737.html"})
+    public void launchInternalClassloaderWithDownloadedResourceAsJnlpApplicationHack() throws Exception {
+        ServerAccess.ProcessResult pr = server.executeJavawsHeadless(l, "/InternalClassloaderWithDownloadedResource-hack.jnlp");
+        evaluate(pr);
+        Assert.assertFalse("should not be terminated but was", pr.wasTerminated);
+        Assert.assertEquals((Integer) 0, pr.returnValue);
+    }
+
+    @Test
+    @Bug(id = {"http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2012-May/018737.html"})
+    public void launchInternalClassloaderWithDownloadedResourceAsJnlpAppletHack() throws Exception {
+        ServerAccess.ProcessResult pr = server.executeJavawsHeadless(l, "/InternalClassloaderWithDownloadedResource-applet-hack.jnlp");
+        evaluate(pr);
+        Assert.assertFalse("should not be terminated but was", pr.wasTerminated);
+        Assert.assertEquals((Integer) 0, pr.returnValue);
+    }
+
+    @Test
+    @NeedsDisplay
+    @Bug(id = {"http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2012-May/018737.html"})
+    @TestInBrowsers(testIn={Browsers.all})
+    public void launchInternalClassloaderWithDownloadedResourceAsHtmlAppletHack() throws Exception {
+        ServerAccess.ProcessResult pr = server.executeBrowser("/InternalClassloaderWithDownloadedResource-hack.html");
+        evaluate(pr);
+        Assert.assertTrue("should be terminated but was not", pr.wasTerminated);
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/MissingJar/resources/MissingJar.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/MissingJar/resources/MissingJar.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/MissingJar/resources/MissingJar.jnlp	(revision 416)
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?> 
+<jnlp spec="1.0"
+      codebase="./"
+      href="MissingJar.jnlp">
+   <information> 
+      <title>test MissingJar</title> 
+      <vendor>IcedTea</vendor>
+   </information> 
+   <resources>
+      <!-- MissingJar is name of reproducer and of main jar,
+      so MissingJar.jar is presented unlike the ThisOneIsMissing jar  -->
+      <jar href="MissingJar.jar" main="true" />
+   </resources>
+   <resources>
+      <jar href="ThisOneIsMissing.jar"  />
+   </resources>
+   <application-desc main-class="MissingJar"/>
+   <security>
+      <all-permissions/>
+   </security>
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/MissingJar/resources/MissingJar2.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/MissingJar/resources/MissingJar2.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/MissingJar/resources/MissingJar2.jnlp	(revision 416)
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?> 
+<jnlp spec="1.0"
+      codebase="./"
+      href="MissingJar2.jnlp">
+   <information> 
+      <title>test MissingJar</title> 
+      <vendor>IcedTea</vendor>
+   </information> 
+   <resources>
+      <jar href="ThisOneIsMissing.jar"  />
+      <!-- MissingJar is name of reproducer and of main jar,
+      so MissingJar.jar is presented unlike the ThisOneIsMissing jar  -->
+      <jar href="MissingJar.jar" main="true" />
+   </resources>
+   <application-desc main-class="MissingJar"/>
+   <security>
+      <all-permissions/>
+   </security>
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/MissingJar/resources/MissingJar3.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/MissingJar/resources/MissingJar3.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/MissingJar/resources/MissingJar3.jnlp	(revision 416)
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?> 
+<jnlp spec="1.0"
+      codebase="./"
+      href="MissingJar3.jnlp">
+   <information> 
+      <title>test MissingJar</title> 
+      <vendor>IcedTea</vendor>
+   </information> 
+   <resources>
+      <!-- MissingJar is name of reproducer and of main jar,
+      so MissingJar.jar is presented unlike the ThisOneIsMissing jar  -->
+      <jar href="MissingJar.jar" main="true" />
+      <jar href="ThisOneIsMissing.jar"  />
+   </resources>
+   <application-desc main-class="MissingJar"/>
+   <security>
+      <all-permissions/>
+   </security>
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/MissingJar/resources/MissingJar4.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/MissingJar/resources/MissingJar4.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/MissingJar/resources/MissingJar4.jnlp	(revision 416)
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?> 
+<jnlp spec="1.0"
+      codebase="./"
+      href="MissingJar4.jnlp">
+   <information> 
+      <title>test MissingJar</title> 
+      <vendor>IcedTea</vendor>
+   </information> 
+   <resources>
+      <jar href="ThisOneIsMissing.jar"  />
+   </resources>
+   <resources>
+      <!-- MissingJar is name of reproducer and of main jar,
+      so MissingJar.jar is presented unlike the ThisOneIsMissing jar  -->
+      <jar href="MissingJar.jar" main="true" />
+   </resources>
+   <application-desc main-class="MissingJar"/>
+   <security>
+      <all-permissions/>
+   </security>
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/MissingJar/srcs/MissingJar.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/MissingJar/srcs/MissingJar.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/MissingJar/srcs/MissingJar.java	(revision 416)
@@ -0,0 +1,42 @@
+/* MissingJar.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.
+ */
+
+public class MissingJar {
+    public static void main(String[] args) {
+            System.out.println("only fixed classloader can initialize this app");
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/MissingJar/testcases/MissingJarTest.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/MissingJar/testcases/MissingJarTest.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/MissingJar/testcases/MissingJarTest.java	(revision 416)
@@ -0,0 +1,84 @@
+/* MissingJar.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.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+import net.sourceforge.jnlp.ServerAccess;
+import net.sourceforge.jnlp.ServerAccess.ProcessResult;
+import org.junit.Assert;
+
+import org.junit.Test;
+
+public class MissingJarTest {
+
+    private static ServerAccess server = new ServerAccess();
+    private final List<String> l = Collections.unmodifiableList(Arrays.asList(new String[]{"-Xtrustall"}));
+
+    private void evaluateResult(ProcessResult pr) {
+        String c = "only fixed classloader can initialize this app";
+        Assert.assertTrue("stdout should contains `" + c + "`, but didn't ", pr.stdout.contains(c));
+        String cc = "ClassNotFoundException";
+        Assert.assertFalse("stderr should NOT contains `" + cc + "`, but did ", pr.stderr.contains(cc));
+        Assert.assertFalse("should not be terminated, but was", pr.wasTerminated);
+        Assert.assertEquals((Integer) 0, pr.returnValue);
+    }
+
+    @Test
+    public void MissingJarTest1() throws Exception {
+        ServerAccess.ProcessResult pr = server.executeJavawsHeadless(l, "/MissingJar.jnlp");
+        evaluateResult(pr);
+    }
+
+    @Test
+    public void MissingJarTest2() throws Exception {
+        ServerAccess.ProcessResult pr = server.executeJavawsHeadless(l, "/MissingJar2.jnlp");
+        evaluateResult(pr);
+    }
+
+    @Test
+    public void MissingJarTest3() throws Exception {
+        ServerAccess.ProcessResult pr = server.executeJavawsHeadless(l, "/MissingJar3.jnlp");
+        evaluateResult(pr);
+    }
+
+    @Test
+    public void MissingJarTest4() throws Exception {
+        ServerAccess.ProcessResult pr = server.executeJavawsHeadless(l, "/MissingJar4.jnlp");
+        evaluateResult(pr);
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/ReadPropertiesBySignedHack/resources/ReadPropertiesBySignedHack.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/ReadPropertiesBySignedHack/resources/ReadPropertiesBySignedHack.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/ReadPropertiesBySignedHack/resources/ReadPropertiesBySignedHack.jnlp	(revision 416)
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?> 
+<jnlp spec="1.0"
+      codebase="./"
+      href="ReadPropertiesBySignedHack.jnlp">
+    <information>
+        <title>read properties using System.getenv()</title>
+        <vendor>IcedTea</vendor>
+    </information>
+    <resources>
+        <jar href="ReadPropertiesBySignedHack.jar" main="true"/>
+        <jar href="ReadProperties.jar" main="false" download="lazy"/>  
+    </resources>
+    <application-desc main-class="ReadPropertiesBySignedHack">
+      <argument>user.name</argument>
+    </application-desc>
+     <security>
+      <all-permissions/>
+    </security>
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/ReadPropertiesBySignedHack/srcs/ReadPropertiesBySignedHack.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/ReadPropertiesBySignedHack/srcs/ReadPropertiesBySignedHack.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/ReadPropertiesBySignedHack/srcs/ReadPropertiesBySignedHack.java	(revision 416)
@@ -0,0 +1,63 @@
+/* ReadPropertiesSigned.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.lang.reflect.*;
+
+public class ReadPropertiesBySignedHack {
+
+    /**
+    *some system property is expected as arg[0], eg user.name or user.home
+    */    
+    public static void main(String[] args) throws Throwable {
+        //security manager is not protecting us from accessing classes  from
+        //net.sourceforge.jnlp.runtime via reflection
+        Class c2= Class.forName("net.sourceforge.jnlp.runtime.JNLPRuntime");
+        Field f2 = c2.getDeclaredField("trustAll");
+        f2.setAccessible(true);
+        f2.setBoolean(null, true);
+        Method m2=c2.getDeclaredMethod("setTrustAll",Boolean.TYPE);
+        m2.setAccessible(true);
+        m2.invoke((Object) null, true );
+        //but security manager is guarding us against lunching unsigned code
+        //from signed archvive even if Xtrustall is on.
+        Class c1= Class.forName("ReadProperties");
+        Method m1=c1.getDeclaredMethod("main",args.getClass());
+        m1.invoke((Object) null, (Object)args);
+    }
+         
+
+  
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/ReadPropertiesBySignedHack/testcases/ReadPropertiesBySignedHackTest.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/ReadPropertiesBySignedHack/testcases/ReadPropertiesBySignedHackTest.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/ReadPropertiesBySignedHack/testcases/ReadPropertiesBySignedHackTest.java	(revision 416)
@@ -0,0 +1,65 @@
+/* ReadPropertiesSignedTest.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.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 ReadPropertiesBySignedHackTest {
+
+    private static ServerAccess server = new ServerAccess();
+    private final List<String> l=Collections.unmodifiableList(Arrays.asList(new String[] {"-Xtrustall"}));
+
+
+    @Test
+    public void ReadPropertiesBySignedHackWithjoutXtrustAll() throws Exception {
+        //no request for permissions
+        ServerAccess.ProcessResult pr=server.executeJavawsHeadless(l,"/ReadPropertiesBySignedHack.jnlp");
+        String s="java.lang.SecurityException: class \"ReadProperties\"'s signer information does not match signer information of other classes in the same package";
+        Assert.assertTrue("Stderr should contains "+s+" but did not",pr.stderr.contains(s));
+        String ss="ClassNotFoundException";
+        Assert.assertFalse("Stderr should not contains "+ss+" but did",pr.stderr.contains(ss));
+        Assert.assertTrue("stdout lenght should be <2 but was "+pr.stdout.length(),pr.stdout.length()<2); // /home/user or /root or eanything else :(
+        Assert.assertFalse("should not be terminated but was",pr.wasTerminated);
+        Assert.assertEquals((Integer)0, pr.returnValue);
+   }
+
+  }
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/ReadPropertiesSigned/resources/ReadPropertiesSigned1.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/ReadPropertiesSigned/resources/ReadPropertiesSigned1.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/ReadPropertiesSigned/resources/ReadPropertiesSigned1.jnlp	(revision 416)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8"?> 
+<jnlp spec="1.0"
+      codebase="./"
+      href="ReadPropertiesSigned1.jnlp">
+    <information>
+        <title>read properties using System.getenv()</title>
+        <vendor>IcedTea</vendor>
+    </information>
+    <resources>
+        <jar href="ReadPropertiesSigned.jar" main="true"/>
+    </resources>
+    <application-desc main-class="ReadPropertiesSigned">
+      <argument>user.name</argument>
+    </application-desc>
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/ReadPropertiesSigned/resources/ReadPropertiesSigned2.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/ReadPropertiesSigned/resources/ReadPropertiesSigned2.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/ReadPropertiesSigned/resources/ReadPropertiesSigned2.jnlp	(revision 416)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?> 
+<jnlp spec="1.0"
+      codebase="./"
+      href="ReadPropertiesSigned2.jnlp">
+    <information>
+        <title>read properties using System.getenv()</title>
+        <vendor>IcedTea</vendor>
+    </information>
+    <resources>
+        <jar href="ReadPropertiesSigned.jar" main="true"/>
+    </resources>
+    <application-desc main-class="ReadPropertiesSigned">
+      <argument>user.name</argument>
+    </application-desc>
+    <security>
+      <all-permissions/>
+    </security>
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/ReadPropertiesSigned/srcs/ReadPropertiesSigned.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/ReadPropertiesSigned/srcs/ReadPropertiesSigned.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/ReadPropertiesSigned/srcs/ReadPropertiesSigned.java	(revision 416)
@@ -0,0 +1,45 @@
+/* ReadPropertiesSigned.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.
+ */
+public class ReadPropertiesSigned {
+
+    /**
+    *some system property is expected as arg[0], eg user.name or user.home
+    */    
+    public static void main(String[] args) {
+         System.out.println(System.getProperty(args[0]));
+  }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/ReadPropertiesSigned/testcases/ReadPropertiesSignedTest.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/ReadPropertiesSigned/testcases/ReadPropertiesSignedTest.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/ReadPropertiesSigned/testcases/ReadPropertiesSignedTest.java	(revision 416)
@@ -0,0 +1,91 @@
+/* ReadPropertiesSignedTest.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.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 ReadPropertiesSignedTest {
+
+    private static ServerAccess server = new ServerAccess();
+    private final List<String> l=Collections.unmodifiableList(Arrays.asList(new String[] {"-Xtrustall"}));
+
+    String accessMatcher = "(?s).*java.security.AccessControlException.{0,5}access denied.{0,5}java.util.PropertyPermission.{0,5}" + "user.name.{0,5}read" + ".*";
+
+    @Test
+    public void ReadSignedPropertiesWithoutPermissionsWithXtrustAll() throws Exception {
+        //no request for permissions
+        ServerAccess.ProcessResult pr=server.executeJavawsHeadless(l,"/ReadPropertiesSigned1.jnlp");
+        Assert.assertTrue("Stderr should match "+accessMatcher+" but did not",pr.stderr.matches(accessMatcher));
+        String ss="ClassNotFoundException";
+        Assert.assertFalse("Stderr should not contains "+ss+" but did",pr.stderr.contains(ss));
+        Assert.assertTrue("stdout lenght should be <2 but was "+pr.stdout.length(),pr.stdout.length()<2); // /home/user or /root or eanything else :(
+        Assert.assertFalse("should not be terminated but was",pr.wasTerminated);
+        Assert.assertEquals((Integer)0, pr.returnValue);
+    }
+
+    @Test
+    public void ReadSignedPropertiesWithPermissionsWithXtrustAll() throws Exception {
+        //request for allpermissions
+        ServerAccess.ProcessResult pr=server.executeJavawsHeadless(l,"/ReadPropertiesSigned2.jnlp");
+        Assert.assertFalse("Stderr should NOT match "+accessMatcher+" but did",pr.stderr.matches(accessMatcher));
+        String ss="ClassNotFoundException";
+        Assert.assertFalse("Stderr should not contains "+ss+" but did",pr.stderr.contains(ss));
+        Assert.assertTrue("stdout lenght should be >= but was "+pr.stdout.length(),pr.stdout.length()>=4); // /home/user or /root or eanything else :(
+        Assert.assertFalse("should not be terminated but was",pr.wasTerminated);
+        Assert.assertEquals((Integer)0, pr.returnValue);
+    }
+
+    @Test
+    public void EnsureXtrustallNotAffectingUnsignedBehaviour() throws Exception {
+        ServerAccess.ProcessResult pr=server.executeJavawsHeadless(l,"/ReadProperties1.jnlp");
+        Assert.assertTrue("Stderr should match "+accessMatcher+" but did not",pr.stderr.matches(accessMatcher));
+        String ss="ClassNotFoundException";
+        Assert.assertFalse("Stderr should not contains "+ss+" but did",pr.stderr.contains(ss));
+        Assert.assertFalse("stdout lenght should not be  >2 but was "+pr.stdout.length(),pr.stdout.length()>2);
+        Assert.assertFalse("should not be terminated but was",pr.wasTerminated);
+        Assert.assertEquals((Integer)0, pr.returnValue);
+        ServerAccess.ProcessResult pr2=server.executeJavawsHeadless(null,"/ReadProperties1.jnlp");
+        Assert.assertEquals(pr.stderr, pr2.stderr);
+        Assert.assertEquals(pr.stdout, pr2.stdout);
+
+    }
+  }
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SavingCookies/resources/CheckCookie.html
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SavingCookies/resources/CheckCookie.html	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SavingCookies/resources/CheckCookie.html	(revision 416)
@@ -0,0 +1,44 @@
+<!--
+
+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 bgcolor="red">
+<p>
+  <applet code="CheckingCookies.class" archive="SavingCookies.jar" codebase="." width="100" height="100">
+  </applet>
+</p>
+</body>
+</html>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SavingCookies/resources/CheckCookieAndGotoClear.html
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SavingCookies/resources/CheckCookieAndGotoClear.html	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SavingCookies/resources/CheckCookieAndGotoClear.html	(revision 416)
@@ -0,0 +1,50 @@
+<!--
+
+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.
+
+ -->
+ 
+<!-- Uses show-document to go to a page that clears the cookie -->
+ 
+<html><head></head><body bgcolor="red">
+<p>
+  <applet code="CheckingCookies.class" archive="SavingCookies.jar" codebase="." width="100" height="100">
+  
+  <param name="show-document" value="ClearPersistentCookie.html">
+  
+  </applet>
+</p>
+</body>
+</html>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SavingCookies/resources/ClearPersistentCookie.html
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SavingCookies/resources/ClearPersistentCookie.html	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SavingCookies/resources/ClearPersistentCookie.html	(revision 416)
@@ -0,0 +1,49 @@
+<!--
+
+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 bgcolor="red">
+<p>
+  <applet code="SavingCookies.class" archive="SavingCookies.jar" codebase="." width="100" height="100">
+
+  <param name="persistent" value="no">
+  
+  <param name="cookie" value="TEST=deleted; Expires=Thu, 01 Jan 1970 00:00:01 GMT">
+
+  </applet>
+</p>
+</body>
+</html>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SavingCookies/resources/SavePersistentCookie.html
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SavingCookies/resources/SavePersistentCookie.html	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SavingCookies/resources/SavePersistentCookie.html	(revision 416)
@@ -0,0 +1,49 @@
+<!--
+
+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 bgcolor="red">
+<p>
+  <applet code="SavingCookies.class" archive="SavingCookies.jar" codebase="." width="100" height="100">
+
+  <param name="persistent" value="yes">
+  
+  <param name="cookie" value="TEST=persistent">
+  
+  </applet>
+</p>
+</body>
+</html>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SavingCookies/resources/SavePersistentCookieAndGotoCheck.html
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SavingCookies/resources/SavePersistentCookieAndGotoCheck.html	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SavingCookies/resources/SavePersistentCookieAndGotoCheck.html	(revision 416)
@@ -0,0 +1,50 @@
+<!--
+
+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 bgcolor="red">
+<p>
+  <applet code="SavingCookies.class" archive="SavingCookies.jar" codebase="." width="100" height="100">
+
+  <param name="show-document" value="CheckCookieAndGotoClear.html">
+  <param name="persistent" value="yes">
+  
+  <param name="cookie" value="TEST=persistent">
+
+  </applet>
+</p>
+</body>
+</html>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SavingCookies/resources/SaveSessionCookie.html
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SavingCookies/resources/SaveSessionCookie.html	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SavingCookies/resources/SaveSessionCookie.html	(revision 416)
@@ -0,0 +1,49 @@
+<!--
+
+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 bgcolor="red">
+<p>
+  <applet code="SavingCookies.class" archive="SavingCookies.jar" codebase="." width="100" height="100">
+
+  <param name="persistent" value="no">
+  
+  <param name="cookie" value="TEST=session">
+
+  </applet>
+</p>
+</body>
+</html>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SavingCookies/resources/SaveSessionCookieAndGotoCheck.html
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SavingCookies/resources/SaveSessionCookieAndGotoCheck.html	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SavingCookies/resources/SaveSessionCookieAndGotoCheck.html	(revision 416)
@@ -0,0 +1,50 @@
+<!--
+
+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 bgcolor="red">
+<p>
+  <applet code="SavingCookies.class" archive="SavingCookies.jar" codebase="." width="100" height="100">
+
+  <param name="show-document" value="CheckCookie.html">
+  <param name="persistent" value="no">
+  
+  <param name="cookie" value="TEST=session">
+
+  </applet>
+</p>
+</body>
+</html>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SavingCookies/srcs/CheckingCookies.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SavingCookies/srcs/CheckingCookies.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SavingCookies/srcs/CheckingCookies.java	(revision 416)
@@ -0,0 +1,114 @@
+/* CheckingCookies.java
+ Confirms that a test cookie is in the cookie store
+ 
+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.applet.Applet;
+import java.io.IOException;
+import java.net.CookieHandler;
+import java.net.CookieManager;
+import java.net.CookiePolicy;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class CheckingCookies extends Applet {
+    static class Killer extends Thread {
+
+        public int n = 2000;
+
+        @Override
+        public void run() {
+            try {
+                Thread.sleep(n);
+                System.out.println("Applet killing itself after " + n + " ms of life");
+                System.exit(0);
+            } catch (Exception ex) {
+            }
+        }
+    }
+
+    static private void printCookieInfo(URI uri) throws IOException {
+        CookieHandler handler = CookieHandler.getDefault();
+        Map<String, List<String>> cookieMap = null;
+
+        if (handler == null) {
+            System.out.println("Failing due to lack of CookieHandler class!");
+            return;
+        }
+        System.out.println("Using CookieHandler class: " + handler.getClass().getCanonicalName());
+
+        cookieMap = handler.get(uri, new HashMap<String, List<String>>());
+        for (Map.Entry<String, List<String>> entry : cookieMap.entrySet()) {
+            System.out.println("Iterating cookiemap with " + entry.getKey() + " => " + entry.getValue());
+            if (entry.getKey().contains("Cookie")) {
+                for (String cookie : entry.getValue()) {
+                    System.out.println("Found cookie: " + cookie);
+                }
+            }
+        }
+    }
+
+    /* If a show-document param was set, go there */
+    private void gotoNextDocument() {
+        URL baseURL = getCodeBase();
+        String nextDocument = getParameter("show-document");
+        if (nextDocument != null) {
+            try {
+                System.out.println("Calling showDocument(" + nextDocument + ")");
+                getAppletContext().showDocument(new URL(baseURL.toString() + nextDocument));
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+        }
+    }
+
+    @Override
+    public void start() {
+        System.out.println("Entered CheckingCookies.java");
+        try {
+            printCookieInfo(getCodeBase().toURI());
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        System.out.println("Finished CheckingCookies.java");
+
+        gotoNextDocument();
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SavingCookies/srcs/SavingCookies.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SavingCookies/srcs/SavingCookies.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SavingCookies/srcs/SavingCookies.java	(revision 416)
@@ -0,0 +1,123 @@
+/* SavingCookies.java
+ Store cookies in the java cookie store, and go to a page that confirms they are there.
+ 
+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.applet.Applet;
+import java.io.IOException;
+import java.net.CookieHandler;
+import java.net.CookieManager;
+import java.net.HttpCookie;
+import java.net.URI;
+import java.net.URL;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+
+public class SavingCookies extends Applet {
+    // Set up a response header with Set-Cookie
+    static private Map<String, List<String>> responseHeaders(String cookie) {
+        List<String> cookies = new ArrayList<String>();
+        cookies.add(cookie);
+        Map<String, List<String>> rh = new HashMap<String, List<String>>();
+        rh.put("Set-Cookie", cookies);
+        rh.put("Cookie", cookies);
+        return rh;
+    }
+
+    static private void saveCookie(URI uri, String cookie) throws IOException {
+        CookieHandler handler = CookieHandler.getDefault();
+
+        if (handler == null) {
+            System.out.println("Failing due to lack of CookieHandler class!");
+            return;
+        }
+
+        System.out.println("Using CookieHandler class: " + handler.getClass().getCanonicalName());
+        System.out.println("Putting " + cookie + " at " + uri.toString());
+        handler.put(uri, responseHeaders(cookie));
+    }
+
+    /* If a show-document param was set, go there */
+    private void gotoNextDocument() {
+        URL baseURL = getCodeBase();
+        String nextDocument = getParameter("show-document");
+        if (nextDocument != null) {
+            try {
+                System.out.println("Calling showDocument(" + nextDocument + ")");
+                getAppletContext().showDocument(new URL(baseURL.toString() + nextDocument));
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+        }
+    }
+
+    static private String formatCookie(String cookie, boolean persistent) {
+        if (persistent) {
+            // Put in the cookie date format
+            final int TIMEOUT = 3600;
+            DateFormat df = new SimpleDateFormat("EEE, dd-MMM-yyyy HH:mm:ss 'GMT'", Locale.US);
+            Calendar cal = Calendar.getInstance();
+            cal.add(Calendar.SECOND, TIMEOUT);
+            cookie += "; ";
+            cookie += "Expires=" + df.format(cal.getTime()) + "; ";
+            cookie += "Max-Age=" + TIMEOUT + "; ";
+        }
+        return cookie;
+    }
+
+    @Override
+    public void start() {
+        System.out.println("Entered SavingCookies.java");
+
+        URL baseURL = getCodeBase();
+        try {
+            saveCookie(baseURL.toURI(), formatCookie(getParameter("cookie"),
+                    "yes".equals(getParameter("persistent"))));
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+
+        System.out.println("Finished SavingCookies.java");
+
+        gotoNextDocument();
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SavingCookies/testcases/SavingCookiesTests.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SavingCookies/testcases/SavingCookiesTests.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SavingCookies/testcases/SavingCookiesTests.java	(revision 416)
@@ -0,0 +1,174 @@
+/* SavingCookieTests.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.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import net.sourceforge.jnlp.ContentReaderListener;
+import net.sourceforge.jnlp.ProcessResult;
+import net.sourceforge.jnlp.annotations.Bug;
+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 SavingCookiesTests extends BrowserTest {
+    
+    static final String ENTERING_CHECK = "Entered CheckingCookies";
+    static final String CHECKING_COMPLETION = "Finished CheckingCookies";
+    static final String SAVING_COMPLETION = "Finished SavingCookies";
+    private final static List<String> TRUSTALL = Collections.unmodifiableList(Arrays.asList(new String[] { "-Xtrustall" }));
+
+    static class ParallelRun extends Thread {
+
+        ParallelRun(String url, String completionString) {
+            this.url = url;
+            this.completionString = completionString;
+            this.completed = false;
+        }
+
+        ProcessResult pr;
+        private String url;
+        private String completionString;
+        volatile boolean completed;
+
+        @Override
+        public void run() {
+            try {
+                final ContentReaderListener stdoutListener = new ContentReaderListener() {
+                    @Override
+                    public void charReaded(char ch) {
+                    }
+
+                    @Override
+                    public synchronized void lineReaded(String s) {
+                        if (completionString != null && s.contains(completionString)) {
+                            completed = true;
+                        }
+                    }
+                };
+                if (url.endsWith(".html")) {
+                    pr = server.executeBrowser(url, stdoutListener, stdoutListener);
+                } else if (url.endsWith(".jnlp")) {
+                    pr = server.executeJavawsHeadless(TRUSTALL, url, stdoutListener, stdoutListener);
+                }
+            } catch (Exception ex) {
+                throw new RuntimeException(ex);
+            } finally {
+                completed = true;
+            }
+        }
+    }
+
+    final String COOKIE_SESSION_CHECK = "Found cookie: TEST=session";
+    final String COOKIE_PERSISTENT_CHECK = "Found cookie: TEST=persistent";
+
+    @Test
+    @TestInBrowsers(testIn = { Browsers.one })
+    public void AppletCheckCookieIsntSet() throws Exception {
+        final String COOKIE_SANITY_CHECK = "Found cookie: TEST=";
+        ProcessResult pr = server.executeBrowser("/CheckCookie.html");
+        
+        Assert.assertFalse("stdout should NOT contain '" + COOKIE_SANITY_CHECK + "' but did.", pr.stdout.contains(COOKIE_SANITY_CHECK));
+        Assert.assertTrue("stdout should contain '" + CHECKING_COMPLETION + "' but did not.", pr.stdout.contains(CHECKING_COMPLETION));
+    }
+    
+    @Test
+    @TestInBrowsers(testIn = { Browsers.one })
+    @Bug(id = "PR588")
+    public void AppletSessionCookieShowDoc() throws Exception {
+        ProcessResult pr = server.executeBrowser("/SaveSessionCookieAndGotoCheck.html");
+
+        Assert.assertTrue("stdout should contain '" + ENTERING_CHECK + "' but did not.", pr.stdout.contains(ENTERING_CHECK));
+        Assert.assertTrue("stdout should contain '" + COOKIE_SESSION_CHECK + "' but did not.", pr.stdout.contains(COOKIE_SESSION_CHECK));
+    }
+
+    @Test
+    @TestInBrowsers(testIn = { Browsers.one })
+    @Bug(id = "PR588")
+    public void AppletSessionCookieParallel() throws Exception {
+        ParallelRun save = new ParallelRun("/SaveSessionCookie.html", SAVING_COMPLETION);
+        save.start();
+        while (!save.completed) {
+            Thread.sleep(100);
+        }
+        
+        ProcessResult check = server.executeBrowser("/CheckCookie.html");
+        save.join();
+        
+        Assert.assertTrue("stdout should contain '" + ENTERING_CHECK + "' but did not.", save.pr.stdout.contains(ENTERING_CHECK));
+        //XXX: It is necessary to check save.pr's stdout, because it does not show up in 'check.stdout' for some reason
+        Assert.assertTrue("stdout should contain '" + COOKIE_SESSION_CHECK + "' but did not.", save.pr.stdout.contains(COOKIE_SESSION_CHECK));
+    }
+
+    @Test
+    @TestInBrowsers(testIn = { Browsers.one })
+    @Bug(id = "PR588")
+    public void AppletSessionCookieSequential() throws Exception {
+        ProcessResult save = server.executeBrowser("/SaveSessionCookie.html");
+        ProcessResult check = server.executeBrowser("/CheckCookie.html");
+        Assert.assertTrue("stdout should contain '" + ENTERING_CHECK + "' but did not.", check.stdout.contains(ENTERING_CHECK));
+        //Session cookies should NOT be intact upon browser close and re-open
+        Assert.assertFalse("stdout should NOT contain '" + COOKIE_SESSION_CHECK + "' but did.", check.stdout.contains(COOKIE_SESSION_CHECK));
+    }
+
+    @Test
+    @TestInBrowsers(testIn = { Browsers.one })
+    @Bug(id = "PR588")
+    public void AppletPersistentCookieShowDoc() throws Exception {
+        ProcessResult pr = server.executeBrowser("/SavePersistentCookieAndGotoCheck.html");
+        
+        Assert.assertTrue("stdout should contain '" + ENTERING_CHECK + "' but did not.", pr.stdout.contains(ENTERING_CHECK));
+        Assert.assertTrue("stdout should contain '" + COOKIE_PERSISTENT_CHECK + "' but did not.", pr.stdout.contains(COOKIE_PERSISTENT_CHECK));
+    }
+
+    @Test
+    @TestInBrowsers(testIn = { Browsers.one })
+    @Bug(id = "PR588")
+    public void AppletPersistentCookieSequential() throws Exception {
+        ProcessResult save = server.executeBrowser("/SavePersistentCookie.html");
+        //Use show doc to clear cookie afterwards
+        ProcessResult check = server.executeBrowser("/CheckCookieAndGotoClear.html");
+        Assert.assertTrue("stdout should contain '" + ENTERING_CHECK + "' but did not.", check.stdout.contains(ENTERING_CHECK));
+        //Persistent cookies should be stored past this point
+        Assert.assertTrue("stdout should contain '" + COOKIE_PERSISTENT_CHECK + "' but did not.", check.stdout.contains(COOKIE_PERSISTENT_CHECK));
+    }
+
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SignedJarResource/resources/SignedJarExtension.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SignedJarResource/resources/SignedJarExtension.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SignedJarResource/resources/SignedJarExtension.jnlp	(revision 416)
@@ -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.
+
+***********************************************************************
+This file is used as an extension jnlp for the launching jnlp's resource - contains 
+SignedJarResource class within SignedJarResource.jar
+***********************************************************************
+ -->
+<?xml version="1.0" encoding="utf-8"?>
+<jnlp spec="1.0" href="SignedJarExtension.jnlp" codebase=".">
+  <information>
+    <title>SignedJarExtension</title>
+    <vendor>IcedTea</vendor>
+    <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+    <description>SignedJarExtension</description>
+    <offline/>
+  </information>
+
+  <security>
+      <all-permissions/>
+  </security>
+
+  <resources>
+    <j2se version="1.6+"/>
+    <jar href="SignedJarResource.jar" main="true"/>
+  </resources>
+
+  <component-desc />
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SignedJarResource/srcs/SignedJarResource.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SignedJarResource/srcs/SignedJarResource.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SignedJarResource/srcs/SignedJarResource.java	(revision 416)
@@ -0,0 +1,43 @@
+/* SignedJarResource.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 SignedJarResource {
+
+    public static void main(String[] args){
+        System.out.println("Running SignedJarResource..");
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SignedJnlpApplication/resources/SignedJnlpApplication1.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SignedJnlpApplication/resources/SignedJnlpApplication1.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SignedJnlpApplication/resources/SignedJnlpApplication1.jnlp	(revision 416)
@@ -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>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SignedJnlpApplication/resources/SignedJnlpApplication2.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SignedJnlpApplication/resources/SignedJnlpApplication2.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SignedJnlpApplication/resources/SignedJnlpApplication2.jnlp	(revision 416)
@@ -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>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SignedJnlpApplication/resources/SignedJnlpApplication3.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SignedJnlpApplication/resources/SignedJnlpApplication3.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SignedJnlpApplication/resources/SignedJnlpApplication3.jnlp	(revision 416)
@@ -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>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SignedJnlpApplication/srcs/JNLP-INF/APPLICATION.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SignedJnlpApplication/srcs/JNLP-INF/APPLICATION.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SignedJnlpApplication/srcs/JNLP-INF/APPLICATION.jnlp	(revision 416)
@@ -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>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SignedJnlpApplication/srcs/SignedJnlpApplication.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SignedJnlpApplication/srcs/SignedJnlpApplication.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SignedJnlpApplication/srcs/SignedJnlpApplication.java	(revision 416)
@@ -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");
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SignedJnlpApplication/testcases/SignedJnlpApplicationTest.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SignedJnlpApplication/testcases/SignedJnlpApplicationTest.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SignedJnlpApplication/testcases/SignedJnlpApplicationTest.java	(revision 416)
@@ -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));
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SignedJnlpCaseTestOne/resources/SignedJnlpCaseTestOne1.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SignedJnlpCaseTestOne/resources/SignedJnlpCaseTestOne1.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SignedJnlpCaseTestOne/resources/SignedJnlpCaseTestOne1.jnlp	(revision 416)
@@ -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="SignedJnlpCaseTestOne1.jnlp" codebase=".">
+  <information>
+    <title>SignedJnlpCaseTest</title>
+    <vendor>IcedTea</vendor>
+    <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+    <description>SignedJnlpCaseTest</description>
+    <offline/>
+  </information>
+
+  <security>
+      <all-permissions/>
+  </security> 
+
+   <resources>
+        <property name="specialProperty" value="icedtea"/>
+   </resources>
+
+  <resources>
+    <j2se version="1.6+"/>
+    <jar href="SignedJnlpCaseTestOne.jar"/>
+  </resources>
+  <application-desc main-class="SignedJnlpCase">
+  </application-desc>
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SignedJnlpCaseTestOne/resources/SignedJnlpCaseTestOne2.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SignedJnlpCaseTestOne/resources/SignedJnlpCaseTestOne2.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SignedJnlpCaseTestOne/resources/SignedJnlpCaseTestOne2.jnlp	(revision 416)
@@ -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="SignedJnlpCaseTestOne2.jnlp" codebase=".">
+  <information>
+    <title>SignedJnlpCaseTest 2</title>
+    <vendor>IcedTea</vendor>
+    <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+    <description>SignedJnlpCaseTest 2</description>
+    <offline/>
+  </information>
+
+  <security>
+      <all-permissions/>
+  </security> 
+
+   <resources>
+        <property name="specialProperty" value="icedtea"/>
+   </resources>
+
+  <resources>
+    <j2se version="1.6+"/>
+    <jar href="SignedJnlpCaseTestOne.jar"/>
+  </resources>
+  <application-desc main-class="SignedJnlpCase">
+  </application-desc>
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SignedJnlpCaseTestOne/srcs/JNLP-INF/aPpLiCaTioN.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SignedJnlpCaseTestOne/srcs/JNLP-INF/aPpLiCaTioN.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SignedJnlpCaseTestOne/srcs/JNLP-INF/aPpLiCaTioN.jnlp	(revision 416)
@@ -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="SignedJnlpCaseTestOne1.jnlp" codebase=".">
+  <information>
+    <title>SignedJnlpCaseTest</title>
+    <vendor>IcedTea</vendor>
+    <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+    <description>SignedJnlpCaseTest</description>
+    <offline/>
+  </information>
+
+  <security>
+      <all-permissions/>
+  </security> 
+
+   <resources>
+        <property name="specialProperty" value="icedtea"/>
+   </resources>
+
+  <resources>
+    <j2se version="1.6+"/>
+    <jar href="SignedJnlpCaseTestOne.jar"/>
+  </resources>
+  <application-desc main-class="SignedJnlpCase">
+  </application-desc>
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SignedJnlpCaseTestOne/srcs/SignedJnlpCase.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SignedJnlpCaseTestOne/srcs/SignedJnlpCase.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SignedJnlpCaseTestOne/srcs/SignedJnlpCase.java	(revision 416)
@@ -0,0 +1,43 @@
+/* SignedJnlpCase.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 SignedJnlpCase {
+
+    public static void main(String[] args) {
+        System.out.println("Running signed application in main");
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SignedJnlpCaseTestOne/testcases/SignedJnlpCaseOneTest.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SignedJnlpCaseTestOne/testcases/SignedJnlpCaseOneTest.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SignedJnlpCaseTestOne/testcases/SignedJnlpCaseOneTest.java	(revision 416)
@@ -0,0 +1,65 @@
+/* SignedJnlpCaseOneTest.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 SignedJnlpCaseOneTest {
+
+    private static ServerAccess server = new ServerAccess();
+    private final List<String> l = Collections.unmodifiableList(Arrays.asList(new String[] { "-Xtrustall" }));
+
+    @Test
+    public void launchingFileMatchesSigned() throws Exception {
+        ServerAccess.ProcessResult pr = server.executeJavawsHeadless(l, "/SignedJnlpCaseTestOne1.jnlp");
+        String s = "Running signed application in main";
+        Assert.assertTrue("Stdout should contains " + s + " but did not", pr.stdout.contains(s));
+    }
+
+    @Test
+    public void launchingFileDoesNotMatchSigned() throws Exception {
+        ServerAccess.ProcessResult pr = server.executeJavawsHeadless(l, "/SignedJnlpCaseTestOne2.jnlp");
+        String s = "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";
+        Assert.assertTrue("Stderr should contains " + s + " but did not", pr.stderr.contains(s));
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SignedJnlpCaseTestTwo/resources/SignedJnlpCaseTestTwo1.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SignedJnlpCaseTestTwo/resources/SignedJnlpCaseTestTwo1.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SignedJnlpCaseTestTwo/resources/SignedJnlpCaseTestTwo1.jnlp	(revision 416)
@@ -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="SignedJnlpCaseTestTwo1.jnlp" codebase=".">
+  <information>
+    <title>SignedJnlpCaseTest</title>
+    <vendor>IcedTea</vendor>
+    <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+    <description>SignedJnlpCaseTest</description>
+    <offline/>
+  </information>
+
+  <security>
+      <all-permissions/>
+  </security> 
+
+   <resources>
+        <property name="specialProperty" value="icedtea"/>
+   </resources>
+
+  <resources>
+    <j2se version="1.6+"/>
+    <jar href="SignedJnlpCaseTestTwo.jar"/>
+  </resources>
+  <application-desc main-class="SignedJnlpCase">
+  </application-desc>
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SignedJnlpCaseTestTwo/resources/SignedJnlpCaseTestTwo2.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SignedJnlpCaseTestTwo/resources/SignedJnlpCaseTestTwo2.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SignedJnlpCaseTestTwo/resources/SignedJnlpCaseTestTwo2.jnlp	(revision 416)
@@ -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="SignedJnlpCaseTestTwo2.jnlp" codebase=".">
+  <information>
+    <title>SignedJnlpCaseTest 2</title>
+    <vendor>IcedTea</vendor>
+    <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+    <description>SignedJnlpCaseTest 2</description>
+    <offline/>
+  </information>
+
+  <security>
+      <all-permissions/>
+  </security> 
+
+   <resources>
+        <property name="specialProperty" value="icedtea"/>
+   </resources>
+
+  <resources>
+    <j2se version="1.6+"/>
+    <jar href="SignedJnlpCaseTestTwo.jar"/>
+  </resources>
+  <application-desc main-class="SignedJnlpCase">
+  </application-desc>
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SignedJnlpCaseTestTwo/srcs/JNLP-INF/aPpLiCaTiOn_tEmPlAte.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SignedJnlpCaseTestTwo/srcs/JNLP-INF/aPpLiCaTiOn_tEmPlAte.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SignedJnlpCaseTestTwo/srcs/JNLP-INF/aPpLiCaTiOn_tEmPlAte.jnlp	(revision 416)
@@ -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="*" codebase="*">
+  <information>
+    <title>SignedJnlpCaseTest</title>
+    <vendor>IcedTea</vendor>
+    <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+    <description>SignedJnlpCaseTest</description>
+    <offline/>
+  </information>
+
+  <security>
+      <all-permissions/>
+  </security> 
+
+   <resources>
+        <property name="*" value="icedtea"/>
+   </resources>
+
+  <resources>
+    <j2se version="1.6+"/>
+    <jar href="*"/>
+  </resources>
+  <application-desc main-class="*">
+  </application-desc>
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SignedJnlpCaseTestTwo/srcs/SignedJnlpCase.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SignedJnlpCaseTestTwo/srcs/SignedJnlpCase.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SignedJnlpCaseTestTwo/srcs/SignedJnlpCase.java	(revision 416)
@@ -0,0 +1,43 @@
+/* SignedJnlpCase.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 SignedJnlpCase {
+
+    public static void main(String[] args) {
+        System.out.println("Running signed application in main");
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SignedJnlpCaseTestTwo/testcases/SignedJnlpCaseTwoTest.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SignedJnlpCaseTestTwo/testcases/SignedJnlpCaseTwoTest.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SignedJnlpCaseTestTwo/testcases/SignedJnlpCaseTwoTest.java	(revision 416)
@@ -0,0 +1,65 @@
+/* SignedJnlpCaseTwoTest.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 SignedJnlpCaseTwoTest {
+
+    private static ServerAccess server = new ServerAccess();
+    private final List<String> l = Collections.unmodifiableList(Arrays.asList(new String[] { "-Xtrustall" }));
+
+    @Test
+    public void launchingFileMatchesSigned() throws Exception {
+        ServerAccess.ProcessResult pr = server.executeJavawsHeadless(l, "/SignedJnlpCaseTestTwo1.jnlp");
+        String s = "Running signed application in main";
+        Assert.assertTrue("Stdout should contains " + s + " but did not", pr.stdout.contains(s));
+    }
+
+    @Test
+    public void launchingFileDoesNotMatchSigned() throws Exception {
+        ServerAccess.ProcessResult pr = server.executeJavawsHeadless(l, "/SignedJnlpCaseTestTwo2.jnlp");
+        String s = "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";
+        Assert.assertTrue("Stderr should contains " + s + " but did not", pr.stderr.contains(s));
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SignedJnlpResource/resources/MatchingSignedJnlpExtension.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SignedJnlpResource/resources/MatchingSignedJnlpExtension.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SignedJnlpResource/resources/MatchingSignedJnlpExtension.jnlp	(revision 416)
@@ -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.
+
+***********************************************************************
+This file is used as an extension jnlp for the launching jnlp's resource - contains main within
+SignedJnlpResource.jar which matches the signed jnlp
+***********************************************************************
+ -->
+<?xml version="1.0" encoding="utf-8"?>
+<jnlp spec="1.0" href="MatchingSignedJnlpExtension.jnlp" codebase=".">
+  <information>
+    <title>MATCHES SIGNED JNLP</title>
+    <vendor>IcedTea</vendor>
+    <homepage href="MATCHES_SIGNED_JNLP"/>
+    <description>MATCHES SIGNED JNLP</description>
+    <offline/>
+  </information>
+
+  <security>
+      <all-permissions/>
+  </security>
+
+  <resources>
+    <j2se version="1.6+"/>
+    <jar href="SignedJnlpResource.jar" main="true"/>
+  </resources>
+
+  <component-desc />
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SignedJnlpResource/resources/UnmatchingSignedJnlpExtension.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SignedJnlpResource/resources/UnmatchingSignedJnlpExtension.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SignedJnlpResource/resources/UnmatchingSignedJnlpExtension.jnlp	(revision 416)
@@ -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.
+
+***********************************************************************
+This file is used as an extension jnlp for the launching jnlp's resource - contains main within
+SignedJnlpResource.jar which does not match the signed jnlp
+***********************************************************************
+ -->
+<?xml version="1.0" encoding="utf-8"?>
+<jnlp spec="1.0" href="UnmatchingSignedJnlpExtension.jnlp" codebase=".">
+  <information>
+    <title>UnmatchingSignedJnlpExtension</title>
+    <vendor>IcedTea</vendor>
+    <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+    <description>UnmatchingSignedJnlpExtension</description>
+    <offline/>
+  </information>
+
+  <security>
+      <all-permissions/>
+  </security>
+
+  <resources>
+    <j2se version="1.6+"/>
+    <jar href="SignedJnlpResource.jar" main="true"/>
+  </resources>
+
+  <component-desc />
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SignedJnlpResource/srcs/JNLP-INF/APPLICATION_TEMPLATE.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SignedJnlpResource/srcs/JNLP-INF/APPLICATION_TEMPLATE.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SignedJnlpResource/srcs/JNLP-INF/APPLICATION_TEMPLATE.jnlp	(revision 416)
@@ -0,0 +1,58 @@
+<!--
+
+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="*" codebase="*">
+  <information>
+    <title>MATCHES SIGNED JNLP</title>
+    <vendor>*</vendor>
+    <homepage href="MATCHES_SIGNED_JNLP"/>
+    <description>MATCHES SIGNED JNLP</description>
+    <offline/>
+  </information>
+
+  <security>
+      <all-permissions/>
+  </security>
+
+  <resources>
+    <j2se version="1.6+"/>
+    <jar href="*" main="*"/>
+  </resources>
+
+  <component-desc />
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SignedJnlpResource/srcs/SignedJnlpResource.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SignedJnlpResource/srcs/SignedJnlpResource.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SignedJnlpResource/srcs/SignedJnlpResource.java	(revision 416)
@@ -0,0 +1,43 @@
+/* SignedJnlpResource..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 SignedJnlpResource {
+
+    public static void main(String[] args){
+        System.out.println("Running SignedJnlpResource...");
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SignedJnlpTemplate/resources/SignedJnlpTemplate1.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SignedJnlpTemplate/resources/SignedJnlpTemplate1.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SignedJnlpTemplate/resources/SignedJnlpTemplate1.jnlp	(revision 416)
@@ -0,0 +1,66 @@
+<!--
+
+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.
+
+******************************************
+* This jnlp file is valid when compared to the signed jnlp *
+******************************************
+
+ -->
+<?xml version="1.0" encoding="utf-8"?>
+<jnlp spec="1.0" href="SignedJnlpTemplate1.jnlp" codebase=".">
+  <information>
+    <title>SignedJnlpTemplate</title>
+    <vendor>IcedTea</vendor>
+    <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+    <description>SignedJnlpTemplate</description>
+    <offline/>
+  </information>
+
+  <security>
+      <all-permissions/>
+  </security> 
+
+   <resources>
+        <property name="specialProperty" value="icedtea"/>
+   </resources>
+
+  <resources>
+    <j2se version="1.6+"/>
+    <jar href="SignedJnlpTemplate.jar"/>
+  </resources>
+  <application-desc main-class="SignedJnlpTemplate">
+  </application-desc>
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SignedJnlpTemplate/resources/SignedJnlpTemplate2.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SignedJnlpTemplate/resources/SignedJnlpTemplate2.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SignedJnlpTemplate/resources/SignedJnlpTemplate2.jnlp	(revision 416)
@@ -0,0 +1,64 @@
+<!--
+
+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 'j2se' child within the 'resource' element in the launching JNLP file *
+********************************************************
+ -->
+<?xml version="1.0" encoding="utf-8"?>
+<jnlp spec="1.0" href="SignedJnlpTemplate2.jnlp" codebase=".">
+  <information>
+    <title>SignedJnlpTemplate</title>
+    <vendor>IcedTea</vendor>
+    <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+    <description>SignedJnlpTemplate</description>
+    <offline/>
+  </information>
+
+  <security>
+      <all-permissions/>
+  </security> 
+
+   <resources>
+        <property name="specialProperty" value="icedtea"/>
+   </resources>
+
+  <resources>
+    <jar href="SignedJnlpTemplate.jar"/>
+  </resources>
+  <application-desc main-class="SignedJnlpTemplate">
+  </application-desc>
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SignedJnlpTemplate/resources/SignedJnlpTemplate3.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SignedJnlpTemplate/resources/SignedJnlpTemplate3.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SignedJnlpTemplate/resources/SignedJnlpTemplate3.jnlp	(revision 416)
@@ -0,0 +1,71 @@
+<!--
+
+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.
+
+*************************************************
+* Added an extra "information" element to the launching JNLP file *
+*************************************************
+
+ -->
+<?xml version="1.0" encoding="utf-8"?>
+<jnlp spec="1.0" href="SignedJnlpTemplate3.jnlp" codebase=".">
+  <information>
+    <title>SignedJnlpTemplate</title>
+    <vendor>IcedTea</vendor>
+    <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+    <description>SignedJnlpTemplate</description>
+    <offline/>
+  </information>
+
+  <information locale="test">
+    <title>IcedTea-Web</title>
+    <vendor>IcedTea</vendor>
+  </information>
+
+  <security>
+      <all-permissions/>
+  </security> 
+
+   <resources>
+        <property name="specialProperty" value="icedtea"/>
+   </resources>
+
+  <resources>
+    <j2se version="1.6+"/>
+    <jar href="SignedJnlpTemplate.jar"/>
+  </resources>
+  <application-desc main-class="SignedJnlpTemplate">
+  </application-desc>
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SignedJnlpTemplate/srcs/JNLP-INF/APPLICATION_TEMPLATE.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SignedJnlpTemplate/srcs/JNLP-INF/APPLICATION_TEMPLATE.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SignedJnlpTemplate/srcs/JNLP-INF/APPLICATION_TEMPLATE.jnlp	(revision 416)
@@ -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="*" codebase="*">
+  <information>
+    <title>*</title>
+    <vendor>IcedTea</vendor>
+    <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+    <description>*</description>
+    <offline/>
+  </information>
+
+  <security>
+      <all-permissions/>
+  </security> 
+
+   <resources>
+        <property name="specialProperty" value="icedtea"/>
+   </resources>
+
+  <resources>
+    <j2se version="*"/>
+    <jar href="SignedJnlpTemplate.jar"/>
+  </resources>
+  <application-desc main-class="SignedJnlpTemplate">
+  </application-desc>
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SignedJnlpTemplate/srcs/SignedJnlpTemplate.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SignedJnlpTemplate/srcs/SignedJnlpTemplate.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SignedJnlpTemplate/srcs/SignedJnlpTemplate.java	(revision 416)
@@ -0,0 +1,43 @@
+/* SignedJnlpTemplate.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 SignedJnlpTemplate {
+
+    public static void main(String[] args) {
+        System.out.println("Running signed application in main");
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SignedJnlpTemplate/testcases/SignedJnlpTemplateTest.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SignedJnlpTemplate/testcases/SignedJnlpTemplateTest.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SignedJnlpTemplate/testcases/SignedJnlpTemplateTest.java	(revision 416)
@@ -0,0 +1,77 @@
+/* SignedJnlpTemplateTest.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 SignedJnlpTemplateTest {
+
+    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 launchingFileMatchesSignedTemplate1() throws Exception {
+        ServerAccess.ProcessResult pr = server.executeJavawsHeadless(l, "/SignedJnlpTemplate1.jnlp");
+        String s = "Running signed application in main";
+        Assert.assertTrue("Stdout should contains " + s + " but did not", pr.stdout.contains(s));
+    }
+
+    /**
+     * Missing 'j2se' child within the 'resource' element in the launching JNLP file
+     */
+    @Test
+    public void launchingFileDoesNotMatchSignedTemplate2() throws Exception {
+        ServerAccess.ProcessResult pr = server.executeJavawsHeadless(l, "/SignedJnlpTemplate2.jnlp");
+        Assert.assertTrue("Stderr should contains " + signedException + " but did not", pr.stderr.contains(signedException));
+    }
+
+    /**
+     * Added an extra "information" element to the launching JNLP file *
+     */
+    @Test
+    public void launchingFileDoesNotMatchSignedTemplate3() throws Exception {
+        ServerAccess.ProcessResult pr = server.executeJavawsHeadless(l, "/SignedJnlpTemplate3.jnlp");
+        Assert.assertTrue("Stderr should contains " + signedException + " but did not", pr.stderr.contains(signedException));
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SimpletestSigned1/resources/SimpletestSigned1.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SimpletestSigned1/resources/SimpletestSigned1.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SimpletestSigned1/resources/SimpletestSigned1.jnlp	(revision 416)
@@ -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="SimpletestSigned1.jnlp" codebase=".">
+  <information>
+    <title>simpletest1</title>
+    <vendor>IcedTea</vendor>
+    <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+    <description>simpletest1</description>
+    <offline/>
+  </information>
+  <resources>
+    <j2se version="1.4+"/>
+    <jar href="SimpletestSigned1.jar"/>
+  </resources>
+  <application-desc main-class="SimpletestSigned1">
+  </application-desc>
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SimpletestSigned1/srcs/SimpletestSigned1.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SimpletestSigned1/srcs/SimpletestSigned1.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/SimpletestSigned1/srcs/SimpletestSigned1.java	(revision 416)
@@ -0,0 +1,43 @@
+/* SimpletestSigned1.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 SimpletestSigned1{
+
+    public static void main(String[] args){
+        System.out.println("Good simple javaws exapmle");
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/Spaces can be everywhere signed/resources/NotOnly spaces can kill ěščřž too signed.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/Spaces can be everywhere signed/resources/NotOnly spaces can kill ěščřž too signed.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/Spaces can be everywhere signed/resources/NotOnly spaces can kill ěščřž too signed.jnlp	(revision 416)
@@ -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.
+
+ -->
+<?xml version="1.0" encoding="utf-8"?>
+<jnlp spec="1.0" href="NotOnly spaces can kill ÄÅ¡ÄÅÅŸ too signed.jnlp" codebase=".">
+    <information>
+        <title>Spaces can be everywhere test with few more chars for encoding signed</title>
+        <vendor>IcedTea</vendor>
+        <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+        <description>AppletTest</description>
+        <offline/>
+    </information>
+    <resources>
+        <j2se version="1.4+"/>
+        <jar href="Spaces can be everywhere signed.jar"/>
+    </resources>
+    <applet-desc
+      documentBase="."
+      name="SpacesCanBeEverywhereSigned"
+      main-class="SpacesCanBeEverywhereSigned"
+      width="100"
+      height="100">
+    </applet-desc>
+</jnlp>
+
+
+</applet-desc>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/Spaces can be everywhere signed/resources/Spaces can be everywhere1 signed.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/Spaces can be everywhere signed/resources/Spaces can be everywhere1 signed.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/Spaces can be everywhere signed/resources/Spaces can be everywhere1 signed.jnlp	(revision 416)
@@ -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="Spaces can be everywhere1 signed.jnlp" codebase=".">
+  <information>
+    <title>Spaces can be everywhere1 signed</title>
+    <vendor>IcedTea</vendor>
+    <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+    <description>Spaces can be everywhere1 signed</description>
+    <offline/>
+  </information>
+  <resources>
+    <j2se version="1.4+"/>
+    <jar href="SimpletestSigned1.jar"/>
+  </resources>
+  <application-desc main-class="SimpletestSigned1">
+  </application-desc>
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/Spaces can be everywhere signed/resources/Spaces can be everywhere2 signed.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/Spaces can be everywhere signed/resources/Spaces can be everywhere2 signed.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/Spaces can be everywhere signed/resources/Spaces can be everywhere2 signed.jnlp	(revision 416)
@@ -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="Spaces can be everywhere2 signed.jnlp" codebase=".">
+  <information>
+    <title>Spaces can be everywhere2</title>
+    <vendor>IcedTea</vendor>
+    <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+    <description>Spaces can be everywhere2 signed</description>
+    <offline/>
+  </information>
+  <resources>
+    <j2se version="1.4+"/>
+    <jar href="Spaces can be everywhere signed.jar"/>
+  </resources>
+  <application-desc main-class="SpacesCanBeEverywhereSigned">
+  </application-desc>
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/Spaces can be everywhere signed/resources/SpacesCanBeEverywhere1signed.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/Spaces can be everywhere signed/resources/SpacesCanBeEverywhere1signed.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/Spaces can be everywhere signed/resources/SpacesCanBeEverywhere1signed.jnlp	(revision 416)
@@ -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="SpacesCanBeEverywhere1signed.jnlp" codebase=".">
+  <information>
+    <title>Spaces can be everywhere signed</title>
+    <vendor>IcedTea</vendor>
+    <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+    <description>simpletest1</description>
+    <offline/>
+  </information>
+  <resources>
+    <j2se version="1.4+"/>
+    <jar href="Spaces can be everywhere signed.jar"/>
+  </resources>
+  <application-desc main-class="SpacesCanBeEverywhereSigned">
+  </application-desc>
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/Spaces can be everywhere signed/resources/spaces applet Tests signed.html
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/Spaces can be everywhere signed/resources/spaces applet Tests signed.html	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/Spaces can be everywhere signed/resources/spaces applet Tests signed.html	(revision 416)
@@ -0,0 +1,42 @@
+<!--
+
+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 bgcolor="red">
+<p><applet code="SpacesCanBeEverywhereSigned.class" archive="Spaces can be everywhere signed.jar" codebase="." width=800 height=600>
+</applet></p>
+</body>
+</html>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/Spaces can be everywhere signed/srcs/SpacesCanBeEverywhereSigned.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/Spaces can be everywhere signed/srcs/SpacesCanBeEverywhereSigned.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/Spaces can be everywhere signed/srcs/SpacesCanBeEverywhereSigned.java	(revision 416)
@@ -0,0 +1,76 @@
+
+import java.applet.Applet;
+
+/* SpacesCanBeEverywhereSigned.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 SpacesCanBeEverywhereSigned extends Applet{
+
+    public static void main(String[] args){
+        System.out.println("Signed spaces can be everywhere.jsr was launched correctly");
+    }
+
+     private class Killer extends Thread {
+
+        public int n = 2000;
+
+        @Override
+        public void run() {
+            try {
+                Thread.sleep(n);
+                System.out.println("Applet killing himself after " + n + " ms of life");
+                System.exit(0);
+            } catch (Exception ex) {
+            }
+        }
+    }
+    private Killer killer;
+
+    @Override
+    public void init() {
+        killer = new Killer();
+    }
+
+    @Override
+    public void start() {
+        main(null);
+        killer.start();
+        System.out.println("killer was started");
+    }
+
+  
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/Spaces can be everywhere signed/testcases/SpacesCanBeEverywhereTestsSigned.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/Spaces can be everywhere signed/testcases/SpacesCanBeEverywhereTestsSigned.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/signed/Spaces can be everywhere signed/testcases/SpacesCanBeEverywhereTestsSigned.java	(revision 416)
@@ -0,0 +1,245 @@
+/* SpacesCanBeEverywhereTestsSigned.java
+Copyright (C) 20121 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.ArrayList;
+import java.util.List;
+import net.sourceforge.jnlp.ServerAccess;
+import net.sourceforge.jnlp.annotations.Bug;
+import net.sourceforge.jnlp.annotations.NeedsDisplay;
+import net.sourceforge.jnlp.browsertesting.BrowserTest;
+import net.sourceforge.jnlp.browsertesting.Browsers;
+import net.sourceforge.jnlp.annotations.TestInBrowsers;
+import org.junit.Assert;
+
+import org.junit.Test;
+
+@Bug(id={"http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2011-October/016127.html","PR804","PR811"})
+public class SpacesCanBeEverywhereTestsSigned extends BrowserTest {
+
+
+    @Bug(id="PR811")
+    @Test
+    @NeedsDisplay
+    public void SpacesCanBeEverywhereLocalAppletTestsJnlp2Signed() throws Exception {
+        List<String> commands=new ArrayList<String>(1);
+        commands.add(server.getJavawsLocation());
+        commands.add(server.getDir()+"/NotOnly spaces can kill ÄÅ¡ÄÅÅŸ too signed.jnlp");
+        /*                                         Change of dir is cousing the Exception bellow
+         * ServerAccess.ProcessResult pr =  ServerAccess.executeProcess(commands,server.getDir());
+         * No X11 DISPLAY variable was set, but this program performed an operation which requires it.
+         * at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:173)
+         * at java.awt.Window.<init>(Window.java:476)
+         * at java.awt.Frame.<init>(Frame.java:419)
+         * at java.awt.Frame.<init>(Frame.java:384)
+         * at javax.swing.SwingUtilities$SharedOwnerFrame.<init>(SwingUtilities.java:1754)
+         * at javax.swing.SwingUtilities.getSharedOwnerFrame(SwingUtilities.java:1831)
+         * at javax.swing.JWindow.<init>(JWindow.java:185)
+         * at javax.swing.JWindow.<init>(JWindow.java:137)
+         * at net.sourceforge.jnlp.runtime.JNLPSecurityManager.<init>(JNLPSecurityManager.java:121)
+         * at net.sourceforge.jnlp.runtime.JNLPRuntime.initialize(JNLPRuntime.java:202)
+         * at net.sourceforge.jnlp.runtime.Boot.run(Boot.java:177)
+         * at net.sourceforge.jnlp.runtime.Boot.run(Boot.java:51)
+         * at java.security.AccessController.doPrivileged(Native Method)
+         * at net.sourceforge.jnlp.runtime.Boot.main(Boot.java:168)
+         *
+         * Thats why there is absolute path to the file.
+         *
+         * This is also why SpacesCanBeEverywhereLocalTests1Signed is passing -
+         * it is in headless mode. This can be considered as bug, but because it is
+         * only on ocal files, and probably only from test run - it can be ignored
+         */
+        ServerAccess.ProcessResult pr =  ServerAccess.executeProcess(commands);
+        String s="Signed spaces can be everywhere.jsr was launched correctly";
+        Assert.assertTrue("stdout should contains `"+s+"`, but did not",pr.stdout.contains(s));
+        String cc = "xception";
+        Assert.assertFalse("stderr should NOT contains `" + cc + "`, but did", pr.stderr.contains(cc));
+        Assert.assertFalse("should not be terminated, but was", pr.wasTerminated);
+        Assert.assertEquals((Integer) 0, pr.returnValue);
+    }
+
+    @Bug(id="PR811")
+    @Test
+    @NeedsDisplay
+    public void SpacesCanBeEverywhereRemoteAppletTestsJnlp2Signed() throws Exception {
+        ServerAccess.ProcessResult pr = server.executeJavaws("/NotOnly%20spaces%20can%20kill%20%C4%9B%C5%A1%C4%8D%C5%99%C5%BE%20too%20signed.jnlp");
+        String s="Signed spaces can be everywhere.jsr was launched correctly";
+        Assert.assertTrue("stdout should contains `"+s+"`, but did not",pr.stdout.contains(s));
+        String cc = "xception";
+        Assert.assertFalse("stderr should NOT contains `" + cc + "`, but did", pr.stderr.contains(cc));
+        Assert.assertFalse("should NOT be terminated, but was not", pr.wasTerminated);
+    }
+
+    @Bug(id="PR811")
+    @Test
+    @NeedsDisplay
+    @TestInBrowsers(testIn = {Browsers.one})
+    public void SpacesCanBeEverywhereRemoteAppletTestsHtml2Signed() throws Exception {
+        ServerAccess.ProcessResult pr = server.executeBrowser("/spaces+applet+Tests+signed.html");
+        String s="Signed spaces can be everywhere.jsr was launched correctly";
+        Assert.assertTrue("stdout should contains `"+s+"`, but did not",pr.stdout.contains(s));
+        String cc = "xception";
+        Assert.assertFalse("stderr should NOT contains `" + cc + "`, but did", pr.stderr.contains(cc));
+        Assert.assertTrue("should be terminated, but was not", pr.wasTerminated);
+    }
+
+
+    @Bug(id={"PR811","http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2011-October/016144.html"})
+    @Test
+    public void SpacesCanBeEverywhereRemoteTests1Signed() throws Exception {
+        ServerAccess.ProcessResult pr = server.executeJavawsHeadless(null, "/Spaces%20can%20be%20everywhere1%20signed.jnlp");
+        String s = "Good simple javaws exapmle";
+        Assert.assertTrue("stdout should contains `" + s + "`, but did not", pr.stdout.contains(s));
+        String cc = "ClassNotFoundException";
+        Assert.assertFalse("stderr should NOT contains `" + cc + "`, but did", pr.stderr.contains(cc));
+        Assert.assertFalse("should not be terminated, but was", pr.wasTerminated);
+        Assert.assertEquals((Integer) 0, pr.returnValue);
+    }
+
+    @Bug(id="PR811")
+    @Test
+    public void SpacesCanBeEverywhereRemoteTests2Signed() throws Exception {
+        ServerAccess.ProcessResult pr = server.executeJavawsHeadless(null, "/Spaces%20can%20be%20everywhere2%20signed.jnlp");
+        String s="Signed spaces can be everywhere.jsr was launched correctly";
+        Assert.assertTrue("stdout should contains `"+s+"`, but did not",pr.stdout.contains(s));
+        String cc = "ClassNotFoundException";
+        Assert.assertFalse("stderr should NOT contains `" + cc + "`, but did", pr.stderr.contains(cc));
+        Assert.assertFalse("should not be terminated, but was", pr.wasTerminated);
+        Assert.assertEquals((Integer) 0, pr.returnValue);
+    }
+
+    @Bug(id="PR811")
+    @Test
+    public void SpacesCanBeEverywhereRemoteTests2Signed_withQuery1() throws Exception {
+        ServerAccess.ProcessResult pr = server.executeJavawsHeadless(null, "/Spaces%20can%20be%20everywhere2%20signed.jnlp?test=20");
+        String s="Signed spaces can be everywhere.jsr was launched correctly";
+        Assert.assertTrue("stdout should contains `"+s+"`, but did not",pr.stdout.contains(s));
+        String cc = "ClassNotFoundException";
+        Assert.assertFalse("stderr should NOT contains `" + cc + "`, but did", pr.stderr.contains(cc));
+        Assert.assertFalse("should not be terminated, but was", pr.wasTerminated);
+        Assert.assertEquals((Integer) 0, pr.returnValue);
+    }
+
+     @Bug(id="PR811")
+    @Test
+    public void SpacesCanBeEverywhereRemoteTests2Signed_withQuery2() throws Exception {
+        ServerAccess.ProcessResult pr = server.executeJavawsHeadless(null, "/Spaces%20can%20be%20everywhere2%20signed.jnlp?test%3D20");
+
+        String s="Signed spaces can be everywhere.jsr was launched correctly";
+        Assert.assertTrue("stdout should contains `"+s+"`, but did not",pr.stdout.contains(s));
+        String cc = "ClassNotFoundException";
+        Assert.assertFalse("stderr should NOT contains `" + cc + "`, but did", pr.stderr.contains(cc));
+        Assert.assertFalse("should not be terminated, but was", pr.wasTerminated);
+        Assert.assertEquals((Integer) 0, pr.returnValue);
+    }
+
+    @Bug(id="PR811")
+    @Test
+    public void SpacesCanBeEverywhereRemoteTests3Signed() throws Exception {
+        ServerAccess.ProcessResult pr = server.executeJavawsHeadless(null, "/SpacesCanBeEverywhere1signed.jnlp");
+        String s="Signed spaces can be everywhere.jsr was launched correctly";
+        Assert.assertTrue("stdout should contains `"+s+"`, but did not",pr.stdout.contains(s));
+        String cc = "ClassNotFoundException";
+        Assert.assertFalse("stderr should NOT contains `" + cc + "`, but did", pr.stderr.contains(cc));
+        Assert.assertFalse("should not be terminated, but was", pr.wasTerminated);
+        Assert.assertEquals((Integer) 0, pr.returnValue);
+    }
+
+
+    @Bug(id="PR804")
+    @Test
+    public void SpacesCanBeEverywhereLocalTests1Signed() throws Exception {
+        List<String> commands=new ArrayList<String>(4);
+        commands.add(server.getJavawsLocation());
+        commands.add(ServerAccess.HEADLES_OPTION);
+        commands.add("Spaces can be everywhere1.jnlp");
+        ServerAccess.ProcessResult pr = ServerAccess.executeProcess(commands,server.getDir());
+        String s = "Good simple javaws exapmle";
+        Assert.assertTrue("stdout should contains `" + s + "`, but did not", pr.stdout.contains(s));
+        String cc = "ClassNotFoundException";
+        Assert.assertFalse("stderr should NOT contains `" + cc + "`, but did", pr.stderr.contains(cc));
+        Assert.assertFalse("should not be terminated, but was", pr.wasTerminated);
+        Assert.assertEquals((Integer) 0, pr.returnValue);
+    }
+
+    @Bug(id="PR804")
+    @Test
+    public void SpacesCanBeEverywhereLocalTests2Signed() throws Exception {
+        List<String> commands=new ArrayList<String>(4);
+        commands.add(server.getJavawsLocation());
+        commands.add(ServerAccess.HEADLES_OPTION);
+        commands.add("Spaces can be everywhere2 signed.jnlp");
+        ServerAccess.ProcessResult pr = ServerAccess.executeProcess(commands,server.getDir());
+        String s="Signed spaces can be everywhere.jsr was launched correctly";
+        Assert.assertTrue("stdout should contains `"+s+"`, but did not",pr.stdout.contains(s));
+        String cc = "ClassNotFoundException";
+        Assert.assertFalse("stderr should NOT contains `" + cc + "`, but did", pr.stderr.contains(cc));
+        Assert.assertFalse("should not be terminated, but was", pr.wasTerminated);
+        Assert.assertEquals((Integer) 0, pr.returnValue);
+    }
+
+    @Bug(id="PR804")
+    @Test
+    public void SpacesCanBeEverywhereLocalTests4Signed() throws Exception {
+        List<String> commands=new ArrayList<String>(4);
+        commands.add(server.getJavawsLocation());
+        commands.add(ServerAccess.HEADLES_OPTION);
+        commands.add(server.getDir()+"/Spaces can be everywhere2 signed.jnlp");
+        ServerAccess.ProcessResult pr = ServerAccess.executeProcess(commands);
+        String s="Signed spaces can be everywhere.jsr was launched correctly";
+        Assert.assertTrue("stdout should contains `"+s+"`, but did not",pr.stdout.contains(s));
+        String cc = "ClassNotFoundException";
+        Assert.assertFalse("stderr should NOT contains `" + cc + "`, but did", pr.stderr.contains(cc));
+        Assert.assertFalse("should not be terminated, but was", pr.wasTerminated);
+        Assert.assertEquals((Integer) 0, pr.returnValue);
+    }
+
+    @Bug(id="PR804")
+    @Test
+    public void SpacesCanBeEverywhereLocalTests3Signed() throws Exception {
+        List<String> commands=new ArrayList<String>(4);
+        commands.add(server.getJavawsLocation());
+        commands.add(ServerAccess.HEADLES_OPTION);
+        commands.add("SpacesCanBeEverywhere1signed.jnlp");
+        ServerAccess.ProcessResult pr = ServerAccess.executeProcess(commands,server.getDir());
+        String s="Signed spaces can be everywhere.jsr was launched correctly";
+        Assert.assertTrue("stdout should contains `"+s+"`, but did not",pr.stdout.contains(s));
+        String cc = "ClassNotFoundException";
+        Assert.assertFalse("stderr should NOT contains `" + cc + "`, but did", pr.stderr.contains(cc));
+        Assert.assertFalse("should not be terminated, but was", pr.wasTerminated);
+        Assert.assertEquals((Integer) 0, pr.returnValue);
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AccessClassInPackage/resources/AccessClassInPackageJAVAXJNLP.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AccessClassInPackage/resources/AccessClassInPackageJAVAXJNLP.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AccessClassInPackage/resources/AccessClassInPackageJAVAXJNLP.jnlp	(revision 416)
@@ -0,0 +1,54 @@
+<!--
+
+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"
+      codebase="."
+      href="AccessClassInPackageJAVAXJNLP.jnlp">
+   <information> 
+      <title>Test accessClassInPackage</title>
+      <vendor>IcedTea</vendor>
+      <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+      <description>testing access to some javax.jnlp.* package</description>
+   </information> 
+   <resources>
+      <jar href="AccessClassInPackage.jar" main="true"/>
+   </resources>
+   <application-desc main-class="AccessClassInPackage">
+     <argument>javax.jnlp.ServiceManager</argument>
+   </application-desc>
+</jnlp> 
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AccessClassInPackage/resources/AccessClassInPackageNETSF.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AccessClassInPackage/resources/AccessClassInPackageNETSF.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AccessClassInPackage/resources/AccessClassInPackageNETSF.jnlp	(revision 416)
@@ -0,0 +1,54 @@
+<!--
+
+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"
+      codebase="."
+      href="AccessClassInPackageNETSF.jnlp">
+   <information> 
+      <title>Test accessClassInPackage</title>
+      <vendor>IcedTea</vendor>
+      <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+      <description>testing access to net.sourceforge.* package</description>
+   </information> 
+   <resources>
+      <jar href="AccessClassInPackage.jar" main="true"/>
+   </resources>
+   <application-desc main-class="AccessClassInPackage">
+     <argument>net.sourceforge.jnlp.Parser</argument>
+   </application-desc>
+</jnlp> 
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AccessClassInPackage/resources/AccessClassInPackageSELF.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AccessClassInPackage/resources/AccessClassInPackageSELF.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AccessClassInPackage/resources/AccessClassInPackageSELF.jnlp	(revision 416)
@@ -0,0 +1,54 @@
+<!--
+
+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"
+      codebase="."
+      href="AccessClassInPackageSELF.jnlp">
+   <information> 
+      <title>Test accessClassInPackage</title>
+      <vendor>IcedTea</vendor>
+      <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+      <description>testing aaccess to package's internal class</description>
+   </information> 
+   <resources>
+      <jar href="AccessClassInPackage.jar" main="true"/>
+   </resources>
+   <application-desc main-class="AccessClassInPackage">
+     <argument>AccessClassInPackage</argument>
+   </application-desc>
+</jnlp> 
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AccessClassInPackage/resources/AccessClassInPackageSUNSEC.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AccessClassInPackage/resources/AccessClassInPackageSUNSEC.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AccessClassInPackage/resources/AccessClassInPackageSUNSEC.jnlp	(revision 416)
@@ -0,0 +1,54 @@
+<!--
+
+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"
+      codebase="."
+      href="AccessClassInPackageSUNSEC.jnlp">
+   <information> 
+      <title>Test accessClassInPackage</title>
+      <vendor>IcedTea</vendor>
+      <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+    <description>testing access to sun.security.* package</description>
+   </information> 
+   <resources>
+      <jar href="AccessClassInPackage.jar" main="true"/>
+   </resources>
+   <application-desc main-class="AccessClassInPackage">
+     <argument>sun.security.internal.spec.TlsKeyMaterialSpec</argument>
+   </application-desc>
+</jnlp> 
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AccessClassInPackage/srcs/AccessClassInPackage.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AccessClassInPackage/srcs/AccessClassInPackage.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AccessClassInPackage/srcs/AccessClassInPackage.java	(revision 416)
@@ -0,0 +1,44 @@
+/* AccessClassInPackage.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.
+ */
+
+public class AccessClassInPackage {
+
+    public static void main(String[] args) throws Exception{
+            Class.forName(args[0]);
+            System.out.println("Class was obtained: "+ args[0]);
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AccessClassInPackage/testcases/AccessClassInPackageTest.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AccessClassInPackage/testcases/AccessClassInPackageTest.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AccessClassInPackage/testcases/AccessClassInPackageTest.java	(revision 416)
@@ -0,0 +1,168 @@
+/* AccessClassInPackageTest.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.util.Arrays;
+import java.util.List;
+import net.sourceforge.jnlp.ServerAccess;
+import net.sourceforge.jnlp.ServerAccess.ProcessResult;
+import org.junit.Assert;
+
+import org.junit.Test;
+
+public class AccessClassInPackageTest {
+
+    private static ServerAccess server = new ServerAccess();
+    private String[] files = {
+        "AccessClassInPackageJAVAXJNLP.jnlp",
+        "AccessClassInPackageSELF.jnlp",
+        "AccessClassInPackageNETSF.jnlp",
+        "AccessClassInPackageSUNSEC.jnlp"
+    };
+    private String[] filesSigned = {
+        "AccessClassInPackageSignedJAVAXJNLP.jnlp",
+        "AccessClassInPackageSignedSELF.jnlp",
+        "AccessClassInPackageSignedNETSF.jnlp",
+        "AccessClassInPackageSignedSUNSEC.jnlp"
+    };
+    private String[] badExceptions = {
+        "accessClassInPackage.javax.jnlp.ServiceManager",
+        "accessClassInPackage.AccessClassInPackage",
+        "accessClassInPackage.net.sourceforge.jnlp",
+        "accessClassInPackage.sun.security.internal.spec"
+    };
+    private String[] pass = {
+        "javax.jnlp.ServiceManager",
+        "AccessClassInPackage",
+        "net.sourceforge.jnlp.Parser",
+        "sun.security.internal.spec.TlsKeyMaterialSpec"
+    };
+    private static final List<String> xta = Arrays.asList(new String[]{"-Xtrustall"});
+
+    private void testShouldFail(ServerAccess.ProcessResult pr, String s) {
+        String c = "(?s).*java.security.AccessControlException.{0,5}access denied.{0,5}java.lang.RuntimePermission.{0,5}" + s + ".*";
+        Assert.assertTrue("stderr should match `" + c + "`, but didn't ", pr.stderr.matches(c));
+    }
+
+    private void testShouldNOTFail(ServerAccess.ProcessResult pr, String s) {
+        String c = "(?s).*java.security.AccessControlException.{0,5}access denied.{0,5}java.lang.RuntimePermission.{0,5}" + s + ".*";
+        Assert.assertFalse("stderr should NOT match `" + c + "`, but did ", pr.stderr.matches(c));
+    }
+
+    private void commonPitfall(ProcessResult pr) {
+        String cc = "ClassNotFoundException";
+        Assert.assertFalse("stderr should NOT contains `" + cc + "`, but did", pr.stderr.contains(cc));
+        Assert.assertFalse("AccessClassInPackageTestLunch1 should not be terminated, but was", pr.wasTerminated);
+        Assert.assertEquals((Integer) 0, pr.returnValue);
+    }
+
+    private void testShouldPass(ServerAccess.ProcessResult pr, String s) {
+        String c = "Class was obtained: " + s;
+        Assert.assertTrue("stdout should contains `" + c + "`, but didn't ", pr.stdout.contains(c));
+    }
+
+    private void testShouldNOTPass(ServerAccess.ProcessResult pr, String s) {
+        String c = "Class was obtained: " + s;
+        Assert.assertFalse("stdout should not contains `" + c + "`, but did ", pr.stdout.contains(c));
+    }
+
+    @Test
+    public void AccessClassInPackageJAVAXJNLP() throws Exception {
+        ServerAccess.ProcessResult pr = server.executeJavawsHeadless(null, "/" + files[0]);
+        commonPitfall(pr);
+        testShouldPass(pr, pass[0]);
+        testShouldNOTFail(pr, badExceptions[0]);
+    }
+
+    @Test
+    public void AccessClassInPackageSELF() throws Exception {
+        ServerAccess.ProcessResult pr = server.executeJavawsHeadless(null, "/" + files[1]);
+        commonPitfall(pr);
+        testShouldPass(pr, pass[1]);
+        testShouldNOTFail(pr, badExceptions[1]);
+    }
+
+    @Test
+    public void AccessClassInPackageNETSF() throws Exception {
+        ServerAccess.ProcessResult pr = server.executeJavawsHeadless(null, "/" + files[2]);
+        commonPitfall(pr);
+        testShouldFail(pr, badExceptions[2]);
+        testShouldNOTPass(pr, pass[2]);
+    }
+
+    @Test
+    public void AccessClassInPackageSUNSEC() throws Exception {
+        ServerAccess.ProcessResult pr = server.executeJavawsHeadless(null, "/" + files[3]);
+        commonPitfall(pr);
+        commonPitfall(pr);
+        testShouldFail(pr, badExceptions[3]);
+        testShouldNOTPass(pr, pass[3]);
+    }
+
+    //now signed vaiants
+    @Test
+    public void AccessClassInPackageSignedJAVAXJNLP() throws Exception {
+        ServerAccess.ProcessResult pr = server.executeJavawsHeadless(xta, "/" + filesSigned[0]);
+        commonPitfall(pr);
+        testShouldPass(pr, pass[0]);
+        testShouldNOTFail(pr, badExceptions[0]);
+    }
+
+    @Test
+    public void AccessClassInPackageSignedSELF() throws Exception {
+        ServerAccess.ProcessResult pr = server.executeJavawsHeadless(xta, "/" + filesSigned[1]);
+        commonPitfall(pr);
+        testShouldPass(pr, pass[1]);
+        testShouldNOTFail(pr, badExceptions[1]);
+    }
+
+    @Test
+    public void AccessClassInPackageSignedNETSF() throws Exception {
+        ServerAccess.ProcessResult pr = server.executeJavawsHeadless(xta, "/" + filesSigned[2]);
+        commonPitfall(pr);
+        testShouldPass(pr, pass[2]);
+        testShouldNOTFail(pr, badExceptions[2]);
+    }
+
+    @Test
+    public void AccessClassInPackageSignedSUNSEC() throws Exception {
+        ServerAccess.ProcessResult pr = server.executeJavawsHeadless(xta, "/" + filesSigned[3]);
+        commonPitfall(pr);
+        testShouldPass(pr, pass[3]);
+        testShouldNOTFail(pr, badExceptions[3]);
+    }
+
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AddShutdownHook/resources/AddShutdownHook.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AddShutdownHook/resources/AddShutdownHook.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AddShutdownHook/resources/AddShutdownHook.jnlp	(revision 416)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?> 
+<jnlp spec="1.0"
+      codebase="./"
+      href="AddShutdownHook.jnlp">
+   <information> 
+      <title>test adding shutdown hooks</title> 
+      <vendor>IcedTea</vendor>
+   </information> 
+   <resources>
+      <jar href="AddShutdownHook.jar" main="true" download="eager"/>
+   </resources>
+   <application-desc main-class="AddShutdownHook"/>
+</jnlp> 
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AddShutdownHook/srcs/AddShutdownHook.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AddShutdownHook/srcs/AddShutdownHook.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AddShutdownHook/srcs/AddShutdownHook.java	(revision 416)
@@ -0,0 +1,48 @@
+/* AddShutdownHook.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.
+ */
+
+public class AddShutdownHook {
+    public static void main(String[] args) {
+
+            Runtime.getRuntime().addShutdownHook(new Thread() {
+                public void run() {
+                    // no op
+                }
+            });
+           
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AddShutdownHook/testcases/AddShutdownHookTest.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AddShutdownHook/testcases/AddShutdownHookTest.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AddShutdownHook/testcases/AddShutdownHookTest.java	(revision 416)
@@ -0,0 +1,58 @@
+/* AddShutdownHookTest.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.ServerAccess;
+import org.junit.Assert;
+
+import org.junit.Test;
+
+public class AddShutdownHookTest {
+
+    private static ServerAccess server = new ServerAccess();
+
+    @Test
+    public void AddShutdownHookTestLunch1() throws Exception {
+        ServerAccess.ProcessResult pr = server.executeJavawsHeadless(null, "/AddShutdownHook.jnlp");
+        String s = "(?s).*java.security.AccessControlException.{0,5}access denied.{0,5}java.lang.RuntimePermission.{0,5}" + "shutdownHooks" + ".*";
+        Assert.assertTrue("stderr should match "+s+" but didn't",pr.stderr.matches(s));
+        String cc="ClassNotFoundException";
+        Assert.assertFalse("stderr should NOT contains `"+cc+"`, but did",pr.stderr.contains(cc));
+        Assert.assertFalse("stdout length should be <=2, but was "+pr.stdout.length(),pr.stdout.length()>2);
+        Assert.assertFalse("AddShutdownHookTestLunch1 should not be terminated, but was",pr.wasTerminated);
+        Assert.assertEquals((Integer) 0, pr.returnValue);
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AllStackTraces/resources/AllStackTraces.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AllStackTraces/resources/AllStackTraces.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AllStackTraces/resources/AllStackTraces.jnlp	(revision 416)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?> 
+<jnlp spec="1.0"
+      codebase="./"
+      href="AllStackTraces.jnlp">
+   <information> 
+      <title>Test Thread.getAllStackTraces</title> 
+      <vendor>IcedTea</vendor>
+   </information> 
+   <resources>
+      <jar href="AllStackTraces.jar" main="true" download="eager"/>
+   </resources>
+   <application-desc main-class="AllStackTraces"/>
+</jnlp> 
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AllStackTraces/srcs/AllStackTraces.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AllStackTraces/srcs/AllStackTraces.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AllStackTraces/srcs/AllStackTraces.java	(revision 416)
@@ -0,0 +1,42 @@
+/* AllStackTraces.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.
+ */
+
+public class AllStackTraces {
+    public static void main(String[] args) {
+            Thread.getAllStackTraces();
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AllStackTraces/testcases/AllStackTracesTest.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AllStackTraces/testcases/AllStackTracesTest.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AllStackTraces/testcases/AllStackTracesTest.java	(revision 416)
@@ -0,0 +1,61 @@
+/* AllStackTracesTest.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.ServerAccess;
+import org.junit.Assert;
+
+import org.junit.Test;
+
+public class AllStackTracesTest {
+
+    private static ServerAccess server = new ServerAccess();
+
+  
+
+    @Test
+    public void AllStackTracesTest1() throws Exception {
+        ServerAccess.ProcessResult pr=server.executeJavawsHeadless(null,"/AllStackTraces.jnlp");
+        String c = "(?s).*java.security.AccessControlException.{0,5}access denied.{0,5}java.lang.RuntimePermission.{0,5}" + "getStackTrace" + ".*";
+        Assert.assertTrue("stderr should match `"+c+"`, but didn't ",pr.stderr.matches(c));
+        String cc="ClassNotFoundException";
+        Assert.assertFalse("stderr should NOT contains `"+cc+"`, but did ",pr.stderr.contains(cc));
+        Assert.assertFalse("stdout length should be <=2, but was "+pr.stdout.length(),pr.stdout.length()>2);
+        Assert.assertFalse("AllStackTracesTest1 should not be terminated, but was",pr.wasTerminated);
+        Assert.assertEquals((Integer)0, pr.returnValue);
+    }
+
+  }
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AppletBaseURLTest/resources/AppletBaseURLTest.html
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AppletBaseURLTest/resources/AppletBaseURLTest.html	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AppletBaseURLTest/resources/AppletBaseURLTest.html	(revision 416)
@@ -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="AppletBaseURL.class"
+            archive="AppletBaseURLTest.jar"
+            codebase="."
+            width="800"
+            height="600">
+    </applet>
+  </body>
+</html>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AppletBaseURLTest/resources/AppletBaseURLTest.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AppletBaseURLTest/resources/AppletBaseURLTest.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AppletBaseURLTest/resources/AppletBaseURLTest.jnlp	(revision 416)
@@ -0,0 +1,58 @@
+<!--
+
+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="AppletBaseURLTest.jnlp" codebase=".">
+    <information>
+        <title>AppletBaseURL</title>
+        <vendor>IcedTea</vendor>
+        <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+        <description>AppletBaseURL</description>
+        <offline/>
+    </information>
+    <resources>
+        <j2se version="1.4+"/>
+        <jar href="AppletBaseURLTest.jar"/>
+    </resources>
+    <applet-desc
+      documentBase="."
+      name="AppletBaseURL"
+      main-class="AppletBaseURL"
+      width="100"
+      height="100">
+    </applet-desc>
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AppletBaseURLTest/resources/AppletJNLPHrefBaseURLTest.html
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AppletBaseURLTest/resources/AppletJNLPHrefBaseURLTest.html	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AppletBaseURLTest/resources/AppletJNLPHrefBaseURLTest.html	(revision 416)
@@ -0,0 +1,46 @@
+<!--
+
+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="AppletBaseURL.class" width="800" height="600">
+      <param name="jnlp_href" value="AppletBaseURLTest.jnlp">
+    </applet>
+  </body>
+</html>
+
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AppletBaseURLTest/srcs/AppletBaseURL.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AppletBaseURLTest/srcs/AppletBaseURL.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AppletBaseURLTest/srcs/AppletBaseURL.java	(revision 416)
@@ -0,0 +1,64 @@
+/* AppletBaseURL.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.applet.Applet;
+public class AppletBaseURL extends Applet {
+
+    private class Killer extends Thread {
+
+        public int n = 1000;
+
+        @Override
+        public void run() {
+            try {
+                Thread.sleep(n);
+                System.out.println("Aplet killing himself after " + n + " ms of life");
+                System.exit(0);
+            } catch (Exception ex) {
+            }
+        }
+    }
+    private Killer killer;
+
+    @Override
+    public void init() {
+        System.out.println("Document base is " + getDocumentBase() + " for this applet");
+        System.out.println("Codebase is " + getCodeBase() + " for this applet");
+        killer = new Killer();
+        killer.start();
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AppletBaseURLTest/testcases/AppletBaseURLTest.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AppletBaseURLTest/testcases/AppletBaseURLTest.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AppletBaseURLTest/testcases/AppletBaseURLTest.java	(revision 416)
@@ -0,0 +1,89 @@
+/* AppletBaseURLTest.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 net.sourceforge.jnlp.ServerAccess.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 AppletBaseURLTest extends BrowserTest{
+
+    private void evaluateApplet(ProcessResult pr, String baseName) {
+        String s8 = "(?s).*Codebase is http://localhost:[0-9]{5}/ for this applet(?s).*";
+        Assert.assertTrue("AppletBaseURL stdout should match" + s8 + " but didn't", pr.stdout.matches(s8));
+        String s9 = "(?s).*Document base is http://localhost:[0-9]{5}/" + baseName + " for this applet(?s).*";
+        Assert.assertTrue("AppletBaseURL stdout should match" + s9 + " but didn't", pr.stdout.matches(s9));
+        String ss = "xception";
+        Assert.assertFalse("AppletBaseURL stderr should not contain" + ss + " but did", pr.stderr.contains(ss));
+    }
+
+    @NeedsDisplay
+    @Test
+    public void AppletWebstartBaseURLTest() throws Exception {
+        ProcessResult pr = server.executeJavaws(null, "/AppletBaseURLTest.jnlp");
+        evaluateApplet(pr, "");
+        Assert.assertFalse(pr.wasTerminated);
+        Assert.assertEquals((Integer) 0, pr.returnValue);
+    }
+
+    @Bug(id="PR855")
+    @NeedsDisplay
+    @Test
+    @TestInBrowsers(testIn={Browsers.one})
+    public void AppletInFirefoxTest() throws Exception {
+        ProcessResult pr = server.executeBrowser("/AppletBaseURLTest.html");
+        pr.process.destroy();
+        evaluateApplet(pr, "AppletBaseURLTest.html");
+        Assert.assertTrue(pr.wasTerminated);
+    }
+
+    @Bug(id="PR855")
+    @NeedsDisplay
+    @Test
+    @TestInBrowsers(testIn={Browsers.one})
+    public void AppletWithJNLPHrefTest() throws Exception {
+        ProcessResult pr = server.executeBrowser("/AppletJNLPHrefBaseURLTest.html");
+        pr.process.destroy();
+        evaluateApplet(pr, "AppletJNLPHrefBaseURLTest.html");
+        Assert.assertTrue(pr.wasTerminated);
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AppletReadsInvalidJar/resources/AppletReadsInvalidJar.html
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AppletReadsInvalidJar/resources/AppletReadsInvalidJar.html	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AppletReadsInvalidJar/resources/AppletReadsInvalidJar.html	(revision 416)
@@ -0,0 +1,42 @@
+<!--
+
+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 bgcolor="blue">
+<p><applet code="Valid.class" archive="NOT_A_VALID_JAR.jar,AppletReadsInvalidJar.jar">
+</applet></p>
+</body>
+</html>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AppletReadsInvalidJar/resources/AppletReadsInvalidJar.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AppletReadsInvalidJar/resources/AppletReadsInvalidJar.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AppletReadsInvalidJar/resources/AppletReadsInvalidJar.jnlp	(revision 416)
@@ -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="AppletReadsInvalidJar.jnlp" codebase=".">
+    <information>
+        <title>AppletReadsInvalidJar</title>
+        <vendor>IcedTea</vendor>
+        <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+        <description>AppletTest</description>
+        <offline/>
+    </information>
+    <resources>
+        <j2se version="1.4+"/>
+        <jar href="NOT_A_VALID_JAR.jar"/>
+        <jar href="AppletReadsInvalidJar.jar"/>
+    </resources>
+    <applet-desc
+      documentBase="."
+      name="AppletReadsInvalidJar"
+      main-class="Valid"
+      width="100"
+      height="100">
+    </applet-desc>
+</jnlp>
+
+
+</applet-desc>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AppletReadsInvalidJar/srcs/Valid.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AppletReadsInvalidJar/srcs/Valid.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AppletReadsInvalidJar/srcs/Valid.java	(revision 416)
@@ -0,0 +1,58 @@
+import java.applet.Applet;
+
+/*
+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.
+ */
+public class Valid extends Applet {
+
+    private static class Killer extends Thread {
+        @Override
+        public void run() {
+            try {
+                int n = 2000;
+                Thread.sleep(n);
+                System.exit(0);
+            } catch (Exception ex) {
+            }
+        }
+    }
+
+    @Override
+    public void init() {
+        new Killer().start();
+        System.out.println("Program Executed Correctly.");
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AppletReadsInvalidJar/testcases/AppletReadsInvalidJarTests.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AppletReadsInvalidJar/testcases/AppletReadsInvalidJarTests.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AppletReadsInvalidJar/testcases/AppletReadsInvalidJarTests.java	(revision 416)
@@ -0,0 +1,69 @@
+/* AppletReadsInvalidJarTests.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.ServerAccess;
+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 AppletReadsInvalidJarTests extends BrowserTest{
+
+  
+    static final String CORRECT_EXECUTION = "Program Executed Correctly.";
+    static final String JNLP_EXPECTED_EXCEPTION = "ZipException";
+
+    /*This SHOULD NOT execute the applet!*/
+    @Test
+    public void AppletJNLPTest() throws Exception {
+        ServerAccess.ProcessResult pr = server.executeJavawsHeadless("/AppletReadsInvalidJar.jnlp");
+
+        Assert.assertFalse("AppletReadsInvalidJar stdout should NOT contain '" + CORRECT_EXECUTION + "', but did (applet should not have ran!).", pr.stdout.contains(CORRECT_EXECUTION));
+        Assert.assertTrue("AppletReadsInvalidJar stderr should contain 'ZipException', but did not.", pr.stderr.contains(JNLP_EXPECTED_EXCEPTION));
+    }
+
+    /*This SHOULD execute the applet!*/
+    @Test
+    @TestInBrowsers(testIn={Browsers.one})
+    public void AppletInFirefoxTest() throws Exception {
+        ServerAccess.ProcessResult pr = server.executeBrowser("/AppletReadsInvalidJar.html");
+
+        Assert.assertTrue("AppletReadsInvalidJar stdout should contain '" + CORRECT_EXECUTION + "' but did not.", pr.stdout.contains(CORRECT_EXECUTION));
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AppletTakesLastParam/resources/appletTakesLastParam.html
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AppletTakesLastParam/resources/appletTakesLastParam.html	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AppletTakesLastParam/resources/appletTakesLastParam.html	(revision 416)
@@ -0,0 +1,44 @@
+<!--
+
+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 bgcolor="blue">
+<p><applet code="AppletTakesLastParam.class" archive="AppletTakesLastParam.jar">
+  <param name="param" value="value1">
+  <param name="param" value="value2">
+</applet></p>
+</body>
+</html>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AppletTakesLastParam/resources/appletTakesLastParam.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AppletTakesLastParam/resources/appletTakesLastParam.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AppletTakesLastParam/resources/appletTakesLastParam.jnlp	(revision 416)
@@ -0,0 +1,63 @@
+<!--
+
+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="appletTakesLastParam.jnlp" codebase=".">
+    <information>
+        <title>AppletTakesLastParam</title>
+        <vendor>IcedTea</vendor>
+        <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+        <description>AppletTakesLastParam</description>
+        <offline/>
+    </information>
+    <resources>
+        <j2se version="1.4+"/>
+        <jar href="AppletTakesLastParam.jar"/>
+    </resources>
+    <applet-desc
+      documentBase="."
+      name="AppletTakesLastParam"
+      main-class="AppletTakesLastParam"
+      width="100"
+      height="100">
+        <param name="param" value="value1"/>
+        <param name="param" value="value2"/>
+    </applet-desc>
+</jnlp>
+
+
+</applet-desc>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AppletTakesLastParam/srcs/AppletTakesLastParam.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AppletTakesLastParam/srcs/AppletTakesLastParam.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AppletTakesLastParam/srcs/AppletTakesLastParam.java	(revision 416)
@@ -0,0 +1,63 @@
+
+import java.applet.Applet;
+
+/* AppletTest.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.
+ */
+public class AppletTakesLastParam extends Applet {
+
+    private class Killer extends Thread {
+
+        public int n = 2000;
+
+        @Override
+        public void run() {
+            try {
+                Thread.sleep(n);
+                System.out.println("Applet killing itself after " + n + " ms");
+                System.exit(0);
+            } catch (Exception ex) {
+            }
+        }
+    }
+    private Killer killer = new Killer();
+
+    @Override
+    public void init() {
+        System.out.println(getParameter("param"));
+        killer.start();
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AppletTakesLastParam/testcases/AppletTakesLastParamTests.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AppletTakesLastParam/testcases/AppletTakesLastParamTests.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AppletTakesLastParam/testcases/AppletTakesLastParamTests.java	(revision 416)
@@ -0,0 +1,68 @@
+/* AppletTestTests.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.ServerAccess;
+import net.sourceforge.jnlp.ServerAccess.ProcessResult;
+import net.sourceforge.jnlp.browsertesting.BrowserTest;
+import net.sourceforge.jnlp.browsertesting.Browsers;
+import net.sourceforge.jnlp.annotations.TestInBrowsers;
+import org.junit.Assert;
+
+import org.junit.Test;
+
+public class AppletTakesLastParamTests extends BrowserTest {
+
+    @Test
+    public void AppletTest() throws Exception {
+        ServerAccess.ProcessResult pr = server.executeJavaws(null, "/appletTakesLastParam.jnlp");
+        evaluateApplet(pr);
+    }
+
+    private void evaluateApplet(ProcessResult pr) {
+        String s0 = "value1";
+        Assert.assertTrue("AppletTakesLastParam stdout should not contain " + s0 + " but did.", !pr.stdout.contains(s0));
+        String s1 = "value2";
+        Assert.assertTrue("AppletTakesLastParam stdout should contain " + s1 + " but did not.", pr.stdout.contains(s1));
+    }
+
+    @Test
+    @TestInBrowsers(testIn = {Browsers.one})
+    public void AppletInFirefoxTest() throws Exception {
+        ServerAccess.ProcessResult pr = server.executeBrowser("/appletTakesLastParam.html");
+        evaluateApplet(pr);
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AppletTest/resources/AppletTest.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AppletTest/resources/AppletTest.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AppletTest/resources/AppletTest.jnlp	(revision 416)
@@ -0,0 +1,63 @@
+<!--
+
+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="AppletTest.jnlp" codebase=".">
+    <information>
+        <title>AppletTest</title>
+        <vendor>IcedTea</vendor>
+        <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+        <description>AppletTest</description>
+        <offline/>
+    </information>
+    <resources>
+        <j2se version="1.4+"/>
+        <jar href="AppletTest.jar"/>
+    </resources>
+    <applet-desc
+      documentBase="."
+      name="AppletTest"
+      main-class="AppletTest"
+      width="100"
+      height="100">
+        <param name="key1" value="value1"/>
+        <param name="key2" value="value2"/>
+    </applet-desc>
+</jnlp>
+
+
+</applet-desc>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AppletTest/resources/appletAutoTests.html
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AppletTest/resources/appletAutoTests.html	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AppletTest/resources/appletAutoTests.html	(revision 416)
@@ -0,0 +1,44 @@
+<!--
+
+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 bgcolor="blue">
+<p><applet code="AppletTest.class" archive="XslowXAppletTest.jar" codebase="." width="800" height="600">
+  <param name="key1" value="value1">
+  <param name="key2" value="#value2">
+</applet></p>
+</body>
+</html>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AppletTest/resources/appletAutoTests2.html
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AppletTest/resources/appletAutoTests2.html	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AppletTest/resources/appletAutoTests2.html	(revision 416)
@@ -0,0 +1,44 @@
+<!--
+
+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 bgcolor="blue">
+<p><applet code="AppletTest.class" archive="AppletTest.jar" codebase="." width="800" height="600">
+  <param name="key1" value="value1">
+  <param name="key2" value="#value2">
+</applet></p>
+</body>
+</html>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AppletTest/resources/appletViewTest.html
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AppletTest/resources/appletViewTest.html	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AppletTest/resources/appletViewTest.html	(revision 416)
@@ -0,0 +1,52 @@
+<!--
+
+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>
+<title>ok applet</title>
+</head><body bgcolor="blue">
+<h1>ok applet</h1>
+<p align="center">
+<applet code="AppletTest.class" archive="XslowXAppletTest.jar" codebase="." width=100 height=100>
+</applet></p>
+<h1>ok applet</h1>
+<h1>bad applet</h1>
+<p align="center">
+<applet code="AppletTest.classsss" archive="XslowXAppletTest.jar" codebase="." width=800 height=600>
+</applet></p>
+<h1>bad applet</h1>
+</body>
+</html>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AppletTest/srcs/AppletTest.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AppletTest/srcs/AppletTest.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AppletTest/srcs/AppletTest.java	(revision 416)
@@ -0,0 +1,82 @@
+
+import java.applet.Applet;
+
+/* AppletTest.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.
+ */
+public class AppletTest extends Applet {
+
+    private class Killer extends Thread {
+
+        public int n = 2000;
+
+        @Override
+        public void run() {
+            try {
+                Thread.sleep(n);
+                System.out.println("Aplet killing himself after " + n + " ms of life");
+                System.exit(0);
+            } catch (Exception ex) {
+            }
+        }
+    }
+    private Killer killer;
+
+    @Override
+    public void init() {
+        System.out.println("applet was initialised");
+        killer = new Killer();
+    }
+
+    @Override
+    public void start() {
+        System.out.println("applet was started");
+        System.out.println(getParameter("key1"));
+        System.out.println(getParameter("key2"));
+        killer.start();
+        System.out.println("killer was started");
+    }
+
+    @Override
+    public void stop() {
+        System.out.println("applet was stopped");
+    }
+
+    @Override
+    public void destroy() {
+        System.out.println("applet will be destroyed");
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AppletTest/testcases/AppletTestTests.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AppletTest/testcases/AppletTestTests.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/AppletTest/testcases/AppletTestTests.java	(revision 416)
@@ -0,0 +1,144 @@
+/* AppletTestTests.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;
+import net.sourceforge.jnlp.browsertesting.BrowserTest;
+import net.sourceforge.jnlp.browsertesting.Browsers;
+import net.sourceforge.jnlp.annotations.NeedsDisplay;
+import net.sourceforge.jnlp.annotations.TestInBrowsers;
+import org.junit.Assert;
+
+import org.junit.Test;
+
+public class AppletTestTests extends BrowserTest {
+
+    @Test
+    @TestInBrowsers(testIn = {Browsers.googleChrome})
+    @NeedsDisplay
+    public void doubleChrome() throws Exception {
+        ServerAccess.PROCESS_TIMEOUT = 30 * 1000;
+        try {
+            //System.out.println("connecting AppletInFirefoxTest request in " + getBrowser().toString());
+            //just verify loging is recording browser
+            ProcessResult pr1 = server.executeBrowser("/appletAutoTests.html");
+            if (pr1.process == null) {
+                Assert.assertTrue("If proces was null here, then google-chrome had to not exist, and so "
+                        + ServerAccess.UNSET_BROWSER
+                        + " should be in exception, but exception was "
+                        + pr1.deadlyException.getMessage(),
+                        pr1.deadlyException.getMessage().contains(ServerAccess.UNSET_BROWSER));
+                return;
+            }
+            evaluateApplet(pr1,false);
+            Assert.assertTrue(pr1.wasTerminated);
+            //System.out.println("connecting AppletInFirefoxTest request in " + getBrowser().toString());
+            // just verify loging is recording browser
+            ServerAccess.ProcessResult pr = server.executeBrowser("/appletAutoTests.html");
+            evaluateApplet(pr,false);
+            Assert.assertTrue(pr.wasTerminated);
+        } finally {
+            ServerAccess.PROCESS_TIMEOUT = 20 * 1000; //back to normal
+        }
+    }
+
+    @Test
+    @NeedsDisplay
+    public void AppletTest() throws Exception {
+        ProcessResult pr = server.executeJavawsHeadless(null, "/AppletTest.jnlp");
+        evaluateApplet(pr,true);
+        Assert.assertFalse(pr.wasTerminated);
+        Assert.assertEquals((Integer) 0, pr.returnValue);
+    }
+
+    private void evaluateApplet(ProcessResult pr, boolean javawsApplet) {
+        String s3 = "applet was initialised";
+        Assert.assertTrue("AppletTest stdout should contains " + s3 + " bud didn't", pr.stdout.contains(s3));
+        String s0 = "applet was started";
+        Assert.assertTrue("AppletTest stdout should contains " + s0 + " bud didn't", pr.stdout.contains(s0));
+        String s1 = "value1";
+        Assert.assertTrue("AppletTest stdout should contains " + s1 + " bud didn't", pr.stdout.contains(s1));
+        String s2 = "value2";
+        Assert.assertTrue("AppletTest stdout should contains " + s2 + " bud didn't", pr.stdout.contains(s2));
+        String ss = "xception";
+        Assert.assertFalse("AppletTest stderr should not contains " + ss + " but did", pr.stderr.contains(ss));
+        String s7 = "Aplet killing himself after 2000 ms of life";
+        Assert.assertTrue("AppletTest stdout should contains " + s7 + " bud didn't", pr.stdout.contains(s7));
+        if (!javawsApplet) {
+            /*this is working correctly in most browser, but not in all. temporarily disabling
+        String s4 = "applet was stopped";
+        Assert.assertTrue("AppletTest stdout should contains " + s4 + " bud did't", pr.stdout.contains(s4));
+        String s5 = "applet will be destroyed";
+        Assert.assertTrue("AppletTest stdout should contains " + s5 + " bud did't", pr.stdout.contains(s5));
+             */
+        }
+    }
+
+    @Test
+    @TestInBrowsers(testIn = {Browsers.all})
+    @NeedsDisplay
+    public void AppletInBrowserTest() throws Exception {
+        //System.out.println("connecting AppletInFirefoxTest request in " + getBrowser().toString());
+        //just verify loging is recordingb rowser
+        ServerAccess.PROCESS_TIMEOUT = 30 * 1000;
+        try {
+            ProcessResult pr = server.executeBrowser("/appletAutoTests2.html");
+            evaluateApplet(pr,false);
+            Assert.assertTrue(pr.wasTerminated);
+            //Assert.assertEquals((Integer) 0, pr.returnValue); due to destroy is null
+        } finally {
+            ServerAccess.PROCESS_TIMEOUT = 20 * 1000; //back to normal
+        }
+    }
+
+    @TestInBrowsers(testIn = {Browsers.all})
+    @NeedsDisplay
+    public void AppletInBrowserTestXslowX() throws Exception {
+        //System.out.println("connecting AppletInFirefoxTest request in " + getBrowser().toString());
+        //just verify loging is recording browser
+        ServerAccess.PROCESS_TIMEOUT = 30 * 1000;
+        try {
+            ProcessResult pr = server.executeBrowser("/appletAutoTests.html");
+            pr.process.destroy();
+            evaluateApplet(pr,false);
+            Assert.assertTrue(pr.wasTerminated);
+            //Assert.assertEquals((Integer) 0, pr.returnValue); due to destroy is null
+        } finally {
+            ServerAccess.PROCESS_TIMEOUT = 20 * 1000; //back to normal
+        }
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/CheckServices/resources/CheckPluginServices.html
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/CheckServices/resources/CheckPluginServices.html	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/CheckServices/resources/CheckPluginServices.html	(revision 416)
@@ -0,0 +1,46 @@
+<!--
+
+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="CheckServices" width="800" height="600">
+      <param name="jnlp_href" value="CheckServices.jnlp">
+    </applet>
+  </body>
+</html>
+
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/CheckServices/resources/CheckServices.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/CheckServices/resources/CheckServices.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/CheckServices/resources/CheckServices.jnlp	(revision 416)
@@ -0,0 +1,57 @@
+<!--
+
+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="CheckServices.jnlp" codebase=".">
+    <information>
+        <title>CheckServices</title>
+        <vendor>IcedTea</vendor>
+        <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+        <description>CheckServices</description>
+        <offline/>
+    </information>
+    <resources>
+        <j2se version="1.4+"/>
+        <jar href="CheckServices.jar"/>
+    </resources>
+    <applet-desc
+      documentBase="."
+      name="CheckServices"
+      main-class="CheckServices"
+      width="100"
+      height="100" />
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/CheckServices/srcs/CheckServices.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/CheckServices/srcs/CheckServices.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/CheckServices/srcs/CheckServices.java	(revision 416)
@@ -0,0 +1,109 @@
+/* CheckServices.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 javax.jnlp.ServiceManager;
+import javax.jnlp.BasicService;
+import java.applet.Applet;
+
+public class CheckServices extends Applet {
+
+    public CheckServices() {
+        System.out.println("Applet constructor reached.");
+        checkSetup("constructor"); 
+    }
+
+    public void checkSetup(String method) {
+        try {
+            BasicService basicService =
+                (BasicService)ServiceManager.lookup("javax.jnlp.BasicService");
+            // getCodeBase() will return null if ServiceManager does not 
+            // have access to ApplicationInstance.
+            String codebase = basicService.getCodeBase().toString();
+            System.out.println("Codebase for applet was found in " + method
+                + ": " + codebase);
+        } catch (NullPointerException npe) {
+            System.err.println("Exception occurred with null codebase in " + method);
+            npe.printStackTrace();
+        } catch (Exception ex) {
+            System.err.println("Exception occurred (probably with ServiceManager).");
+          ex.printStackTrace();
+        }
+    }
+
+    @Override
+    public void init() {
+        System.out.println("Applet is initializing.");
+        checkSetup("init()"); 
+    }
+
+    @Override
+    public void start() {
+        System.out.println("Applet is starting.");
+        checkSetup("start()"); 
+        // FIXME: Instead of killing the thread, use the AWT robot to close
+        // the applet window, signaling the event that runs stop/destroy.
+        System.out.println("Killer thread is starting.");
+        Thread killer = new Thread() {
+            public int n = 2000;
+        
+            @Override
+            public void run() {
+                try {
+                        Thread.sleep(n);
+                        System.out.println("Applet killing itself after " + n + " ms of life");
+                        System.exit(0);
+                } catch (Exception ex) {
+                }   
+            }
+        };
+        killer.start(); 
+    }
+
+   
+    @Override
+    public void stop() {
+        System.out.println("Applet is stopping.");
+        checkSetup("stop()"); 
+    }   
+
+    @Override
+    public void destroy() {
+        System.out.println("Applet is destorying itself.");
+        checkSetup("destroy()"); 
+    } 
+    
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/CheckServices/testcases/CheckServicesTests.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/CheckServices/testcases/CheckServicesTests.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/CheckServices/testcases/CheckServicesTests.java	(revision 416)
@@ -0,0 +1,89 @@
+/* CheckServicesTests.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 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;
+
+@Bug(id="http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2012-February/017153.html")
+public class CheckServicesTests extends BrowserTest{
+
+    public void evaluateApplet(ProcessResult pr, boolean applet) {
+        String s0 = "Codebase for applet was found in constructor";
+        Assert.assertTrue("CheckServices stdout should contain `" + s0 + "' but didn't.", pr.stdout.contains(s0));
+        String s1 = "Codebase for applet was found in init()";
+        Assert.assertTrue("CheckServices stdout should contain `" + s1 + "' but didn't.", pr.stdout.contains(s1));
+        String s2 = "Codebase for applet was found in start()";
+        Assert.assertTrue("CheckServices stdout should contain `" + s2 + "' but didn't.", pr.stdout.contains(s2));
+        if (applet){
+            /*this is working correctly in most browser, but not in all. temporarily disabling
+        String s3 = "Codebase for applet was found in stop()";
+        Assert.assertTrue("CheckServices stdout should contain `" + s3 + "' but didn't.", pr.stdout.contains(s3));
+        String s4 = "Codebase for applet was found in destroy()";
+        Assert.assertTrue("CheckServices stdout should contain `" + s4 + "' but didn't.", pr.stdout.contains(s4));
+             */
+        }
+        String s5 = "Exception occurred with null codebase in";
+        Assert.assertFalse("CheckServices stderr should not contain `" + s5 + "' but did.", pr.stdout.contains(s5));
+        String s6 = "Applet killing itself after 2000 ms of life";
+        Assert.assertTrue("CheckServices stdout should contain `" + s6 + "' but didn't.", pr.stdout.contains(s6));
+    }
+
+    @Test
+    @NeedsDisplay
+    public void CheckWebstartServices() throws Exception {
+        ProcessResult pr = server.executeJavaws(null, "/CheckServices.jnlp");
+        evaluateApplet(pr, false);
+        Assert.assertFalse(pr.wasTerminated);
+        Assert.assertEquals((Integer)0, pr.returnValue);
+    }
+
+    @Test
+    @NeedsDisplay
+    @TestInBrowsers(testIn={Browsers.one})
+    public void CheckPluginJNLPHServices() throws Exception {
+        ProcessResult pr = server.executeBrowser(null, "/CheckPluginServices.html");
+        evaluateApplet(pr,false);
+        Assert.assertTrue(pr.wasTerminated);
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/CreateClassLoader/resources/CreateClassLoader.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/CreateClassLoader/resources/CreateClassLoader.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/CreateClassLoader/resources/CreateClassLoader.jnlp	(revision 416)
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="utf-8"?> 
+
+<!--
+
+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.
+ -->
+
+<jnlp spec="1.0"
+      codebase="./"
+      href="CreateClassLoader.jnlp">
+    <information>
+        <title>set context classloader</title>
+        <vendor>IcedTea</vendor>
+    </information>
+    <resources>
+        <jar href="CreateClassLoader.jar" main="true" download="eager"/>
+    </resources>
+    <application-desc main-class="CreateClassLoader"/>
+</jnlp> 
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/CreateClassLoader/srcs/CreateClassLoader.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/CreateClassLoader/srcs/CreateClassLoader.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/CreateClassLoader/srcs/CreateClassLoader.java	(revision 416)
@@ -0,0 +1,46 @@
+/* CreateClassLoader.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.net.URL;
+import java.net.URLClassLoader;
+
+public class CreateClassLoader {
+    public static void main(String[] args) throws Exception {
+            URLClassLoader ucl = new URLClassLoader(new URL[0]);
+
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/CreateClassLoader/testcases/CreateClassLoaderTest.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/CreateClassLoader/testcases/CreateClassLoaderTest.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/CreateClassLoader/testcases/CreateClassLoaderTest.java	(revision 416)
@@ -0,0 +1,58 @@
+/* CreateClassLoaderTest.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.ServerAccess;
+import org.junit.Assert;
+
+import org.junit.Test;
+
+public class CreateClassLoaderTest {
+
+    private static ServerAccess server = new ServerAccess();
+
+    @Test
+    public void CreateClassLoaderLunch1() throws Exception {
+        ServerAccess.ProcessResult pr = server.executeJavawsHeadless(null, "/CreateClassLoader.jnlp");
+        String s = "(?s).*java.security.AccessControlException.{0,5}access denied.{0,5}java.lang.RuntimePermission.{0,5}" + "createClassLoader" + ".*";
+        Assert.assertTrue("Stderr should match "+s+" but didn't",pr.stderr.matches(s));
+        String cc="ClassNotFoundException";
+        Assert.assertFalse("stderr should NOT contains `"+cc+"`, but did",pr.stderr.contains(cc));
+        Assert.assertFalse("stdout length should be <=2, but was "+pr.stdout.length(),pr.stdout.length()>2);
+        Assert.assertFalse("CreateClassLoaderLunch1 should not be terminated, but was",pr.wasTerminated);
+        Assert.assertEquals((Integer) 0, pr.returnValue);
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/InformationTitleVendorParser/resources/InformationParser.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/InformationTitleVendorParser/resources/InformationParser.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/InformationTitleVendorParser/resources/InformationParser.jnlp	(revision 416)
@@ -0,0 +1,47 @@
+<!--
+
+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="InformationParser.jnlp" codebase=".">
+  <!-- information tag missing -->
+  <resources>
+    <j2se version="1.4+"/>
+    <jar href="simpletest1.jar"/>
+  </resources>
+  <application-desc main-class="TitleVendorParser">
+  </application-desc>
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/InformationTitleVendorParser/resources/TitleParser.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/InformationTitleVendorParser/resources/TitleParser.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/InformationTitleVendorParser/resources/TitleParser.jnlp	(revision 416)
@@ -0,0 +1,52 @@
+<!--
+
+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="TitleParser.jnlp" codebase=".">
+  <information>
+    <vendor>IcedTea</vendor>
+    <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+    <description>Title tag missing</description>
+    <offline/>
+  </information>
+  <resources>
+    <j2se version="1.4+"/>
+    <jar href="simpletest1.jar"/>
+  </resources>
+  <application-desc main-class="TitleVendorParser">
+  </application-desc>
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/InformationTitleVendorParser/resources/TitleVendorParser.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/InformationTitleVendorParser/resources/TitleVendorParser.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/InformationTitleVendorParser/resources/TitleVendorParser.jnlp	(revision 416)
@@ -0,0 +1,51 @@
+<!--
+
+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="TitleVendorParser.jnlp" codebase=".">
+  <information>
+    <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+    <description>Title/Vendor tags missing</description>
+    <offline/>
+  </information>
+  <resources>
+    <j2se version="1.4+"/>
+    <jar href="simpletest1.jar"/>
+  </resources>
+  <application-desc main-class="TitleVendorParser">
+  </application-desc>
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/InformationTitleVendorParser/resources/VendorParser.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/InformationTitleVendorParser/resources/VendorParser.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/InformationTitleVendorParser/resources/VendorParser.jnlp	(revision 416)
@@ -0,0 +1,52 @@
+<!--
+
+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="VendorParser.jnlp" codebase=".">
+  <information>
+    <title>VendorParser</title>
+    <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+    <description>Vendor tag missing</description>
+    <offline/>
+  </information>
+  <resources>
+    <j2se version="1.4+"/>
+    <jar href="simpletest1.jar"/>
+  </resources>
+  <application-desc main-class="TitleVendorParser">
+  </application-desc>
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/InformationTitleVendorParser/testcases/InformationTitleVendorParserTest.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/InformationTitleVendorParser/testcases/InformationTitleVendorParserTest.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/InformationTitleVendorParser/testcases/InformationTitleVendorParserTest.java	(revision 416)
@@ -0,0 +1,79 @@
+/* InformationTitleVendorParserTest.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.util.Arrays;
+import java.util.List;
+
+import net.sourceforge.jnlp.ServerAccess;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class InformationTitleVendorParserTest {
+
+    private static ServerAccess server = new ServerAccess();
+
+    public void runTest(String jnlpName, String exception) throws Exception {
+        List<String> verbosed = Arrays.asList(new String[] { "-verbose" });
+        ServerAccess.ProcessResult pr=server.executeJavawsHeadless(verbosed, "/" + jnlpName + ".jnlp");
+        String s1 = "Good simple javaws exapmle";
+        Assert.assertFalse("test" + jnlpName + " stdout should not contain " + s1 + " but did.", pr.stdout.contains(s1));
+        Assert.assertTrue("testForTitle stderr should contain " + exception + " but did not.", pr.stderr.contains(exception));
+        Assert.assertFalse(pr.wasTerminated);
+        Assert.assertEquals((Integer)0, pr.returnValue);
+    }
+
+    @Test
+    public void testInformationeParser() throws Exception {
+        runTest("InformationParser", "net.sourceforge.jnlp.MissingInformationException");
+    }
+
+    @Test
+    public void testTitleParser() throws Exception {
+        runTest("TitleParser", "net.sourceforge.jnlp.MissingTitleException");
+    }
+    @Test
+    public void testVendorParser() throws Exception {
+        runTest("VendorParser", "net.sourceforge.jnlp.MissingVendorException");
+    }
+
+    @Test
+    public void testTitleVendorParser() throws Exception {
+        // Note that the title message missing causes an immediate exception, regardless of Vendor.
+        runTest("TitleVendorParser", "net.sourceforge.jnlp.MissingTitleException");
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/LocalisedInformationElement/resources/LocalisedInformationElement1.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/LocalisedInformationElement/resources/LocalisedInformationElement1.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/LocalisedInformationElement/resources/LocalisedInformationElement1.jnlp	(revision 416)
@@ -0,0 +1,72 @@
+<!--
+
+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="LocalisedInformationElement1.jnlp" codebase=".">
+  <information>
+    <title>localisedJnlp1.jnlp1</title>
+    <vendor>IcedTea</vendor>
+    <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+    <description>LocalisedInformationElement1.jnlp</description>
+    <offline/>
+  </information>
+  <information locale="fr" >
+    <title>LocalisedInformationElement1.jnlp la francee</title>
+    <description>La LocalisedInformationElement1.jnlp</description>
+    <offline/>
+  </information>
+  <information locale="fr_BE" >
+    <title>LocalisedInformationElement1.jnlp la francee BE</title>
+    <offline/>
+  </information>
+  <information locale="fr_BE.iso88591" >
+    <title>LocalisedInformationElement1.jnlp la francee BE iso88591</title>
+    <offline/>
+  </information>
+  <information locale="cs" >
+    <title>LocalisedInformationElement1.jnlp po cesky</title>
+    <vendor>IcedTea CZ</vendor>
+    <description>Muj vlastni LocalisedInformationElement1.jnlp</description>
+    <offline/>
+  </information>
+  <resources>
+    <j2se version="1.4+"/>
+    <jar href="LocalisedInformationElement.jar"/>
+  </resources>
+  <application-desc main-class="LocalisedInformationElement">
+  </application-desc>
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/LocalisedInformationElement/resources/LocalisedInformationElement2.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/LocalisedInformationElement/resources/LocalisedInformationElement2.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/LocalisedInformationElement/resources/LocalisedInformationElement2.jnlp	(revision 416)
@@ -0,0 +1,70 @@
+<!--
+
+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="LocalisedInformationElement2.jnlp" codebase=".">
+  <information>
+    <title>localisedJnlp1.jnlp1</title>
+    <!--vendor is misisng-->
+    <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+    <description>LocalisedInformationElement1.jnlp</description>
+    <offline/>
+  </information>
+  <information locale="fr" >
+    <title>LocalisedInformationElement1.jnlp la francee</title>
+    <vendor>IcedTea</vendor>
+    <description>La LocalisedInformationElement1.jnlp</description>
+    <offline/>
+  </information>
+  <information locale="fr_BE" >
+    <title>LocalisedInformationElement1.jnlp la francee BE</title>
+    <!--vendor should be found by fall back-->
+    <offline/>
+  </information>
+  <information locale="cs" >
+    <title>LocalisedInformationElement1.jnlp po cesky</title>
+    <!--vendor is misisng, and not find by fallback-->
+    <description>Muj vlastni LocalisedInformationElement1.jnlp</description>
+    <offline/>
+  </information>
+  <resources>
+    <j2se version="1.4+"/>
+    <jar href="LocalisedInformationElement.jar"/>
+  </resources>
+  <application-desc main-class="LocalisedInformationElement">
+  </application-desc>
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/LocalisedInformationElement/resources/LocalisedInformationElement3.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/LocalisedInformationElement/resources/LocalisedInformationElement3.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/LocalisedInformationElement/resources/LocalisedInformationElement3.jnlp	(revision 416)
@@ -0,0 +1,69 @@
+<!--
+
+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="LocalisedInformationElement3.jnlp" codebase=".">
+  <information>
+    <title>localisedJnlp1.jnlp1</title>
+    <vendor>IcedTea</vendor>
+    <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+    <description>D_DEF</description>
+    <offline/>
+  </information>
+  <information locale="fr" >
+    <title>LocalisedInformationElement1.jnlp la francee</title>
+    <description>D_DEF_FR</description>
+    <offline/>
+  </information>
+  <information locale="fr_BE" >
+    <title>LocalisedInformationElement1.jnlp la francee BE</title>
+    <description>D_FR_BE</description>
+    <offline/>
+  </information>
+  <information locale="cs" >
+    <title>LocalisedInformationElement1.jnlp po cesky</title>
+    <vendor>IcedTea CZ</vendor>
+    <description>D_DEF_CS</description>
+    <offline/>
+  </information>
+  <resources>
+    <j2se version="1.4+"/>
+    <jar href="LocalisedInformationElement.jar"/>
+  </resources>
+  <application-desc main-class="LocalisedInformationElement">
+  </application-desc>
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/LocalisedInformationElement/resources/LocalisedInformationElement4.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/LocalisedInformationElement/resources/LocalisedInformationElement4.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/LocalisedInformationElement/resources/LocalisedInformationElement4.jnlp	(revision 416)
@@ -0,0 +1,70 @@
+<!--
+
+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="LocalisedInformationElement4.jnlp" codebase=".">
+  <information>
+    <title>localisedJnlp1.jnlp1</title>
+    <!--vendor is misisng-->
+    <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+    <description>D_DEF</description>
+    <offline/>
+  </information>
+  <information locale="fr" >
+    <title>LocalisedInformationElement1.jnlp la francee</title>
+    <vendor>IcedTea</vendor>
+    <description>D_DEF_FR</description>
+    <offline/>
+  </information>
+  <information locale="fr_BE" >
+    <title>LocalisedInformationElement1.jnlp la francee BE</title>
+    <!--vendor should be found by fall back-->
+    <offline/>
+  </information>
+  <information locale="cs" >
+    <title>LocalisedInformationElement1.jnlp po cesky</title>
+    <!--vendor is misisng, and not find by fallback-->
+    <description>D_DEF_CS</description>
+    <offline/>
+  </information>
+  <resources>
+    <j2se version="1.4+"/>
+    <jar href="LocalisedInformationElement.jar"/>
+  </resources>
+  <application-desc main-class="LocalisedInformationElement">
+  </application-desc>
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/LocalisedInformationElement/resources/LocalisedInformationElement_noLoc.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/LocalisedInformationElement/resources/LocalisedInformationElement_noLoc.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/LocalisedInformationElement/resources/LocalisedInformationElement_noLoc.jnlp	(revision 416)
@@ -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="LocalisedInformationElement_noLoc.jnlp" codebase=".">
+  <information>
+    <title>localisedJnlp_noLoc.jnlp1</title>
+    <vendor>IcedTea</vendor>
+    <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+    <description>LocalisedInformationElement_noLoc.jnlp</description>
+    <offline/>
+  </information>
+  <resources>
+    <j2se version="1.4+"/>
+    <jar href="LocalisedInformationElement.jar"/>
+  </resources>
+  <application-desc main-class="LocalisedInformationElement">
+  </application-desc>
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/LocalisedInformationElement/srcs/LocalisedInformationElement.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/LocalisedInformationElement/srcs/LocalisedInformationElement.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/LocalisedInformationElement/srcs/LocalisedInformationElement.java	(revision 416)
@@ -0,0 +1,52 @@
+/* LocalisedInformationElement.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.Locale;
+
+public class LocalisedInformationElement{
+
+    public static void main(String[] args){
+        System.out.println("LocalisedInformationElement launched");
+        System.out.println("*******************");
+//        This needs signed code
+//        String locale = System.getProperty("user.language");
+//        System.out.println("value of user.language: "+locale);
+        Locale loc=Locale.getDefault();
+        System.out.println("default locale: "+loc.toString());
+        System.out.println("*******************");
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/LocalisedInformationElement/testcases/LocalisedInformationElementTest.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/LocalisedInformationElement/testcases/LocalisedInformationElementTest.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/LocalisedInformationElement/testcases/LocalisedInformationElementTest.java	(revision 416)
@@ -0,0 +1,356 @@
+/* LocalisedInformationElementTest.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.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Set;
+import net.sourceforge.jnlp.ProcessResult;
+import net.sourceforge.jnlp.ServerAccess;
+import net.sourceforge.jnlp.annotations.Bug;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class LocalisedInformationElementTest {
+
+    private static ServerAccess server = new ServerAccess();
+
+    /**
+     * this will prepare new set of varibales with wanted locale, which
+     * can be then passed to subprocess
+     * @param locale - locale to be set to LANG variable, eg cs_CZ.UTF-8
+     */
+    public static String[] getChangeLocalesForSubproces(String locale) {
+        ServerAccess.logOutputReprint("Setting locales");
+        Map<String, String> p = System.getenv();
+        Set<Entry<String, String>> r = p.entrySet();
+        List<Entry<String, String>> rr = new ArrayList(r);
+        Collections.sort(rr, new Comparator<Entry<String, String>>() {
+
+            @Override
+            public int compare(Entry<String, String> o1, Entry<String, String> o2) {
+                return o1.getKey().compareTo(o2.getKey());
+            }
+        });
+        String[] l = new String[rr.size()];
+        int i = -1;
+        for (Iterator<Entry<String, String>> it = rr.iterator(); it.hasNext();) {
+            i++;
+            Entry<String, String> entry = it.next();
+            String v = entry.getValue();
+            String s = entry.getKey() + "=" + v;
+            //System.out.println(s);
+            if (entry.getKey().equals("LANG")) {
+                ServerAccess.logOutputReprint("was " + v);
+                v = locale;
+                ServerAccess.logOutputReprint("set " + v);
+            }
+            s = entry.getKey() + "=" + v;
+            l[i] = s;
+        }
+        return l;
+    }
+
+    public static ProcessResult evaluateLocalisedInformationElementTest(String id, String[] variables, boolean verbose) throws Exception {
+        ProcessResult pr = executeJavaws(verbose, variables, id);
+        String s = "LocalisedInformationElement launched";
+        Assert.assertTrue(id + " stdout should contains " + s + " bud didn't", pr.stdout.contains(s));
+        //to strict?
+        //String ss = "xception";
+        //Assert.assertFalse(id + " stderr should not contains " + ss + " but did", pr.stderr.contains(ss));
+        String locMatch = "(?s).*default locale: \\w{2}.*";
+        Assert.assertTrue(id + " stdout should match " + locMatch + " bud didn't", pr.stdout.matches(locMatch));
+        return pr;
+    }
+
+    public static ProcessResult evaluateLocalisedInformationElementTestNotLaunched(String id, String[] variables, boolean verbose) throws Exception {
+        ProcessResult pr = executeJavaws(verbose, variables, id);
+        String s = "LocalisedInformationElement launched";
+        Assert.assertFalse(id + " stdout should not contains " + s + " bud didn't", pr.stdout.contains(s));
+        String ss = "xception";
+        Assert.assertTrue(id + " stderr should contains " + ss + " but didn't", pr.stderr.contains(ss));
+        String locMatch = "(?s).*default locale: \\w{2}.*";
+        Assert.assertFalse(id + " stdout should not match " + locMatch + " bud didn't", pr.stdout.matches(locMatch));
+        String sss = "MissingVendorException";
+        Assert.assertTrue(id + " stderr should contains " + sss + " but didn't", pr.stderr.contains(sss));
+        return pr;
+    }
+
+    private static ProcessResult executeJavaws(boolean verbose, String[] variables, String id) throws Exception {
+        List<String> oa = new ArrayList<String>(1);
+        if (verbose) {
+            oa.add("-verbose");
+        }
+        final ProcessResult pr;
+        if (variables == null) {
+            pr = server.executeJavawsHeadless(oa, "/" + id + ".jnlp");
+        } else {
+            pr = server.executeJavawsHeadless(oa, "/" + id + ".jnlp", variables);
+        }
+        return pr;
+    }
+
+
+    //the description checkis disabled for all PR955, so it is representing just
+    //PR955 issue. Tests with enable description check are introduced later
+    private final boolean w1=false;
+
+    @Test
+    @Bug(id = "PR955")
+    public void testLocalisedInformationElementLaunchWithLocalisedInformation1() throws Exception {
+        String[] l = getChangeLocalesForSubproces("en_US.UTF-8");
+        ProcessResult pr = evaluateLocalisedInformationElementTest("LocalisedInformationElement1", l, true);
+        assertTiVeDe(pr, "localisedJnlp1.jnlp1", "IcedTea", "LocalisedInformationElement1.jnlp", w1);
+    }
+
+//LANG variable do not 'accept' nationales without regions :(
+//    @Test
+//    @Bug(id = "PR955")
+//    public void testLocalisedInformationElementLaunchWithLocalisedInformation2() throws Exception {
+//        String[] l = getChangeLocalesForSubproces("cs");
+//        ProcessResult pr = evaluateLocalisedInformationElementTest("LocalisedInformationElement1", l,true);
+//        assertTiVeDe(pr,"LocalisedInformationElement1.jnlp po cesky","IcedTea CZ","Muj vlastni LocalisedInformationElement1.jnlp",w1);
+//    }
+    @Test
+    @Bug(id = "PR955")
+    public void testLocalisedInformationElementLaunchWithLocalisedInformation22() throws Exception {
+        String[] l = getChangeLocalesForSubproces("cs_CZ");
+        ProcessResult pr = evaluateLocalisedInformationElementTest("LocalisedInformationElement1", l, true);
+        assertTiVeDe(pr, "LocalisedInformationElement1.jnlp po cesky", "IcedTea CZ", "Muj vlastni LocalisedInformationElement1.jnlp", w1);
+    }
+
+    @Test
+    @Bug(id = "PR955")
+    public void testLocalisedInformationElementLaunchWithLocalisedInformation33_1() throws Exception {
+        String[] l = getChangeLocalesForSubproces("fr_BE");
+        ProcessResult pr = evaluateLocalisedInformationElementTest("LocalisedInformationElement1", l, true);
+        assertTiVeDe(pr, "LocalisedInformationElement1.jnlp la francee BE", "IcedTea", "La LocalisedInformationElement1.jnlp", w1);
+    }
+
+//   java is ignoring set encoding :(
+//    @Test
+//    @Bug(id = "PR955")
+//    public void testLocalisedInformationElementLaunchWithLocalisedInformation33_2() throws Exception {
+//        String[] l = getChangeLocalesForSubproces("fr_BE.iso88591");
+//        ProcessResult pr = evaluateLocalisedInformationElementTest("LocalisedInformationElement1", l, true);
+//        assertTiVeDe(pr, "LocalisedInformationElement1.jnlp la francee BE iso88591", "IcedTea", "La LocalisedInformationElement1.jnlp",false);
+//    }
+    @Test
+    @Bug(id = "PR955")
+    public void testLocalisedInformationElementLaunchWithLocalisedInformation33_() throws Exception {
+        String[] l = getChangeLocalesForSubproces("fr_CH");
+        ProcessResult pr = evaluateLocalisedInformationElementTest("LocalisedInformationElement1", l, true);
+        assertTiVeDe(pr, "LocalisedInformationElement1.jnlp la francee", "IcedTea", "La LocalisedInformationElement1.jnlp", w1);
+    }
+
+    @Test
+    @Bug(id = "PR955")
+    public void testLocalisedInformationElementLaunchWithLocalisedInformation1_withPieceMissing() throws Exception {
+        String[] l = getChangeLocalesForSubproces("en_US.UTF-8");
+        ProcessResult pr = evaluateLocalisedInformationElementTestNotLaunched("LocalisedInformationElement2", l, true);
+
+    }
+
+    @Test
+    @Bug(id = "PR955")
+    public void testLocalisedInformationElementLaunchWithLocalisedInformation22_withPieceMissing() throws Exception {
+        String[] l = getChangeLocalesForSubproces("cs_CZ");
+        ProcessResult pr = evaluateLocalisedInformationElementTestNotLaunched("LocalisedInformationElement2", l, true);
+    }
+
+    @Test
+    @Bug(id = "PR955")
+    public void testLocalisedInformationElementLaunchWithLocalisedInformation33_1_withPieceMissing() throws Exception {
+        String[] l = getChangeLocalesForSubproces("fr_BE");
+        ProcessResult pr = evaluateLocalisedInformationElementTest("LocalisedInformationElement2", l, true);
+        assertTiVeDe(pr, "LocalisedInformationElement1.jnlp la francee BE", "IcedTea", "La LocalisedInformationElement1.jnlp", w1);
+    }
+
+    @Test
+    @Bug(id = "PR955")
+    public void testLocalisedInformationElementLaunchWithLocalisedInformation33_withPieceMissing() throws Exception {
+        String[] l = getChangeLocalesForSubproces("fr_CH");
+        ProcessResult pr = evaluateLocalisedInformationElementTest("LocalisedInformationElement2", l, true);
+        assertTiVeDe(pr, "LocalisedInformationElement1.jnlp la francee", "IcedTea", "La LocalisedInformationElement1.jnlp", w1);
+    }
+
+    //thsoe 11 methods are jsut for printing of locales passed to javaws
+    //so actually testing the LOCALE hack
+    @Test
+    public void printLocales() throws Exception {
+        ProcessResult pr = evaluateLocalisedInformationElementTest("LocalisedInformationElement_noLoc", null, false);
+    }
+
+    @Test
+    public void printLocalesChanged1() throws Exception {
+        String[] l = getChangeLocalesForSubproces("cs_CZ.UTF-8");
+        ProcessResult pr = evaluateLocalisedInformationElementTest("LocalisedInformationElement_noLoc", l, false);
+        Assert.assertTrue(pr.stdout.contains("cs_CZ"));
+    }
+// the following four have acepted iso encoding, but not used it
+
+    @Test
+    public void printLocalesChanged2() throws Exception {
+        String[] l = getChangeLocalesForSubproces("en_AU.ISO-8859-1");
+        ProcessResult pr = evaluateLocalisedInformationElementTest("LocalisedInformationElement_noLoc", l, false);
+        Assert.assertTrue(pr.stdout.contains("en_AU"));
+    }
+
+    @Test
+    public void printLocalesChanged22() throws Exception {
+        String[] l = getChangeLocalesForSubproces("en_AU.ISO88591");
+        ProcessResult pr = evaluateLocalisedInformationElementTest("LocalisedInformationElement_noLoc", l, false);
+        Assert.assertTrue(pr.stdout.contains("en_AU"));
+    }
+
+    @Test
+    public void printLocalesChanged2222() throws Exception {
+        String[] l = getChangeLocalesForSubproces("en_AU.iso-8859-1");
+        ProcessResult pr = evaluateLocalisedInformationElementTest("LocalisedInformationElement_noLoc", l, false);
+        Assert.assertTrue(pr.stdout.contains("en_AU"));
+    }
+
+    @Test
+    public void printLocalesChanged3() throws Exception {
+        String[] l = getChangeLocalesForSubproces("en_AU.UTF-8");
+        ProcessResult pr = evaluateLocalisedInformationElementTest("LocalisedInformationElement_noLoc", l, false);
+        Assert.assertTrue(pr.stdout.contains("en_AU"));
+    }
+
+    // the following five have NOTacepted iso encoding at all
+    @Test
+    public void printLocalesChanged2_X() throws Exception {
+        String[] l = getChangeLocalesForSubproces("en_AU.ISO-8859-2");
+        ProcessResult pr = evaluateLocalisedInformationElementTest("LocalisedInformationElement_noLoc", l, false);
+        Assert.assertFalse(pr.stdout.contains("en_AU"));
+    }
+
+    @Test
+    public void printLocalesChanged22_X() throws Exception {
+        String[] l = getChangeLocalesForSubproces("en_AU.ISO88592");
+        ProcessResult pr = evaluateLocalisedInformationElementTest("LocalisedInformationElement_noLoc", l, false);
+        Assert.assertFalse(pr.stdout.contains("en_AU"));
+    }
+
+    @Test
+    public void printLocalesChanged2222_X() throws Exception {
+        String[] l = getChangeLocalesForSubproces("en_AU.iso-8859-2");
+        ProcessResult pr = evaluateLocalisedInformationElementTest("LocalisedInformationElement_noLoc", l, false);
+        Assert.assertFalse(pr.stdout.contains("en_AU"));
+    }
+
+    @Test
+    public void printLocalesChanged3_X() throws Exception {
+        String[] l = getChangeLocalesForSubproces("en_AU.UTF-16");
+        ProcessResult pr = evaluateLocalisedInformationElementTest("LocalisedInformationElement_noLoc", l, false);
+        Assert.assertFalse(pr.stdout.contains("en_AU"));
+    }
+
+    @Test
+    public void printLocalesChanged4_X() throws Exception {
+        String[] l = getChangeLocalesForSubproces("en_AU.jklukl56489jkyk");
+        ProcessResult pr = evaluateLocalisedInformationElementTest("LocalisedInformationElement_noLoc", l, false);
+        Assert.assertFalse(pr.stdout.contains("en_AU"));
+    }
+    private static final String DEFAULT_HOMEPAGE = "http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web";
+
+    public static void assertTiVeDe(ProcessResult pr, String title, String vendor, String description, boolean descTests) {
+        assertTiHpVeDe(pr, title, DEFAULT_HOMEPAGE, vendor, description, descTests);
+    }
+
+    public static void assertTiHpVeDe(ProcessResult pr, String title, String homepage, String vendor, String description, boolean descTests) {
+        Assert.assertTrue("call shuld evaluate homepage as: " + homepage + " but did not", pr.stdout.contains("Homepage: " + homepage));
+        Assert.assertTrue("call shuld evaluate title as: " + title + " but did not", pr.stdout.contains("Acceptable title tag found, contains: " + title));
+        Assert.assertTrue("call shuld evaluate vendor as: " + " but did not", pr.stdout.contains("Acceptable vendor tag found, contains: " + vendor));
+        if (descTests) {
+            Assert.assertTrue("call shuld evaluate description as: " + description + " but did not", pr.stdout.contains("Description: " + description));
+        }
+    }
+
+
+    //following tests are testing also localisation of description
+    private final boolean w2=true;
+
+    @Test
+    public void testLocalisedInformationElementLaunchWithLocalisedInformation1_withDescription() throws Exception {
+        String[] l = getChangeLocalesForSubproces("en_US.UTF-8");
+        ProcessResult pr = evaluateLocalisedInformationElementTest("LocalisedInformationElement3", l, true);
+        assertTiVeDe(pr, "localisedJnlp1.jnlp1", "IcedTea", "D_DEF", w2);
+    }
+
+    @Test
+    public void testLocalisedInformationElementLaunchWithLocalisedInformation22_withDescription() throws Exception {
+        String[] l = getChangeLocalesForSubproces("cs_CZ");
+        ProcessResult pr = evaluateLocalisedInformationElementTest("LocalisedInformationElement3", l, true);
+        assertTiVeDe(pr, "LocalisedInformationElement1.jnlp po cesky", "IcedTea CZ", "D_DEF_CS", w2);
+    }
+
+    @Test
+    public void testLocalisedInformationElementLaunchWithLocalisedInformation33_1_withDescription() throws Exception {
+        String[] l = getChangeLocalesForSubproces("fr_BE");
+        ProcessResult pr = evaluateLocalisedInformationElementTest("LocalisedInformationElement3", l, true);
+        assertTiVeDe(pr, "LocalisedInformationElement1.jnlp la francee BE", "IcedTea", "D_FR_BE", w2);
+    }
+
+    @Test
+    public void testLocalisedInformationElementLaunchWithLocalisedInformation33__withDescription() throws Exception {
+        String[] l = getChangeLocalesForSubproces("fr_CH");
+        ProcessResult pr = evaluateLocalisedInformationElementTest("LocalisedInformationElement3", l, true);
+        assertTiVeDe(pr, "LocalisedInformationElement1.jnlp la francee", "IcedTea", "D_DEF_FR", w2);
+    }
+
+    @Test
+    public void testLocalisedInformationElementLaunchWithLocalisedInformation33_1_withPieceMissing_withDescription() throws Exception {
+        String[] l = getChangeLocalesForSubproces("fr_BE");
+        ProcessResult pr = evaluateLocalisedInformationElementTest("LocalisedInformationElement4", l, true);
+        assertTiVeDe(pr, "LocalisedInformationElement1.jnlp la francee BE", "IcedTea", "D_DEF_FR", w2);
+    }
+
+    @Test
+    public void testLocalisedInformationElementLaunchWithLocalisedInformation33_withPieceMissing_withDescription() throws Exception {
+        String[] l = getChangeLocalesForSubproces("fr_CH");
+        ProcessResult pr = evaluateLocalisedInformationElementTest("LocalisedInformationElement4", l, true);
+        assertTiVeDe(pr, "LocalisedInformationElement1.jnlp la francee", "IcedTea", "D_DEF_FR", w2);
+    }
+
+    //following tests are testing localisation of homepage
+    //to lazy to do...
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/ManifestedJar1/resources/ManifestedJar-1main2mainAppDesc.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/ManifestedJar1/resources/ManifestedJar-1main2mainAppDesc.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/ManifestedJar1/resources/ManifestedJar-1main2mainAppDesc.jnlp	(revision 416)
@@ -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"
+      codebase="./"
+      href="ManifestedJar-1main2mainNoAppDesc.jnlp">
+   <information> 
+      <title>Test Thread.getAllStackTraces</title> 
+      <vendor>IcedTea</vendor>
+      <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+      <description>testing jar with manin class in manifest. Invalid xml exception should go out</description>
+   </information> 
+   <resources>
+      <jar href="ManifestedJar1.jar" main="true"/>
+      <jar href="ManifestedJar2.jar" main="true"/>
+   </resources>
+  <application-desc main-class="ManifestedJar2">
+</jnlp> 
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/ManifestedJar1/resources/ManifestedJar-1main2mainNoAppDesc.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/ManifestedJar1/resources/ManifestedJar-1main2mainNoAppDesc.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/ManifestedJar1/resources/ManifestedJar-1main2mainNoAppDesc.jnlp	(revision 416)
@@ -0,0 +1,54 @@
+<!--
+
+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"
+      codebase="./"
+      href="ManifestedJar-1main2mainNoAppDesc.jnlp">
+   <information> 
+      <title>ManifestedJar-1main2mainNoAppDesc.jnlp</title> 
+      <vendor>IcedTea</vendor>
+      <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+      <description>testing jar with manin class in manifest,  hello from manifestedjar1 should go out</description>
+   </information> 
+   <resources>
+      <jar href="ManifestedJar1.jar" main="true"/>
+      <jar href="ManifestedJar2.jar" main="true"/>
+   </resources>
+   <application-desc/>
+</jnlp> 
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/ManifestedJar1/resources/ManifestedJar-1main2nothingNoAppDesc.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/ManifestedJar1/resources/ManifestedJar-1main2nothingNoAppDesc.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/ManifestedJar1/resources/ManifestedJar-1main2nothingNoAppDesc.jnlp	(revision 416)
@@ -0,0 +1,54 @@
+<!--
+
+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"
+      codebase="./"
+      href="ManifestedJar-1main2nothingNoAppDesc.jnlp">
+   <information> 
+      <title>ManifestedJar-1main2nothingNoAppDesc</title> 
+      <vendor>IcedTea</vendor>
+      <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+      <description>testing jar with manin class in manifest, hello from manifestedjar2 should be printed</description>
+   </information> 
+   <resources>
+      <jar href="ManifestedJar1.jar" />
+      <jar href="ManifestedJar2.jar" main="true"/>
+   </resources>
+   <application-desc/>
+</jnlp> 
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/ManifestedJar1/resources/ManifestedJar-1mainHaveAppDesc.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/ManifestedJar1/resources/ManifestedJar-1mainHaveAppDesc.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/ManifestedJar1/resources/ManifestedJar-1mainHaveAppDesc.jnlp	(revision 416)
@@ -0,0 +1,54 @@
+<!--
+
+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"
+      codebase="./"
+      href="ManifestedJar-1mainHaveAppDesc.jnlp">
+   <information> 
+      <title>"ManifestedJar-1mainHaveAppDesc.jnlp</title> 
+      <vendor>IcedTea</vendor>
+      <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+      <description>testing jar with manin class in manifest, hello from manifestedjar2 should be printed</description>
+   </information> 
+   <resources>
+      <jar href="ManifestedJar1.jar" main="true"/>
+      <jar href="ManifestedJar2.jar" />
+   </resources>
+  <application-desc main-class="ManifestedJar2">
+  </application-desc>
+</jnlp> 
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/ManifestedJar1/resources/ManifestedJar-1mainNoAppDesc.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/ManifestedJar1/resources/ManifestedJar-1mainNoAppDesc.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/ManifestedJar1/resources/ManifestedJar-1mainNoAppDesc.jnlp	(revision 416)
@@ -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"
+      codebase="./"
+      href="ManifestedJar-1mainNoAppDesc.jnlp">
+   <information> 
+      <title>ManifestedJar-1mainNoAppDesc.jnlp</title> 
+      <vendor>IcedTea</vendor>
+      <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+      <description>testing jar with manin class in manifest, hello from manifestedjar should be printed</description>
+   </information> 
+   <resources>
+      <jar href="ManifestedJar1.jar" main="true"/>
+   </resources>
+   <application-desc/>
+</jnlp> 
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/ManifestedJar1/resources/ManifestedJar-1noAppDesc.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/ManifestedJar1/resources/ManifestedJar-1noAppDesc.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/ManifestedJar1/resources/ManifestedJar-1noAppDesc.jnlp	(revision 416)
@@ -0,0 +1,52 @@
+<!--
+
+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"
+      codebase="./"
+      href="ManifestedJar-1noAppDesc.jnlp">
+   <information> 
+      <title>ManifestedJar-1noAppDesc</title> 
+      <vendor>IcedTea</vendor>
+      <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+      <description>testing jar with manin class in manifest, hello from manifestedjar1 shold be printed</description>
+   </information> 
+   <resources>
+      <jar href="ManifestedJar1.jar"/>
+   </resources>
+   <application-desc/>
+</jnlp> 
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/ManifestedJar1/resources/ManifestedJar-1noAppDescAtAll.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/ManifestedJar1/resources/ManifestedJar-1noAppDescAtAll.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/ManifestedJar1/resources/ManifestedJar-1noAppDescAtAll.jnlp	(revision 416)
@@ -0,0 +1,49 @@
+<!--
+
+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"  codebase="./"  href="ManifestedJar-1noAppDescAtAll.jnlp">
+   <information> 
+      <title>ManifestedJar-1noAppDescAtAll</title> 
+      <vendor>IcedTea</vendor>
+      <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+      <description>testing jar with manin class in manifest, exception during launching, no application specified</description>
+   </information> 
+   <resources>
+      <jar href="ManifestedJar1.jar"/>
+   </resources>
+</jnlp> 
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/ManifestedJar1/resources/ManifestedJar-1nothing2nothingAppDesc.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/ManifestedJar1/resources/ManifestedJar-1nothing2nothingAppDesc.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/ManifestedJar1/resources/ManifestedJar-1nothing2nothingAppDesc.jnlp	(revision 416)
@@ -0,0 +1,54 @@
+<!--
+
+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"
+      codebase="./"
+      href="ManifestedJar-1nothing2nothingAppDesc.jnlp">
+   <information> 
+      <title>ManifestedJar-1nothing2nothingAppDesc</title> 
+      <vendor>IcedTea</vendor>
+      <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+      <description>testing jar with manin class in manifest. Hello from manifestedjar2 should be printed</description>
+   </information> 
+   <resources>
+      <jar href="ManifestedJar1.jar" />
+      <jar href="ManifestedJar2.jar" />
+   </resources>
+  <application-desc main-class="ManifestedJar2">
+</jnlp> 
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/ManifestedJar1/resources/ManifestedJar-1nothing2nothingNoAppDesc.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/ManifestedJar1/resources/ManifestedJar-1nothing2nothingNoAppDesc.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/ManifestedJar1/resources/ManifestedJar-1nothing2nothingNoAppDesc.jnlp	(revision 416)
@@ -0,0 +1,54 @@
+<!--
+
+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"
+      codebase="./"
+      href="ManifestedJar-1nothing2nothingNoAppDesc.jnlp">
+   <information> 
+      <title>ManifestedJar-1nothing2nothingNoAppDesc</title> 
+      <vendor>IcedTea</vendor>
+      <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+      <description>testing jar with manin class in manifest. Hello from manifestedjar1 should be printed</description>
+   </information> 
+   <resources>
+      <jar href="ManifestedJar1.jar" />
+      <jar href="ManifestedJar2.jar" />
+   </resources>
+   <application-desc/>
+</jnlp> 
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/ManifestedJar1/srcs/META-INF/MANIFEST.MF
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/ManifestedJar1/srcs/META-INF/MANIFEST.MF	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/ManifestedJar1/srcs/META-INF/MANIFEST.MF	(revision 416)
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Main-Class: ManifestedJar1
+
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/ManifestedJar1/srcs/ManifestedJar1.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/ManifestedJar1/srcs/ManifestedJar1.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/ManifestedJar1/srcs/ManifestedJar1.java	(revision 416)
@@ -0,0 +1,45 @@
+/* AllStackTraces.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.
+ */
+
+public class ManifestedJar1 {
+    public static void main(String[] args) {
+            hello1();          
+    }
+    public static void hello1() {
+            System.out.println("Hello from ManifestedJar1");
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/ManifestedJar1/testcases/ManifestedJar1Test.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/ManifestedJar1/testcases/ManifestedJar1Test.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/ManifestedJar1/testcases/ManifestedJar1Test.java	(revision 416)
@@ -0,0 +1,217 @@
+/* ManifestedJar1Test.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.ServerAccess;
+import net.sourceforge.jnlp.annotations.Bug;
+import org.junit.Assert;
+
+import org.junit.Test;
+
+@Bug(id="http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2012-February/017435.html")
+public class ManifestedJar1Test {
+
+    private static ServerAccess server = new ServerAccess();
+    private static final String nonLunchableMessage = "net.sourceforge.jnlp.LaunchException: Fatal: Application Error: Not a launchable JNLP file. File must be a JNLP application, applet, or installer type.";
+    //actually this on eis never printed as stderr will not recieve this message in headless mode :(
+    private static final String twoMainException = "net.sourceforge.jnlp.ParseException: Invalid XML document syntax";
+
+    private void assertManifestedJar1(String id, ServerAccess.ProcessResult q) {
+        String s = "Hello from ManifestedJar1";
+        Assert.assertTrue(id + " stdout should contains `" + s + "`, but didn't ", q.stdout.contains(s));
+    }
+
+    private void assertManifestedJar2(String id, ServerAccess.ProcessResult q) {
+        String s = "Hello from ManifestedJar2";
+        Assert.assertTrue(id + " stdout should contains `" + s + "`, but didn't ", q.stdout.contains(s));
+    }
+
+    private void assertNotManifestedJar1(String id, ServerAccess.ProcessResult q) {
+        String s = "Hello from ManifestedJar1";
+        Assert.assertFalse(id + " stdout should NOT contains `" + s + "`, but didn ", q.stdout.contains(s));
+    }
+    private void assertAppError(String id, ServerAccess.ProcessResult q) {
+        Assert.assertTrue(id + " stderr should contains `" + nonLunchableMessage + "`, but didnn't ", q.stderr.contains(nonLunchableMessage));
+    }
+
+    private void assertNotManifestedJar2(String id, ServerAccess.ProcessResult q) {
+        String s = "Hello from ManifestedJar2";
+        Assert.assertFalse(id + " stdout should NOT contains `" + s + "`, but didn ", q.stdout.contains(s));
+    }
+
+    private void assertNotDead(String id, ServerAccess.ProcessResult pr) {
+        String cc = "ClassNotFoundException";
+        Assert.assertFalse(id + " stderr should NOT contains `" + cc + "`, but did", pr.stderr.contains(cc));
+        Assert.assertFalse(id + " should not be terminated, but was", pr.wasTerminated);
+        Assert.assertEquals((Integer) 0, pr.returnValue);
+    }
+
+    @Test
+    /**
+     * if two jars with manifest specified, none is main and no main class, then first one is loaded
+     */
+    public void manifestedJar1nothing2nothingNoAppDesc() throws Exception {
+        String id = "ManifestedJar-1nothing2nothingNoAppDesc";
+        ServerAccess.ProcessResult pr = server.executeJavawsHeadless(null, "/" + id + ".jnlp");
+        assertManifestedJar1(id, pr);
+        assertNotDead(id, pr);
+    }
+
+    /**
+     *if one jar with manifest, is not main,  and no main class then is lunched
+     *
+     */
+    @Test
+    public void manifestedJar1noAppDesc() throws Exception {
+        String id = "ManifestedJar-1noAppDesc";
+        ServerAccess.ProcessResult pr = server.executeJavawsHeadless(null, "/" + id + ".jnlp");
+        assertManifestedJar1(id, pr);
+        assertNotDead(id, pr);
+    }
+
+    /**
+     *if one jar with manifest, but not marked as main and no main class then is lunched
+     *
+     */
+    @Test
+    public void manifestedJar1mainNoAppDesc() throws Exception {
+        String id = "ManifestedJar-1mainNoAppDesc";
+        ServerAccess.ProcessResult pr = server.executeJavawsHeadless(null, "/" + id + ".jnlp");
+        assertManifestedJar1(id, pr);
+        assertNotDead(id, pr);
+    }
+
+    /**
+     *if one jar with manifest, marked as main and no main class then is lunched
+     *
+     */
+    @Test
+    public void ManifestedJar1mainHaveAppDesc() throws Exception {
+        String id = "ManifestedJar-1mainHaveAppDesc";
+        ServerAccess.ProcessResult pr = server.executeJavawsHeadless(null, "/" + id + ".jnlp");
+        assertManifestedJar2(id, pr);
+        assertNotDead(id, pr);
+    }
+
+    /**
+     *
+     * Two jars, both with manifest, First is main, but specified mainclass belongs  to second one, then second one should be lunched
+     */
+    @Test
+    public void ManifestedJar1main2nothingNoAppDesc() throws Exception {
+        String id = "ManifestedJar-1main2nothingNoAppDesc";
+        ServerAccess.ProcessResult pr = server.executeJavawsHeadless(null, "/" + id + ".jnlp");
+        assertManifestedJar2(id, pr);
+        assertNotDead(id, pr);
+    }
+
+    /**
+     *
+     * Two jars, both with manifest, seconds is main, no mainclass, then the one marked as main is lunched
+     */
+    @Test
+    public void manifestedJar1main2nothingNoAppDesc() throws Exception {
+        String id = "ManifestedJar-1main2nothingNoAppDesc";
+        ServerAccess.ProcessResult pr = server.executeJavawsHeadless(null, "/" + id + ".jnlp");
+        assertManifestedJar2(id, pr);
+        assertNotDead(id, pr);
+    }
+
+    /**
+     *
+     * Two jars, both with manifest, sboth with main tag, no app desc
+     *
+     * thisis passing, SUSPICIOUS, but to lunch at least something is better then to lunch nothing at all.
+     * althoug it maybe SHOULD throw twoMainException
+     */
+    @Test
+    public void manifestedJar1main2mainNoAppDesc() throws Exception {
+        String id = "ManifestedJar-1main2mainNoAppDesc";
+        ServerAccess.ProcessResult pr = server.executeJavawsHeadless(null, "/" + id + ".jnlp");
+        assertManifestedJar1(id, pr);
+        assertNotDead(id, pr);
+    }
+
+    /**
+     *
+     * Two jars, both with manifest, sboth with main tag, have app desc
+     *
+     * corectly failing with twoMainException
+     */
+    @Test
+    public void manifestedJar1main2mainAppDesc() throws Exception {
+        String id = "ManifestedJar-1main2mainAppDesc";
+        ServerAccess.ProcessResult pr = server.executeJavawsHeadless(null, "/" + id + ".jnlp");
+        assertNotManifestedJar1(id, pr);
+        assertNotManifestedJar2(id, pr);
+        assertNotDead(id, pr);
+    }
+
+    /**
+     *
+     * Two jars, both with manifest, sboth with main tag, have app desc
+     *
+     * corectly failing
+     */
+    @Test
+    public void manifestedJar1noAppDescAtAll() throws Exception {
+        String id = "ManifestedJar-1noAppDescAtAll";
+        ServerAccess.ProcessResult pr = server.executeJavawsHeadless(null, "/" + id + ".jnlp");
+        assertNotManifestedJar1(id, pr);
+        assertNotManifestedJar2(id, pr);
+        assertAppError(id, pr);
+        assertNotDead(id, pr);
+    }
+
+
+
+    /**
+     *
+     * Two jars, both with manifest, non with main tag, have app desc
+     * 
+     * this jnlp is NOT lunched, twoMainException thrown - ok
+     *
+     */
+    @Test
+    public void manifestedJar1nothing2nothingAppDesc() throws Exception {
+        String id = "ManifestedJar-1nothing2nothingAppDesc";
+        ServerAccess.ProcessResult pr = server.executeJavawsHeadless(null, "/" + id + ".jnlp");
+        assertNotManifestedJar2(id, pr);
+        assertNotManifestedJar1(id, pr);
+        assertNotDead(id, pr);
+    }
+
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/ManifestedJar2/srcs/META-INF/MANIFEST.MF
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/ManifestedJar2/srcs/META-INF/MANIFEST.MF	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/ManifestedJar2/srcs/META-INF/MANIFEST.MF	(revision 416)
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Main-Class: ManifestedJar2
+
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/ManifestedJar2/srcs/ManifestedJar2.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/ManifestedJar2/srcs/ManifestedJar2.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/ManifestedJar2/srcs/ManifestedJar2.java	(revision 416)
@@ -0,0 +1,45 @@
+/* AllStackTraces.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.
+ */
+
+public class ManifestedJar2 {
+    public static void main(String[] args) {
+            hello2();          
+    }
+    public static void hello2() {
+            System.out.println("Hello from ManifestedJar2");
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/ReadEnvironment/resources/ReadEnvironment.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/ReadEnvironment/resources/ReadEnvironment.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/ReadEnvironment/resources/ReadEnvironment.jnlp	(revision 416)
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="utf-8"?> 
+
+<!--
+
+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.
+ -->
+
+<jnlp spec="1.0"
+      codebase="./"
+      href="ReadEnvironment.jnlp">
+    <information>
+        <title>ReadEnvironment using System.getenv()</title>
+        <vendor>IcedTea</vendor>
+    </information>
+    <resources>
+        <jar href="ReadEnvironment.jar" main="true" />
+    </resources>
+    <application-desc main-class="ReadEnvironment"/>
+</jnlp> 
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/ReadEnvironment/srcs/ReadEnvironment.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/ReadEnvironment/srcs/ReadEnvironment.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/ReadEnvironment/srcs/ReadEnvironment.java	(revision 416)
@@ -0,0 +1,44 @@
+/* ReadEnvironment.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.
+ */
+
+public class ReadEnvironment {
+    public static void main(String[] args) {
+
+            System.getenv("USER");
+
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/ReadEnvironment/testcases/ReadEnvironmentTest.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/ReadEnvironment/testcases/ReadEnvironmentTest.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/ReadEnvironment/testcases/ReadEnvironmentTest.java	(revision 416)
@@ -0,0 +1,58 @@
+/* ReadEnvironmentTest.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.ServerAccess;
+import org.junit.Assert;
+
+import org.junit.Test;
+
+public class ReadEnvironmentTest {
+
+    private static ServerAccess server = new ServerAccess();
+
+    @Test
+    public void ReadEnvironmentLunch1() throws Exception {
+        ServerAccess.ProcessResult pr = server.executeJavawsHeadless(null, "/ReadEnvironment.jnlp");
+        String s = "(?s).*java.security.AccessControlException.{0,5}access denied.{0,5}java.lang.RuntimePermission.{0,5}" + "getenv.USER" + ".*";
+        Assert.assertTrue("stderr should match"+s+"but didn't",pr.stderr.matches(s));
+        String cc="ClassNotFoundException";
+        Assert.assertFalse("stderr should NOT contains `"+cc+"`, but did",pr.stderr.contains(cc));
+        Assert.assertFalse("stdout length should be <=2, but was "+pr.stdout.length(),pr.stdout.length()>2);
+        Assert.assertFalse("ReadEnvironmentLunch1 should not be terminated, but was",pr.wasTerminated);
+        Assert.assertEquals((Integer) 0, pr.returnValue);
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/ReadProperties/resources/ReadProperties1.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/ReadProperties/resources/ReadProperties1.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/ReadProperties/resources/ReadProperties1.jnlp	(revision 416)
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="utf-8"?> 
+
+<!--
+
+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.
+ -->
+
+<jnlp spec="1.0"
+      codebase="./"
+      href="ReadProperties1.jnlp">
+    <information>
+        <title>read properties using System.getenv()</title>
+        <vendor>IcedTea</vendor>
+    </information>
+    <resources>
+        <jar href="ReadProperties.jar" main="true"/>
+    </resources>
+    <application-desc main-class="ReadProperties">
+      <argument>user.name</argument>
+    </application-desc>
+
+
+</jnlp> 
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/ReadProperties/resources/ReadProperties2.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/ReadProperties/resources/ReadProperties2.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/ReadProperties/resources/ReadProperties2.jnlp	(revision 416)
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="utf-8"?> 
+
+<!--
+
+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.
+ -->
+
+<jnlp spec="1.0"
+      codebase="./"
+      href="ReadProperties2.jnlp">
+    <information>
+        <title>read properties using System.getenv()</title>
+        <vendor>IcedTea</vendor>
+    </information>
+    <resources>
+        <jar href="ReadProperties.jar" main="true"/>
+    </resources>
+    <application-desc main-class="ReadProperties">
+      <argument>user.home</argument>
+    </application-desc>
+</jnlp> 
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/ReadProperties/srcs/ReadProperties.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/ReadProperties/srcs/ReadProperties.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/ReadProperties/srcs/ReadProperties.java	(revision 416)
@@ -0,0 +1,45 @@
+/* ReadProperties.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.
+ */
+public class ReadProperties {
+
+/**
+*some system property is expected as arg[0], eg user.name or user.home
+*/    
+    public static void main(String[] args) {
+         System.out.println(System.getProperty(args[0]));
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/ReadProperties/testcases/ReadPropertiesTest.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/ReadProperties/testcases/ReadPropertiesTest.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/ReadProperties/testcases/ReadPropertiesTest.java	(revision 416)
@@ -0,0 +1,71 @@
+/* ReadPropertiesTest.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.ServerAccess;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class ReadPropertiesTest {
+
+    private static ServerAccess server = new ServerAccess();
+
+ 
+    @Test
+    public void ReadPropertiesLunch1() throws Exception {
+        ServerAccess.ProcessResult pr=server.executeJavawsHeadless(null,"/ReadProperties1.jnlp");
+        String s = "(?s).*java.security.AccessControlException.{0,5}access denied.{0,5}java.util.PropertyPermission.{0,5}" + "user.name.{0,5}read" + ".*";
+        Assert.assertTrue("stderr should match "+s+" but didn't",pr.stderr.matches(s));
+        String cc="ClassNotFoundException";
+        Assert.assertFalse("stderr should NOT contains `"+cc+"`, but did",pr.stderr.contains(cc));
+        Assert.assertFalse("stdout length should be <=2, but was "+pr.stdout.length(),pr.stdout.length()>2);
+        Assert.assertFalse("ReadPropertiesLunch1 should not be terminated, but was",pr.wasTerminated);
+        Assert.assertEquals((Integer)0, pr.returnValue);
+    }
+
+    @Test
+    public void ReadPropertiesLunch2() throws Exception {
+        ServerAccess.ProcessResult pr=server.executeJavawsHeadless(null,"/ReadProperties2.jnlp");
+        String s = "(?s).*java.security.AccessControlException.{0,5}access denied.{0,5}java.util.PropertyPermission.{0,5}" + "user.home.{0,5}read" + ".*";
+        Assert.assertTrue("stderr should match "+s+" but didn't",pr.stderr.matches(s));
+        String cc="ClassNotFoundException";
+        Assert.assertFalse("stderr should NOT contains `"+cc+"`, but did",pr.stderr.contains(cc));
+        Assert.assertFalse("stdout length should be <=2, but was "+pr.stdout.length(),pr.stdout.length()>2);
+        Assert.assertFalse("ReadPropertiesLunch2 should not be terminated, but was",pr.wasTerminated);
+        Assert.assertEquals((Integer)0, pr.returnValue);
+    }
+  }
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/RedirectStreams/resources/RedirectStreams.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/RedirectStreams/resources/RedirectStreams.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/RedirectStreams/resources/RedirectStreams.jnlp	(revision 416)
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="utf-8"?> 
+
+<!--
+
+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.
+ -->
+
+<jnlp spec="1.0"
+      codebase="./"
+      href="RedirectStreams.jnlp">
+    <information>
+        <title>redirect stdin/stdout streams</title>
+        <vendor>IcedTea</vendor>
+    </information>
+    <resources>
+        <jar href="RedirectStreams.jar" main="true"/>
+    </resources>
+    <application-desc main-class="RedirectStreams"/>
+</jnlp> 
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/RedirectStreams/srcs/RedirectStreams.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/RedirectStreams/srcs/RedirectStreams.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/RedirectStreams/srcs/RedirectStreams.java	(revision 416)
@@ -0,0 +1,44 @@
+/* RedirectStreams.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.io.StringBufferInputStream;
+
+public class RedirectStreams {
+    public static void main(String[] args) {
+            System.setIn(new StringBufferInputStream("TEST"));
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/RedirectStreams/testcases/RedirectStreamsTest.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/RedirectStreams/testcases/RedirectStreamsTest.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/RedirectStreams/testcases/RedirectStreamsTest.java	(revision 416)
@@ -0,0 +1,57 @@
+/* RedirectStreamsTest.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.ServerAccess;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class RedirectStreamsTest {
+
+    private static ServerAccess server = new ServerAccess();
+
+    @Test
+    public void RedirectStreamsTest1() throws Exception {
+        ServerAccess.ProcessResult pr = server.executeJavawsHeadless(null, "/RedirectStreams.jnlp");
+        String s = "(?s).*java.security.AccessControlException.{0,5}access denied.{0,5}java.lang.RuntimePermission.{0,5}" + "setIO" + ".*";
+        Assert.assertTrue("Stderr should match "+s+" but didn't",pr.stderr.matches(s));
+        String cc="ClassNotFoundException";
+        Assert.assertFalse("stderr should NOT contains `"+cc+"`, but did",pr.stderr.contains(cc));
+        Assert.assertFalse("stdout length should be <=2, but was "+pr.stdout.length(),pr.stdout.length()>2);
+        Assert.assertFalse("RedirectStreams should not be terminated, but was",pr.wasTerminated);
+        Assert.assertEquals((Integer) 0, pr.returnValue);
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/ReplaceSecurityManager/resources/ReplaceSecurityManager.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/ReplaceSecurityManager/resources/ReplaceSecurityManager.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/ReplaceSecurityManager/resources/ReplaceSecurityManager.jnlp	(revision 416)
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+
+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.
+ -->
+
+<jnlp spec="1.0"
+      codebase="./"
+      href="ReplaceSecurityManager.jnlp">
+   <information> 
+      <title>Test replacing security manager</title> 
+      <vendor>IcedTea</vendor>
+   </information> 
+   <resources>
+      <jar href="ReplaceSecurityManager.jar" main="true"/>
+   </resources>
+   <application-desc main-class="ReplaceSecurityManager"/>
+</jnlp> 
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/ReplaceSecurityManager/srcs/ReplaceSecurityManager.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/ReplaceSecurityManager/srcs/ReplaceSecurityManager.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/ReplaceSecurityManager/srcs/ReplaceSecurityManager.java	(revision 416)
@@ -0,0 +1,43 @@
+/* ReplaceSecurityManager.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.
+ */
+public class ReplaceSecurityManager {
+    public static void main(String[] args) throws Exception{
+     
+            System.setSecurityManager(null);
+         
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/ReplaceSecurityManager/testcases/ReplaceSecurityManagerTest.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/ReplaceSecurityManager/testcases/ReplaceSecurityManagerTest.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/ReplaceSecurityManager/testcases/ReplaceSecurityManagerTest.java	(revision 416)
@@ -0,0 +1,57 @@
+/* ReplaceSecurityManagerTest.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.ServerAccess;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class ReplaceSecurityManagerTest {
+
+    private static ServerAccess server = new ServerAccess();
+
+    @Test
+    public void ReplaceSecurityManagerLunch1() throws Exception {
+        ServerAccess.ProcessResult pr = server.executeJavawsHeadless(null, "/ReplaceSecurityManager.jnlp");
+        String s = "(?s).*java.security.AccessControlException.{0,5}access denied.{0,5}java.lang.RuntimePermission.{0,5}" + "setSecurityManager" + ".*";
+        Assert.assertTrue("stderr should match "+s+" but didn't",pr.stderr.matches(s));
+        String cc="ClassNotFoundException";
+        Assert.assertFalse("stderr should NOT contains `"+cc+"`, but did",pr.stderr.contains(cc));
+        Assert.assertFalse("stdout length should be <=2, but was "+pr.stdout.length(),pr.stdout.length()>2);
+        Assert.assertFalse("ReplaceSecurityManagerLunch1 should not be terminated, but was",pr.wasTerminated);
+        Assert.assertEquals((Integer) 0, pr.returnValue);
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/SetContextClassLoader/resources/SetContextClassLoader.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/SetContextClassLoader/resources/SetContextClassLoader.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/SetContextClassLoader/resources/SetContextClassLoader.jnlp	(revision 416)
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="utf-8"?> 
+
+<!--
+
+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.
+ -->
+
+<jnlp spec="1.0"
+      codebase="./"
+      href="SetContextClassLoader.jnlp">
+    <information>
+        <title>set context classloader</title>
+        <vendor>IcedTea</vendor>
+    </information>
+    <resources>
+        <jar href="SetContextClassLoader.jar" main="true" download="eager"/>
+    </resources>
+    <application-desc main-class="SetContextClassLoader"/>
+</jnlp> 
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/SetContextClassLoader/srcs/SetContextClassLoader.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/SetContextClassLoader/srcs/SetContextClassLoader.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/SetContextClassLoader/srcs/SetContextClassLoader.java	(revision 416)
@@ -0,0 +1,44 @@
+/* SetContextClassLoader.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.
+ */
+
+public class SetContextClassLoader {
+    public static void main(String[] args) throws Exception{
+
+            Thread.currentThread().setContextClassLoader(null);
+      
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/SetContextClassLoader/testcases/SetContextClassLoaderTest.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/SetContextClassLoader/testcases/SetContextClassLoaderTest.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/SetContextClassLoader/testcases/SetContextClassLoaderTest.java	(revision 416)
@@ -0,0 +1,57 @@
+/* SetContextClassLoaderTest.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.ServerAccess;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class SetContextClassLoaderTest {
+
+    private static ServerAccess server = new ServerAccess();
+
+    @Test
+    public void SetContextClassLoader1() throws Exception {
+        ServerAccess.ProcessResult pr = server.executeJavawsHeadless(null, "/SetContextClassLoader.jnlp");
+        String s = "(?s).*java.security.AccessControlException.{0,5}access denied.{0,5}java.lang.RuntimePermission.{0,5}" + "setContextClassLoader" + ".*";
+        Assert.assertTrue("stderr should match "+s+" but didn't",pr.stderr.matches(s));
+        String cc="ClassNotFoundException";
+        Assert.assertFalse("stderr should NOT contains `"+cc+"`, but did",pr.stderr.contains(cc));
+        Assert.assertFalse("stdout length should be <=2, but was "+pr.stdout.length(),pr.stdout.length()>2);
+        Assert.assertFalse("SetContextClassLoader1 should not be terminated, but was",pr.wasTerminated);
+        Assert.assertEquals((Integer) 0, pr.returnValue);
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/Spaces can be everywhere/resources/NotOnly spaces can kill ěščřž too.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/Spaces can be everywhere/resources/NotOnly spaces can kill ěščřž too.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/Spaces can be everywhere/resources/NotOnly spaces can kill ěščřž too.jnlp	(revision 416)
@@ -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.
+
+ -->
+<?xml version="1.0" encoding="utf-8"?>
+<jnlp spec="1.0" href="NotOnly spaces can kill ÄÅ¡ÄÅÅŸ too.jnlp" codebase=".">
+    <information>
+        <title>Spaces can be everywhere test with few more chars for encoding</title>
+        <vendor>IcedTea</vendor>
+        <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+        <description>AppletTest</description>
+        <offline/>
+    </information>
+    <resources>
+        <j2se version="1.4+"/>
+        <jar href="Spaces can be everywhere.jar"/>
+    </resources>
+    <applet-desc
+      documentBase="."
+      name="SpacesCanBeEverywhere"
+      main-class="SpacesCanBeEverywhere"
+      width="100"
+      height="100">
+    </applet-desc>
+</jnlp>
+
+
+</applet-desc>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/Spaces can be everywhere/resources/Spaces can be everywhere1.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/Spaces can be everywhere/resources/Spaces can be everywhere1.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/Spaces can be everywhere/resources/Spaces can be everywhere1.jnlp	(revision 416)
@@ -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="Spaces can be everywhere1.jnlp" codebase=".">
+  <information>
+    <title>Spaces can be everywhere1</title>
+    <vendor>IcedTea</vendor>
+    <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+    <description>Spaces can be everywhere1</description>
+    <offline/>
+  </information>
+  <resources>
+    <j2se version="1.4+"/>
+    <jar href="simpletest1.jar"/>
+  </resources>
+  <application-desc main-class="SimpleTest1">
+  </application-desc>
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/Spaces can be everywhere/resources/Spaces can be everywhere2.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/Spaces can be everywhere/resources/Spaces can be everywhere2.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/Spaces can be everywhere/resources/Spaces can be everywhere2.jnlp	(revision 416)
@@ -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="Spaces can be everywhere2.jnlp" codebase=".">
+  <information>
+    <title>Spaces can be everywhere2</title>
+    <vendor>IcedTea</vendor>
+    <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+    <description>Spaces can be everywhere2</description>
+    <offline/>
+  </information>
+  <resources>
+    <j2se version="1.4+"/>
+    <jar href="Spaces can be everywhere.jar"/>
+  </resources>
+  <application-desc main-class="SpacesCanBeEverywhere">
+  </application-desc>
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/Spaces can be everywhere/resources/SpacesCanBeEverywhere1.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/Spaces can be everywhere/resources/SpacesCanBeEverywhere1.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/Spaces can be everywhere/resources/SpacesCanBeEverywhere1.jnlp	(revision 416)
@@ -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="SpacesCanBeEverywhere1.jnlp" codebase=".">
+  <information>
+    <title>simpletest1</title>
+    <vendor>IcedTea</vendor>
+    <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+    <description>simpletest1</description>
+    <offline/>
+  </information>
+  <resources>
+    <j2se version="1.4+"/>
+    <jar href="Spaces can be everywhere.jar"/>
+  </resources>
+  <application-desc main-class="SpacesCanBeEverywhere">
+  </application-desc>
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/Spaces can be everywhere/resources/spaces applet Tests.html
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/Spaces can be everywhere/resources/spaces applet Tests.html	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/Spaces can be everywhere/resources/spaces applet Tests.html	(revision 416)
@@ -0,0 +1,42 @@
+<!--
+
+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 bgcolor="blue">
+<p><applet code="SpacesCanBeEverywhere.class" archive="Spaces can be everywhere.jar" codebase="." width=800 height=600>
+</applet></p>
+</body>
+</html>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/Spaces can be everywhere/srcs/SpacesCanBeEverywhere.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/Spaces can be everywhere/srcs/SpacesCanBeEverywhere.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/Spaces can be everywhere/srcs/SpacesCanBeEverywhere.java	(revision 416)
@@ -0,0 +1,76 @@
+
+import java.applet.Applet;
+
+/* SpacesCanBeEverywhere.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.
+ */
+
+public class SpacesCanBeEverywhere extends Applet{
+
+    public static void main(String[] args){
+        System.out.println("Spaces can be everywhere.jsr was launched correctly");
+    }
+
+     private class Killer extends Thread {
+
+        public int n = 2000;
+
+        @Override
+        public void run() {
+            try {
+                Thread.sleep(n);
+                System.out.println("Applet killing himself after " + n + " ms of life");
+                System.exit(0);
+            } catch (Exception ex) {
+            }
+        }
+    }
+    private Killer killer;
+
+    @Override
+    public void init() {
+        killer = new Killer();
+    }
+
+    @Override
+    public void start() {
+        main(null);
+        killer.start();
+        System.out.println("killer was started");
+    }
+
+  
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/Spaces can be everywhere/testcases/SpacesCanBeEverywhereTests.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/Spaces can be everywhere/testcases/SpacesCanBeEverywhereTests.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/Spaces can be everywhere/testcases/SpacesCanBeEverywhereTests.java	(revision 416)
@@ -0,0 +1,244 @@
+/* SpacesCanBeEverywhereTests.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.util.ArrayList;
+import java.util.List;
+import net.sourceforge.jnlp.ServerAccess;
+import net.sourceforge.jnlp.annotations.Bug;
+import net.sourceforge.jnlp.annotations.NeedsDisplay;
+import net.sourceforge.jnlp.browsertesting.BrowserTest;
+import net.sourceforge.jnlp.browsertesting.Browsers;
+import net.sourceforge.jnlp.annotations.TestInBrowsers;
+import org.junit.Assert;
+import org.junit.Test;
+
+@Bug(id={"http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2011-October/016127.html","PR804","PR811"})
+public class SpacesCanBeEverywhereTests extends BrowserTest {
+
+
+    @Bug(id="PR811")
+    @Test
+    @NeedsDisplay
+    public void SpacesCanBeEverywhereLocalAppletTestsJnlp2() throws Exception {
+        List<String> commands=new ArrayList<String>(1);
+        commands.add(server.getJavawsLocation());
+        commands.add(server.getDir()+"/NotOnly spaces can kill ÄÅ¡ÄÅÅŸ too.jnlp");
+        /*                                         Change of dir is cousing the Exception bellow
+         * ServerAccess.ProcessResult pr =  ServerAccess.executeProcess(commands,server.getDir());
+         * No X11 DISPLAY variable was set, but this program performed an operation which requires it.
+         * at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:173)
+         * at java.awt.Window.<init>(Window.java:476)
+         * at java.awt.Frame.<init>(Frame.java:419)
+         * at java.awt.Frame.<init>(Frame.java:384)
+         * at javax.swing.SwingUtilities$SharedOwnerFrame.<init>(SwingUtilities.java:1754)
+         * at javax.swing.SwingUtilities.getSharedOwnerFrame(SwingUtilities.java:1831)
+         * at javax.swing.JWindow.<init>(JWindow.java:185)
+         * at javax.swing.JWindow.<init>(JWindow.java:137)
+         * at net.sourceforge.jnlp.runtime.JNLPSecurityManager.<init>(JNLPSecurityManager.java:121)
+         * at net.sourceforge.jnlp.runtime.JNLPRuntime.initialize(JNLPRuntime.java:202)
+         * at net.sourceforge.jnlp.runtime.Boot.run(Boot.java:177)
+         * at net.sourceforge.jnlp.runtime.Boot.run(Boot.java:51)
+         * at java.security.AccessController.doPrivileged(Native Method)
+         * at net.sourceforge.jnlp.runtime.Boot.main(Boot.java:168)
+         *
+         * Thats why there is absolute path to the file.
+         *
+         * This is also why SpacesCanBeEverywhereLocalTests1Signed is passing -
+         * it is in headless mode. This can be considered as bug, but because it is
+         * only on ocal files, and probably only from test run - it can be ignored
+         */
+        ServerAccess.ProcessResult pr =  ServerAccess.executeProcess(commands);
+        String s="Spaces can be everywhere.jsr was launched correctly";
+        Assert.assertTrue("stdout should contains `"+s+"`, but did not",pr.stdout.contains(s));
+        String cc = "xception";
+        Assert.assertFalse("stderr should NOT contains `" + cc + "`, but did", pr.stderr.contains(cc));
+        Assert.assertFalse("should not be terminated, but was", pr.wasTerminated);
+        Assert.assertEquals((Integer) 0, pr.returnValue);
+    }
+
+    @Bug(id="PR811")
+    @Test
+    @NeedsDisplay
+    public void SpacesCanBeEverywhereRemoteAppletTestsJnlp2() throws Exception {
+        ServerAccess.ProcessResult pr = server.executeJavaws("/NotOnly%20spaces%20can%20kill%20%C4%9B%C5%A1%C4%8D%C5%99%C5%BE%20too.jnlp");
+        String s="Spaces can be everywhere.jsr was launched correctly";
+        Assert.assertTrue("stdout should contains `"+s+"`, but did not",pr.stdout.contains(s));
+        String cc = "xception";
+        Assert.assertFalse("stderr should NOT contains `" + cc + "`, but did", pr.stderr.contains(cc));
+        Assert.assertFalse("should NOT be terminated, but was not", pr.wasTerminated);
+    }
+
+    @Bug(id="PR811")
+    @Test
+    @NeedsDisplay
+    @TestInBrowsers(testIn = {Browsers.all})
+    public void SpacesCanBeEverywhereRemoteAppletTestsHtml2() throws Exception {
+        ServerAccess.ProcessResult pr = server.executeBrowser("/spaces+applet+Tests.html");
+        String s="Spaces can be everywhere.jsr was launched correctly";
+        Assert.assertTrue("stdout should contains `"+s+"`, but did not",pr.stdout.contains(s));
+        String cc = "xception";
+        Assert.assertFalse("stderr should NOT contains `" + cc + "`, but did", pr.stderr.contains(cc));
+        Assert.assertTrue("should be terminated, but was not", pr.wasTerminated);
+    }
+
+
+    @Bug(id={"PR811","http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2011-October/016144.html"})
+    @Test
+    public void SpacesCanBeEverywhereRemoteTests1() throws Exception {
+        ServerAccess.ProcessResult pr = server.executeJavawsHeadless(null, "/Spaces%20can%20be%20everywhere1.jnlp");
+        String s = "Good simple javaws exapmle";
+        Assert.assertTrue("stdout should contains `" + s + "`, but did not", pr.stdout.contains(s));
+        String cc = "ClassNotFoundException";
+        Assert.assertFalse("stderr should NOT contains `" + cc + "`, but did", pr.stderr.contains(cc));
+        Assert.assertFalse("should not be terminated, but was", pr.wasTerminated);
+        Assert.assertEquals((Integer) 0, pr.returnValue);
+    }
+
+    @Bug(id="PR811")
+    @Test
+    public void SpacesCanBeEverywhereRemoteTests2() throws Exception {
+        ServerAccess.ProcessResult pr = server.executeJavawsHeadless(null, "/Spaces%20can%20be%20everywhere2.jnlp");
+        String s="Spaces can be everywhere.jsr was launched correctly";
+        Assert.assertTrue("stdout should contains `"+s+"`, but did not",pr.stdout.contains(s));
+        String cc = "ClassNotFoundException";
+        Assert.assertFalse("stderr should NOT contains `" + cc + "`, but did", pr.stderr.contains(cc));
+        Assert.assertFalse("should not be terminated, but was", pr.wasTerminated);
+        Assert.assertEquals((Integer) 0, pr.returnValue);
+    }
+
+    @Bug(id="PR811")
+    @Test
+    public void SpacesCanBeEverywhereRemoteTests2_withQuery1() throws Exception {
+        ServerAccess.ProcessResult pr = server.executeJavawsHeadless(null, "/Spaces%20can%20be%20everywhere2.jnlp?test=10");
+        String s="Spaces can be everywhere.jsr was launched correctly";
+        Assert.assertTrue("stdout should contains `"+s+"`, but did not",pr.stdout.contains(s));
+        String cc = "ClassNotFoundException";
+        Assert.assertFalse("stderr should NOT contains `" + cc + "`, but did", pr.stderr.contains(cc));
+        Assert.assertFalse("should not be terminated, but was", pr.wasTerminated);
+        Assert.assertEquals((Integer) 0, pr.returnValue);
+    }
+
+
+    @Bug(id="PR811")
+    @Test
+    public void SpacesCanBeEverywhereRemoteTests2_withQuery2() throws Exception {
+        ServerAccess.ProcessResult pr = server.executeJavawsHeadless(null, "/Spaces%20can%20be%20everywhere2.jnlp?test%3D10");
+        String s="Spaces can be everywhere.jsr was launched correctly";
+        Assert.assertTrue("stdout should contains `"+s+"`, but did not",pr.stdout.contains(s));
+        String cc = "ClassNotFoundException";
+        Assert.assertFalse("stderr should NOT contains `" + cc + "`, but did", pr.stderr.contains(cc));
+        Assert.assertFalse("should not be terminated, but was", pr.wasTerminated);
+        Assert.assertEquals((Integer) 0, pr.returnValue);
+    }
+
+    @Bug(id="PR811")
+    @Test
+    public void SpacesCanBeEverywhereRemoteTests3() throws Exception {
+        ServerAccess.ProcessResult pr = server.executeJavawsHeadless(null, "/SpacesCanBeEverywhere1.jnlp");
+        String s="Spaces can be everywhere.jsr was launched correctly";
+        Assert.assertTrue("stdout should contains `"+s+"`, but did not",pr.stdout.contains(s));
+        String cc = "ClassNotFoundException";
+        Assert.assertFalse("stderr should NOT contains `" + cc + "`, but did", pr.stderr.contains(cc));
+        Assert.assertFalse("should not be terminated, but was", pr.wasTerminated);
+        Assert.assertEquals((Integer) 0, pr.returnValue);
+    }
+
+
+    @Bug(id="PR804")
+    @Test
+    public void SpacesCanBeEverywhereLocalTests1() throws Exception {
+        List<String> commands=new ArrayList<String>(4);
+        commands.add(server.getJavawsLocation());
+        commands.add(ServerAccess.HEADLES_OPTION);
+        commands.add("Spaces can be everywhere1.jnlp");
+        ServerAccess.ProcessResult pr = ServerAccess.executeProcess(commands,server.getDir());
+        String s = "Good simple javaws exapmle";
+        Assert.assertTrue("stdout should contains `" + s + "`, but did not", pr.stdout.contains(s));
+        String cc = "ClassNotFoundException";
+        Assert.assertFalse("stderr should NOT contains `" + cc + "`, but did", pr.stderr.contains(cc));
+        Assert.assertFalse("should not be terminated, but was", pr.wasTerminated);
+        Assert.assertEquals((Integer) 0, pr.returnValue);
+    }
+
+    @Bug(id="PR804")
+    @Test
+    public void SpacesCanBeEverywhereLocalTests2() throws Exception {
+        List<String> commands=new ArrayList<String>(4);
+        commands.add(server.getJavawsLocation());
+        commands.add(ServerAccess.HEADLES_OPTION);
+        commands.add("Spaces can be everywhere2.jnlp");
+        ServerAccess.ProcessResult pr = ServerAccess.executeProcess(commands,server.getDir());
+        String s="Spaces can be everywhere.jsr was launched correctly";
+        Assert.assertTrue("stdout should contains `"+s+"`, but did not",pr.stdout.contains(s));
+        String cc = "ClassNotFoundException";
+        Assert.assertFalse("stderr should NOT contains `" + cc + "`, but did", pr.stderr.contains(cc));
+        Assert.assertFalse("should not be terminated, but was", pr.wasTerminated);
+        Assert.assertEquals((Integer) 0, pr.returnValue);
+    }
+
+    @Bug(id="PR804")
+    @Test
+    public void SpacesCanBeEverywhereLocalTests4() throws Exception {
+        List<String> commands=new ArrayList<String>(4);
+        commands.add(server.getJavawsLocation());
+        commands.add(ServerAccess.HEADLES_OPTION);
+        commands.add(server.getDir()+"/Spaces can be everywhere2.jnlp");
+        ServerAccess.ProcessResult pr = ServerAccess.executeProcess(commands);
+        String s="Spaces can be everywhere.jsr was launched correctly";
+        Assert.assertTrue("stdout should contains `"+s+"`, but did not",pr.stdout.contains(s));
+        String cc = "ClassNotFoundException";
+        Assert.assertFalse("stderr should NOT contains `" + cc + "`, but did", pr.stderr.contains(cc));
+        Assert.assertFalse("should not be terminated, but was", pr.wasTerminated);
+        Assert.assertEquals((Integer) 0, pr.returnValue);
+    }
+
+    @Bug(id="PR804")
+    @Test
+    public void SpacesCanBeEverywhereLocalTests3() throws Exception {
+        List<String> commands=new ArrayList<String>(4);
+        commands.add(server.getJavawsLocation());
+        commands.add(ServerAccess.HEADLES_OPTION);
+        commands.add("SpacesCanBeEverywhere1.jnlp");
+        ServerAccess.ProcessResult pr = ServerAccess.executeProcess(commands,server.getDir());
+        String s="Spaces can be everywhere.jsr was launched correctly";
+        Assert.assertTrue("stdout should contains `"+s+"`, but did not",pr.stdout.contains(s));
+        String cc = "ClassNotFoundException";
+        Assert.assertFalse("stderr should NOT contains `" + cc + "`, but did", pr.stderr.contains(cc));
+        Assert.assertFalse("should not be terminated, but was", pr.wasTerminated);
+        Assert.assertEquals((Integer) 0, pr.returnValue);
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/UnsignedJnlpApplication/resources/UnsignedJnlpApplication1.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/UnsignedJnlpApplication/resources/UnsignedJnlpApplication1.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/UnsignedJnlpApplication/resources/UnsignedJnlpApplication1.jnlp	(revision 416)
@@ -0,0 +1,54 @@
+<!--
+
+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="UnsignedJnlpApplication1.jnlp" codebase=".">
+  <information>
+    <title>UnsignedJnlpApplication</title>
+    <vendor>IcedTea</vendor>
+    <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+    <description>UnsignedJnlpApplication</description>
+    <offline/>
+  </information>
+
+  <resources>
+    <j2se version="1.6+"/>
+    <jar href="UnsignedJnlpApplication.jar"/>
+  </resources>
+  <application-desc main-class="UnsignedJnlpApplication">
+  </application-desc>
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/UnsignedJnlpApplication/resources/UnsignedJnlpApplication2.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/UnsignedJnlpApplication/resources/UnsignedJnlpApplication2.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/UnsignedJnlpApplication/resources/UnsignedJnlpApplication2.jnlp	(revision 416)
@@ -0,0 +1,56 @@
+<!--
+
+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 'description' element in the launching JNLP file *
+****************************************
+ -->
+<?xml version="1.0" encoding="utf-8"?>
+<jnlp spec="1.0" href="UnsignedJnlpApplication1.jnlp" codebase=".">
+  <information>
+    <title>UnsignedJnlpApplication</title>
+    <vendor>IcedTea</vendor>
+    <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+    <offline/>
+  </information>
+
+  <resources>
+    <j2se version="1.6+"/>
+    <jar href="UnsignedJnlpApplication.jar"/>
+  </resources>
+  <application-desc main-class="UnsignedJnlpApplication">
+  </application-desc>
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/UnsignedJnlpApplication/resources/UnsignedJnlpApplication3.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/UnsignedJnlpApplication/resources/UnsignedJnlpApplication3.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/UnsignedJnlpApplication/resources/UnsignedJnlpApplication3.jnlp	(revision 416)
@@ -0,0 +1,57 @@
+<!--
+
+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.
+
+*****************************************************************
+* Using a different value of name within the 'title' element in the launching JNLP file *
+*****************************************************************
+ -->
+<?xml version="1.0" encoding="utf-8"?>
+<jnlp spec="1.0" href="UnsignedJnlpApplication1.jnlp" codebase=".">
+  <information>
+    <title>DIFFERENTJnlpApplicationNAME</title>
+    <vendor>IcedTea</vendor>
+    <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+    <description>UnsignedJnlpApplication</description>
+    <offline/>
+  </information>
+
+  <resources>
+    <j2se version="1.6+"/>
+    <jar href="UnsignedJnlpApplication.jar"/>
+  </resources>
+  <application-desc main-class="UnsignedJnlpApplication">
+  </application-desc>
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/UnsignedJnlpApplication/srcs/JNLP-INF/APPLICATION.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/UnsignedJnlpApplication/srcs/JNLP-INF/APPLICATION.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/UnsignedJnlpApplication/srcs/JNLP-INF/APPLICATION.jnlp	(revision 416)
@@ -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="UnsignedJnlpApplication1.jnlp" codebase=".">
+  <information>
+    <title>UnsignedJnlpApplication</title>
+    <vendor>IcedTea</vendor>
+    <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+    <description>UnsignedJnlpApplication</description>
+    <offline/>
+  </information>
+
+  <security>
+      <all-permissions/>
+  </security> 
+
+   <resources>
+        <property name="specialProperty" value="icedtea"/>
+   </resources>
+
+  <resources>
+    <j2se version="1.6+"/>
+    <jar href="UnsignedJnlpApplication.jar"/>
+  </resources>
+  <application-desc main-class="UnsignedJnlpApplication">
+  </application-desc>
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/UnsignedJnlpApplication/srcs/UnsignedJnlpApplication.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/UnsignedJnlpApplication/srcs/UnsignedJnlpApplication.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/UnsignedJnlpApplication/srcs/UnsignedJnlpApplication.java	(revision 416)
@@ -0,0 +1,43 @@
+/* UnsignedJnlpApplication.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 UnsignedJnlpApplication {
+
+    public static void main(String[] args) {
+        System.out.println("Running unsigned application in main");
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/UnsignedJnlpApplication/testcases/UnsignedJnlpApplicationTest.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/UnsignedJnlpApplication/testcases/UnsignedJnlpApplicationTest.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/UnsignedJnlpApplication/testcases/UnsignedJnlpApplicationTest.java	(revision 416)
@@ -0,0 +1,68 @@
+/* UnsignedJnlpApplicationTest.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 UnsignedJnlpApplicationTest {
+
+    private static ServerAccess server = new ServerAccess();
+    private final List<String> l = Collections.unmodifiableList(Arrays.asList(new String[] { "-Xtrustall" }));
+    private final String outputString = "Running unsigned application in main";
+
+    @Test
+    public void jnlpFileIsUnchecked1() throws Exception {
+        ServerAccess.ProcessResult pr = server.executeJavawsHeadless(l, "/UnsignedJnlpApplication1.jnlp");
+        Assert.assertTrue("Stdout should contains " + outputString + " but did not", pr.stdout.contains(outputString));
+    }
+
+    @Test
+    public void jnlpFileIsUnchecked2() throws Exception {
+        ServerAccess.ProcessResult pr = server.executeJavawsHeadless(l, "/UnsignedJnlpApplication2.jnlp");
+        Assert.assertTrue("Stdout should contains " + outputString + " but did not", pr.stdout.contains(outputString));
+    }
+
+    @Test
+    public void jnlpFileIsUnchecked3() throws Exception {
+        ServerAccess.ProcessResult pr = server.executeJavawsHeadless(l, "/UnsignedJnlpApplication3.jnlp");
+        Assert.assertTrue("Stdout should contains " + outputString + " but did not", pr.stdout.contains(outputString));
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/UnsignedJnlpTemplate/resources/UnsignedJnlpTemplate1.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/UnsignedJnlpTemplate/resources/UnsignedJnlpTemplate1.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/UnsignedJnlpTemplate/resources/UnsignedJnlpTemplate1.jnlp	(revision 416)
@@ -0,0 +1,54 @@
+<!--
+
+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="UnsignedJnlpTemplate1.jnlp" codebase=".">
+  <information>
+    <title>UnsignedJnlpTemplate</title>
+    <vendor>IcedTea</vendor>
+    <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+    <description>UnsignedJnlpTemplate</description>
+    <offline/>
+  </information>
+
+  <resources>
+    <j2se version="1.6+"/>
+    <jar href="UnsignedJnlpTemplate.jar"/>
+  </resources>
+  <application-desc main-class="UnsignedJnlpTemplate">
+  </application-desc>
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/UnsignedJnlpTemplate/resources/UnsignedJnlpTemplate2.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/UnsignedJnlpTemplate/resources/UnsignedJnlpTemplate2.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/UnsignedJnlpTemplate/resources/UnsignedJnlpTemplate2.jnlp	(revision 416)
@@ -0,0 +1,56 @@
+<!--
+
+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 'description' element in the launching JNLP file *
+****************************************
+ -->
+<?xml version="1.0" encoding="utf-8"?>
+<jnlp spec="1.0" href="UnsignedJnlpTemplate1.jnlp" codebase=".">
+  <information>
+    <title>UnsignedJnlpTemplate</title>
+    <vendor>IcedTea</vendor>
+    <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+    <offline/>
+  </information>
+
+  <resources>
+    <j2se version="1.6+"/>
+    <jar href="UnsignedJnlpTemplate.jar"/>
+  </resources>
+  <application-desc main-class="UnsignedJnlpTemplate">
+  </application-desc>
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/UnsignedJnlpTemplate/resources/UnsignedJnlpTemplate3.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/UnsignedJnlpTemplate/resources/UnsignedJnlpTemplate3.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/UnsignedJnlpTemplate/resources/UnsignedJnlpTemplate3.jnlp	(revision 416)
@@ -0,0 +1,57 @@
+<!--
+
+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.
+
+*****************************************************************
+* Using a different value of name within the 'title' element in the launching JNLP file *
+*****************************************************************
+ -->
+<?xml version="1.0" encoding="utf-8"?>
+<jnlp spec="1.0" href="UnsignedJnlpTemplate1.jnlp" codebase=".">
+  <information>
+    <title>DIFFERENTJnlpTemplateNAME</title>
+    <vendor>IcedTea</vendor>
+    <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+    <description>UnsignedJnlpTemplate</description>
+    <offline/>
+  </information>
+
+  <resources>
+    <j2se version="1.6+"/>
+    <jar href="UnsignedJnlpTemplate.jar"/>
+  </resources>
+  <application-desc main-class="UnsignedJnlpTemplate">
+  </application-desc>
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/UnsignedJnlpTemplate/srcs/JNLP-INF/APPLICATION_TEMPLATE.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/UnsignedJnlpTemplate/srcs/JNLP-INF/APPLICATION_TEMPLATE.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/UnsignedJnlpTemplate/srcs/JNLP-INF/APPLICATION_TEMPLATE.jnlp	(revision 416)
@@ -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="UnsignedJnlpTemplate1.jnlp" codebase=".">
+  <information>
+    <title>UnsignedJnlpTemplate</title>
+    <vendor>IcedTea</vendor>
+    <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+    <description>UnsignedJnlpTemplate</description>
+    <offline/>
+  </information>
+
+  <security>
+      <all-permissions/>
+  </security> 
+
+   <resources>
+        <property name="specialProperty" value="icedtea"/>
+   </resources>
+
+  <resources>
+    <j2se version="1.6+"/>
+    <jar href="UnsignedJnlpTemplate.jar"/>
+  </resources>
+  <application-desc main-class="UnsignedJnlpTemplate">
+  </application-desc>
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/UnsignedJnlpTemplate/srcs/UnsignedJnlpTemplate.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/UnsignedJnlpTemplate/srcs/UnsignedJnlpTemplate.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/UnsignedJnlpTemplate/srcs/UnsignedJnlpTemplate.java	(revision 416)
@@ -0,0 +1,43 @@
+/* UnsignedJnlpTemplate.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 UnsignedJnlpTemplate {
+
+    public static void main(String[] args) {
+        System.out.println("Running unsigned application in main");
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/UnsignedJnlpTemplate/testcases/UnsignedJnlpTemplateTest.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/UnsignedJnlpTemplate/testcases/UnsignedJnlpTemplateTest.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/UnsignedJnlpTemplate/testcases/UnsignedJnlpTemplateTest.java	(revision 416)
@@ -0,0 +1,68 @@
+/* UnsignedJnlpTemplateTest.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 UnsignedJnlpTemplateTest {
+
+    private static ServerAccess server = new ServerAccess();
+    private final List<String> l = Collections.unmodifiableList(Arrays.asList(new String[] { "-Xtrustall" }));
+    private final String outputString = "Running unsigned application in main";
+
+    @Test
+    public void jnlpTemplateIsUnchecked1() throws Exception {
+        ServerAccess.ProcessResult pr = server.executeJavawsHeadless(l, "/UnsignedJnlpTemplate1.jnlp");
+        Assert.assertTrue("Stdout should contains " + outputString + " but did not", pr.stdout.contains(outputString));
+    }
+
+    @Test
+    public void jnlpTemplateIsUnchecked2() throws Exception {
+        ServerAccess.ProcessResult pr = server.executeJavawsHeadless(l, "/UnsignedJnlpTemplate2.jnlp");
+        Assert.assertTrue("Stdout should contains " + outputString + " but did not", pr.stdout.contains(outputString));
+    }
+
+    @Test
+    public void jnlpTemplateIsUnchecked3() throws Exception {
+        ServerAccess.ProcessResult pr = server.executeJavawsHeadless(l, "/UnsignedJnlpTemplate3.jnlp");
+        Assert.assertTrue("Stdout should contains " + outputString + " but did not", pr.stdout.contains(outputString));
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/deadlocktest/resources/deadlocktest.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/deadlocktest/resources/deadlocktest.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/deadlocktest/resources/deadlocktest.jnlp	(revision 416)
@@ -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="deadlocktest.jnlp" codebase=".">
+  <information>
+    <title>simpletest1</title>
+    <vendor>IcedTea</vendor>
+    <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+    <description>simpletest1</description>
+    <offline/>
+  </information>
+  <resources>
+    <j2se version="1.4+"/>
+    <jar href="deadlocktest.jar"/>
+  </resources>
+  <application-desc main-class="DeadlockTest">
+  </application-desc>
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/deadlocktest/resources/deadlocktest_1.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/deadlocktest/resources/deadlocktest_1.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/deadlocktest/resources/deadlocktest_1.jnlp	(revision 416)
@@ -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="deadlocktest_1.jnlp" codebase="." java-vm-args="-Xmx1g" >
+    <information>
+        <title>simpletest1</title>
+        <vendor>IcedTea</vendor>
+        <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+        <description>simpletest1</description>
+        <offline/>
+    </information>
+    <resources>
+        <j2se version="1.4+" max-heap-size="1024m"/>
+        <jar href="deadlocktest.jar"/>
+    </resources>
+    <application-desc main-class="DeadlockTest">
+    </application-desc>
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/deadlocktest/srcs/DeadlockTest.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/deadlocktest/srcs/DeadlockTest.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/deadlocktest/srcs/DeadlockTest.java	(revision 416)
@@ -0,0 +1,58 @@
+/* DeadlockTest.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.
+ */
+
+public class DeadlockTest {
+
+    private static final int DEADLOCK_TEST_TIME_OF_LIFE=30000;
+
+    public static void main(String[] args) throws Exception {
+        long startTime = System.nanoTime() / 1000000l;
+        System.out.println("Deadlock test started");
+        int i=0;
+        while (true) {
+            long now = System.nanoTime() / 1000000l;
+            Thread.sleep(3500);
+            i++;
+            System.out.println(i+" Deadlock sleeping");
+            if (now - startTime > DEADLOCK_TEST_TIME_OF_LIFE) {
+                System.out.println("This process is hanging more then "+DEADLOCK_TEST_TIME_OF_LIFE/1000+"s. Should be killed");
+                System.out.flush();
+                System.exit(5);
+            }
+        }
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/deadlocktest/testcases/DeadLockTestTest.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/deadlocktest/testcases/DeadLockTestTest.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/deadlocktest/testcases/DeadLockTestTest.java	(revision 416)
@@ -0,0 +1,267 @@
+/* DeadLockTestTest.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.util.ArrayList;
+import net.sourceforge.jnlp.ServerAccess;
+import net.sourceforge.jnlp.ServerAccess.ProcessResult;
+import org.junit.Assert;
+import java.util.Arrays;
+import java.util.List;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import org.junit.BeforeClass;
+
+import org.junit.Test;
+
+public class DeadLockTestTest {
+
+    private static ServerAccess server = new ServerAccess();
+    private static String deadlocktest_1 = "/deadlocktest_1.jnlp";
+    private static String deadlocktest = "/deadlocktest.jnlp";
+
+    @BeforeClass
+    public static void printJavas() throws Exception {
+        ServerAccess.logOutputReprint("Currently runnng javas1 " + countJavaInstances());
+
+    }
+
+    @Test
+    public void testDeadLockTestTerminated() throws Exception {
+        testDeadLockTestTerminatedBody(deadlocktest);
+        testDeadLockTestTerminatedBody(deadlocktest);
+        ServerAccess.logOutputReprint("Currently running javas12 " + countJavaInstances());
+    }
+
+    @Test
+    public void testDeadLockTestTerminated2() throws Exception {
+        testDeadLockTestTerminatedBody(deadlocktest_1);
+        testDeadLockTestTerminatedBody(deadlocktest_1);
+        /**
+         * this happens, when p.p.destroy is called before p.interrupt. and destroyed variable is removedI have no idea why, but it is incorrect.
+        Assert.assertNotNull("return can not be null in no fork process. Was ",pr.returnValue);//in this case forking is forbiden, and sojava throws an exception after destroy
+         */
+        ServerAccess.logOutputReprint("Currently running javas13 " + countJavaInstances());
+    }
+
+    public void testDeadLockTestTerminatedBody(String jnlp) throws Exception {
+        List<String> before = countJavaInstances();
+        ServerAccess.logOutputReprint("java1 " + jnlp + " : " + before.size());
+        ServerAccess.ProcessResult pr = server.executeJavawsHeadless(null, jnlp);
+        assertDeadlockTestLaunched(pr);
+        List<String> after = countJavaInstances();
+        ServerAccess.logOutputReprint("java2 " + jnlp + " : " + after.size());
+        killDiff(before, after);
+        String ss = "This process is hanging more than 30s. Should be killed";
+        Assert.assertFalse("stdout should not contains: " + ss + ", but did", pr.stdout.contains(ss));
+//        as we are tryng to terminate process as harmless as possible those two are no longer valid in all cases
+//        Assert.assertTrue("testDeadLockTestTerminated should be terminated, but wasn't", pr.wasTerminated);
+//        Assert.assertNull("Killed process must have null return value. Have not - ", pr.returnValue);
+        List<String> afterKill = countJavaInstances();
+        ServerAccess.logOutputReprint("java3 " + jnlp + " : " + afterKill.size());
+        Assert.assertEquals("assert that just old javas remians", 0, (before.size() - afterKill.size()));
+    }
+
+    @Test
+    public void ensureAtLeasOneJavaIsRunning() throws Exception {
+        Assert.assertTrue("at least one java should be running, but isn't! Javas are probably counted badly", countJavaInstances().size() > 0);
+
+    }
+
+    @Test
+    public void testSimpletest1lunchFork() throws Exception {
+        List<String> before = countJavaInstances();
+        ServerAccess.logOutputReprint("java4: " + before.size());
+        BackgroundDeadlock bd = new BackgroundDeadlock(deadlocktest_1, null);
+        bd.start();
+        Thread.sleep(ServerAccess.PROCESS_TIMEOUT * 2 / 3);
+        List<String> during = countJavaInstances();
+        ServerAccess.logOutputReprint("java5: " + during.size());
+        waitForBackgroundDeadlock(bd);
+        List<String> after = countJavaInstances();
+        ServerAccess.logOutputReprint("java6: " + after.size());
+        Assert.assertNotNull("proces inside background deadlock cant be null. It was.", bd.getPr());
+        assertDeadlockTestLaunched(bd.getPr());
+        killDiff(before, during);
+        List<String> afterKill = countJavaInstances();
+        ServerAccess.logOutputReprint("java66: " + afterKill.size());
+        Assert.assertEquals("assert that just old javas remians", 0, (before.size() - afterKill.size()));
+        // div by two is caused by jav in java process hierarchy
+        Assert.assertEquals("launched JVMs must be exactly 2, was " + (during.size() - before.size()) / 2, 2, (during.size() - before.size()) / 2);
+    }
+
+    @Test
+    public void testSimpletest1lunchNoFork() throws Exception {
+        List<String> before = countJavaInstances();
+        ServerAccess.logOutputReprint("java7: " + before.size());
+        BackgroundDeadlock bd = new BackgroundDeadlock(deadlocktest_1, Arrays.asList(new String[]{"-Xnofork"}));
+        bd.start();
+        Thread.sleep(ServerAccess.PROCESS_TIMEOUT * 2 / 3);
+        List<String> during = countJavaInstances();
+        ServerAccess.logOutputReprint("java8: " + during.size());
+        waitForBackgroundDeadlock(bd);
+        List<String> after = countJavaInstances();
+        ServerAccess.logOutputReprint("java9: " + after.size());
+        Assert.assertNotNull("proces inside background deadlock cant be null. It was.", bd.getPr());
+        assertDeadlockTestLaunched(bd.getPr());
+        killDiff(before, during);
+        List<String> afterKill = countJavaInstances();
+        ServerAccess.logOutputReprint("java99: " + afterKill.size());
+        Assert.assertEquals("assert that just old javas remians", 0, (before.size() - afterKill.size()));
+        // div by two is caused by jav in java process hierarchy
+        Assert.assertEquals("launched JVMs must be exactly 1, was  " + (during.size() - before.size()) / 2, 1, (during.size() - before.size()) / 2);
+    }
+
+    /**
+     * by process assasin destroyed processes are hanging random amount of time as zombies.
+     * Kill -9 is handling zombies pretty well.
+     *
+     * This function kills or  processes which are in nw but are not in old
+     * (eq.to killing new zombies:) )
+     *
+     * @param old
+     * @param nw
+     * @return
+     * @throws Exception
+     */
+    private static List<String> killDiff(List<String> old, List<String> nw) throws Exception {
+        ensureLinux();
+        List<String> result = new ArrayList<String>();
+        for (String string : nw) {
+            if (old.contains(string)) {
+                continue;
+            }
+            ServerAccess.logOutputReprint("Killing " + string);
+            ServerAccess.PROCESS_LOG = false;
+            try {
+                ServerAccess.ProcessResult pr = ServerAccess.executeProcess(Arrays.asList(new String[]{"kill", "-9", string}));
+            } finally {
+                ServerAccess.PROCESS_LOG = true;
+            }
+            result.add(string);
+            ServerAccess.logOutputReprint("Killed " + string);
+        }
+        return result;
+    }
+
+    private static List<String> countJavaInstances() throws Exception {
+        ensureLinux();
+        List<String> result = new ArrayList<String>();
+        ServerAccess.PROCESS_LOG = false;
+        try {
+            ServerAccess.ProcessResult pr = ServerAccess.executeProcess(Arrays.asList(new String[]{"ps", "-eo", "pid,ppid,stat,fname"}));
+            Matcher m = Pattern.compile("\\s*\\d+\\s+\\d+ .+ java\\s*").matcher(pr.stdout);
+            int i = 0;
+            while (m.find()) {
+                i++;
+                String ss = m.group();
+                //ServerAccess.logOutputReprint(i+": "+ss);
+                result.add(ss.trim().split("\\s+")[0]);
+            }
+        } finally {
+            ServerAccess.PROCESS_LOG = true;
+        }
+        return result;
+
+    }
+
+    public static void main(String[] args) throws Exception {
+        ServerAccess.logOutputReprint("" + countJavaInstances());
+    }
+
+    private void assertDeadlockTestLaunched(ProcessResult pr) {
+        String s = "Deadlock test started";
+        Assert.assertTrue("Deadlock test should print out " + s + ", but did not", pr.stdout.contains(s));
+        String ss = "xception";
+        Assert.assertFalse("Deadlock test should not stderr " + ss + " but did", pr.stderr.contains(ss));
+        //each 3500 seconds deadlock test stdout something
+        //timeout is 20s
+        //so it should write out FIVE sentences, but is mostly just three or four. Last is nearly always consumed by termination
+        for (int i = 1; i <= 3; i++) {
+            String sentence = i + " Deadlock sleeping";
+            Assert.assertTrue(
+                    "stdout should contains: " + sentence + ", didn't, so framework have consumed to much during termination",
+                    pr.stdout.contains(sentence));
+        }
+    }
+
+    private void waitForBackgroundDeadlock(final BackgroundDeadlock bd) throws InterruptedException {
+        while (!bd.isFinished()) {
+            Thread.sleep(500);
+
+        }
+    }
+
+    private static class BackgroundDeadlock extends Thread {
+
+        private boolean finished = false;
+        private ProcessResult pr = null;
+        String jnlp;
+        List<String> args;
+
+        public BackgroundDeadlock(String jnlp, List<String> args) {
+            this.jnlp = jnlp;
+            this.args = args;
+        }
+
+        @Override
+        public void run() {
+            try {
+                pr = server.executeJavawsHeadless(args, jnlp);
+            } catch (Exception ex) {
+                ServerAccess.logException(ex);
+            } finally {
+                finished = true;
+            }
+
+        }
+
+        public ProcessResult getPr() {
+            return pr;
+        }
+
+        public boolean isFinished() {
+            return finished;
+        }
+    }
+
+    private static void ensureLinux() {
+        String os = System.getProperty("os.name").toLowerCase();
+        if (!(os.contains("linux") || os.contains("unix"))) {
+            throw new IllegalStateException("This test can be procesed only on linux like machines");
+        }
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/simpletest1/resources/simpletest1.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/simpletest1/resources/simpletest1.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/simpletest1/resources/simpletest1.jnlp	(revision 416)
@@ -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="simpletest1.jnlp" codebase=".">
+  <information>
+    <title>simpletest1</title>
+    <vendor>IcedTea</vendor>
+    <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+    <description>simpletest1</description>
+    <offline/>
+  </information>
+  <resources>
+    <j2se version="1.4+"/>
+    <jar href="simpletest1.jar"/>
+  </resources>
+  <application-desc main-class="SimpleTest1">
+  </application-desc>
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/simpletest1/resources/simpletestCustomSplash.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/simpletest1/resources/simpletestCustomSplash.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/simpletest1/resources/simpletestCustomSplash.jnlp	(revision 416)
@@ -0,0 +1,55 @@
+<!--
+
+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="simpletestCustomSplash.jnlp" codebase=".">
+  <information>
+    <title>simpletest1</title>
+    <vendor>IcedTea</vendor>
+    <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+    <description>simpletest1</description>
+    <icon kind="splash" href="netxPlugin.png"/>
+    <offline/>
+  </information>
+  <resources>
+    <j2se version="1.4+"/>
+    <!--<jar href="XslowXsimpletest1.jar"/>-->
+   <jar href="XslowXdeadlocktest.jar"/>
+  </resources>
+  <application-desc main-class="SimpleTest1">
+  </application-desc>
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/simpletest1/resources/simpletestMegaSlow.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/simpletest1/resources/simpletestMegaSlow.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/simpletest1/resources/simpletestMegaSlow.jnlp	(revision 416)
@@ -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="XslowXsimpletestMegaSlow.jnlp" codebase=".">
+  <information>
+    <title>simpletest1</title>
+    <vendor>IcedTea</vendor>
+    <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+    <description>simpletest1</description>
+    <offline/>
+  </information>
+  <resources>
+    <j2se version="1.4+"/>
+    <jar href="XslowXsimpletest1.jar"/>
+  </resources>
+  <application-desc main-class="SimpleTest1">
+  </application-desc>
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/simpletest1/resources/simpletestSlow.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/simpletest1/resources/simpletestSlow.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/simpletest1/resources/simpletestSlow.jnlp	(revision 416)
@@ -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="simpletestSlow.jnlp" codebase=".">
+  <information>
+    <title>simpletest1</title>
+    <vendor>IcedTea</vendor>
+    <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+    <description>simpletest1</description>
+    <offline/>
+  </information>
+  <resources>
+    <j2se version="1.4+"/>
+    <jar href="XslowXsimpletest1.jar"/>
+  </resources>
+  <application-desc main-class="SimpleTest1">
+  </application-desc>
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/simpletest1/resources/simpletestSlowBrokenCustomSplash.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/simpletest1/resources/simpletestSlowBrokenCustomSplash.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/simpletest1/resources/simpletestSlowBrokenCustomSplash.jnlp	(revision 416)
@@ -0,0 +1,54 @@
+<!--
+
+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="simpletestSlowBrokenCustomSplash.jnlp" codebase=".">
+  <information>
+    <title>simpletest1</title>
+    <vendor>IcedTea</vendor>
+    <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+    <icon kind="splash" href="netxPlugin.pngggg"/>
+    <description>simpletest1</description>
+    <offline/>
+  </information>
+  <resources>
+    <j2se version="1.4+"/>
+    <jar href="XslowXsimpletest1.jar"/>
+  </resources>
+  <application-desc main-class="SimpleTest1">
+  </application-desc>
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/simpletest1/resources/simpletestSlowSlowCustomSplash.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/simpletest1/resources/simpletestSlowSlowCustomSplash.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/simpletest1/resources/simpletestSlowSlowCustomSplash.jnlp	(revision 416)
@@ -0,0 +1,54 @@
+<!--
+
+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="simpletestSlowSlowCustomSplash.jnlp" codebase=".">
+  <information>
+    <title>simpletest1</title>
+    <vendor>IcedTea</vendor>
+    <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+    <icon kind="splash" href="XslowXnetxPlugin.png"/>
+    <description>simpletest1</description>
+    <offline/>
+  </information>
+  <resources>
+    <j2se version="1.4+"/>
+    <jar href="XslowXsimpletest1.jar"/>
+  </resources>
+  <application-desc main-class="SimpleTest1">
+  </application-desc>
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/simpletest1/srcs/SimpleTest1.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/simpletest1/srcs/SimpleTest1.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/simpletest1/srcs/SimpleTest1.java	(revision 416)
@@ -0,0 +1,43 @@
+/* SimpleTest1.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.
+ */
+
+public class SimpleTest1{
+
+    public static void main(String[] args){
+        System.out.println("Good simple javaws exapmle");
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/simpletest1/testcases/SimpleTest1Test.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/simpletest1/testcases/SimpleTest1Test.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/simpletest1/testcases/SimpleTest1Test.java	(revision 416)
@@ -0,0 +1,61 @@
+/* SimpleTest1Test.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.ServerAccess;
+import org.junit.Assert;
+
+import org.junit.Test;
+
+public class SimpleTest1Test {
+
+    private static ServerAccess server = new ServerAccess();
+
+  
+
+    @Test
+    public void testSimpletest1lunchOk() throws Exception {
+        ServerAccess.ProcessResult pr=server.executeJavawsHeadless(null,"/simpletest1.jnlp");
+        String s="Good simple javaws exapmle";
+        Assert.assertTrue("testSimpletest1lunchOk stdout should contains "+s+" bud didn't",pr.stdout.contains(s));
+        String ss="xception";
+        Assert.assertFalse("testSimpletest1lunchOk stderr should not contains "+ss+" but did",pr.stderr.contains(ss));
+        Assert.assertFalse(pr.wasTerminated);
+        Assert.assertEquals((Integer)0, pr.returnValue);
+    }
+
+ }
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/simpletest2/resources/simpletest2.jnlp
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/simpletest2/resources/simpletest2.jnlp	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/simpletest2/resources/simpletest2.jnlp	(revision 416)
@@ -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="simpletest2.jnlp" codebase=".">
+  <information>
+    <title>simpletest2</title>
+    <vendor>IcedTea</vendor>
+    <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+    <description>simpletest2</description>
+    <offline/>
+  </information>
+  <resources>
+    <j2se version="1.4+"/>
+    <jar href="simpletest2.jar"/>
+  </resources>
+  <application-desc main-class="SimpleTest2">
+  </application-desc>
+</jnlp>
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/simpletest2/srcs/SimpleTest2.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/simpletest2/srcs/SimpleTest2.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/simpletest2/srcs/SimpleTest2.java	(revision 416)
@@ -0,0 +1,44 @@
+/* SimpleTest2.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.
+ */
+
+public class SimpleTest2{
+
+    public static void main(String[] args){
+throw new RuntimeException("Correct exception");
+
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/simpletest2/testcases/SimpleTest2Test.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/simpletest2/testcases/SimpleTest2Test.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/reproducers/simple/simpletest2/testcases/SimpleTest2Test.java	(revision 416)
@@ -0,0 +1,62 @@
+/* SimpleTest2Test.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.ServerAccess;
+import org.junit.Assert;
+
+import org.junit.Test;
+
+public class SimpleTest2Test {
+
+    private static ServerAccess server = new ServerAccess();
+
+
+    @Test
+    public void testSimpletest2lunchException() throws Exception {
+        ServerAccess.ProcessResult pr=server.executeJavawsHeadless(null,"/simpletest2.jnlp");
+        Assert.assertTrue("stdout should be < 1 , but was "+pr.stdout.trim().length(),pr.stdout.trim().length() < 1);
+        String s="Correct exception";
+        Assert.assertTrue("stderr should contains "+s+" but didn't",pr.stderr.contains(s));
+        String ss="Exception";
+        Assert.assertTrue("stderr should contains "+ss+" but did not",pr.stderr.contains(ss));
+        Assert.assertFalse("testSimpletest2lunchException should not be terminated, but was",pr.wasTerminated);
+        //Assert.assertFalse(0==pr.returnValue);exception and still returned 0?
+    }
+
+
+
+    }
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions-tests/net/sourceforge/jnlp/ResourcesTest.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions-tests/net/sourceforge/jnlp/ResourcesTest.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions-tests/net/sourceforge/jnlp/ResourcesTest.java	(revision 416)
@@ -0,0 +1,390 @@
+/* ResourcesTest.java
+Copyright (C) 2011-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.
+ */
+package net.sourceforge.jnlp;
+
+import java.io.File;
+import java.io.FileFilter;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URI;
+import java.net.URL;
+import java.util.Arrays;
+import java.util.List;
+import net.sourceforge.jnlp.browsertesting.Browser;
+import net.sourceforge.jnlp.browsertesting.BrowserFactory;
+import net.sourceforge.jnlp.browsertesting.BrowserTest;
+import net.sourceforge.jnlp.browsertesting.Browsers;
+import net.sourceforge.jnlp.annotations.NeedsDisplay;
+import net.sourceforge.jnlp.annotations.TestInBrowsers;
+import net.sourceforge.jnlp.browsertesting.browsers.LinuxBrowser;
+import net.sourceforge.jnlp.annotations.TestInBrowsers;
+import org.junit.Assert;
+
+import org.junit.Test;
+
+public class ResourcesTest extends  BrowserTest{
+
+
+    @Test
+    @NeedsDisplay
+    public void testNonExisitngBrowserWillNotDeadlock() throws Exception {
+        server.setCurrentBrowser(Browsers.none);
+        ServerAccess.ProcessResult pr = server.executeBrowser("not_existing_url.html");
+        Assert.assertNull(pr.process);
+        Assert.assertEquals(pr.stderr, "");
+        Assert.assertEquals(pr.stdout, "");
+        Assert.assertTrue(pr.wasTerminated);
+        Assert.assertTrue(pr.returnValue < 0);
+        junit.framework.Assert.assertNotNull(pr.deadlyException);
+    }
+
+    @Test
+    public void testUnexistingProcessWillFailRecognizedly() throws Exception {
+        server.setCurrentBrowser(Browsers.none);
+        List<String> al=Arrays.asList(new String[] {"definietly_not_Existing_process"});
+        ServerAccess.ProcessResult pr = server.executeProcess(al);
+        Assert.assertNull(pr.process);
+        Assert.assertEquals(pr.stderr, "");
+        Assert.assertEquals(pr.stdout, "");
+        Assert.assertTrue(pr.wasTerminated);
+        Assert.assertTrue(pr.returnValue < 0);
+        junit.framework.Assert.assertNotNull(pr.deadlyException);
+    }
+
+    @Test
+    public void testGetUrlUponThisInstance() throws MalformedURLException{
+        URL u1=server.getUrlUponThisInstance("simple.jsp");
+        URL u2=server.getUrlUponThisInstance("/simple.jsp");
+        Assert.assertEquals(u1, u2);
+    }
+
+    @Test
+    @TestInBrowsers(testIn=Browsers.none)
+    public void testNonExisitngBrowserWillNotCauseMess() throws Exception {
+        ServerAccess.ProcessResult pr = server.executeBrowser("not_existing_url.html");
+        Assert.assertNull(pr.process);
+        Assert.assertEquals(pr.stderr, "");
+        Assert.assertEquals(pr.stdout, "");
+        Assert.assertTrue(pr.wasTerminated);
+        Assert.assertTrue(pr.returnValue < 0);
+        junit.framework.Assert.assertNotNull(pr.deadlyException);
+    }
+
+    @Test
+    public void testBrowsers2() throws Exception {
+        List<Browser> a = BrowserFactory.getFactory().getAllBrowsers();
+        Assert.assertNotNull("returned browsers array must not be null", a);
+        Assert.assertTrue("at least one browser must be configured", a.size() > 0);
+        for (Browser b : a) {
+            testBrowser(b);
+        }
+
+    }
+
+    @Test
+    @TestInBrowsers(testIn = Browsers.all)
+    public void testBrowser3() throws Exception {
+        testBrowser(server.getCurrentBrowser());
+
+
+    }
+
+    @Test
+    public void testBrowsers1() throws Exception {
+        BrowserFactory bf = new BrowserFactory(null);
+        int expected = 0;
+        Assert.assertTrue("Created from null there must be " + expected + " browsers in factory. Is" + bf.getAllBrowsers().size(), bf.getAllBrowsers().size() == expected);
+
+        bf = new BrowserFactory("");
+        expected = 0;
+        Assert.assertTrue("Created from empty there must be " + expected + " browsers in factory. Is" + bf.getAllBrowsers().size(), bf.getAllBrowsers().size() == expected);
+
+        String s = "dsgrdg";
+        bf = new BrowserFactory(s);
+        expected = 0;
+        Assert.assertTrue("Created from nonsense " + s + " there must be " + expected + " browsers in factory. Is" + bf.getAllBrowsers().size(), bf.getAllBrowsers().size() == expected);
+
+        s = "sgrg/jkik";
+        bf = new BrowserFactory(s);
+        expected = 0;
+        Assert.assertTrue("Created from nonsense " + s + " there must be " + expected + " browsers in factory. Is" + bf.getAllBrowsers().size(), bf.getAllBrowsers().size() == expected);
+
+        s = Browsers.firefox + "/jkik";
+        bf = new BrowserFactory(s);
+        expected = 0;
+        Assert.assertTrue("Created from nonsense " + s + "there must be " + expected + " browsers in factory. Is" + bf.getAllBrowsers().size(), bf.getAllBrowsers().size() == expected);
+
+        s = "sgrg/jkik:sege";
+        bf = new BrowserFactory(s);
+        expected = 0;
+        Assert.assertTrue("Created from  two nonsenses " + s + "there must be " + expected + " browsers in factory. Is" + bf.getAllBrowsers().size(), bf.getAllBrowsers().size() == expected);
+
+        s = Browsers.firefox.toExec() + ":" + Browsers.firefox;
+        bf = new BrowserFactory(s);
+        expected = 2;
+        Assert.assertTrue("Created from  " + s + "there must be " + expected + " browsers in factory. Is" + bf.getAllBrowsers().size(), bf.getAllBrowsers().size() == expected);
+
+        s = Browsers.firefox.toExec();
+        bf = new BrowserFactory(s);
+        expected = 1;
+        Assert.assertTrue("Created from  " + s + "there must be " + expected + " browsers in factory. Is" + bf.getAllBrowsers().size(), bf.getAllBrowsers().size() == expected);
+
+        s = "something/somewhere/" + Browsers.firefox.toExec();
+        bf = new BrowserFactory(s);
+        expected = 1;
+        Assert.assertTrue("Created from  " + s + "there must be " + expected + " browsers in factory. Is" + bf.getAllBrowsers().size(), bf.getAllBrowsers().size() == expected);
+
+        s = "something/somewhere/" + Browsers.firefox.toExec() + ":" + "something/somewhere/" + Browsers.opera.toExec();
+        bf = new BrowserFactory(s);
+        expected = 2;
+        Assert.assertTrue("Created from  " + s + "there must be " + expected + " browsers in factory. Is" + bf.getAllBrowsers().size(), bf.getAllBrowsers().size() == expected);
+
+        s = "something/somewhere/" + Browsers.firefox.toExec() + ":" + "something/somewhere/" + Browsers.opera.toExec() + ":" + Browsers.chromiumBrowser;
+        bf = new BrowserFactory(s);
+        expected = 3;
+        Assert.assertTrue("Created from  " + s + "there must be " + expected + " browsers in factory. Is" + bf.getAllBrowsers().size(), bf.getAllBrowsers().size() == expected);
+
+        s = Browsers.firefox.toExec() + ":" + "vfdgf" + ":" + Browsers.googleChrome.toExec();
+        bf = new BrowserFactory(s);
+        expected = 2;
+        Assert.assertTrue("Created from  " + s + "there must be " + expected + " browsers in factory. Is" + bf.getAllBrowsers().size(), bf.getAllBrowsers().size() == expected);
+
+        s = Browsers.firefox.toExec() + ":" + Browsers.chromiumBrowser + ":" + Browsers.googleChrome.toExec() + ":" + Browsers.opera + ":" + Browsers.epiphany + ":" + Browsers.midori;
+        bf = new BrowserFactory(s);
+        expected = 6;
+        Assert.assertTrue("Created from  " + s + "there must be " + expected + " browsers in factory. Is" + bf.getAllBrowsers().size(), bf.getAllBrowsers().size() == expected);
+        testFullFactory(bf);
+
+        s = "fgfd/" + Browsers.firefox.toExec() + ":" + "/fgfd/" + Browsers.chromiumBrowser + ":" + "fgfd/dfsdf/" + Browsers.googleChrome.toExec() + ":" + "/g/fgfd/" + Browsers.opera + ":" + Browsers.epiphany + ":" + Browsers.midori;
+        bf = new BrowserFactory(s);
+        expected = 6;
+        Assert.assertTrue("Created from  " + s + "there must be " + expected + " browsers in factory. Is" + bf.getAllBrowsers().size(), bf.getAllBrowsers().size() == expected);
+        testFullFactory(bf);
+
+        s = Browsers.firefox.toExec() + ":" + ":" + Browsers.googleChrome.toExec() + ":" + Browsers.opera;
+        bf = new BrowserFactory(s);
+        expected = 3;
+        Assert.assertTrue("Created from  " + s + "there must be " + expected + " browsers in factory. Is" + bf.getAllBrowsers().size(), bf.getAllBrowsers().size() == expected);
+
+        s = Browsers.firefox.toExec() + ":" + ":" + ":" + Browsers.opera;
+        bf = new BrowserFactory(s);
+        expected = 2;
+        Assert.assertTrue("Created from  " + s + "there must be " + expected + " browsers in factory. Is" + bf.getAllBrowsers().size(), bf.getAllBrowsers().size() == expected);
+
+        s = ":" + ":" + Browsers.googleChrome.toExec() + ":";
+        bf = new BrowserFactory(s);
+        expected = 1;
+        Assert.assertTrue("Created from  " + s + "there must be " + expected + " browsers in factory. Is" + bf.getAllBrowsers().size(), bf.getAllBrowsers().size() == expected);
+
+        s = ":" + Browsers.firefox.toExec() + ":bfgbfg/fddf/" + Browsers.googleChrome.toExec() + ":";
+        bf = new BrowserFactory(s);
+        expected = 2;
+        Assert.assertTrue("Created from  " + s + "there must be " + expected + " browsers in factory. Is" + bf.getAllBrowsers().size(), bf.getAllBrowsers().size() == expected);
+
+
+
+
+    }
+
+    @Test
+    public void testResourcesExists() throws Exception {
+        File[] simpleContent = server.getDir().listFiles(new FileFilter() {
+
+            public boolean accept(File file) {
+                if (!file.isDirectory()) {
+                    return true;
+                } else {
+                    return false;
+                }
+            }
+        });
+        Assert.assertNotNull(simpleContent);
+        Assert.assertTrue(simpleContent.length > 5);
+
+        for (int i = 0; i < simpleContent.length; i++) {
+            File file = simpleContent[i];
+            ServerAccess.logOutputReprint(file.getName());
+            //server port have in fact no usage in converting filename to uri-like-filename.
+            //But if there is null, instead if some number, then nullpointer exception is thrown (Integer->int).
+            //So I'm using "real" currently used port, instead of some random value.
+            URI u = new URI((String) null, (String) null, (String) null, server.getPort(), file.getName(), (String) null, null);
+            ServerAccess.logOutputReprint(" ("+u.toString()+")");
+            String fname = u.toString();
+            if (file.getName().toLowerCase().endsWith(".jnlp")) {
+                String c = server.getResourceAsString("/" + fname);
+                Assert.assertTrue(c.contains("<"));
+                Assert.assertTrue(c.contains(">"));
+                Assert.assertTrue(c.contains("jnlp"));
+                Assert.assertTrue(c.contains("resources"));
+                Assert.assertTrue(c.replaceAll("\\s*", "").contains("</jnlp>"));
+
+            } else {
+                byte[] c = server.getResourceAsBytes("/" + fname).toByteArray();
+                Assert.assertEquals(c.length, file.length());
+            }
+
+        }
+
+    }
+
+    @Test
+    @NeedsDisplay
+    @TestInBrowsers(testIn = Browsers.one)
+    public void testListeners() throws Exception {
+        final StringBuilder o1 = new StringBuilder();
+        final StringBuilder e1 = new StringBuilder();
+        final StringBuilder o2 = new StringBuilder();
+        final StringBuilder e2 = new StringBuilder();
+        final ContentReaderListener lo = new ContentReaderListener() {
+
+            @Override
+            public void charReaded(char ch) {
+                //ServerAccess.logOutputReprint("OO recieved char: "+ch);
+                o1.append(ch);
+            }
+
+            @Override
+            public void lineReaded(String s) {
+                //ServerAccess.logOutputReprint("OO recieved line: "+s);
+                o2.append(s).append("\n");
+            }
+        };
+        ContentReaderListener le = new ContentReaderListener() {
+
+            @Override
+            public void charReaded(char ch) {
+                //ServerAccess.logOutputReprint("EE recieved char: "+ch);
+                e1.append(ch);
+            }
+
+            @Override
+            public void lineReaded(String s) {
+                //ServerAccess.logOutputReprint("EE recieved line: "+s);
+                e2.append(s).append("\n");
+            }
+        };
+       ServerAccess.ProcessResult pr = server.executeBrowser("not_existing_url.html",lo,le);
+        server.setCurrentBrowser(BrowserFactory.getFactory().getFirst().getID());
+        Assert.assertNotNull(server.getCurrentBrowsers());
+        Assert.assertNotNull(server.getCurrentBrowser());
+//        ServerAccess.logOutputReprint("total o");
+//        ServerAccess.logOutputReprint(pr.stdout);
+//        ServerAccess.logOutputReprint("total e");
+//        ServerAccess.logOutputReprint(pr.stderr);
+       Assert.assertEquals(pr.stdout, o1.toString());
+       Assert.assertEquals(pr.stderr, e1.toString());
+       //the last \n is mandatory as las tline is flushed also when proces dies
+       Assert.assertEquals(pr.stdout.replace("\n", ""), o2.toString().replace("\n", ""));
+       Assert.assertEquals(pr.stderr.replace("\n", ""), e2.toString().replace("\n", ""));
+
+    }
+
+    private void testFullFactory(BrowserFactory bf) {
+        Assert.assertEquals(bf.getBrowser(Browsers.chromiumBrowser).getID(), Browsers.chromiumBrowser);
+        Assert.assertEquals(bf.getBrowser(Browsers.googleChrome).getID(), Browsers.googleChrome);
+        Assert.assertEquals(bf.getBrowser(Browsers.firefox).getID(), Browsers.firefox);
+        Assert.assertEquals(bf.getBrowser(Browsers.opera).getID(), Browsers.opera);
+        Assert.assertEquals(bf.getBrowser(Browsers.epiphany).getID(), Browsers.epiphany);
+        Assert.assertEquals(bf.getBrowser(Browsers.midori).getID(), Browsers.midori);
+    }
+
+    private void testBrowser(Browser browser) throws IOException {
+        File f1 = null;
+        if (browser.getDefaultPluginExpectedLocation() != null) {
+            f1 = new File(browser.getDefaultPluginExpectedLocation());
+        }
+        File f2 = null;
+        if (browser.getUserDefaultPluginExpectedLocation() != null) {
+            f2 = new File(browser.getUserDefaultPluginExpectedLocation());
+        }
+        if (f1 != null) {
+            Assert.assertTrue("browser's plugins  location should exist " + f1.toString() + " for " + browser.getID().toString(), f1.exists());
+        }
+        if (f2 != null) {
+            Assert.assertTrue("browser's users-plugins  location should exist " + f2.toString() + " for " + browser.getID().toString(), f2.exists());
+        }
+
+        File[] ff1 = new File[0];
+        if (f1 != null) {
+            ff1 = f1.listFiles();
+        }
+
+        File[] ff2 = new File[0];
+        if (f2 != null) {
+            ff2 = f2.listFiles();
+        }
+
+        Assert.assertTrue("at least one of browser's plugins  directory should contains at least one file didn't. For " + browser.getID().toString(), ff1.length + ff2.length > 0);
+
+        ff1 = new File[0];
+        if (f1 != null) {
+            ff1 = f1.listFiles(new FileFilter() {
+
+                @Override
+                public boolean accept(File pathname) {
+                    return (pathname.getName().equals(LinuxBrowser.DEFAULT_PLUGIN_NAME));
+                }
+            });
+        }
+
+        ff2 = new File[0];
+        if (f2 != null) {
+            ff2 = f2.listFiles(new FileFilter() {
+
+                @Override
+                public boolean accept(File pathname) {
+                    return (pathname.getName().equals(LinuxBrowser.DEFAULT_PLUGIN_NAME));
+                }
+            });
+        }
+
+        Assert.assertTrue("browser's plugins  directories should contains exactly one  " + LinuxBrowser.DEFAULT_PLUGIN_NAME + ", but didnt for " + browser.getID().toString(),
+                ff1.length + ff2.length == 1);
+        String currentPath = server.getJavawsFile().getParentFile().getParentFile().getAbsolutePath();
+
+        File[] ff;
+        if (ff1.length == 1) {
+            ff = ff1;
+        } else {
+            ff = ff2;
+        }
+        String s = ServerAccess.getContentOfStream(new FileInputStream(ff[0]), "ASCII");
+        Assert.assertTrue("browser's plugins  shoud points to" + currentPath + ", but  didnt",
+                s.contains(s));
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions-tests/net/sourceforge/jnlp/ServerAccessTest.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions-tests/net/sourceforge/jnlp/ServerAccessTest.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions-tests/net/sourceforge/jnlp/ServerAccessTest.java	(revision 416)
@@ -0,0 +1,233 @@
+/* ServerAccessTest.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.
+ */
+package net.sourceforge.jnlp;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.net.URL;
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ *
+ * This class provides access to virtual server and stuff around.
+ * It can find unoccupied port, start server, provides its singleton instantiation, lunch parallel instantiations,
+ * read location of installed (tested javaws) see javaws.build.bin java property,
+ * location of server www root on file system (see test.server.dir java property),
+ * stubs for lunching javaws and for locating resources and read resources.
+ *
+ * It can also execute processes with timeout (@see PROCESS_TIMEOUT) (used during lunching javaws)
+ * Some protected apis are exported because public classes in this package are put to be tested by makefile.
+ *
+ * There are included test cases which show some basic usages.
+ *
+ *
+ */
+public class ServerAccessTest {
+
+    ServerAccess serverAccess = new ServerAccess();
+
+    @Test
+    public void testsProcessResultFiltering() throws Exception {
+        ProcessResult pn = new ProcessResult(null, null, null, true, 0, null);
+        Assert.assertNull(pn.notFilteredStdout);
+        Assert.assertNull(pn.stdout);
+        Assert.assertNull(pn.stderr);
+        String fakeOut2 =
+                "EMMA: processing instrumentation path ...\n"
+                + "EMMA: package [net.sourceforge.filebrowser] contains classes [ArrayOfString] without full debug info\n"
+                + "EMMA: instrumentation path processed in 1407 ms\n"
+                + "test stage 1\n"
+                + "test stage 2\n"
+                + "EMMA: The intruder!\n"
+                + "test stage 3\n"
+                + "EMMA: [45 class(es) instrumented, 13 resource(s) copied]\n"
+                + "EMMA: metadata merged into [icedtea-web/inc] {in 105 ms}\n"
+                + "EMMA: processing instrumentation path ...";
+        String filteredOut2 =
+                "test stage 1\n"
+                + "test stage 2\n"
+                + "test stage 3\n";
+        ProcessResult p2 = new ProcessResult(fakeOut2, fakeOut2, null, true, 0, null);
+        Assert.assertEquals(p2.notFilteredStdout, fakeOut2);
+        Assert.assertEquals(p2.stdout, filteredOut2);
+        Assert.assertEquals(p2.stderr, fakeOut2);
+        fakeOut2 += "\n";
+        p2 = new ProcessResult(fakeOut2, fakeOut2, null, true, 0, null);
+        Assert.assertEquals(p2.notFilteredStdout, fakeOut2);
+        Assert.assertEquals(p2.stdout, filteredOut2);
+        Assert.assertEquals(p2.stderr, fakeOut2);
+        String fakeOut =
+                "test string\n"
+                + "EMMA: processing instrumentation path ...\n"
+                + "EMMA: package [net.sourceforge.filebrowser] contains classes [ArrayOfString] without full debug info\n"
+                + "EMMA: instrumentation path processed in 1407 ms\n"
+                + "test stage 1\n"
+                + "test stage 2\n"
+                + "test stage 3\n"
+                + "EMMA: [45 class(es) instrumented, 13 resource(s) copied]\n"
+                + "EMMA: metadata merged into [icedtea-web/inc] {in 105 ms}\n"
+                + "EMMA: processing instrumentation path ...\n"
+                + "test ends";
+        String filteredOut =
+                "test string\n"
+                + "test stage 1\n"
+                + "test stage 2\n"
+                + "test stage 3\n"
+                + "test ends";
+        ProcessResult p = new ProcessResult(fakeOut, fakeOut, null, true, 0, null);
+        Assert.assertEquals(p.notFilteredStdout, fakeOut);
+        Assert.assertEquals(p.stdout, filteredOut);
+        Assert.assertEquals(p.stderr, fakeOut);
+        fakeOut += "\n";
+        filteredOut += "\n";
+        p = new ProcessResult(fakeOut, fakeOut, null, true, 0, null);
+        Assert.assertEquals(p.notFilteredStdout, fakeOut);
+        Assert.assertEquals(p.stdout, filteredOut);
+        Assert.assertEquals(p.stderr, fakeOut);
+    }
+
+    @Test
+    public void ensureJavaws() throws Exception {
+        String javawsValue = serverAccess.getJavawsLocation();
+        Assert.assertNotNull(javawsValue);
+        Assert.assertTrue(javawsValue.trim().length() > 2);
+        File javawsFile = serverAccess.getJavawsFile();
+        Assert.assertTrue(javawsFile.exists());
+        Assert.assertFalse(javawsFile.isDirectory());
+    }
+
+    @Test
+    public void ensureServer() throws Exception {
+        ServerLauncher server = ServerAccess.getInstance();
+        Assert.assertNotNull(server.getPort());
+        Assert.assertNotNull(server.getDir());
+        Assert.assertTrue(server.getPort() > 999);
+        Assert.assertTrue(server.getDir().toString().trim().length() > 2);
+
+        Assert.assertTrue(server.getDir().exists());
+        Assert.assertTrue(server.getDir().isDirectory());
+
+        File portFile = new File(server.getDir(), "server.port");
+        File dirFile = new File(server.getDir(), "server.dir");
+
+        ServerAccess.saveFile(server.getDir().getAbsolutePath(), dirFile);
+        ServerAccess.saveFile(server.getPort().toString(), portFile);
+        ServerAccess.saveFile(server.getPort().toString(), portFile);
+
+        Assert.assertTrue(portFile.exists());
+        Assert.assertTrue(dirFile.exists());
+        Assert.assertTrue(server.getDir().listFiles().length > 1);
+
+        String portFileContent = ServerAccess.getContentOfStream(new FileInputStream(portFile));
+        String dirFileContent = ServerAccess.getContentOfStream(new FileInputStream(dirFile));
+
+        URL portUrl = new URL("http", "localhost", server.getPort(), "/server.port");
+        URL dirUrl = new URL("http", "localhost", server.getPort(), "/server.dir");
+
+        String portUrlContent = ServerAccess.getContentOfStream(portUrl.openConnection().getInputStream());
+        String dirUrlContent = ServerAccess.getContentOfStream(dirUrl.openConnection().getInputStream());
+
+        Assert.assertEquals(portUrlContent.trim(), portFileContent.trim());
+        Assert.assertEquals(dirUrlContent.trim(), dirFileContent.trim());
+        Assert.assertEquals(new File(dirUrlContent.trim()), server.getDir());
+        Assert.assertEquals(new Integer(portUrlContent.trim()), server.getPort());
+
+        URL fastUrl = new URL("http", "localhost", server.getPort(), "/simpletest1.jnlp");
+        URL slowUrl = new URL("http", "localhost", server.getPort(), "/XslowXsimpletest1.jnlp");
+
+        String fastUrlcontent = ServerAccess.getContentOfStream(fastUrl.openConnection().getInputStream());
+        String slowUrlContent = ServerAccess.getContentOfStream(slowUrl.openConnection().getInputStream());
+        Assert.assertEquals(fastUrlcontent, slowUrlContent);
+
+    }
+
+    @Test
+    public void splitArrayTest0() throws Exception {
+        byte[] b = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14};
+        byte[][] bb = TinyHttpdImpl.splitArray(b, 3);
+        //printArrays(bb);
+        byte[] b1 = {1, 2, 3, 4, 5};
+        byte[] b2 = {6, 7, 8, 9, 10};
+        byte[] b3 = {11, 12, 13, 14};
+        Assert.assertEquals(3, bb.length);
+        Assert.assertArrayEquals(b1, bb[0]);
+        Assert.assertArrayEquals(b2, bb[1]);
+        Assert.assertArrayEquals(b3, bb[2]);
+    }
+
+    @Test
+    public void splitArrayTest1() throws Exception {
+        byte[] b = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13};
+        byte[][] bb = TinyHttpdImpl.splitArray(b, 3);
+        //printArrays(bb);
+        byte[] b1 = {1, 2, 3, 4, 5};
+        byte[] b2 = {6, 7, 8, 9, 10};
+        byte[] b3 = {11, 12, 13};
+        Assert.assertEquals(3, bb.length);
+        Assert.assertArrayEquals(b1, bb[0]);
+        Assert.assertArrayEquals(b2, bb[1]);
+        Assert.assertArrayEquals(b3, bb[2]);
+    }
+
+    @Test
+    public void splitArrayTest2() throws Exception {
+        byte[] b = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12};
+        byte[][] bb = TinyHttpdImpl.splitArray(b, 3);
+        //printArrays(bb);
+        byte[] b1 = {1, 2, 3, 4};
+        byte[] b2 = {5, 6, 7, 8};
+        byte[] b3 = {9, 10, 11, 12};
+        Assert.assertEquals(3, bb.length);
+        Assert.assertArrayEquals(b1, bb[0]);
+        Assert.assertArrayEquals(b2, bb[1]);
+        Assert.assertArrayEquals(b3, bb[2]);
+    }
+
+    private void printArrays(byte[][] bb) {
+        System.out.println("[][] l=" + bb.length);
+        for (int i = 0; i < bb.length; i++) {
+            byte[] bs = bb[i];
+            System.out.println(i + ": l=" + bs.length);
+            for (int j = 0; j < bs.length; j++) {
+                byte c = bs[j];
+                System.out.print(" " + j + ":" + c + " ");
+            }
+            System.out.println("");
+        }
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/ContentReader.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/ContentReader.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/ContentReader.java	(revision 416)
@@ -0,0 +1,133 @@
+/* ContentReader.java
+Copyright (C) 2011,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.
+ */
+
+package net.sourceforge.jnlp;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.Reader;
+
+/**
+ * Class to read content of stdout/stderr of process, and to cooperate with its running/terminated/finished statuses.
+ */
+class ContentReader implements Runnable {
+
+    StringBuilder sb = new StringBuilder();
+    private final InputStream is;
+    private boolean done;
+    ContentReaderListener listener;
+
+    public String getContent() {
+        return sb.toString();
+    }
+
+    public ContentReader(InputStream is) throws IOException {
+        this.is = is;
+    }
+
+    public ContentReader(InputStream is, ContentReaderListener l) throws IOException {
+        this.is = is;
+        this.listener = l;
+    }
+
+    public void setListener(ContentReaderListener listener) {
+        this.listener = listener;
+    }
+
+    public ContentReaderListener getListener() {
+        return listener;
+    }
+
+    /**
+     * Blocks until the copy is complete, or until the thread is interrupted
+     */
+    public synchronized void waitUntilDone() throws InterruptedException {
+        boolean interrupted = false;
+        // poll interrupted flag, while waiting for copy to complete
+        while (!(interrupted = Thread.interrupted()) && !done) {
+            wait(1000);
+        }
+        if (interrupted) {
+            ServerAccess.logNoReprint("Stream copier: throwing InterruptedException");
+            //throw new InterruptedException();
+        }
+    }
+
+    @Override
+    public void run() {
+        try {
+            Reader br = new InputStreamReader(is, "UTF-8");
+            StringBuilder line = new StringBuilder();
+            while (true) {
+                int s = br.read();
+                if (s < 0) {
+                    if (line.length() > 0 && listener != null) {
+                        listener.lineReaded(line.toString());
+                    }
+                    break;
+                }
+                char ch = (char) s;
+                sb.append(ch);
+                line.append(ch);
+                if (ch == '\n') {
+                    if (listener != null) {
+                        listener.lineReaded(line.toString());
+                    }
+                    line = new StringBuilder();
+                }
+                if (listener != null) {
+                    listener.charReaded(ch);
+                }
+            }
+            //do not want to bother output with terminations
+            //mostly compaling when assassin kill the process about StreamClosed
+            //do not want to bother output with terminations
+            //mostly compaling when assassin kill the process about StreamClosed
+        } catch (Exception ex) {
+            // logException(ex);
+        } finally {
+            try {
+                is.close();
+            } catch (Exception ex) {
+                // ex.printStackTrace();
+            } finally {
+                done = true;
+            }
+        }
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/ContentReaderListener.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/ContentReaderListener.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/ContentReaderListener.java	(revision 416)
@@ -0,0 +1,45 @@
+/* ContentReaderListener.java
+Copyright (C) 2011,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.
+ */
+
+package net.sourceforge.jnlp;
+
+public interface ContentReaderListener {
+
+   public void charReaded(char ch);
+   public void lineReaded(String s);
+
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/LogItem.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/LogItem.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/LogItem.java	(revision 416)
@@ -0,0 +1,71 @@
+/* LogItem.java
+Copyright (C) 2011,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.
+ */
+
+package net.sourceforge.jnlp;
+
+import java.util.Date;
+
+class LogItem {
+
+    public final Date timeStamp = new Date();
+    public final StackTraceElement[] fullTrace = Thread.currentThread().getStackTrace();
+    public final String text;
+    private static final String ITEM_ELEMENT = "item";
+    private static final String ITEM_ID_ATTRIBUTE = "id";
+    private static final String STAMP_ELEMENT = "stamp";
+    private static final String TEXT_ELEMENT = "text";
+    private static final String FULLTRACE_ELEMENT = "fulltrace";
+
+    public LogItem(String text) {
+        this.text = text;
+    }
+
+    public StringBuilder toStringBuilder(int id) {
+        StringBuilder sb = new StringBuilder();
+        sb.append("  <" + ITEM_ELEMENT + " " + ITEM_ID_ATTRIBUTE + "=\"").append(id).append("\">\n");
+        sb.append("    <" + STAMP_ELEMENT + "><![CDATA[").append(timeStamp.toString()).append("]]></" + STAMP_ELEMENT + ">\n");
+        sb.append("    <" + TEXT_ELEMENT + "><![CDATA[\n").append(text).append("\n]]></" + TEXT_ELEMENT + ">\n");
+        sb.append("    <" + FULLTRACE_ELEMENT + "><![CDATA[\n");
+        //five methods since call in log methods + getStacktrace method
+        for (int i = 6; i < fullTrace.length; i++) {
+            sb.append(fullTrace[i].toString()).append("\n");
+        }
+        sb.append("\n]]>    </" + FULLTRACE_ELEMENT + ">\n");
+        sb.append("  </" + ITEM_ELEMENT + ">\n");
+        return sb;
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/LoggingBottleneck.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/LoggingBottleneck.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/LoggingBottleneck.java	(revision 416)
@@ -0,0 +1,215 @@
+/* LoggingBottleneck.java
+Copyright (C) 2011,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.
+ */
+
+package net.sourceforge.jnlp;
+
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStreamWriter;
+import java.io.Writer;
+import java.lang.reflect.Method;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Set;
+import net.sourceforge.jnlp.annotations.TestInBrowsers;
+import net.sourceforge.jnlp.browsertesting.BrowserTest;
+import net.sourceforge.jnlp.browsertesting.Browsers;
+
+public class LoggingBottleneck {
+
+    /**
+     * default singleton
+     */
+    private static LoggingBottleneck loggingBottleneck;
+    private static final File DEFAULT_LOG_FILE = new File("ServerAccess-logs.xml");
+    private static final File DEFAULT_STDERR_FILE = new File("stderr.log");
+    private static final File DEFAULT_STDOUT_FILE = new File("stdout.log");
+    private static final File DEFAULT_STDLOGS_FILE = new File("all.log");
+    private static final String LOGS_ELEMENT = "logs";
+    private static final String CLASSLOG_ELEMENT = "classlog";
+    private static final String CLASSNAME_ATTRIBUTE = "className";
+    private static final String TESTLOG_ELEMENT = "testLog";
+    private static final String TESTMETHOD_ATTRIBUTE = "testMethod";
+    private static final String FULLID_ATTRIBUTE = "fullId";
+    private BufferedWriter DEFAULT_STDERR_WRITER;
+    private BufferedWriter DEFAULT_STDOUT_WRITER;
+    private BufferedWriter DEFAULT_STDLOGS_WRITER;
+    /**
+     * This is static copy of name of id of currentBrowser for logging purposes
+     */
+    private String loggedBrowser = Browsers.none.toString();
+    /**
+     * map of classes, each have map of methods, each have errorlist, outLIst, and allList (allist contains also not std or err messages)
+     * class.testMethod.logs
+     */
+    final Map<String, Map<String, TestsLogs>> processLogs = new HashMap<String, Map<String, TestsLogs>>(100);
+    private boolean added = false;
+
+    public static LoggingBottleneck getDefaultLoggingBottleneck() {
+        if (loggingBottleneck == null) {
+            loggingBottleneck = new LoggingBottleneck();
+        }
+        return loggingBottleneck;
+
+    }
+
+    private LoggingBottleneck() {
+        try {
+            DEFAULT_STDOUT_WRITER = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(DEFAULT_STDOUT_FILE)));
+            DEFAULT_STDERR_WRITER = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(DEFAULT_STDERR_FILE)));
+            DEFAULT_STDLOGS_WRITER = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(DEFAULT_STDLOGS_FILE)));
+        } catch (Throwable t) {
+            t.printStackTrace();
+        }
+    }
+
+    void writeXmlLog() throws FileNotFoundException, IOException {
+        writeXmlLog(DEFAULT_LOG_FILE);
+    }
+
+    void writeXmlLog(File f) throws FileNotFoundException, IOException {
+        Writer w = new OutputStreamWriter(new FileOutputStream(f));
+        Set<Entry<String, Map<String, TestsLogs>>> classes = processLogs.entrySet();
+        w.write("<" + LOGS_ELEMENT + ">");
+        for (Entry<String, Map<String, TestsLogs>> classLog : classes) {
+            String className = classLog.getKey();
+            w.write("<" + CLASSLOG_ELEMENT + " " + CLASSNAME_ATTRIBUTE + "=\"" + className + "\">");
+            Set<Entry<String, TestsLogs>> testsLogs = classLog.getValue().entrySet();
+            for (Entry<String, TestsLogs> testLog : testsLogs) {
+                String testName = testLog.getKey();
+                String testLogs = testLog.getValue().toString();
+                w.write("<" + TESTLOG_ELEMENT + " " + TESTMETHOD_ATTRIBUTE + "=\"" + testName + "\" " + FULLID_ATTRIBUTE + "=\"" + className + "." + testName + "\"  >");
+                w.write(testLogs);
+                w.write("</" + TESTLOG_ELEMENT + ">");
+            }
+            w.write("</" + CLASSLOG_ELEMENT + ">");
+        }
+        w.write("</" + LOGS_ELEMENT + ">");
+        w.flush();
+        w.close();
+    }
+
+    void addToXmlLog(String message, boolean printToOut, boolean printToErr, StackTraceElement ste) {
+        Map<String, TestsLogs> classLog = processLogs.get(ste.getClassName());
+        if (classLog == null) {
+            classLog = new HashMap<String, TestsLogs>(50);
+            processLogs.put(ste.getClassName(), classLog);
+        }
+        String methodBrowseredName = ste.getMethodName();
+        methodBrowseredName = modifyMethodWithForBrowser(methodBrowseredName, ste.getClassName());
+        TestsLogs methodLog = classLog.get(methodBrowseredName);
+        if (methodLog == null) {
+            methodLog = new TestsLogs();
+            classLog.put(methodBrowseredName, methodLog);
+        }
+        if (!added) {
+            Runtime.getRuntime().addShutdownHook(new Thread() {
+
+                @Override
+                public void run() {
+                    try {
+                        LoggingBottleneck.getDefaultLoggingBottleneck().writeXmlLog();
+                    } catch (Exception ex) {
+                        ex.printStackTrace();
+                    }
+                }
+            });
+            added = true;
+        }
+        methodLog.add(printToErr, printToOut, message);
+    }
+
+    public String modifyMethodWithForBrowser(String methodBrowseredName, String className) {
+        try {
+            Class clazz = Class.forName(className);
+            /*
+             * By using this isAssignable to ensure corect class before invocation,
+             * then we lost possibility to track manualy set browsers, but it is correct,
+             * as method description is set only when annotation is used
+             */
+            if (clazz != null && BrowserTest.class.isAssignableFrom(clazz)) {
+                Method testMethod = clazz.getMethod(methodBrowseredName);
+                if (testMethod != null) {
+                    TestInBrowsers tib = testMethod.getAnnotation(TestInBrowsers.class);
+                    if (tib != null) {
+                        methodBrowseredName = methodBrowseredName + " - " + loggedBrowser;
+                    }
+                }
+            }
+        } catch (Throwable ex) {
+            ex.printStackTrace();
+        }
+        return methodBrowseredName;
+    }
+
+    public void setLoggedBrowser(String loggedBrowser) {
+        this.loggedBrowser = loggedBrowser;
+    }
+
+    public void logIntoPlaintextLog(String message, boolean printToOut, boolean printToErr) {
+        try {
+            if (printToOut) {
+                LoggingBottleneck.getDefaultLoggingBottleneck().stdout(message);
+            }
+            if (printToErr) {
+                LoggingBottleneck.getDefaultLoggingBottleneck().stderr(message);
+            }
+            LoggingBottleneck.getDefaultLoggingBottleneck().stdeall(message);
+        } catch (Throwable t) {
+            t.printStackTrace();
+        }
+    }
+
+    private void stdout(String idded) throws IOException {
+        DEFAULT_STDOUT_WRITER.write(idded);
+        DEFAULT_STDOUT_WRITER.newLine();
+    }
+
+    private void stderr(String idded) throws IOException {
+        DEFAULT_STDERR_WRITER.write(idded);
+        DEFAULT_STDERR_WRITER.newLine();
+    }
+
+    private void stdeall(String idded) throws IOException {
+        DEFAULT_STDLOGS_WRITER.write(idded);
+        DEFAULT_STDLOGS_WRITER.newLine();
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/ProcessAssasin.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/ProcessAssasin.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/ProcessAssasin.java	(revision 416)
@@ -0,0 +1,201 @@
+/* ProcessAssasin.java
+Copyright (C) 2011,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.
+ */
+package net.sourceforge.jnlp;
+
+import java.lang.reflect.Field;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * class which timeout any ThreadedProcess. This killing of 'thread with process' replaced not working process.destroy().
+ */
+class ProcessAssasin extends Thread {
+
+    long timeout;
+    private final ThreadedProcess p;
+    //false == is disabled:(
+    private boolean canRun = true;
+    private boolean wasTerminated = false;
+    /**
+     * if this is true, then process is not destroyed after timeout, but just left to its own destiny.
+     * Its stdout/err is no longer recorded, and it is leaking system resources until it dies by itself
+     * The contorl is returned to main thread with all informations recorded  untill now.
+     * You will be able to listen to std out from listeners still
+     */
+    private boolean skipInstedOfDesroy = false;
+
+    public ProcessAssasin(ThreadedProcess p, long timeout) {
+        this.p = (p);
+        this.timeout = timeout;
+    }
+
+    public ProcessAssasin(ThreadedProcess p, long timeout, boolean skipInstedOfDesroy) {
+        this.p = (p);
+        this.timeout = timeout;
+        this.skipInstedOfDesroy = skipInstedOfDesroy;
+    }
+
+    public void setCanRun(boolean canRun) {
+        this.canRun = canRun;
+        if (p != null) {
+            if (p.getP() != null) {
+                ServerAccess.logNoReprint("Stopping assassin for" + p.toString() + " " + p.getP().toString() + " " + p.getCommandLine() + ": ");
+            } else {
+                ServerAccess.logNoReprint("Stopping assassin for" + p.toString() + " " + p.getCommandLine() + ": ");
+            }
+        } else {
+            ServerAccess.logNoReprint("Stopping assassin for null job: ");
+        }
+    }
+
+    public boolean isCanRun() {
+        return canRun;
+    }
+
+    public boolean wasTerminated() {
+        return wasTerminated;
+    }
+
+    public void setSkipInstedOfDesroy(boolean skipInstedOfDesroy) {
+        this.skipInstedOfDesroy = skipInstedOfDesroy;
+    }
+
+    public boolean isSkipInstedOfDesroy() {
+        return skipInstedOfDesroy;
+    }
+
+    @Override
+    public void run() {
+        long startTime = System.nanoTime() / ServerAccess.NANO_TIME_DELIMITER;
+        while (canRun) {
+            try {
+                long time = System.nanoTime() / ServerAccess.NANO_TIME_DELIMITER;
+                //ServerAccess.logOutputReprint(time - startTime);
+                //ServerAccess.logOutputReprint((time - startTime) > timeout);
+                if ((time - startTime) > timeout) {
+                    try {
+                        if (p != null) {
+                            if (p.getP() != null) {
+                                ServerAccess.logErrorReprint("Timed out " + p.toString() + " " + p.getP().toString() + " .. killing " + p.getCommandLine() + ": ");
+                            } else {
+                                ServerAccess.logErrorReprint("Timed out " + p.toString() + " " + "null  .. killing " + p.getCommandLine() + ": ");
+                            }
+                            wasTerminated = true;
+                            if (p.getP() != null) {
+                                try {
+                                    if (!skipInstedOfDesroy) {
+                                        destroyProcess(p);
+                                    }
+                                } catch (Throwable ex) {
+                                    if (p.deadlyException == null) {
+                                        p.deadlyException = ex;
+                                    }
+                                    ex.printStackTrace();
+                                }
+                            }
+                            p.interrupt();
+//                            while (!ServerAccess.terminated.contains(p)) {
+//                                Thread.sleep(100);
+//                            }
+                            if (p.getP() != null) {
+                                ServerAccess.logErrorReprint("Timed out " + p.toString() + " " + p.getP().toString() + " .. killed " + p.getCommandLine());
+                            } else {
+                                ServerAccess.logErrorReprint("Timed out " + p.toString() + " null  .. killed " + p.getCommandLine());
+                            }
+                        } else {
+                            ServerAccess.logErrorReprint("Timed out null job");
+                        }
+                        break;
+                    } finally {
+                        p.setDestoyed(true);
+                    }
+                }
+                Thread.sleep(100);
+            } catch (Exception ex) {
+                ex.printStackTrace();
+            }
+        }
+        if (p != null) {
+            if (p.getP() != null) {
+                ServerAccess.logNoReprint("assassin for" + p.toString() + " " + p.getP().toString() + " .. done " + p.getCommandLine() + "  termination " + wasTerminated);
+            } else {
+                ServerAccess.logNoReprint("assassin for" + p.toString() + " null .. done " + p.getCommandLine() + "  termination " + wasTerminated);
+            }
+        } else {
+            ServerAccess.logNoReprint("assassin for non existing job  termination " + wasTerminated);
+        }
+    }
+
+    public static void destroyProcess(ThreadedProcess pp) {
+        Process p = pp.getP();
+        try {
+            Field f = p.getClass().getDeclaredField("pid");
+            f.setAccessible(true);
+            String pid = (f.get(p)).toString();
+            sigInt(pid);
+            //sigTerm(pid);
+            //sigKill(pid);
+        } catch (Exception ex) {
+            ServerAccess.logException(ex);
+        } finally {
+            p.destroy();
+        }
+    }
+
+    public static void sigInt(String pid) throws Exception {
+        kill(pid, "SIGINT");
+    }
+
+    public static void sigKill(String pid) throws Exception {
+        kill(pid, "SIGKILL");
+    }
+
+    public static void sigTerm(String pid) throws Exception {
+        kill(pid, "SIGTERM");
+    }
+
+    public static void kill(String pid,String signal) throws InterruptedException, Exception {
+        List<String> ll = new ArrayList<String>(4);
+        ll.add("kill");
+        ll.add("-s");
+        ll.add(signal);
+        ll.add(pid);
+        ServerAccess.executeProcess(ll); //sync, but  acctually release
+        //before affected application close
+        Thread.sleep(1000);
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/ProcessResult.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/ProcessResult.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/ProcessResult.java	(revision 416)
@@ -0,0 +1,69 @@
+/* ProcessResult.java
+Copyright (C) 2011,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.
+ */
+
+package net.sourceforge.jnlp;
+
+/**
+ * artefacts what are left by finished process
+ */
+public class ProcessResult {
+
+    public final String stdout;
+    public final String notFilteredStdout;
+    public final String stderr;
+    public final Process process;
+    public final Integer returnValue;
+    public final boolean wasTerminated;
+    /*
+     * possible exception which caused Process not to be launched
+     */
+    public final Throwable deadlyException;
+
+    public ProcessResult(String stdout, String stderr, Process process, boolean wasTerminated, Integer r, Throwable deadlyException) {
+        this.notFilteredStdout = stdout;
+        if (stdout == null) {
+            this.stdout = null;
+        } else {
+            this.stdout = stdout.replaceAll("EMMA:.*\n?", "");
+        }
+        this.stderr = stderr;
+        this.process = process;
+        this.wasTerminated = wasTerminated;
+        this.returnValue = r;
+        this.deadlyException = deadlyException;
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java	(revision 416)
@@ -0,0 +1,840 @@
+/* ServerAccess.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.
+ */
+package net.sourceforge.jnlp;
+
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.OutputStream;
+import java.io.OutputStreamWriter;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.io.Writer;
+import java.net.HttpURLConnection;
+import java.net.MalformedURLException;
+import java.net.ServerSocket;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+import net.sourceforge.jnlp.browsertesting.Browser;
+import net.sourceforge.jnlp.browsertesting.BrowserFactory;
+import net.sourceforge.jnlp.browsertesting.Browsers;
+import org.junit.Assert;
+
+/**
+ *
+ * This class provides access to virtual server and stuff around.
+ * It can find unoccupied port, start server, provides its singleton instantiation, launch parallel instantiations,
+ * read location of installed (tested javaws) see javaws.build.bin java property,
+ * location of server www root on file system (see test.server.dir java property),
+ * stubs for launching javaws and for locating resources and read resources.
+ *
+ * It can also execute processes with timeout (@see PROCESS_TIMEOUT) (used during launching javaws)
+ * Some protected apis are exported because public classes in this package are put to be tested by makefile.
+ *
+ * There are included test cases which show some basic usages.
+ *
+ *
+ */
+public class ServerAccess {
+
+    public static final long NANO_TIME_DELIMITER=1000000l;
+    /**
+     * java property which value containing path to default (makefile by) directory with deployed resources
+     */
+    public static final String TEST_SERVER_DIR = "test.server.dir";
+    /**
+     * java property which value containing path to installed (makefile by) javaws binary
+     */
+    public static final String JAVAWS_BUILD_BIN = "javaws.build.bin";
+    /** property to set the different then default browser
+     */
+    public static final String USED_BROWSERS = "used.browsers";
+    public static final String DEFAULT_LOCALHOST_NAME = "localhost";
+    /**
+     * server instance singleton
+     */
+    private static ServerLauncher server;
+    /**
+     * inner version of engine
+     */
+    private static final String version = "5";
+    /**
+     * timeout to read 'remote' resources
+     * This can be changed in runtime, but will affect all following tasks
+     */
+    public static int READ_TIMEOUT = 1000;
+    /**
+     * timeout in ms to let process to finish, before assassin will kill it.
+     * This can be changed in runtime, but will affect all following tasks
+     */
+    public static long PROCESS_TIMEOUT = 20 * 1000;//ms
+    /**
+     * this flag is indicating whether output of executeProcess should be logged. By default true.
+     */
+    public static boolean PROCESS_LOG = true;
+    public static boolean LOGS_REPRINT = false;
+
+    private Browser currentBrowser;
+    public static final String UNSET_BROWSER="unset_browser";
+
+    /**
+     * main method of this class prints out random free port
+     * or runs server
+     * param "port" prints out the port
+     * nothing or number will run server on random(or on number specified)
+     * port in -Dtest.server.dir
+     */
+    public static void main(String[] args) throws Exception {
+        if (args.length > 0 && args[0].equalsIgnoreCase("port")) {
+            int i = findFreePort();
+            System.out.println(i);
+            System.exit(0);
+        } else {
+            int port = 44321;
+            if (args.length > 0) {
+                port=new Integer(args[0]);
+            }
+            getIndependentInstance(port);
+            while (true) {
+                Thread.sleep(1000);
+            }
+
+        }
+    }
+
+    /**
+     * utility method to find random free port
+     *
+     * @return - found random free port
+     * @throws IOException - if socket can't be opened or no free port exists
+     */
+    public static int findFreePort()
+            throws IOException {
+        ServerSocket findPortTestingSocket = new ServerSocket(0);
+        int port = findPortTestingSocket.getLocalPort();
+        findPortTestingSocket.close();
+        return port;
+    }
+    public static final  String HEADLES_OPTION="-headless";
+    public static final  String VERBOSE_OPTION="-verbose ";
+
+    /**
+     * we would like to have an singleton instance ASAP
+     */
+    public ServerAccess() {
+
+        getInstance();
+
+
+    }
+
+    /**
+     *
+     * @return cached instance. If none, then creates new
+     */
+    public static ServerLauncher getInstance() {
+        if (server == null) {
+            server = getIndependentInstance();
+        }
+        return server;
+    }
+
+    /**
+     *
+     * @return new not cached iserver instance on random port,
+     * useful for testing application loading from different url then base
+     */
+    public static ServerLauncher getIndependentInstance() {
+        return getIndependentInstance(true);
+    }
+    public static ServerLauncher getIndependentInstance(boolean daemon) {
+        String dir = (System.getProperty(TEST_SERVER_DIR));
+        try{
+            return getIndependentInstance(dir, findFreePort(),daemon);
+        }catch (Exception ex){
+            throw  new RuntimeException(ex);
+        }
+    }
+
+
+    /**
+     *
+     * @return new not cached iserver instance on random port,
+     * useful for testing application loading from different url then base
+     */
+    
+    public static ServerLauncher getIndependentInstance(int port) {
+        return getIndependentInstance(port, true);
+    }
+    public static ServerLauncher getIndependentInstance(int port,boolean daemon) {
+        String dir = (System.getProperty(TEST_SERVER_DIR));
+        return getIndependentInstance(dir,port,daemon);
+    }
+
+    /**
+     *
+     * @return new not cached iserver instance on random port upon custom www root directory,
+     * useful for testing application loading from different url then base
+     */
+
+    public static ServerLauncher getIndependentInstance(String dir, int port) {
+        return getIndependentInstance(dir, port, true);
+    }
+    public static ServerLauncher getIndependentInstance(String dir, int port,boolean daemon) {
+
+
+        if (dir == null || dir.trim().length() == 0 || !new File(dir).exists() || !new File(dir).isDirectory()) {
+            throw new RuntimeException("test.server.dir property must be set to valid directory!");
+        }
+        try {
+            ServerLauncher lServerLuncher = new ServerLauncher(port, new File(dir));
+            Thread r=new Thread(lServerLuncher);
+            r.setDaemon(daemon);
+            r.start();
+            return lServerLuncher;
+        } catch (Exception ex) {
+            throw new RuntimeException(ex);
+        }
+
+    }
+
+    /**
+     *
+     * @return - value passed inside as javaws binary location. See JAVAWS_BUILD_BIN
+     */
+    public String getJavawsLocation() {
+        return System.getProperty(JAVAWS_BUILD_BIN);
+    }
+
+      /**
+     *
+     * @return - bianry from where to lunch current browser
+     */
+    public String getBrowserLocation() {
+       if (this.currentBrowser==null) return UNSET_BROWSER;
+       return this.currentBrowser.getBin();
+    }
+
+    public List<String> getBrowserParams() {
+       if (this.currentBrowser==null) return null;
+       List<String> l1=this.currentBrowser.getComaptibilitySwitches();
+       List<String> l2=this.currentBrowser.getDefaultSwitches();
+       List<String> l= new ArrayList();
+       if (l1!=null)l.addAll(l1);
+       if (l2!=null)l.addAll(l2);
+       return l;
+
+    }
+
+    public Browsers getCurrentBrowsers() {
+        if (currentBrowser==null) return null;
+        return currentBrowser.getID();
+    }
+    public Browser getCurrentBrowser() {
+        return currentBrowser;
+    }
+
+    public void setCurrentBrowser(Browsers currentBrowser) {
+        this.currentBrowser = BrowserFactory.getFactory().getBrowser(currentBrowser);
+        if (this.currentBrowser == null) {
+           LoggingBottleneck.getDefaultLoggingBottleneck().setLoggedBrowser(UNSET_BROWSER);
+        } else {
+            LoggingBottleneck.getDefaultLoggingBottleneck().setLoggedBrowser(this.currentBrowser.getID().toString());
+        }
+    }
+
+    public void setCurrentBrowser(Browser currentBrowser) {
+        this.currentBrowser = currentBrowser;
+        if (this.currentBrowser == null) {
+            LoggingBottleneck.getDefaultLoggingBottleneck().setLoggedBrowser(UNSET_BROWSER);
+        } else {
+            LoggingBottleneck.getDefaultLoggingBottleneck().setLoggedBrowser(this.currentBrowser.getID().toString());
+        }
+    }
+
+
+
+    /**
+     *
+     * @return - value passed inside as javaws binary location as file. See JAVAWS_BUILD_BIN
+     */
+    public File getJavawsFile() {
+        return new File(System.getProperty(JAVAWS_BUILD_BIN));
+    }
+
+    /**
+     *
+     * @return port on which is running cached server. If non singleton instance is running, new is created.
+     */
+    public int getPort() {
+        if (server == null) {
+            getInstance();
+        }
+        //if (!server.isRunning()) throw new RuntimeException("Server mysteriously died");
+        return server.getPort();
+
+    }
+
+    /**
+     *
+     * @return directory upon which is running cached server. If non singleton instance is running, new is created.
+     */
+    public File getDir() {
+        if (server == null) {
+            getInstance();
+        }
+        // if (!server.isRunning()) throw new RuntimeException("Server mysteriously died");
+        return server.getDir();
+    }
+
+    /**
+     *
+     * @return url pointing to cached server resource. If non singleton instance is running, new is created.
+     */
+    public URL getUrl(String resource) throws MalformedURLException {
+        if (server == null) {
+            getInstance();
+        }
+        //if (!server.isRunning()) throw new RuntimeException("Server mysteriously died");
+        return server.getUrl(resource);
+    }
+
+    /**
+     *
+     * @return url pointing to cached server . If non singleton instance is running, new is created.
+     */
+    public URL getUrl() throws MalformedURLException {
+        return getUrl("");
+
+    }
+
+    /**
+     *
+     * @return whether cached server is alive. If non singleton instance is running, new is created.
+     */
+    public boolean isRunning() {
+        if (server == null) {
+            getInstance();
+        }
+        //if (!server.isRunning()) throw new RuntimeException("Server mysteriously died");
+        return server.isRunning();
+
+    }
+
+    /**
+     * Return resource from cached server
+     * 
+     * @param resource to be located on cached server
+     * @return individual bytes of resource
+     * @throws IOException if connection can't be established or resource does not exist
+     */
+    public ByteArrayOutputStream getResourceAsBytes(String resource) throws IOException {
+        return getResourceAsBytes(getUrl(resource));
+    }
+
+    /**
+     * Return resource from cached server
+     * 
+     * @param resource to be located on cached server
+     * @return string constructed from  resource
+     * @throws IOException if connection can't be established or resource does not exist
+     */
+    public String getResourceAsString(String resource) throws IOException {
+        return getResourceAsString(getUrl(resource));
+    }
+
+    /**
+     * utility method which can read bytes of any stream
+     * 
+     * @param input stream to be read
+     * @return individual bytes of resource
+     * @throws IOException if connection can't be established or resource does not exist
+     */
+    public static ByteArrayOutputStream getBytesFromStream(InputStream is) throws IOException {
+        ByteArrayOutputStream buffer = new ByteArrayOutputStream();
+        int nRead;
+        byte[] data = new byte[16384];
+        while ((nRead = is.read(data, 0, data.length)) != -1) {
+            buffer.write(data, 0, nRead);
+        }
+        buffer.flush();
+        return buffer;
+    }
+
+    /**
+     * utility method which can read from any stream as one long String
+     * 
+     * @param input stream
+     * @return stream as string
+     * @throws IOException if connection can't be established or resource does not exist
+     */
+    public static String getContentOfStream(InputStream is,String encoding) throws IOException {
+        try {
+            BufferedReader br = new BufferedReader(new InputStreamReader(is, encoding));
+            StringBuilder sb = new StringBuilder();
+            while (true) {
+                String s = br.readLine();
+                if (s == null) {
+                    break;
+                }
+                sb.append(s).append("\n");
+
+            }
+            return sb.toString();
+        } finally {
+            is.close();
+        }
+
+    }
+
+    /**
+     * utility method which can read from any stream as one long String
+     *
+     * @param input stream
+     * @return stream as string
+     * @throws IOException if connection can't be established or resource does not exist
+     */
+    public static String getContentOfStream(InputStream is) throws IOException {
+        return getContentOfStream(is, "UTF-8");
+
+    }
+
+    /**
+     * utility method which can read bytes of resource from any url
+     * 
+     * @param resource to be located on any url
+     * @return individual bytes of resource
+     * @throws IOException if connection can't be established or resource does not exist
+     */
+    public static ByteArrayOutputStream getResourceAsBytes(URL u) throws IOException {
+        HttpURLConnection connection = (HttpURLConnection) u.openConnection();
+        connection = (HttpURLConnection) u.openConnection();
+        connection.setRequestMethod("GET");
+        connection.setDoOutput(true);
+        connection.setReadTimeout(READ_TIMEOUT);
+        connection.connect();
+        return getBytesFromStream(connection.getInputStream());
+
+    }
+
+    /**
+     * utility method which can read string of resource from any url
+     * 
+     * @param resource to be located on any url
+     * @return resource as string
+     * @throws IOException if connection can't be established or resource does not exist
+     */
+    public static String getResourceAsString(URL u) throws IOException {
+        HttpURLConnection connection = (HttpURLConnection) u.openConnection();
+        connection = (HttpURLConnection) u.openConnection();
+        connection.setRequestMethod("GET");
+        connection.setDoOutput(true);
+        connection.setReadTimeout(READ_TIMEOUT);
+        connection.connect();
+        return getContentOfStream(connection.getInputStream());
+    }
+
+    /**
+     * helping dummy  method to save String as file
+     * 
+     * @param content
+     * @param f
+     * @throws IOException
+     */
+    public static void saveFile(String content, File f) throws IOException {
+        saveFile(content, f, "utf-8");
+    }
+    public static void saveFile(String content, File f,String encoding) throws IOException {
+        Writer output = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(f),encoding));
+        output.write(content);
+        output.flush();
+        output.close();
+    }
+
+    /**
+     * wrapping method to executeProcess (eg: javaws -headless http://localhost:port/resource)
+     * will execute default javaws (@see JAVAWS_BUILD_BIN) upon default url upon cached server (@see SERVER_NAME @see getPort(), @see getInstance())
+     * with parameter -headless (no gui, no asking)
+     * @param resource  name of resource
+     * @return result what left after running this process
+     * @throws Exception
+     */
+    public ProcessResult executeJavawsHeadless(String resource) throws Exception {
+        return executeJavawsHeadless(null, resource);
+    }
+    public ProcessResult executeJavawsHeadless(String resource,ContentReaderListener stdoutl,ContentReaderListener stderrl) throws Exception {
+        return executeJavawsHeadless(null, resource,stdoutl,stderrl,null);
+    }
+     
+    /**
+     * wrapping method to executeProcess (eg: javaws arg arg -headless http://localhost:port/resource)
+     * will execute default javaws (@see JAVAWS_BUILD_BIN) upon default url upon cached server (@see SERVER_NAME @see getPort(), @see getInstance())
+     * with parameter -headless (no gui, no asking)
+     * @param resource  name of resource
+     * @param otherargs other arguments to be added to headless one
+     * @return result what left after running this process
+     * @throws Exception
+     */
+    public ProcessResult executeJavawsHeadless(List<String> otherargs, String resource) throws Exception {
+         return executeJavawsHeadless(otherargs, resource,null,null,null);
+     }
+    public ProcessResult executeJavawsHeadless(List<String> otherargs, String resource, String[] vars) throws Exception {
+         return executeJavawsHeadless(otherargs, resource,null,null,vars);
+     }
+
+    public ProcessResult executeJavawsHeadless(List<String> otherargs, String resource,ContentReaderListener stdoutl,ContentReaderListener stderrl,String[] vars) throws Exception {
+        if (otherargs == null) {
+            otherargs = new ArrayList<String>(1);
+        }
+        List<String> headlesList = new ArrayList<String>(otherargs);
+        headlesList.add(HEADLES_OPTION);
+        return executeJavaws(headlesList, resource,stdoutl,stderrl,vars);
+    }
+
+
+    /**
+     * wrapping method to executeProcess (eg: javaws  http://localhost:port/resource)
+     * will execute default javaws (@see JAVAWS_BUILD_BIN) upon default url upon cached server (@see SERVER_NAME @see getPort(), @see getInstance())
+     * @param resource  name of resource
+     * @return result what left after running this process
+     * @throws Exception
+     */
+    public ProcessResult executeJavaws(String resource) throws Exception {
+        return executeJavaws(null, resource);
+    }
+    public ProcessResult executeJavaws(String resource,ContentReaderListener stdoutl,ContentReaderListener stderrl) throws Exception {
+        return executeJavaws(null, resource,stdoutl,stderrl);
+    }
+    public ProcessResult executeBrowser(String resource) throws Exception {
+        return executeBrowser(getBrowserParams(), resource);
+    }
+    public ProcessResult executeBrowser(String resource,ContentReaderListener stdoutl,ContentReaderListener stderrl) throws Exception {
+        return executeBrowser(getBrowserParams(), resource, stdoutl, stderrl);
+    }
+
+    /**
+     *  wrapping method to executeProcess (eg: javaws arg arg http://localhost:port/resource)
+     * will execute default javaws (@see JAVAWS_BUILD_BIN) upon default url upon cached server (@see SERVER_NAME @see getPort(), @see getInstance()))
+     * @param resource  name of resource
+     * @param otherargs other arguments to be added
+     * @return result what left after running this process
+     * @throws Exception
+     */
+    public ProcessResult executeJavaws(List<String> otherargs, String resource) throws Exception {
+        return executeProcessUponURL(getJavawsLocation(), otherargs, getUrlUponThisInstance(resource));
+    }
+    public ProcessResult executeJavaws(List<String> otherargs, String resource,ContentReaderListener stdoutl,ContentReaderListener stderrl) throws Exception {
+        return executeProcessUponURL(getJavawsLocation(), otherargs, getUrlUponThisInstance(resource),stdoutl,stderrl);
+    }
+    public ProcessResult executeJavaws(List<String> otherargs, String resource,ContentReaderListener stdoutl,ContentReaderListener stderrl,String[] vars) throws Exception {
+        return executeProcessUponURL(getJavawsLocation(), otherargs, getUrlUponThisInstance(resource),stdoutl,stderrl,vars);
+    }
+
+    public ProcessResult executeBrowser(List<String> otherargs, String resource) throws Exception {
+        return executeProcessUponURL(getBrowserLocation(), otherargs, getUrlUponThisInstance(resource));
+    }
+    public ProcessResult executeBrowser(List<String> otherargs, String resource,ContentReaderListener stdoutl,ContentReaderListener stderrl) throws Exception {
+        return executeProcessUponURL(getBrowserLocation(), otherargs, getUrlUponThisInstance(resource),stdoutl,stderrl);
+    }
+
+     public ProcessResult executeBrowser(Browser b,List<String> otherargs, String resource) throws Exception {
+        return executeProcessUponURL(b.getBin(), otherargs, getUrlUponThisInstance(resource));
+    }
+    public ProcessResult executeBrowser(Browser b,List<String> otherargs, String resource,ContentReaderListener stdoutl,ContentReaderListener stderrl) throws Exception {
+        return executeProcessUponURL(b.getBin(), otherargs, getUrlUponThisInstance(resource),stdoutl,stderrl);
+    }
+
+    /**
+     * Ctreate resource on http, on 'localhost' on port on which this instance is running
+     * @param resource
+     * @return
+     * @throws MalformedURLException
+     */
+    public URL getUrlUponThisInstance(String resource) throws MalformedURLException {
+        if (!resource.startsWith("/")) {
+            resource = "/" + resource;
+        }
+        return new URL("http", server.getServerName(), getPort(), resource);
+    }
+
+    /**
+     * wrapping method to executeProcess (eg: javaws arg arg arg url)
+     * will execute default javaws (@see JAVAWS_BUILD_BIN) upon any server
+     * @param u url of resource upon any server
+     * @param javaws arguments
+     * @return result what left after running this process
+     * @throws Exception
+     */
+    public ProcessResult executeJavawsUponUrl(List<String> otherargs, URL u) throws Exception {
+        return executeProcessUponURL(getJavawsLocation(), otherargs, u);
+    }
+    public ProcessResult executeJavawsUponUrl(List<String> otherargs, URL u,ContentReaderListener stdoutl,ContentReaderListener stderrl) throws Exception {
+        return executeProcessUponURL(getJavawsLocation(), otherargs, u,stdoutl,stderrl);
+    }
+
+    /**
+     * wrapping utility method to executeProcess (eg: any_binary arg arg arg url)
+     *
+     * will execute  any process upon  url upon any server
+     * @param u url of resource upon any server
+     * @param javaws arguments
+     * @return result what left after running this process
+     * @throws Exception
+     */
+    public static ProcessResult executeProcessUponURL(String toBeExecuted, List<String> otherargs, URL u) throws Exception {
+        return executeProcessUponURL(toBeExecuted, otherargs, u,null,null);
+    }
+
+    public static ProcessResult executeProcessUponURL(String toBeExecuted, List<String> otherargs, URL u,ContentReaderListener stdoutl,ContentReaderListener stderrl) throws Exception {
+        return executeProcessUponURL(toBeExecuted, otherargs, u, stdoutl, stderrl, null);
+    }
+    public static ProcessResult executeProcessUponURL(String toBeExecuted, List<String> otherargs, URL u,ContentReaderListener stdoutl,ContentReaderListener stderrl,String[] vars) throws Exception {
+        Assert.assertNotNull(u);
+        Assert.assertNotNull(toBeExecuted);
+        Assert.assertTrue(toBeExecuted.trim().length() > 1);
+        if (otherargs == null) {
+            otherargs = new ArrayList<String>(1);
+        }
+        List<String> urledArgs = new ArrayList<String>(otherargs);
+        urledArgs.add(0, toBeExecuted);
+        urledArgs.add(u.toString());
+        return executeProcess(urledArgs, stdoutl, stderrl,vars);
+    }
+
+     public static ProcessResult executeProcess(final List<String> args) throws Exception {
+         return  executeProcess(args, null);
+     }
+      public static ProcessResult executeProcess(final List<String> args,ContentReaderListener stdoutl,ContentReaderListener stderrl) throws Exception {
+         return  executeProcess(args, null,stdoutl,stderrl);
+     }
+      public static ProcessResult executeProcess(final List<String> args,ContentReaderListener stdoutl,ContentReaderListener stderrl,String[] vars) throws Exception {
+         return  executeProcess(args, null,stdoutl,stderrl,vars);
+     }
+    /**
+     * utility method to lunch process, get its stdout/stderr, its return value and to kill it if running to long (@see PROCESS_TIMEOUT)
+     *
+     *
+     * Small bacground:
+     * This method creates thread inside which exec will be executed. Then creates assassin thread with given timeout to kill the previously created thread if necessary.
+     * Starts assassin thread, starts process thread. Wait until process is running, then starts content readers.
+     * Closes input of process.
+     * Wait until process is running (no matter if it terminate itself (correctly or badly), or is terminated by its assassin.
+     * Construct result from readed stdout, stderr, process return value, assassin successfully
+     *
+     * @param args binary with args to be executed
+     * @param dir optional, directory where this process will run
+     * @return what left from process - process itself, its stdout, stderr and return value and whether it was terminated by assassin.
+     * @throws Exception
+     */
+    public static ProcessResult executeProcess(final List<String> args,File dir) throws Exception {
+        return executeProcess(args, dir, null, null);
+    }
+
+    private static String createConnectionMessage(ThreadedProcess t) {
+        return "Connecting " + t.getCommandLine();
+    }
+
+    /**
+     * Proceed message s to logging with request to reprint to System.err
+     * @param s
+     */
+    public static void logErrorReprint(String s) {
+        log(s, false, true);
+    }
+
+    /**
+     * Proceed message s to logging with request to reprint to System.out
+     * @param s
+     */
+    public static void logOutputReprint(String s) {
+        log(s, true, false);
+    }
+
+    /**
+     * Proceed message s to logging withhout request to reprint
+     * @param s
+     */
+    public static void logNoReprint(String s) {
+        log(s, false, false);
+    }
+
+    private static void log(String message, boolean printToOut, boolean printToErr) {
+        String idded;
+        StackTraceElement ste = getTestMethod();
+        String fullId = ste.getClassName() + "." + ste.getMethodName();
+        fullId = LoggingBottleneck.getDefaultLoggingBottleneck().modifyMethodWithForBrowser(ste.getMethodName(), ste.getClassName());
+        if (message.contains("\n")) {
+            idded = fullId + ": \n" + message + "\n" + fullId + " ---";
+        } else {
+            idded = fullId + ": " + message;
+
+        }
+        if (LOGS_REPRINT) {
+            if (printToOut) {
+                System.out.println(idded);
+            }
+            if (printToErr) {
+                System.err.println(idded);
+            }
+        }
+        LoggingBottleneck.getDefaultLoggingBottleneck().logIntoPlaintextLog(idded, printToOut,printToErr);
+        LoggingBottleneck.getDefaultLoggingBottleneck().addToXmlLog(message,printToOut,printToErr,ste);
+    }
+
+    public static void logException(Throwable t){
+        logException(t, true);
+    }
+    public static void logException(Throwable t, boolean print){
+        try{
+        StringWriter sw = new StringWriter();
+        PrintWriter pw = new PrintWriter(sw);
+        t.printStackTrace(pw);
+        log(sw.toString(), false, print);
+        pw.close();
+        sw.close();
+        }catch(Exception ex){
+           throw new RuntimeException(ex);
+        }
+    }
+
+    private static StackTraceElement getTestMethod() {
+        return getTestMethod(Thread.currentThread().getStackTrace());
+    }
+
+    private static StackTraceElement getTestMethod(StackTraceElement[] stack) {
+        //0 is always thread
+        //1 is net.sourceforge.jnlp.ServerAccess
+        StackTraceElement result = stack[1];
+        String baseClass = stack[1].getClassName();
+        int i = 2;
+        for (; i < stack.length; i++) {
+            result = stack[i];//at least moving up
+            if(stack[i].getClassName().contains("$")){
+                continue;
+            }
+            if (!baseClass.equals(stack[i].getClassName())) {
+                break;
+            }
+        }
+        //if nothing left in stack then we have been in ServerAccess already
+        //so the target method is the highest form it and better to return it
+        //rather then die to ArrayOutOfBounds
+        if(i >= stack.length){
+            return result;
+        }
+        //now we are out of net.sourceforge.jnlp.ServerAccess
+        //method we need (the test)  is highest from following class
+        baseClass = stack[i].getClassName();
+        for (; i < stack.length; i++) {
+            if(stack[i].getClassName().contains("$")){
+                continue;
+            }
+            if (!baseClass.equals(stack[i].getClassName())) {
+                break;
+            }
+            result = stack[i];
+        }
+
+        return result;
+    }
+
+    public static ProcessResult executeProcess(final List<String> args, File dir, ContentReaderListener stdoutl, ContentReaderListener stderrl) throws Exception {
+        return executeProcess(args, dir, stdoutl, stderrl,null);
+
+    }
+    public static ProcessResult executeProcess(final List<String> args, File dir, ContentReaderListener stdoutl, ContentReaderListener stderrl,String[] vars) throws Exception {
+        ThreadedProcess t = new ThreadedProcess(args, dir,vars);
+        if (PROCESS_LOG) {
+            String connectionMesaage = createConnectionMessage(t);
+            log(connectionMesaage, true, true);
+        }
+        ProcessAssasin pa = new ProcessAssasin(t, PROCESS_TIMEOUT);
+        pa.start();
+        t.start();
+        while (t.getP() == null && t.deadlyException == null) {
+            Thread.sleep(100);
+        }
+        if (t.deadlyException != null) {
+            pa.setCanRun(false);
+            return new ProcessResult("", "", null, true, Integer.MIN_VALUE, t.deadlyException);
+        }
+        ContentReader crs = new ContentReader(t.getP().getInputStream(),stdoutl);
+        ContentReader cre = new ContentReader(t.getP().getErrorStream(),stderrl);
+
+        OutputStream out = t.getP().getOutputStream();
+        if (out != null) {
+            out.close();
+        }
+
+        new Thread(crs).start();
+        new Thread(cre).start();
+        while (t.isRunning()) {
+            Thread.sleep(100);
+        }
+
+        while (!t.isDestoyed()) {
+            Thread.sleep(100);
+        }
+        pa.setCanRun(false);
+        // ServerAccess.logOutputReprint(t.getP().exitValue()); when process is killed, this throws exception
+
+        ProcessResult pr=new ProcessResult(crs.getContent(), cre.getContent(), t.getP(), pa.wasTerminated(), t.getExitCode(), null);
+        if (PROCESS_LOG) {
+            log(pr.stdout, true, false);
+            log(pr.stderr, false, true);
+        }
+        return pr;
+    }
+
+    /**
+     * this is temprary solution until refactoring is fully done
+     * Use  net.sourceforge.jnlp.ProcessResult instead
+     */
+    @Deprecated
+    public static class ProcessResult extends net.sourceforge.jnlp.ProcessResult {
+
+        public ProcessResult(String stdout, String stderr, Process process, boolean wasTerminated, Integer r, Throwable deadlyException) {
+            super(stdout, stderr, process, wasTerminated, r, deadlyException);
+        }
+    }
+    }
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/ServerLauncher.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/ServerLauncher.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/ServerLauncher.java	(revision 416)
@@ -0,0 +1,120 @@
+/* ServerLauncher.java
+Copyright (C) 2011,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.
+ */
+
+package net.sourceforge.jnlp;
+
+import java.io.File;
+import java.net.MalformedURLException;
+import java.net.ServerSocket;
+import java.net.URL;
+
+/**
+ * wrapper around tiny http server to separate lunch configurations and servers.
+ * to allow terminations and stuff around.
+ */
+public class ServerLauncher implements Runnable {
+
+    /**
+     * default url name part.
+     * This can be changed in runtime, but will affect all following tasks upon those server
+     */
+    private String serverName = ServerAccess.DEFAULT_LOCALHOST_NAME;
+    private boolean running;
+    private final Integer port;
+    private final File dir;
+
+    public String getServerName() {
+        return serverName;
+    }
+
+    public void setServerName(String serverName) {
+        this.serverName = serverName;
+    }
+
+    public ServerLauncher(Integer port, File dir) {
+        this.port = port;
+        this.dir = dir;
+        System.err.println("port: " + port);
+        System.err.println("dir: " + dir);
+    }
+
+    public boolean isRunning() {
+        return running;
+    }
+
+    public Integer getPort() {
+        return port;
+    }
+
+    public File getDir() {
+        return dir;
+    }
+
+    public ServerLauncher(File dir) {
+        this(8181, dir);
+    }
+
+    public ServerLauncher(Integer port) {
+        this(port, new File(System.getProperty("user.dir")));
+    }
+
+    public ServerLauncher() {
+        this(8181, new File(System.getProperty("user.dir")));
+    }
+
+    public void run() {
+        running = true;
+        try {
+            ServerSocket s = new ServerSocket(port);
+            while (running) {
+                new TinyHttpdImpl(s.accept(), dir, port);
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        } finally {
+            running = false;
+        }
+    }
+
+    public URL getUrl(String resource) throws MalformedURLException {
+        return new URL("http", getServerName(), getPort(), resource);
+    }
+
+    public URL getUrl() throws MalformedURLException {
+        return getUrl("");
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/TestsLogs.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/TestsLogs.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/TestsLogs.java	(revision 416)
@@ -0,0 +1,85 @@
+/* TestsLogs.java
+Copyright (C) 2011,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.
+ */
+
+package net.sourceforge.jnlp;
+
+import java.util.LinkedList;
+import java.util.List;
+
+class TestsLogs {
+
+    public final List<LogItem> outs = new LinkedList<LogItem>();
+    public final List<LogItem> errs = new LinkedList<LogItem>();
+    public final List<LogItem> all = new LinkedList<LogItem>();
+    private static final String LOG_ELEMENT = "log";
+    private static final String LOG_ID_ATTRIBUTE = "id";
+
+    synchronized void add(boolean err, boolean out, String text) {
+        if (text == null) {
+            text = "null";
+        }
+        LogItem li = new LogItem(text);
+        if (out) {
+            outs.add(li);
+        }
+        if (err) {
+            errs.add(li);
+        }
+        all.add(li);
+
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = listToStringBuilder(outs, "out");
+        sb.append(listToStringBuilder(errs, "err"));
+        sb.append(listToStringBuilder(all, "all"));
+        return sb.toString();
+    }
+
+    private StringBuilder listToStringBuilder(List<LogItem> l, String id) {
+        StringBuilder sb = new StringBuilder();
+        sb.append("<" + LOG_ELEMENT + " " + LOG_ID_ATTRIBUTE + "=\"").append(id).append("\">\n");
+        int i = 0;
+        for (LogItem logItem : l) {
+            i++;
+            sb.append(logItem.toStringBuilder(i));
+        }
+        sb.append("</" + LOG_ELEMENT + ">\n");
+        return sb;
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/ThreadedProcess.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/ThreadedProcess.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/ThreadedProcess.java	(revision 416)
@@ -0,0 +1,166 @@
+/* ThreadedProcess.java
+Copyright (C) 2011,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.
+ */
+
+package net.sourceforge.jnlp;
+
+import java.io.File;
+import java.util.List;
+
+/**
+ *
+ * wrapper around Runtime.getRuntime().exec(...) which ensures that process is run inside its own, by us controlled, thread.
+ * Process builder caused some unexpected and weird behavior :/
+ */
+class ThreadedProcess extends Thread {
+
+    Process p = null;
+    List<String> args;
+    Integer exitCode;
+    Boolean running;
+    String[] variables;
+    File dir;
+    Throwable deadlyException = null;
+    /*
+     * before removing this "useless" variable
+     * check DeadLockTestTest.testDeadLockTestTerminated2
+     */
+    private boolean destoyed = false;
+
+    public boolean isDestoyed() {
+        return destoyed;
+    }
+
+    public void setDestoyed(boolean destoyed) {
+        this.destoyed = destoyed;
+    }
+
+    public Boolean isRunning() {
+        return running;
+    }
+
+    public Integer getExitCode() {
+        return exitCode;
+    }
+
+    public void setVariables(String[] variables) {
+        this.variables = variables;
+    }
+
+    public String[] getVariables() {
+        return variables;
+    }
+
+
+
+    public ThreadedProcess(List<String> args) {
+        this.args = args;
+    }
+
+    public ThreadedProcess(List<String> args, File dir) {
+        this(args);
+        this.dir = dir;
+    }
+
+    public ThreadedProcess(List<String> args,String[] vars) {
+        this(args);
+        this.variables = vars;
+    }
+    
+     public ThreadedProcess(List<String> args, File dir,String[] vars) {
+        this(args,dir);
+        this.variables = vars;
+    }
+
+
+    public String getCommandLine() {
+        String commandLine = "unknown command";
+        try {
+            if (args != null && args.size() > 0) {
+                commandLine = "";
+                for (String string : args) {
+                    commandLine = commandLine + " " + string;
+                }
+            }
+        } catch (Exception ex) {
+            ex.printStackTrace();
+        } finally {
+            return commandLine;
+        }
+    }
+
+    public Process getP() {
+        return p;
+    }
+
+    @Override
+    public void run() {
+        try {
+            running = true;
+            Runtime r = Runtime.getRuntime();
+            if (dir == null) {
+                if (variables == null) {
+                    p = r.exec(args.toArray(new String[0]));
+                } else {
+                    p = r.exec(args.toArray(new String[0]), variables);
+                }
+            } else {
+                p = r.exec(args.toArray(new String[0]), variables, dir);
+            }
+            try {
+                exitCode = p.waitFor();
+                Thread.sleep(500); //this is giving to fast done proecesses's e/o readers time to read all. I would like to know better solution :-/
+            } finally {
+                destoyed = true;
+            }
+        } catch (Exception ex) {
+            if (ex instanceof InterruptedException) {
+                //add to the set of terminated threaded processes
+                deadlyException = ex;
+                ServerAccess.logException(deadlyException, false);
+                //ServerAccess.terminated.add(this);
+            } else {
+                //happens when non-existing process is launched, is causing p null!
+                //ServerAccess.terminated.add(this);
+                deadlyException = ex;
+                ServerAccess.logException(deadlyException, false);
+                throw new RuntimeException(ex);
+            }
+        } finally {
+            running = false;
+        }
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/TinyHttpdImpl.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/TinyHttpdImpl.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/TinyHttpdImpl.java	(revision 416)
@@ -0,0 +1,174 @@
+/* TinyHttpdImpl.java
+Copyright (C) 2011,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.
+ */
+
+package net.sourceforge.jnlp;
+
+import java.io.BufferedReader;
+import java.io.DataOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.InputStreamReader;
+import java.net.Socket;
+import java.net.SocketException;
+import java.net.URLDecoder;
+import java.util.StringTokenizer;
+
+/**
+ * based on http://www.mcwalter.org/technology/java/httpd/tiny/index.html
+ * Very small implementation of http return headers for our served resources
+ * Originally Licenced under GPLv2.0 
+ *
+ * When resource starts with XslowX prefix, then resouce (without XslowX)
+ * is returned, but its delivery is delayed
+ */
+class TinyHttpdImpl extends Thread {
+
+    Socket c;
+    private final File dir;
+    private final int port;
+    private boolean canRun = true;
+    private static final String XSX = "/XslowX";
+
+    public TinyHttpdImpl(Socket s, File f, int port) {
+        c = s;
+        this.dir = f;
+        this.port = port;
+        start();
+    }
+
+    public void setCanRun(boolean canRun) {
+        this.canRun = canRun;
+    }
+
+    public int getPort() {
+        return port;
+    }
+
+    @Override
+    public void run() {
+        try {
+            BufferedReader i = new BufferedReader(new InputStreamReader(c.getInputStream()));
+            DataOutputStream o = new DataOutputStream(c.getOutputStream());
+            try {
+                while (canRun) {
+                    String s = i.readLine();
+                    if (s.length() < 1) {
+                        break;
+                    }
+                    if (s.startsWith("GET")) {
+                        StringTokenizer t = new StringTokenizer(s, " ");
+                        t.nextToken();
+                        String op = t.nextToken();
+                        String p = op;
+                        if (p.startsWith(XSX)) {
+                            p = p.replace(XSX, "/");
+                        }
+                        ServerAccess.logNoReprint("Getting: " + p);
+                        p = URLDecoder.decode(p, "UTF-8");
+                        ServerAccess.logNoReprint("Serving: " + p);
+                        p = (".".concat((p.endsWith("/")) ? p.concat("index.html") : p)).replace('/', File.separatorChar);
+                        File pp = new File(dir, p);
+                        int l = (int) pp.length();
+                        byte[] b = new byte[l];
+                        FileInputStream f = new FileInputStream(pp);
+                        f.read(b);
+                        String content = "";
+                        String ct = "Content-Type: ";
+                        if (p.toLowerCase().endsWith(".jnlp")) {
+                            content = ct + "application/x-java-jnlp-file\n";
+                        } else if (p.toLowerCase().endsWith(".html")) {
+                            content = ct + "text/html\n";
+                        } else if (p.toLowerCase().endsWith(".jar")) {
+                            content = ct + "application/x-jar\n";
+                        }
+                        o.writeBytes("HTTP/1.0 200 OK\nConten" + "t-Length:" + l + "\n" + content + "\n");
+                        if (op.startsWith(XSX)) {
+                            byte[][] bb = splitArray(b, 10);
+                            for (int j = 0; j < bb.length; j++) {
+                                Thread.sleep(2000);
+                                byte[] bs = bb[j];
+                                o.write(bs, 0, bs.length);
+                            }
+                        } else {
+                            o.write(b, 0, l);
+                        }
+                    }
+                }
+            } catch (SocketException e) {
+                ServerAccess.logException(e, false);
+            } catch (Exception e) {
+                o.writeBytes("HTTP/1.0 404 ERROR\n\n\n");
+                ServerAccess.logException(e, false);
+            }
+            o.close();
+        } catch (Exception e) {
+            ServerAccess.logException(e, false);
+        }
+    }
+
+    /**
+     * This function splits input array to severasl pieces
+     * from byte[length] splitt to n pieces s is retrunrd byte[n][length/n], except
+     * last piece which contains length%n
+     *
+     * @param input - array to be splitted
+     * @param pieces - to how many pieces it should be broken
+     * @return inidividual pices of original array, which concatet again givs original array
+     */
+    public static byte[][] splitArray(byte[] input, int pieces) {
+        int rest = input.length;
+        int rowLength = rest / pieces;
+        if (rest % pieces > 0) {
+            rowLength++;
+        }
+        if (pieces * rowLength >= rest + rowLength) {
+            pieces--;
+        }
+        int i = 0, j = 0;
+        byte[][] array = new byte[pieces][];
+        array[0] = new byte[rowLength];
+        for (byte b : input) {
+            if (i >= rowLength) {
+                i = 0;
+                array[++j] = new byte[Math.min(rowLength, rest)];
+            }
+            array[j][i++] = b;
+            rest--;
+        }
+        return array;
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/annotations/Bug.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/annotations/Bug.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/annotations/Bug.java	(revision 416)
@@ -0,0 +1,69 @@
+/* Bug.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.
+ */
+
+package net.sourceforge.jnlp.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * When declare for suite class or for Test-marked method,
+ * should be interpreted by report generating tool to links.
+ * Known shortcuts are
+ * SX  - http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=X
+ * PRX - http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=X
+ * RHX - https://bugzilla.redhat.com/show_bug.cgi?id=X
+ * DX  - http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=X
+ * GX  - http://bugs.gentoo.org/show_bug.cgi?id=X
+ * CAX - http://server.complang.tuwien.ac.at/cgi-bin/bugzilla/show_bug.cgi?id=X
+ * LPX - https://bugs.launchpad.net/bugs/X
+ *
+ * http://mail.openjdk.java.net/pipermail/distro-pkg-dev/
+ * and http://mail.openjdk.java.net/pipermail/ are proceed differently
+ * You just put eg @Bug(id="RH12345",id="http:/my.bukpage.com/terribleNew")
+ * and  RH12345 will be transalated as
+ * <a href="https://bugzilla.redhat.com/show_bug.cgi?id=123456">123456<a> or
+ * similar, the url will be inclueded as is. Both added to proper tests or suites
+ *
+ */
+@Target({ElementType.METHOD,ElementType.TYPE})
+@Retention(RetentionPolicy.RUNTIME)
+public @interface Bug {
+ public String[] id();
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/annotations/KnownToFail.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/annotations/KnownToFail.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/annotations/KnownToFail.java	(revision 416)
@@ -0,0 +1,61 @@
+/* KnownToFail.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.
+ */
+
+package net.sourceforge.jnlp.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * <p>
+ * This annotation marks a test as a known failure (as opposed to a
+ * regression). A test that is a known failure will not hold of a release,
+ * nor should developers hold off a fix if they run the unit tests and a
+ * test marked as a known failure fails.
+ * </p><p>
+ * This annotation is meant for adding tests for bugs before the fix is
+ * implemented.
+ * </p>
+ */
+
+@Target({ElementType.METHOD,ElementType.TYPE})
+@Retention(RetentionPolicy.RUNTIME)
+public @interface KnownToFail {
+    
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/annotations/NeedsDisplay.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/annotations/NeedsDisplay.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/annotations/NeedsDisplay.java	(revision 416)
@@ -0,0 +1,55 @@
+/* NeedsDisplay.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.
+ */
+
+
+package net.sourceforge.jnlp.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * This annotation should be declared for each test which requires DISPALY defined.
+ * If no display is defined, then those test will not be run
+ *
+ */
+@Target(ElementType.METHOD)
+@Retention(RetentionPolicy.RUNTIME)
+public @interface NeedsDisplay {
+
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/annotations/TestInBrowsers.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/annotations/TestInBrowsers.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/annotations/TestInBrowsers.java	(revision 416)
@@ -0,0 +1,50 @@
+/* TestInBrowsers.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.
+ */
+
+package net.sourceforge.jnlp.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import net.sourceforge.jnlp.browsertesting.Browsers;
+
+@Target(ElementType.METHOD)
+@Retention(RetentionPolicy.RUNTIME)
+public @interface TestInBrowsers {
+    public Browsers[] testIn();
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/browsertesting/Browser.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/browsertesting/Browser.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/browsertesting/Browser.java	(revision 416)
@@ -0,0 +1,56 @@
+/* Browser.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.
+ */
+
+package net.sourceforge.jnlp.browsertesting;
+
+import java.util.List;
+
+/**
+ * interface which represents individual browsers
+ */
+public interface Browser {
+    public String getDefaultBin();
+    public String getDefaultPluginExpectedLocation();
+    public String getBin();
+    //public void setBin(String bin);
+    public String getUserDefaultPluginExpectedLocation();
+    public Browsers getID();
+    public List<String> getComaptibilitySwitches();
+    public List<String> getDefaultSwitches();
+
+
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/browsertesting/BrowserFactory.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/browsertesting/BrowserFactory.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/browsertesting/BrowserFactory.java	(revision 416)
@@ -0,0 +1,226 @@
+/* BrowserFactory.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.
+ */
+
+package net.sourceforge.jnlp.browsertesting;
+
+import net.sourceforge.jnlp.annotations.TestInBrowsers;
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Random;
+import net.sourceforge.jnlp.ServerAccess;
+import net.sourceforge.jnlp.browsertesting.browsers.Chrome;
+import net.sourceforge.jnlp.browsertesting.browsers.Chromium;
+import net.sourceforge.jnlp.browsertesting.browsers.Epiphany;
+import net.sourceforge.jnlp.browsertesting.browsers.Firefox;
+import net.sourceforge.jnlp.browsertesting.browsers.Midory;
+import net.sourceforge.jnlp.browsertesting.browsers.Opera;
+
+public class BrowserFactory {
+
+    private static final BrowserFactory factory = new BrowserFactory(System.getProperty(ServerAccess.USED_BROWSERS));
+    private  List<Browser> configuredBrowsers;
+    Random oneGenerator = new Random();
+
+    public static BrowserFactory getFactory() {
+        return factory;
+    }
+
+    /**
+     * This is public just for testing purposes!
+     */
+    public BrowserFactory(String browsers) {
+        if (browsers == null) {
+            configuredBrowsers = new ArrayList<Browser>(0);
+        } else {
+            String[] s = browsers.split(File.pathSeparator);
+            configuredBrowsers = new ArrayList<Browser>(s.length);
+            for (int i = 0; i < s.length; i++) {
+                String string = s[i];
+                String[] p = string.split("/");
+                if (p.length > 1) {
+                    string = p[p.length - 1];
+                }
+                if (string.equals(Browsers.chromiumBrowser.toString())) {
+                    configuredBrowsers.add(new Chromium(s[i]));
+                }
+                if (string.equals(Browsers.googleChrome.toString())) {
+                    configuredBrowsers.add(new Chrome(s[i]));
+                }
+                if (string.equals(Browsers.opera.toString())) {
+                    configuredBrowsers.add(new Opera(s[i]));
+                }
+                if (string.equals(Browsers.firefox.toString())) {
+                    configuredBrowsers.add(new Firefox(s[i]));
+                }
+                if (string.equals(Browsers.epiphany.toString())) {
+                    configuredBrowsers.add(new Epiphany(s[i]));
+                }
+                if (string.equals(Browsers.midori.toString())) {
+                    configuredBrowsers.add(new Midory(s[i]));
+                }
+            }
+        }
+
+    }
+
+    public Browser getBrowser(Browsers id) {
+        for (int i = 0; i < configuredBrowsers.size(); i++) {
+            Browser browser = configuredBrowsers.get(i);
+            if (browser.getID() == id) {
+                return browser;
+            }
+
+        }
+        return null;
+
+    }
+
+    public Browser getFirst() {
+        for (int i = 0; i < configuredBrowsers.size(); i++) {
+            Browser browser = configuredBrowsers.get(i);
+            return browser;
+
+        }
+        return null;
+
+    }
+
+    public Browser getRandom() {
+        if (configuredBrowsers.isEmpty()){
+            return null;
+        }
+        return configuredBrowsers.get(oneGenerator.nextInt(configuredBrowsers.size()));
+    }
+
+    public List<Browser> getAllBrowsers() {
+        return Collections.unmodifiableList(configuredBrowsers);
+    }
+
+    public List<Browsers> getBrowsers(TestInBrowsers tib) {
+        return getBrowsers(tib.testIn());
+    }
+     public List<Browsers> getBrowsers(Browsers[] testIn) {
+        List<Browser> q = translateAnnotationSilently(testIn);
+         if (q==null || q.isEmpty()){
+            List<Browsers> qq = new ArrayList<Browsers>(0);
+               qq.add(Browsers.none);
+               return qq;
+            }
+        List<Browsers> qq = new ArrayList<Browsers>(q.size());
+         for (Browser browser : q) {
+             qq.add(browser.getID());
+         }
+         return qq;
+
+     }
+    /**
+     *
+     * @param testIn Bbrowsers which should be transformed to list of Browser
+     * @return all matching browser, if browser do not exists, this is ignored and run is silently continued
+     */
+    public List<Browser> translateAnnotationSilently(Browsers[] testIn) {
+        if (testIn==null) {
+            return null;
+        }
+        List<Browser> r = new ArrayList<Browser>(configuredBrowsers.size());
+        for (Browsers b : testIn) {
+            if (b == Browsers.all) {
+                if (getAllBrowsers().isEmpty()) {
+                    ServerAccess.logErrorReprint("You try to add all browsers, but there is none");
+                } else {
+                    r.addAll(getAllBrowsers());
+                }
+            } else if (b == Browsers.one) {
+                Browser bb = getRandom();
+                if (bb == null) {
+                    ServerAccess.logErrorReprint("You try to add random browser, but there is none");
+                } else {
+                    r.add(bb);
+                }
+            } else {
+                Browser bb = getBrowser(b);
+                if (bb == null) {
+                    ServerAccess.logErrorReprint("You try to add " + b.toString() + " browser, but it do not exists");
+                } else {
+                    r.add(bb);
+                }
+
+            }
+        }
+
+        return r;
+
+    }
+
+    /**
+     *
+     * @param tib
+     * @return all matching browser, if browser do not exists, exception is thrown
+     */
+    public List<Browser> translateAnnotationLaudly(TestInBrowsers tib) {
+        return translateAnnotationLaudly(tib.testIn());
+    }
+    public List<Browser> translateAnnotationLaudly(Browsers[] testIn) {
+        List<Browser> r = new ArrayList<Browser>(configuredBrowsers.size());
+        for (Browsers b :testIn) {
+            if (b == Browsers.all) {
+                if (getAllBrowsers().isEmpty()) {
+                    throw new IllegalStateException("You try to add all browsers, but there is none");
+                }
+                r.addAll(getAllBrowsers());
+            } else if (b == Browsers.one) {
+                Browser bb = getRandom();
+                if (bb == null) {
+                    throw new IllegalStateException("You try to add random browser, but there is none");
+                }
+                r.add(bb);
+            } else {
+                Browser bb = getBrowser(b);
+                if (bb == null) {
+                    throw new IllegalStateException("You try to add " + b.toString() + " browser, but it do not exists");
+                }
+                r.add(bb);
+
+            }
+        }
+
+        return r;
+
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/browsertesting/BrowserTest.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/browsertesting/BrowserTest.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/browsertesting/BrowserTest.java	(revision 416)
@@ -0,0 +1,60 @@
+/* BrowserTest.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.
+ */
+
+package net.sourceforge.jnlp.browsertesting;
+
+import net.sourceforge.jnlp.ServerAccess;
+import org.junit.runner.RunWith;
+
+
+@RunWith(value = BrowserTestRunner.class)
+public abstract class BrowserTest {
+
+    public static Browsers browser=null;
+    public static final ServerAccess server = new ServerAccess();
+
+    public static void setBrowser(Browsers b) {
+        browser = b;
+        server.setCurrentBrowser(browser);
+    }
+
+    public static Browsers getBrowser() {
+        return browser;
+    }
+
+
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/browsertesting/BrowserTestRunner.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/browsertesting/BrowserTestRunner.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/browsertesting/BrowserTestRunner.java	(revision 416)
@@ -0,0 +1,185 @@
+/* BrowserTestRunner.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.
+ */
+
+package net.sourceforge.jnlp.browsertesting;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.InvocationTargetException;
+import net.sourceforge.jnlp.annotations.TestInBrowsers;
+import java.lang.reflect.Method;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Random;
+import net.sourceforge.jnlp.ServerAccess;
+import org.junit.Ignore;
+import org.junit.internal.AssumptionViolatedException;
+import org.junit.internal.runners.model.EachTestNotifier;
+import org.junit.runner.Description;
+import org.junit.runner.notification.RunNotifier;
+import org.junit.runners.BlockJUnit4ClassRunner;
+import org.junit.runners.model.FrameworkMethod;
+import org.junit.runners.model.InitializationError;
+import org.junit.runners.model.Statement;
+
+public class BrowserTestRunner extends BlockJUnit4ClassRunner {
+
+    public BrowserTestRunner(java.lang.Class<?> testClass) throws InitializationError {
+        super(testClass);
+    }
+
+    @Override
+    protected void runChild(FrameworkMethod method, RunNotifier notifier) {
+        Method mm = method.getMethod();
+        TestInBrowsers tib = mm.getAnnotation(TestInBrowsers.class);
+        injectBrowserCatched(method, Browsers.none);
+        boolean browserIgnoration = false;
+        if (tib != null) {
+            try {
+                List<Browsers> testableBrowsers = BrowserFactory.getFactory().getBrowsers(tib);
+                String mbr = System.getProperty("modified.browsers.run");
+                if (mbr != null) {
+                    if (mbr.equalsIgnoreCase("all")) {
+                        if (!isBrowsersNoneSet(tib)) {
+                            testableBrowsers = BrowserFactory.getFactory().getBrowsers(new Browsers[]{Browsers.all});
+                        }
+                    } else if (mbr.equalsIgnoreCase("one")) {
+                        //this complication here is for case like
+                        // namely enumerated concrete browsers, so we want to pick up
+                        // random one from those already enumerated
+                        if (isBrowsersNoneSet(tib)) {
+                            testableBrowsers = Arrays.asList(new Browsers[]{testableBrowsers.get(new Random().nextInt(testableBrowsers.size()))});
+                        }
+                    } else if (mbr.equalsIgnoreCase("ignore")) {
+                        testableBrowsers = BrowserFactory.getFactory().getBrowsers(new Browsers[]{Browsers.none});
+                        browserIgnoration = true;
+                    } else {
+                        ServerAccess.logErrorReprint("unrecognized value of modified.browsers.run - " + mbr);
+                    }
+                }
+                for (Browsers browser : testableBrowsers) {
+                    try {
+                        injcetBrowser(method, browser);
+                        runChildX(method, notifier, browser, browserIgnoration);
+                    } catch (Exception ex) {
+                        //throw new RuntimeException("unabled to inject browser", ex);
+                        ServerAccess.logException(ex, true);
+                    }
+                }
+            } finally {
+                injectBrowserCatched(method, Browsers.none);
+            }
+        } else {
+            runChildX(method, notifier, null, false);
+        }
+    }
+
+    private boolean isBrowsersNoneSet(TestInBrowsers tib) {
+        if (tib.testIn().length == 1 && tib.testIn()[0] == Browsers.none) {
+            return true;
+        }
+        return false;
+    }
+
+    private void injectBrowserCatched(FrameworkMethod method, Browsers browser) {
+        try {
+            injcetBrowser(method, browser);
+        } catch (Exception ex) {
+            //throw new RuntimeException("unabled to inject browser", ex);
+            ServerAccess.logException(ex, true);
+        }
+    }
+
+    private void injcetBrowser(FrameworkMethod method, Browsers browser) throws IllegalAccessException, SecurityException, NoSuchMethodException, IllegalArgumentException, InvocationTargetException {
+        Method ff = method.getMethod().getDeclaringClass().getMethod("setBrowser", Browsers.class);
+        ff.invoke(null, browser);
+    }
+
+    protected void runChildX(final FrameworkMethod method, RunNotifier notifier, Browsers browser, boolean browserIgnoration) {
+        Description description = describeChild(method, browser);
+        if (method.getAnnotation(Ignore.class) != null) {
+            notifier.fireTestIgnored(description);
+        } else {
+            try {
+                runLeaf(methodBlock(method), description, notifier, browserIgnoration);
+//                ServerAccess.logOutputReprint("trying leaf");
+//                Method m = this.getClass().getMethod("runLeaf", Statement.class, Description.class, RunNotifier.class);
+//                m.setAccessible(true);
+//                m.invoke(this, methodBlock(method), description, notifier);
+//                ServerAccess.logOutputReprint("leaf invoked");
+            } catch (Exception ex) {
+                //throw new RuntimeException("unabled to lunch test on leaf", ex);
+                ServerAccess.logException(ex, true);
+            }
+        }
+    }
+
+    /**
+     * Runs a {@link Statement} that represents a leaf (aka atomic) test.
+     */
+    protected final void runLeaf(Statement statement, Description description,
+            RunNotifier notifier, boolean ignore) {
+        EachTestNotifier eachNotifier = new EachTestNotifier(notifier, description);
+        eachNotifier.fireTestStarted();
+          if (ignore) {
+                eachNotifier.fireTestIgnored();
+                return;
+            }
+        try {
+          statement.evaluate();
+        } catch (AssumptionViolatedException e) {
+            eachNotifier.addFailedAssumption(e);
+        } catch (Throwable e) {
+            eachNotifier.addFailure(e);
+        } finally {
+            eachNotifier.fireTestFinished();
+        }
+    }
+
+    protected Description describeChild(FrameworkMethod method, Browsers browser) {
+        if (browser == null) {
+            return super.describeChild(method);
+        } else {
+            try {
+                return Description.createTestDescription(getTestClass().getJavaClass(),
+                        testName(method) + " - " + browser.toString(), method.getAnnotations());
+            } catch (Exception ex) {
+                ServerAccess.logException(ex, true);
+                return super.describeChild(method);
+            }
+        }
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/browsertesting/Browsers.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/browsertesting/Browsers.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/browsertesting/Browsers.java	(revision 416)
@@ -0,0 +1,83 @@
+/* Browsers.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.
+ */
+
+package net.sourceforge.jnlp.browsertesting;
+
+/**
+ * When all represent all configured browser, one represens one random
+ * (the first found) configured browser. Each other represents inidivdual browsers
+ * 
+ */
+public enum Browsers {
+
+   none, all, one, opera, googleChrome, chromiumBrowser, firefox, midori,epiphany;
+
+    public String toExec() {
+        switch (this) {
+            case opera:
+                return "opera";
+            case googleChrome:
+                return "google-chrome";
+            case chromiumBrowser:
+                return "chromium-browser";
+            case firefox:
+                return "firefox";
+            case midori:
+                return "midori";
+            case epiphany:
+                return "epiphany";
+            default:
+                return null;
+
+        }
+    }
+
+    @Override
+     public String toString() {
+        if (toExec()!=null) return  toExec();
+        switch (this) {
+            case all:
+                return "all";
+            case one:
+                return "one";
+             case none:
+                return "unset_browser";
+           default:  return "unknown";
+
+        }
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/browsertesting/browsers/Chrome.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/browsertesting/browsers/Chrome.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/browsertesting/browsers/Chrome.java	(revision 416)
@@ -0,0 +1,52 @@
+/* Chrome.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.
+ */
+
+package net.sourceforge.jnlp.browsertesting.browsers;
+
+import net.sourceforge.jnlp.browsertesting.Browsers;
+
+public class Chrome extends MozillaFamilyLinuxBrowser {
+
+    public Chrome(String bin) {
+        super(bin);
+    }
+
+    @Override
+    public Browsers getID() {
+        return Browsers.googleChrome;
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/browsertesting/browsers/Chromium.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/browsertesting/browsers/Chromium.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/browsertesting/browsers/Chromium.java	(revision 416)
@@ -0,0 +1,52 @@
+/* Chromium.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.
+ */
+
+package net.sourceforge.jnlp.browsertesting.browsers;
+
+import net.sourceforge.jnlp.browsertesting.Browsers;
+
+public class Chromium extends MozillaFamilyLinuxBrowser {
+
+    public Chromium(String bin) {
+        super(bin);
+    }
+
+    @Override
+    public Browsers getID() {
+        return Browsers.chromiumBrowser;
+    }
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/browsertesting/browsers/Epiphany.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/browsertesting/browsers/Epiphany.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/browsertesting/browsers/Epiphany.java	(revision 416)
@@ -0,0 +1,55 @@
+/* Epiphany.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.
+ */
+
+package net.sourceforge.jnlp.browsertesting.browsers;
+
+import net.sourceforge.jnlp.browsertesting.Browsers;
+
+public class Epiphany extends MozillaFamilyLinuxBrowser {
+
+    public Epiphany(String bin) {
+        super(bin);
+    }
+
+    @Override
+    public Browsers getID() {
+        return Browsers.epiphany;
+    }
+
+
+    
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/browsertesting/browsers/Firefox.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/browsertesting/browsers/Firefox.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/browsertesting/browsers/Firefox.java	(revision 416)
@@ -0,0 +1,66 @@
+/* Firefox.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.
+ */
+
+package net.sourceforge.jnlp.browsertesting.browsers;
+
+import java.util.Arrays;
+import java.util.List;
+import net.sourceforge.jnlp.browsertesting.Browsers;
+
+public class Firefox extends MozillaFamilyLinuxBrowser {
+
+    public Firefox(String bin) {
+        super(bin);
+    }
+
+    String[] cs={"-new-tab"};
+
+    @Override
+    public Browsers getID() {
+        return Browsers.firefox;
+    }
+
+    @Override
+    public List<String> getComaptibilitySwitches() {
+        return Arrays.asList(cs);
+    }
+
+
+
+
+    
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/browsertesting/browsers/LinuxBrowser.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/browsertesting/browsers/LinuxBrowser.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/browsertesting/browsers/LinuxBrowser.java	(revision 416)
@@ -0,0 +1,97 @@
+/* LinuxBrowser.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.
+ */
+
+package net.sourceforge.jnlp.browsertesting.browsers;
+
+import net.sourceforge.jnlp.browsertesting.Browser;
+
+
+public abstract class LinuxBrowser implements Browser{
+      public static final String DEFAULT_PLUGIN_NAME="libjavaplugin.so";
+      public static final String DEFAULT_BIN_PATH="/usr/bin/";
+
+      protected final String bin;
+      protected String fsdir="unknown";
+
+    public LinuxBrowser(String bin) {
+        this.bin = bin;
+    }
+
+      
+
+    @Override
+    public String getBin() {
+        return bin;
+    }
+
+//    @Override
+//    public void setBin(String bin) {
+//        this.bin=bin;
+//    }
+
+    @Override
+    public String getDefaultBin() {
+       return DEFAULT_BIN_PATH+getID().toExec();
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (!(obj instanceof Browser)) return false;
+        Browser b=(Browser) obj;
+        return b.getBin().equals(getBin());
+    }
+
+    @Override
+    public int hashCode() {
+        int hash = 5;
+        hash = 59 * hash + (this.bin != null ? this.bin.hashCode() : 0);
+        return hash;
+    }
+
+      @Override
+    public String getDefaultPluginExpectedLocation() {
+        if (System.getProperty("os.arch").contains("64")) {
+            return "/usr/lib64/"+fsdir+"/plugins";
+        } else {
+            return "/usr/lib/"+fsdir+"/plugins";
+
+        }
+    }
+
+
+    
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/browsertesting/browsers/Midory.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/browsertesting/browsers/Midory.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/browsertesting/browsers/Midory.java	(revision 416)
@@ -0,0 +1,55 @@
+/* Midory.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.
+ */
+
+package net.sourceforge.jnlp.browsertesting.browsers;
+
+import net.sourceforge.jnlp.browsertesting.Browsers;
+
+public class Midory extends MozillaFamilyLinuxBrowser {
+
+    public Midory(String bin) {
+        super(bin);
+    }
+
+    @Override
+    public Browsers getID() {
+        return Browsers.midori;
+    }
+
+
+    
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/browsertesting/browsers/MozillaFamilyLinuxBrowser.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/browsertesting/browsers/MozillaFamilyLinuxBrowser.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/browsertesting/browsers/MozillaFamilyLinuxBrowser.java	(revision 416)
@@ -0,0 +1,66 @@
+/* MozillaFamilyLinuxBrowser.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.
+ */
+
+package net.sourceforge.jnlp.browsertesting.browsers;
+
+import java.util.List;
+
+public  abstract class MozillaFamilyLinuxBrowser  extends LinuxBrowser{
+
+    public MozillaFamilyLinuxBrowser(String bin) {
+        super(bin);
+        fsdir="mozilla";
+    }
+ 
+
+    @Override
+    public List<String> getComaptibilitySwitches() {
+        return null;
+    }
+
+    @Override
+    public List<String> getDefaultSwitches() {
+        return null;
+    }
+   
+    @Override
+    public String getUserDefaultPluginExpectedLocation() {
+        return   System.getProperty("user.home")+"/.mozilla/plugins";
+    }
+
+
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/browsertesting/browsers/Opera.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/browsertesting/browsers/Opera.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/browsertesting/browsers/Opera.java	(revision 416)
@@ -0,0 +1,73 @@
+/* Opera.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.
+ */
+package net.sourceforge.jnlp.browsertesting.browsers;
+
+import java.util.Arrays;
+import java.util.List;
+import net.sourceforge.jnlp.browsertesting.Browsers;
+
+public class Opera extends LinuxBrowser {
+
+    public Opera(String bin) {
+        super(bin);
+        fsdir="opera";
+    }
+
+    @Override
+    public Browsers getID() {
+        return Browsers.opera;
+    }
+
+    @Override
+    public String getUserDefaultPluginExpectedLocation() {
+        return null;
+    }
+
+
+    String[] cs={"-nosession", "-nomail", "-nolirc", "-newtab"};
+
+    @Override
+    public List<String> getComaptibilitySwitches() {
+        return Arrays.asList(cs);
+    }
+
+    @Override
+    public List<String> getDefaultSwitches() {
+        return null;
+    }
+
+}
Index: /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/mock/MockJNLPFile.java
===================================================================
--- /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/mock/MockJNLPFile.java	(revision 416)
+++ /branches/vendor/sourceforge/icedtea-web/current/tests/test-extensions/net/sourceforge/jnlp/mock/MockJNLPFile.java	(revision 416)
@@ -0,0 +1,55 @@
+/* MockJNLPFile.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.
+ */
+
+package net.sourceforge.jnlp.mock;
+
+import java.util.List;
+import java.util.Locale;
+
+import net.sourceforge.jnlp.InformationDesc;
+import net.sourceforge.jnlp.JNLPFile;
+
+public class MockJNLPFile extends JNLPFile {
+
+    public MockJNLPFile(Locale locale) {
+        defaultLocale = locale;
+    }
+
+    public void setInfo(List<InformationDesc> infoList) {
+        info = infoList;
+    }
+}
