gecko-dev/toolkit/content/tests/widgets/window_label_checkbox.xul
Brian Grinstead 6515f97bcb Bug 1544322 - Part 1 - Remove the [type] attribute for one-liner <script> tags loading files in chrome://mochikit/content/ r=bzbarsky
This is an autogenerated commit to handle scripts loading mochitest harness files, in
the simple case where the script src is on the same line as the tag.

This was generated with https://bug1544322.bmoattachments.org/attachment.cgi?id=9058170
using the `--part 1` argument.

Differential Revision: https://phabricator.services.mozilla.com/D26812

--HG--
extra : moz-landing-system : lando
2019-04-15 20:56:58 +00:00

46 lines
1.3 KiB
XML

<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<window title="Label Checkbox Tests" width="200" height="200"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
<hbox>
<label control="checkbox" value="Label" id="label"/>
<checkbox id="checkbox"/>
<label control="radio2" value="Label" id="label2"/>
<radiogroup>
<radio/>
<radio id="radio2"/>
</radiogroup>
</hbox>
<script class="testbody" type="application/javascript">
<![CDATA[
let SimpleTest = opener.SimpleTest;
SimpleTest.waitForFocus(() => {
let ok = SimpleTest.ok;
let label = document.getElementById("label");
let checkbox = document.getElementById("checkbox");
let label2 = document.getElementById("label2");
let radio2 = document.getElementById("radio2");
checkbox.checked = true;
radio2.selected = false;
ok(checkbox.checked, "sanity check");
ok(!radio2.selected, "sanity check");
setTimeout(() => {
synthesizeMouseAtCenter(label, {});
ok(!checkbox.checked, "Checkbox should be unchecked");
synthesizeMouseAtCenter(label2, {});
ok(radio2.selected, "Radio2 should be selected");
opener.postMessage("done", "*");
window.close();
}, 0);
});
]]>
</script>
</window>