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(); |
}, |
]); |