Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / forms / label / selection-disabled-label.html
blob179a20460d5424c83e794f2369146d270828f8d5
1 <!DOCTYPE html>
2 <html>
3 <script src="../../../resources/js-test.js"></script>
4 <style>
5 span {
6 user-select: none;
7 -webkit-user-select: none;
9 </style>
10 <div>
11 Select, some text from this line!!!
12 </div>
13 <label class="label">
14 <input type="checkbox"/>
15 <span id='span'>Click Me</span>
16 </label>
17 <div id='console'></div>
19 <script>
20 description('Tests that the click event is passed when selection is disabaled' +
21 ' on label');
23 var span = document.getElementById('span');
24 testWithDoubleClick(span);
25 shouldBeEqualToString('window.getSelection().toString()', '');
27 var div = document.querySelector('div');
28 testWithDoubleClick(div);
29 shouldBeEqualToString('window.getSelection().toString()', 'Select');
31 shouldBeFalse("document.querySelector('input').checked");
33 span.click();
34 shouldBeTrue("document.querySelector('input').checked");
36 span.click();
37 shouldBeFalse("document.querySelector('input').checked");
39 div.style.display = 'none';
40 span.style.display = 'none';
42 function testWithDoubleClick(element)
44 eventSender.mouseMoveTo(element.offsetLeft, element.offsetTop);
45 eventSender.mouseDown();
46 eventSender.mouseUp();
47 eventSender.mouseDown();
48 eventSender.mouseUp();
50 </script>