3 <script src=
"../../http/tests/inspector/inspector-test.js"></script>
4 <script src=
"editor-test.js"></script>
9 InspectorTest
.runTestSuite([
10 function testCRInitial(next
)
12 var textEditor
= InspectorTest
.createTestEditor();
13 textEditor
.setText("1\n2\n3\n");
14 InspectorTest
.addResult(encodeURI(textEditor
.text()));
18 function testCRLFInitial(next
)
20 var textEditor
= InspectorTest
.createTestEditor();
21 textEditor
.setText("1\r\n2\r\n3\r\n");
22 InspectorTest
.addResult(encodeURI(textEditor
.text()));
26 function testCREdit(next
)
28 var textEditor
= InspectorTest
.createTestEditor();
29 textEditor
.setText("1\n2\n3\n");
30 textEditor
.editRange(new WebInspector
.TextRange(1, 0, 1, 0), "foo\r\nbar");
31 InspectorTest
.addResult(encodeURI(textEditor
.text()));
35 function testCRLFEdit(next
)
37 var textEditor
= InspectorTest
.createTestEditor();
38 textEditor
.setText("1\r\n2\r\n3\r\n");
39 textEditor
.editRange(new WebInspector
.TextRange(1, 0, 1, 0), "foo\r\nbar");
40 InspectorTest
.addResult(encodeURI(textEditor
.text()));
49 <body onload=
"runTest()">
51 This test checks that line endings are inferred from the initial text content, not incremental editing.