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

Unified Diff: LayoutTests/inspector/editor/text-editor-mark-clean.html

Issue 22638008: DevTools: Use CodeMirror modes instead of highlight tokenizers (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: address comments Created 7 years, 4 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
Index: LayoutTests/inspector/editor/text-editor-mark-clean.html
diff --git a/LayoutTests/inspector/editor/text-editor-mark-clean.html b/LayoutTests/inspector/editor/text-editor-mark-clean.html
index edf1376068efa1e59fdd902afa5c46ac3bc3ab3f..f004937970e3a32b6623d1bfe4ae570efec075f5 100644
--- a/LayoutTests/inspector/editor/text-editor-mark-clean.html
+++ b/LayoutTests/inspector/editor/text-editor-mark-clean.html
@@ -1,64 +1,64 @@
<html>
<head>
<script src="../../http/tests/inspector/inspector-test.js"></script>
-<script src="highlighter-test.js"></script>
+<script src="editor-test.js"></script>
<script>
function test()
{
- var textModel = new WebInspector.TextEditorModel();
- textModel.setText("1\n2\n3\n4");
+ var textEditor = InspectorTest.createTestEditor();
+ textEditor.setText("1\n2\n3\n4");
InspectorTest.runTestSuite([
function testMarkiningInitialStateAsClean(next)
{
- InspectorTest.addResult("Initial state: clean=" + textModel.isClean());
- textModel.markClean();
- InspectorTest.addResult("After marking clean: clean=" + textModel.isClean());
- textModel.editRange(WebInspector.TextRange.createFromLocation(0, 0), "newText");
- InspectorTest.addResult("EDIT; clean=" + textModel.isClean());
- textModel.undo();
- InspectorTest.addResult("UNDO; clean=" + textModel.isClean());
- textModel.redo();
- InspectorTest.addResult("REDO; clean=" + textModel.isClean());
- textModel.undo();
- InspectorTest.addResult("UNDO; clean=" + textModel.isClean());
- textModel.editRange(WebInspector.TextRange.createFromLocation(1, 0), "newText2");
- InspectorTest.addResult("EDIT; clean=" + textModel.isClean());
- textModel.undo();
- InspectorTest.addResult("UNDO; clean=" + textModel.isClean());
+ InspectorTest.addResult("Initial state: clean=" + textEditor.isClean());
+ textEditor.markClean();
+ InspectorTest.addResult("After marking clean: clean=" + textEditor.isClean());
+ textEditor.editRange(WebInspector.TextRange.createFromLocation(0, 0), "newText");
+ InspectorTest.addResult("EDIT; clean=" + textEditor.isClean());
+ textEditor.undo();
+ InspectorTest.addResult("UNDO; clean=" + textEditor.isClean());
+ textEditor.redo();
+ InspectorTest.addResult("REDO; clean=" + textEditor.isClean());
+ textEditor.undo();
+ InspectorTest.addResult("UNDO; clean=" + textEditor.isClean());
+ textEditor.editRange(WebInspector.TextRange.createFromLocation(1, 0), "newText2");
+ InspectorTest.addResult("EDIT; clean=" + textEditor.isClean());
+ textEditor.undo();
+ InspectorTest.addResult("UNDO; clean=" + textEditor.isClean());
next();
},
function testMiddleStateAsClean(next)
{
- InspectorTest.addResult("Initial state: clean=" + textModel.isClean());
+ InspectorTest.addResult("Initial state: clean=" + textEditor.isClean());
for(var i = 0; i < 3; ++i) {
- textModel.editRange(WebInspector.TextRange.createFromLocation(i, 0), "newText" + i);
- InspectorTest.addResult("EDIT; clean=" + textModel.isClean());
+ textEditor.editRange(WebInspector.TextRange.createFromLocation(i, 0), "newText" + i);
+ InspectorTest.addResult("EDIT; clean=" + textEditor.isClean());
}
- textModel.markClean();
- InspectorTest.addResult("After marking clean: clean=" + textModel.isClean());
- textModel.editRange(WebInspector.TextRange.createFromLocation(3, 0), "newText" + 3);
- InspectorTest.addResult("EDIT; clean=" + textModel.isClean());
+ textEditor.markClean();
+ InspectorTest.addResult("After marking clean: clean=" + textEditor.isClean());
+ textEditor.editRange(WebInspector.TextRange.createFromLocation(3, 0), "newText" + 3);
+ InspectorTest.addResult("EDIT; clean=" + textEditor.isClean());
for(var i = 0; i < 4; ++i) {
- textModel.undo();
- InspectorTest.addResult("UNDO; clean=" + textModel.isClean());
+ textEditor.undo();
+ InspectorTest.addResult("UNDO; clean=" + textEditor.isClean());
}
for(var i = 0; i < 4; ++i) {
- textModel.redo();
- InspectorTest.addResult("REDO; clean=" + textModel.isClean());
+ textEditor.redo();
+ InspectorTest.addResult("REDO; clean=" + textEditor.isClean());
}
for(var i = 0; i < 2; ++i) {
- textModel.undo();
- InspectorTest.addResult("UNDO; clean=" + textModel.isClean());
+ textEditor.undo();
+ InspectorTest.addResult("UNDO; clean=" + textEditor.isClean());
}
- textModel.editRange(WebInspector.TextRange.createFromLocation(1, 0), "foo");
- InspectorTest.addResult("EDIT; clean=" + textModel.isClean());
- textModel.undo();
- InspectorTest.addResult("UNDO; clean=" + textModel.isClean());
- textModel.undo();
- InspectorTest.addResult("UNDO; clean=" + textModel.isClean());
+ textEditor.editRange(WebInspector.TextRange.createFromLocation(1, 0), "foo");
+ InspectorTest.addResult("EDIT; clean=" + textEditor.isClean());
+ textEditor.undo();
+ InspectorTest.addResult("UNDO; clean=" + textEditor.isClean());
+ textEditor.undo();
+ InspectorTest.addResult("UNDO; clean=" + textEditor.isClean());
next();
},
]);
« no previous file with comments | « LayoutTests/inspector/editor/highlighter-test.js ('k') | LayoutTests/inspector/editor/text-editor-model.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698