OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <script src="../../http/tests/inspector/inspector-test.js"></script> | 3 <script src="../../http/tests/inspector/inspector-test.js"></script> |
4 <script src="editor-test.js"></script> | 4 <script src="editor-test.js"></script> |
5 <script> | 5 <script> |
6 | 6 |
7 function test() | 7 function test() |
8 { | 8 { |
9 InspectorTest.runTestSuite([ | 9 InspectorTest.runTestSuite([ |
10 function testCRInitial(next) | 10 function testCRInitial(next) |
11 { | 11 { |
12 var textEditor = InspectorTest.createTestEditor(); | 12 var textEditor = InspectorTest.createTestEditor(); |
13 textEditor.setText("1\n2\n3\n"); | 13 textEditor.setText("1\n2\n3\n"); |
14 InspectorTest.addResult(encodeURI(textEditor.text())); | 14 InspectorTest.addResult(encodeURI(textEditor.text())); |
15 next(); | 15 next(); |
16 }, | 16 }, |
17 | 17 |
18 function testCRLFInitial(next) | 18 function testCRLFInitial(next) |
19 { | 19 { |
20 var textEditor = InspectorTest.createTestEditor(); | 20 var textEditor = InspectorTest.createTestEditor(); |
21 textEditor.setText("1\r\n2\r\n3\r\n"); | 21 textEditor.setText("1\r\n2\r\n3\r\n"); |
22 InspectorTest.addResult(encodeURI(textEditor.text())); | 22 InspectorTest.addResult(encodeURI(textEditor.text())); |
23 next(); | 23 next(); |
24 }, | 24 }, |
25 | 25 |
26 function testCREdit(next) | 26 function testCREdit(next) |
27 { | 27 { |
28 var textEditor = InspectorTest.createTestEditor(); | 28 var textEditor = InspectorTest.createTestEditor(); |
29 textEditor.setText("1\n2\n3\n"); | 29 textEditor.setText("1\n2\n3\n"); |
30 textEditor.editRange(new Common.TextRange(1, 0, 1, 0), "foo\r\nbar")
; | 30 textEditor.editRange(new TextUtils.TextRange(1, 0, 1, 0), "foo\r\nba
r"); |
31 InspectorTest.addResult(encodeURI(textEditor.text())); | 31 InspectorTest.addResult(encodeURI(textEditor.text())); |
32 next(); | 32 next(); |
33 }, | 33 }, |
34 | 34 |
35 function testCRLFEdit(next) | 35 function testCRLFEdit(next) |
36 { | 36 { |
37 var textEditor = InspectorTest.createTestEditor(); | 37 var textEditor = InspectorTest.createTestEditor(); |
38 textEditor.setText("1\r\n2\r\n3\r\n"); | 38 textEditor.setText("1\r\n2\r\n3\r\n"); |
39 textEditor.editRange(new Common.TextRange(1, 0, 1, 0), "foo\r\nbar")
; | 39 textEditor.editRange(new TextUtils.TextRange(1, 0, 1, 0), "foo\r\nba
r"); |
40 InspectorTest.addResult(encodeURI(textEditor.text())); | 40 InspectorTest.addResult(encodeURI(textEditor.text())); |
41 next(); | 41 next(); |
42 } | 42 } |
43 ]); | 43 ]); |
44 } | 44 } |
45 | 45 |
46 </script> | 46 </script> |
47 </head> | 47 </head> |
48 | 48 |
49 <body onload="runTest()"> | 49 <body onload="runTest()"> |
50 <p> | 50 <p> |
51 This test checks that line endings are inferred from the initial text content, n
ot incremental editing. | 51 This test checks that line endings are inferred from the initial text content, n
ot incremental editing. |
52 </p> | 52 </p> |
53 | 53 |
54 </body> | 54 </body> |
55 </html> | 55 </html> |
OLD | NEW |