Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(296)

Unified Diff: LayoutTests/inspector/editor/text-editor-line-breaks.html

Issue 19540026: DevTools: [CodeMirror] respect CRLF line endings (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/devtools/front_end/CodeMirrorTextEditor.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/inspector/editor/text-editor-line-breaks.html
diff --git a/LayoutTests/inspector/editor/text-editor-line-breaks.html b/LayoutTests/inspector/editor/text-editor-line-breaks.html
index bc7492168953dd5b2efcd77ad0331ac0c385a25b..f271f44a8e867048ecbe2d3d094adeba74040db5 100644
--- a/LayoutTests/inspector/editor/text-editor-line-breaks.html
+++ b/LayoutTests/inspector/editor/text-editor-line-breaks.html
@@ -1,6 +1,7 @@
<html>
<head>
<script src="../../http/tests/inspector/inspector-test.js"></script>
+<script src="editor-test.js"></script>
<script>
function test()
@@ -8,35 +9,35 @@ function test()
InspectorTest.runTestSuite([
function testCRInitial(next)
{
- var textModel = new WebInspector.TextEditorModel();
- textModel.setText("1\n2\n3\n");
- InspectorTest.addResult(encodeURI(textModel.text()));
+ var textEditor = InspectorTest.createTestEditor();
+ textEditor.setText("1\n2\n3\n");
+ InspectorTest.addResult(encodeURI(textEditor.text()));
next();
},
function testCRLFInitial(next)
{
- var textModel = new WebInspector.TextEditorModel();
- textModel.setText("1\r\n2\r\n3\r\n");
- InspectorTest.addResult(encodeURI(textModel.text()));
+ var textEditor = InspectorTest.createTestEditor();
+ textEditor.setText("1\r\n2\r\n3\r\n");
+ InspectorTest.addResult(encodeURI(textEditor.text()));
next();
},
function testCREdit(next)
{
- var textModel = new WebInspector.TextEditorModel();
- textModel.setText("1\n2\n3\n");
- textModel.editRange(new WebInspector.TextRange(1, 0, 1, 0), "foo\r\nbar");
- InspectorTest.addResult(encodeURI(textModel.text()));
+ var textEditor = InspectorTest.createTestEditor();
+ textEditor.setText("1\n2\n3\n");
+ textEditor.editRange(new WebInspector.TextRange(1, 0, 1, 0), "foo\r\nbar");
+ InspectorTest.addResult(encodeURI(textEditor.text()));
next();
},
function testCRLFEdit(next)
{
- var textModel = new WebInspector.TextEditorModel();
- textModel.setText("1\r\n2\r\n3\r\n");
- textModel.editRange(new WebInspector.TextRange(1, 0, 1, 0), "foo\r\nbar");
- InspectorTest.addResult(encodeURI(textModel.text()));
+ var textEditor = InspectorTest.createTestEditor();
+ textEditor.setText("1\r\n2\r\n3\r\n");
+ textEditor.editRange(new WebInspector.TextRange(1, 0, 1, 0), "foo\r\nbar");
+ InspectorTest.addResult(encodeURI(textEditor.text()));
next();
}
]);
« no previous file with comments | « no previous file | Source/devtools/front_end/CodeMirrorTextEditor.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698