Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / input / div-first-child-rule-textarea.html
blob09569dc70e85fdf2e42d96588b5846494ddaecfa
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 textarea 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('textarea')[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 textarea element even when there is div:last-child {}.</p>
29 <textarea>hello</textarea>
30 </body>
31 </html>