Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / css / first-letter-text-fragment-update.html
blob2db276edeab3fb94e549a98a721433cc2b64166d
1 <!doctype html>
2 <style>
3 p:first-letter {
4 text-decoration: underline;
5 color: green;
6 font-size: 2em;
8 </style>
9 <script>
10 if (window.testRunner)
11 testRunner.dumpAsText();
13 window.onload = function() {
14 document.body.offsetTop;
15 var firstChild = document.getElementById('test').firstChild;
16 firstChild.nodeValue = "PASS. " + firstChild.nodeValue;
18 document.body.offsetTop;
19 var textNode = document.createTextNode('I am adding a new text. ');
20 var para = document.getElementById('test');
21 para.insertBefore(textNode, para.firstChild);
23 document.body.offsetTop;
24 var test = document.getElementById('test');
25 var firstChild = test.firstChild;
26 test.removeChild(firstChild);
28 </script>
30 This test passes if the following paragraph starts with PASS.
32 <p id="test">This is a test paragraph. You can insert extra text at its start;
33 the :first-letter styles should be updated to accommodate this new text.</p>