newcheckbox-test.lzx
<canvas>
<include href="incubator/newcheckbox.lzx"/>
<include href="lzunit"/>
<baseform id="theform" x="20" y="20">
<simplelayout axis="y" spacing="10"/>
<newcheckbox id="ncb" text="name joe" name="joe"/>
<newcheckbox id="xcb" text="submitname gimp" submitname="gimp"/>
<newcheckbox id="ocb" text="name ryan" name="originalryan"/>
</baseform>
<TestSuite>
<TestCase>
<method name="testNamedCheckboxToXML">
var str = ncb.toXML(ncb.value);
assertTrue(str.indexOf("joe") >= 0);
</method>
<method name="testSubmitNamedCheckboxToXML">
var str = ocb.toXML(ocb.value);
assertTrue(str.indexOf("ryan") >= 0);
</method>
<method name="testRenameSubmit">
var str = xcb.toXML(xcb.value);
assertTrue(str.indexOf("gimp") >= 0);
xcb.setAttribute("submitname", "carabiner");
str = xcb.toXML(xcb.value);
assertTrue(str.indexOf("carabiner") >= 0);
</method>
<method name="addTests">
this.addTest("testNamedCheckboxToXML");
this.addTest("testSubmitNamedCheckboxToXML");
this.addTest("testRenameSubmit");
</method>
</TestCase>
</TestSuite>
</canvas>
Cross References
Includes
Named Instances
- <baseform id="theform">
- <newcheckbox id="ncb">
- <newcheckbox id="ocb">
- <newcheckbox id="xcb">