Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / forms / focus-with-display-block.html
blob1307988834063fcba3f7d3b4de762a18dda4d187
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <script src="../../resources/js-test.js"></script>
5 <style>
6 output, meter, progress {
7 display: block;
9 </style>
10 </head>
11 <body>
12 <p id="description"></p>
13 <div id="console"></div>
14 <script>
15 description('This test ensures that &lt;output&gt;, &lt;meter&gt; and &lt;progress&gt; are not focused.');
17 function moveFocus(element) {
18 if (window.testRunner)
19 eventSender.keyDown('\t');
20 else
21 element.focus();
24 function checkFocus() {
25 var active = document.activeElement.nodeName;
26 if (active == "OUTPUT" || active == "METER" || active == "PROGRESS") {
27 debug(active + ' should not have focus.');
28 return false;
30 return true;
33 var input = document.createElement('input');
34 var output = document.createElement('output');
35 var progress = document.createElement('progress');
36 var meter = document.createElement('meter');
38 // Set a placeholder text to the output element to display the element.
39 output.innerHTML = 'Text in output element';
41 document.body.appendChild(input);
42 document.body.appendChild(output);
43 document.body.appendChild(progress);
44 document.body.appendChild(meter);
46 debug('- Moves the focus by using keyDown() in DRT, otherwise using element.focus().');
47 debug('- checkFocus() returns true when &lt;output&gt;, &lt;meter&gt; and &lt;progress&gt; do not have focus.');
49 moveFocus(input);
50 shouldBeTrue('checkFocus()');
51 moveFocus(output);
52 shouldBeTrue('checkFocus()');
53 moveFocus(progress);
54 shouldBeTrue('checkFocus()');
55 moveFocus(meter);
56 shouldBeTrue('checkFocus()');
57 </script>
58 </body>
59 </html>