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 <script> | |
| 6 test(() => { | |
| 7 assert_selection( | |
| 8 '', | |
| 9 selection => { | |
| 10 let doc = selection.document; | |
| 11 doc.documentElement.innerHTML = `<style>aaa</style> | |
| 12 First text in BODY | |
| 13 <br/> | |
| 14 <style> | |
| 15 * { display: -webkit-inline-box; } | |
| 16 .CLASS11 { float: right;} | |
| 17 </style> | |
| 18 <div class="CLASS11"></div> | |
| 19 Trailing text`; | |
| 20 | |
| 21 doc.designMode = 'on'; | |
| 22 doc.execCommand("SelectAll") | |
|
yosin_UTC9
2017/03/17 10:04:11
nit: Let's use single-quote since other parts use
| |
| 23 doc.execCommand("Indent"); | |
|
yosin_UTC9
2017/03/17 10:04:11
nit: Let's use single-quote since other parts use
| |
| 24 }, | |
| 25 | |
| 26 // TODO(tkent): We successfully avoid inserting BLOCKQUOTE under HTML, but | |
| 27 // inserting BR in the first STYLE looks wrong and resultant selection is | |
| 28 // weird. | |
| 29 '<html><head><style>aa<br>^a</style>\n</head>' + | |
| 30 '<body><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;">' + | |
| 31 'First text in BODY<br><style>\n* { display: -webkit-inline-box; }\n.CLASS11 { float: right;}\n' + | |
| 32 '<br></style>\nTrailing tex|t</blockquote><br><div class="CLASS11"></div>' + | |
| 33 '</body></html>', | |
| 34 {'dumpFromRoot': true}); | |
| 35 }, 'Indent the whole tree should not insert new nodes under the documentElement. '); | |
| 36 </script> | |
| OLD | NEW |