| <html> |
| <head> |
| <script src="../../http/tests/inspector/inspector-test.js"></script> |
| <script> |
| |
| function test() |
| { |
| function createAndDumpTextModel(text) |
| { |
| var textModel = new WebInspector.TextEditorModel(); |
| textModel.setText(text); |
| InspectorTest.addResult("Lines:" + textModel.linesCount + ", length:" + textModel.text().length + ", input equals output:" + (textModel.text() === text)); |
| } |
| |
| createAndDumpTextModel("1\n2\n\n"); |
| createAndDumpTextModel("1\r\n2\r\n\r\n"); |
| createAndDumpTextModel("1\n2\n\r\n"); |
| createAndDumpTextModel("no line breaks"); |
| |
| InspectorTest.completeTest(); |
| } |
| |
| </script> |
| </head> |
| |
| <body onload="runTest()"> |
| <p> |
| This test checks the text editor model. |
| </p> |
| |
| </body> |
| </html> |