Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / pasteboard / pasting-into-p-should-not-nest-p.html
blobd0ff47c5a18453308b6fb3b822cbf7dbac82df13
1 <!DOCTYPE html>
2 <html>
3 <body>
4 <p id="description">This tests copying and pasting a p element into another p element doesn't end up in a nested p elements.</p>
5 <div id="editor" style="border: 1px solid black;" contenteditable>
6 <p style="font-size: 12px; color: blue;"><span id="source">Copy this line</span></p>
7 <p style="font-size: 12px;"><strong>Paste it below in the empty line below. The font size should be 12px and the text should be in blue.</strong></p>
8 <p style="font-size: 12px; color: blue;"><br></p>
9 </div>
10 <script src="../../resources/dump-as-markup.js"></script>
11 <script>
13 var source = document.getElementById('source');
14 getSelection().collapse(source, 0);
15 getSelection().modify('extend', 'forward', 'lineboundary');
16 getSelection().modify('extend', 'forward', 'character');
18 function serializeAndParseInnerHTML() {
19 var editor = document.getElementById('editor');
20 editor.innerHTML = editor.innerHTML;
23 if (document.queryCommandEnabled('copy')) {
24 Markup.description(document.getElementById('description').textContent);
26 document.execCommand('Copy', false, null);
27 getSelection().collapse(document.querySelector('br').parentNode, 0);
28 document.execCommand('Paste', false, null);
30 Markup.dump('editor', 'After paste');
32 serializeAndParseInnerHTML();
34 Markup.dump('editor', 'After innerHTML = innerHTML');
35 } else {
36 document.onpaste = function () { setTimeout(serializeAndParseInnerHTML); }
37 Markup.noAutoDump();
40 </script>
41 </body>
42 </html>