OLD | NEW |
1 <!DOCTYPE html> | 1 <!doctype html> |
2 <html hidden> | 2 <html hidden> |
3 <head> | 3 <head> |
| 4 <script src="../../resources/testharness.js"></script> |
| 5 <script src="../../resources/testharnessreport.js"></script> |
4 <style> | 6 <style> |
5 html, head, style { | 7 html, head, style { |
6 display: block; | 8 display: block; |
7 } | 9 } |
8 </style> | 10 </style> |
9 </head> | 11 </head> |
| 12 <body> |
| 13 <div id="sample">foo</div> |
10 <script> | 14 <script> |
11 document.designMode = "on"; | 15 document.designMode = 'on'; |
12 document.execCommand("selectAll"); | 16 document.execCommand('selectAll'); |
13 document.execCommand("italic"); | 17 document.execCommand('italic'); |
14 document.execCommand("justifyLeft"); | 18 document.execCommand('justifyLeft'); |
15 document.documentElement.removeAttribute("hidden"); | 19 document.documentElement.removeAttribute('hidden'); |
| 20 |
| 21 test(() => { |
| 22 var sample = document.getElementById('sample'); |
| 23 assert_equals(sample.innerHTML, '<i>foo</i>'); |
| 24 // TODO(yosin): Once we do lazy visible position canonicalization, |
| 25 // we should have a caret. |
| 26 assert_equals(getSelection().rangeCount, 0); |
| 27 }, 'This is a crash test.'); |
16 </script> | 28 </script> |
17 <body> | |
18 This test passes if it does not crash. | |
19 </body> | 29 </body> |
20 </html> | 30 </html> |
OLD | NEW |