Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / input / div-first-child-rule-input.html
blob4fb868eedc39032cad57e5ec459ffccb87de4673
1 <!DOCTYPE html>
2 <head>
3 <style type="text/css">
4 div:last-child {}
5 </style>
6 <script>
8 if (window.testRunner)
9 testRunner.dumpAsText();
11 // The bug only reproduces when input is the last element in body
12 // So we have no choice but to run the test on page load.
13 function runTest() {
14 var input = document.body.getElementsByTagName('input')[0];
15 input.focus();
16 input.selectionStart = 5;
17 input.selectionEnd = 5;
18 document.execCommand('InsertHTML', false, '<div> world</div>');
19 var result = input.value == 'hello world' ? 'PASS' : 'FAIL';
20 input.parentNode.insertBefore(document.createTextNode(result), input);
21 if (window.testRunner)
22 input.parentNode.removeChild(input);
25 </script>
26 </head>
27 <body onload="runTest()">
28 <p>This test ensures WebKit can paste content inside an input element even when there is div:last-child {}.</p>
29 <input type="text" value="hello">
30 </body>
31 </html>