contenteditable justify commands applied to next paragraph as well
[WebKit-https.git] / LayoutTests / editing / execCommand / contenteditable-justify-next-paragraph.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../resources/dump-as-markup.js"></script>
5 </head>
6
7 <body>
8 <div id="container" contenteditable >
9     <p id="paragraph1">Paragraph one.</p>
10     <p id="paragraph2">Paragraph two.</p>
11 </div>
12 </body>
13
14 <script>
15     document.getElementById('container').focus();
16     getSelection().modify('Extend', 'Forward', 'Line');
17     document.execCommand('JustifyCenter', false, null);
18
19     Markup.description('This test is for a bug when selection extends complete line on first paragraph and applying justifyCenter command will be applied to next paragraph also. Only first Paragraph with id "paragraph1" should have attribute style="text-align: center"');
20     Markup.dump('container');
21 </script>
22 </html>