Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!doctype html> | |
| 2 <script src="../../resources/testharness.js"></script> | |
| 3 <script src="../../resources/testharnessreport.js"></script> | |
| 4 <script src="../assert_selection.js"></script> | |
| 5 <div id="log"></div> | |
| 6 <script> | |
| 7 test(() => assert_selection( | |
| 8 '<div contenteditable>foo<br><div>|bar</div></div>', | |
| 9 'insertParagraph', | |
| 10 '<div contenteditable>foo<br><div><br></div><div>|bar</div></div>'), | |
| 11 'insert a paragraph separator after BR and before character'); | |
| 12 | |
| 13 test(() => assert_selection( | |
| 14 '<div contenteditable>foo<div>|bar</div></div>', | |
| 15 'insertParagraph', | |
| 16 '<div contenteditable>foo<div><br></div><div>|bar</div></div>'), | |
| 17 'insert a paragraph separator before character'); | |
| 18 | |
| 19 // A Testt for a bug in the paragraph separator insertion code that would add an | |
|
yoichio
2016/08/30 02:02:01
s/Testt/Test/g
yosin_UTC9
2016/08/30 04:41:09
Done
| |
| 20 // extra newline when inserting a paragraph separator at the end of a paragraph | |
| 21 // in text that preserves newlines. Also, an extraneous space would be added | |
| 22 // after 'foo'. Only one newline should be added. And there should be no | |
| 23 // extraneous spaces. | |
| 24 // | |
| 25 // It demonstrates a bug: too much padding is left between the new line and the | |
| 26 // end of the paragraph containing 'foo'. | |
| 27 test(() => assert_selection( | |
| 28 '<div contenteditable><pre>foo\n|bar</pre></div>', | |
| 29 'insertParagraph', | |
| 30 '<div contenteditable><pre>foo\n<br></pre><pre>|bar</pre></div>'), | |
| 31 'insert a paragraph separator in PRE'); | |
| 32 </script> | |
| 33 | |
| OLD | NEW |