Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / forms / input-readonly-select.html
blob1515e8f757e920ad1ed8eb7f0c6032acd28a93c3
1 <!DOCTYPE html>
2 <html><body>
3 <script src="../../resources/js-test.js"></script>
5 <div id="container">
6 <input id="input" type="text" value="something">
7 <input id="readonlyInput" type="text" readonly value="something">
8 <input id="disabledInput" type="text" disabled value="something">
10 <textarea id="textarea">something</textarea>
11 <textarea id="readonlyTextarea" readonly>something</textarea>
12 <textarea id="disabledTextarea" disabled>something</textarea>
13 </div>
14 <pre id="console"></pre>
16 <script>
17 function doubleClickOn(element)
19 var x = element.offsetLeft + element.offsetWidth / 2;
20 var y = element.offsetTop + element.offsetHeight / 2;
22 eventSender.mouseMoveTo(x, y);
23 eventSender.mouseDown();
24 eventSender.mouseUp();
25 eventSender.mouseDown();
26 eventSender.mouseUp();
29 var selectEventFiredOnInput = false;
30 var selectEventFiredOnReadonlyInput = false;
31 var selectEventFiredOnDisabledInput = false;
32 var selectEventFiredOnTextarea = false;
33 var selectEventFiredOnReadonlyTextarea = false;
34 var selectEventFiredOnDisabledTextarea = false;
36 input.addEventListener('select', function() {
37 selectEventFiredOnInput = true;
38 });
39 readonlyInput.addEventListener('select', function() {
40 selectEventFiredOnReadonlyInput = true;
41 });
42 disabledInput.addEventListener('select', function() {
43 selectEventFiredOnDisabledInput = true;
44 });
46 textarea.addEventListener('select', function() {
47 selectEventFiredOnTextarea = true;
48 });
49 readonlyTextarea.addEventListener('select', function() {
50 selectEventFiredOnReadonlyTextarea = true;
51 });
52 disabledTextarea.addEventListener('select', function() {
53 selectEventFiredOnDisabledTextarea = true;
54 });
56 debug('double clicking on normal input');
57 doubleClickOn(input);
58 shouldBeTrue('selectEventFiredOnInput');
59 debug('');
61 debug('double clicking on readonly input');
62 doubleClickOn(readonlyInput);
63 shouldBeTrue('selectEventFiredOnReadonlyInput');
64 debug('');
66 debug('double clicking on disabled input');
67 doubleClickOn(disabledInput);
68 shouldBeTrue('selectEventFiredOnDisabledInput');
69 debug('');
71 debug('double clicking on normal textarea');
72 doubleClickOn(textarea);
73 shouldBeTrue('selectEventFiredOnTextarea');
74 debug('');
76 debug('double clicking on readonly textarea');
77 doubleClickOn(readonlyTextarea);
78 shouldBeTrue('selectEventFiredOnReadonlyTextarea');
79 debug('');
81 debug('double clicking on disabled textarea');
82 doubleClickOn(disabledTextarea);
83 shouldBeTrue('selectEventFiredOnDisabledTextarea');
84 debug('');
86 container.innerHTML = "";
87 </script>
89 </body></html>