aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog9
-rw-r--r--tests/netx/unit/net/sourceforge/jnlp/PluginParametersTest.java20
2 files changed, 29 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index fff6d6d..b8330c2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
2012-12-10 Saad Mohammad <[email protected]>
+ Add unit tests for PR1189.
+ * tests/netx/unit/net/sourceforge/jnlp/PluginParametersTest.java:
+ (testConstructorWithNoCodeAndObjectParam): Initialize PluginParameters
+ without code/object parameters.
+ (testConstructorWithOnlyJnlpHrefParam): Initialize PluginParameters with
+ jnlp_href but no code/object parameters.
+
+2012-12-10 Saad Mohammad <[email protected]>
+
Add reproducer for PR1189.
* tests/reproducers/simple/AppletTagWithMissingCodeAttribute/resources/AppletTagWithMissingCodeAttribute.html:
Simple webpage which contains an applet tag with no code attribute.
diff --git a/tests/netx/unit/net/sourceforge/jnlp/PluginParametersTest.java b/tests/netx/unit/net/sourceforge/jnlp/PluginParametersTest.java
index 0e05b53..fd855e2 100644
--- a/tests/netx/unit/net/sourceforge/jnlp/PluginParametersTest.java
+++ b/tests/netx/unit/net/sourceforge/jnlp/PluginParametersTest.java
@@ -111,4 +111,24 @@ public class PluginParametersTest {
}
+ /**
+ * Initialize PluginParameters without code/object parameters
+ */
+ @Test(expected = PluginParameterException.class)
+ public void testConstructorWithNoCodeAndObjectParam() {
+ Map<String, String> rawParams = new HashMap<String, String>();
+ rawParams.put("classid", "clsid:classidValue");
+ new PluginParameters(rawParams);
+ }
+
+ /**
+ * Initialize PluginParameters with jnlp_href but no code/object parameters
+ */
+ @Test
+ public void testConstructorWithOnlyJnlpHrefParam() {
+ Map<String, String> rawParams = new HashMap<String, String>();
+ rawParams.put("jnlp_href", "applet.jnlp");
+ PluginParameters pluginParam = new PluginParameters(rawParams);
+ assertEquals("applet.jnlp", pluginParam.getJNLPHref());
+ }
}