-
Enhancement
-
Resolution: Fixed
-
P4
-
7
-
b138
-
generic
-
generic
Assertion:
method to be tested: public void testGetDecoratedPreference() throws
Exception in sun.plugin2.applet.JNLP2ManagerTest
1. Feed a JNLP xml file as below with decorated value "true"
private static final String SIMPLE_EMBEDDED_JNLP =
"<?xml version='1.0' encoding='UTF-8' standalone='no'?>" + EOL +
"<jnlp codebase='' href='launch.jnlp' spec='1.0+'>" + EOL +
" <information>" + EOL +
" <vendor>Sun</vendor>" + EOL +
" <title>GUIFormExamples</title>" + EOL +
" <shortcut online='true'>" + EOL +
" <desktop/>" + EOL +
" </shortcut>" + EOL +
" </information>" + EOL +
" <update check='always'/>" + EOL +
" <resources>" + EOL +
" <j2se href='http://java.sun.com/products/autodl/j2se'
version='1.5+'/>" + EOL +
" <jar href='GUIFormExamples.jar' main='true'/>" + EOL +
" <jar href='lib/swing-layout-1.0.4.jar'/>" + EOL +
" </resources>" + EOL +
" <applet-desc name='AntennaApplet'" + EOL +
" main-class='examples.AntennaApplet'" + EOL +
" width='800' height='50'" + EOL +
" >" + EOL +
" <param name='decorated' value='true'/>" + EOL +
" </applet-desc>" + EOL +
"</jnlp>";
Should return true
2. Feed a JNLP xml file as below with decorated value "false"
private static final String SIMPLE_EMBEDDED_JNLP =
"<?xml version='1.0' encoding='UTF-8' standalone='no'?>" + EOL +
"<jnlp codebase='' href='launch.jnlp' spec='1.0+'>" + EOL +
" <information>" + EOL +
" <vendor>Sun</vendor>" + EOL +
" <title>GUIFormExamples</title>" + EOL +
" <shortcut online='true'>" + EOL +
" <desktop/>" + EOL +
" </shortcut>" + EOL +
" </information>" + EOL +
" <update check='always'/>" + EOL +
" <resources>" + EOL +
" <j2se href='http://java.sun.com/products/autodl/j2se'
version='1.5+'/>" + EOL +
" <jar href='GUIFormExamples.jar' main='true'/>" + EOL +
" <jar href='lib/swing-layout-1.0.4.jar'/>" + EOL +
" </resources>" + EOL +
" <applet-desc name='AntennaApplet'" + EOL +
" main-class='examples.AntennaApplet'" + EOL +
" width='800' height='50'" + EOL +
" >" + EOL +
" <param name='decorated' value='false'/>" + EOL +
" </applet-desc>" + EOL +
"</jnlp>";
Should return false
3. Feed a JNLP xml file as below without decorated value
private static final String SIMPLE_EMBEDDED_JNLP =
"<?xml version='1.0' encoding='UTF-8' standalone='no'?>" + EOL +
"<jnlp codebase='' href='launch.jnlp' spec='1.0+'>" + EOL +
" <information>" + EOL +
" <vendor>Sun</vendor>" + EOL +
" <title>GUIFormExamples</title>" + EOL +
" <shortcut online='true'>" + EOL +
" <desktop/>" + EOL +
" </shortcut>" + EOL +
" </information>" + EOL +
" <update check='always'/>" + EOL +
" <resources>" + EOL +
" <j2se href='http://java.sun.com/products/autodl/j2se'
version='1.5+'/>" + EOL +
" <jar href='GUIFormExamples.jar' main='true'/>" + EOL +
" <jar href='lib/swing-layout-1.0.4.jar'/>" + EOL +
" </resources>" + EOL +
" <applet-desc name='AntennaApplet'" + EOL +
" main-class='examples.AntennaApplet'" + EOL +
" width='800' height='50'" + EOL +
" >" + EOL +
" </applet-desc>" + EOL +
"</jnlp>";
Should return true.
4. Feed a JNLP xml file as below without decorated value
private static final String SIMPLE_EMBEDDED_JNLP =
"<?xml version='1.0' encoding='UTF-8' standalone='no'?>" + EOL +
"<jnlp codebase='' href='launch.jnlp' spec='1.0+'>" + EOL +
" <information>" + EOL +
" <vendor>Sun</vendor>" + EOL +
" <title>GUIFormExamples</title>" + EOL +
" <shortcut online='true'>" + EOL +
" <desktop/>" + EOL +
" </shortcut>" + EOL +
" </information>" + EOL +
" <update check='always'/>" + EOL +
" <resources>" + EOL +
" <j2se href='http://java.sun.com/products/autodl/j2se'
version='1.5+'/>" + EOL +
" <jar href='GUIFormExamples.jar' main='true'/>" + EOL +
" <jar href='lib/swing-layout-1.0.4.jar'/>" + EOL +
" </resources>" + EOL +
" <applet-desc name='AntennaApplet'" + EOL +
" main-class='examples.AntennaApplet'" + EOL +
" width='800' height='50'" + EOL +
" >" + EOL +
" <param name='decorated' value='randomstr'/>" + EOL +
" </applet-desc>" + EOL +
"</jnlp>";
Should return false.
method to be tested: public void testGetDecoratedPreference() throws
Exception in sun.plugin2.applet.JNLP2ManagerTest
1. Feed a JNLP xml file as below with decorated value "true"
private static final String SIMPLE_EMBEDDED_JNLP =
"<?xml version='1.0' encoding='UTF-8' standalone='no'?>" + EOL +
"<jnlp codebase='' href='launch.jnlp' spec='1.0+'>" + EOL +
" <information>" + EOL +
" <vendor>Sun</vendor>" + EOL +
" <title>GUIFormExamples</title>" + EOL +
" <shortcut online='true'>" + EOL +
" <desktop/>" + EOL +
" </shortcut>" + EOL +
" </information>" + EOL +
" <update check='always'/>" + EOL +
" <resources>" + EOL +
" <j2se href='http://java.sun.com/products/autodl/j2se'
version='1.5+'/>" + EOL +
" <jar href='GUIFormExamples.jar' main='true'/>" + EOL +
" <jar href='lib/swing-layout-1.0.4.jar'/>" + EOL +
" </resources>" + EOL +
" <applet-desc name='AntennaApplet'" + EOL +
" main-class='examples.AntennaApplet'" + EOL +
" width='800' height='50'" + EOL +
" >" + EOL +
" <param name='decorated' value='true'/>" + EOL +
" </applet-desc>" + EOL +
"</jnlp>";
Should return true
2. Feed a JNLP xml file as below with decorated value "false"
private static final String SIMPLE_EMBEDDED_JNLP =
"<?xml version='1.0' encoding='UTF-8' standalone='no'?>" + EOL +
"<jnlp codebase='' href='launch.jnlp' spec='1.0+'>" + EOL +
" <information>" + EOL +
" <vendor>Sun</vendor>" + EOL +
" <title>GUIFormExamples</title>" + EOL +
" <shortcut online='true'>" + EOL +
" <desktop/>" + EOL +
" </shortcut>" + EOL +
" </information>" + EOL +
" <update check='always'/>" + EOL +
" <resources>" + EOL +
" <j2se href='http://java.sun.com/products/autodl/j2se'
version='1.5+'/>" + EOL +
" <jar href='GUIFormExamples.jar' main='true'/>" + EOL +
" <jar href='lib/swing-layout-1.0.4.jar'/>" + EOL +
" </resources>" + EOL +
" <applet-desc name='AntennaApplet'" + EOL +
" main-class='examples.AntennaApplet'" + EOL +
" width='800' height='50'" + EOL +
" >" + EOL +
" <param name='decorated' value='false'/>" + EOL +
" </applet-desc>" + EOL +
"</jnlp>";
Should return false
3. Feed a JNLP xml file as below without decorated value
private static final String SIMPLE_EMBEDDED_JNLP =
"<?xml version='1.0' encoding='UTF-8' standalone='no'?>" + EOL +
"<jnlp codebase='' href='launch.jnlp' spec='1.0+'>" + EOL +
" <information>" + EOL +
" <vendor>Sun</vendor>" + EOL +
" <title>GUIFormExamples</title>" + EOL +
" <shortcut online='true'>" + EOL +
" <desktop/>" + EOL +
" </shortcut>" + EOL +
" </information>" + EOL +
" <update check='always'/>" + EOL +
" <resources>" + EOL +
" <j2se href='http://java.sun.com/products/autodl/j2se'
version='1.5+'/>" + EOL +
" <jar href='GUIFormExamples.jar' main='true'/>" + EOL +
" <jar href='lib/swing-layout-1.0.4.jar'/>" + EOL +
" </resources>" + EOL +
" <applet-desc name='AntennaApplet'" + EOL +
" main-class='examples.AntennaApplet'" + EOL +
" width='800' height='50'" + EOL +
" >" + EOL +
" </applet-desc>" + EOL +
"</jnlp>";
Should return true.
4. Feed a JNLP xml file as below without decorated value
private static final String SIMPLE_EMBEDDED_JNLP =
"<?xml version='1.0' encoding='UTF-8' standalone='no'?>" + EOL +
"<jnlp codebase='' href='launch.jnlp' spec='1.0+'>" + EOL +
" <information>" + EOL +
" <vendor>Sun</vendor>" + EOL +
" <title>GUIFormExamples</title>" + EOL +
" <shortcut online='true'>" + EOL +
" <desktop/>" + EOL +
" </shortcut>" + EOL +
" </information>" + EOL +
" <update check='always'/>" + EOL +
" <resources>" + EOL +
" <j2se href='http://java.sun.com/products/autodl/j2se'
version='1.5+'/>" + EOL +
" <jar href='GUIFormExamples.jar' main='true'/>" + EOL +
" <jar href='lib/swing-layout-1.0.4.jar'/>" + EOL +
" </resources>" + EOL +
" <applet-desc name='AntennaApplet'" + EOL +
" main-class='examples.AntennaApplet'" + EOL +
" width='800' height='50'" + EOL +
" >" + EOL +
" <param name='decorated' value='randomstr'/>" + EOL +
" </applet-desc>" + EOL +
"</jnlp>";
Should return false.