2 <script src=
"../../../resources/js-test.js"></script>
4 window
.onload = function() {
5 var checkbox
= document
.getElementById('checkbox');
6 var label
= document
.getElementById('label');
8 shouldBeFalse('checkbox.checked');
10 if (window
.eventSender
) {
11 eventSender
.mouseMoveTo(label
.offsetLeft
, label
.offsetTop
);
13 eventSender
.mouseDown();
14 eventSender
.mouseUp();
15 shouldBeTrue('checkbox.checked');
17 eventSender
.leapForward(1000);
18 eventSender
.mouseDown();
19 eventSender
.mouseUp();
20 shouldBeFalse('checkbox.checked');
24 shouldBeTrue('checkbox.checked');
27 shouldBeFalse('checkbox.checked');
29 window
.getSelection().selectAllChildren(label
);
31 shouldBeTrue('checkbox.checked');
34 shouldBeFalse('checkbox.checked');
37 <input id=
"checkbox" type=
"checkbox">
38 <label id=
"label" for=
"checkbox">Label
</label>
39 <div id=
"console"></div>