OLD | NEW |
| (Empty) |
1 <html> | |
2 <head> | |
3 <script src="../../http/tests/inspector/inspector-test.js"></script> | |
4 <script> | |
5 | |
6 function test() | |
7 { | |
8 function createAndDumpTextModel(text) | |
9 { | |
10 var textModel = new WebInspector.TextEditorModel(); | |
11 textModel.setText(text); | |
12 InspectorTest.addResult("Lines:" + textModel.linesCount + ", length:" +
textModel.text().length + ", input equals output:" + (textModel.text() === text)
); | |
13 } | |
14 | |
15 createAndDumpTextModel("1\n2\n\n"); | |
16 createAndDumpTextModel("1\r\n2\r\n\r\n"); | |
17 createAndDumpTextModel("1\n2\n\r\n"); | |
18 createAndDumpTextModel("no line breaks"); | |
19 | |
20 InspectorTest.completeTest(); | |
21 } | |
22 | |
23 </script> | |
24 </head> | |
25 | |
26 <body onload="runTest()"> | |
27 <p> | |
28 This test checks the text editor model. | |
29 </p> | |
30 | |
31 </body> | |
32 </html> | |
OLD | NEW |