<!DOCTYPE html>
<input type="checkbox" name="ch1" id="ch1" value="1" /><label id="for_ch1" for="ch1">checkbox1</label>
<input type="checkbox" name="ch2" id="ch2" value="2" /><label id="for_ch2" for="ch2">checkbox2</label>
<p id="description"></p>
<div id="console"></div>
<script src="../../resources/js-test.js"></script>
<script>
    description('Tests nested click event on label element with checkbox');
    document.getElementById('ch1').addEventListener('click', function() {
        document.getElementById('for_ch2').click();
    }, false);
    document.getElementById('for_ch1').click();
    shouldBeTrue("document.getElementById('ch2').checked");
</script>
