3 <script src=
"../../../resources/js-test.js"></script>
4 <label><input type=
"checkbox">Label for a checkbox
</label>
6 description('Event order for a labeled control should be "focus" then "change"');
7 var label
= document
.querySelector('label');
8 var checkbox
= document
.querySelector('input');
11 checkbox
.addEventListener('focus', function() {
12 debug('"focus" event has been dispatched.');
14 shouldBe('changeCount', '0');
16 checkbox
.addEventListener('change', function() {
17 debug('"change" event has been dispatched.');
19 shouldBe('focusCount', '1');