Web Inspector: InspectorTest.createTestEditor should not set any text in editor

https://bugs.webkit.org/show_bug.cgi?id=106772

Patch by Andrey Lushnikov <lushnikov@chromium.org> on 2013-01-14
Reviewed by Pavel Feldman.

Add InspectorTest.fillEditorWithText helper method and remove this
functionality from InspectorTest.createTestEditor method.

* inspector/editor/editor-test.js:
(initialize_EditorTests.InspectorTest.createTestEditor): Removed functionality for setting editor text.
(initialize_EditorTests.InspectorTest.fillEditorWithText): Added.
* inspector/editor/text-editor-remove-chunks-from-dom.html:
* inspector/editor/text-editor-selection.html:
* inspector/editor/text-editor-type-over-decoration.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139605 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent c8789d81
2013-01-14 Andrey Lushnikov <lushnikov@chromium.org>
Web Inspector: InspectorTest.createTestEditor should not set any text in editor
https://bugs.webkit.org/show_bug.cgi?id=106772
Reviewed by Pavel Feldman.
Add InspectorTest.fillEditorWithText helper method and remove this
functionality from InspectorTest.createTestEditor method.
* inspector/editor/editor-test.js:
(initialize_EditorTests.InspectorTest.createTestEditor): Removed functionality for setting editor text.
(initialize_EditorTests.InspectorTest.fillEditorWithText): Added.
* inspector/editor/text-editor-remove-chunks-from-dom.html:
* inspector/editor/text-editor-selection.html:
* inspector/editor/text-editor-type-over-decoration.html:
2013-01-14 Csaba Osztrogonác <ossy@webkit.org>
[Qt] Unreviewed gardening, skip a new asserting test to paint the bots green.
function initialize_EditorTests()
{
InspectorTest.createTestEditor = function(lineCount, clientHeight, chunkSize)
InspectorTest.createTestEditor = function(clientHeight, chunkSize)
{
WebInspector.debugDefaultTextEditor = true;
var textEditor = new WebInspector.DefaultTextEditor("", new WebInspector.TextEditorDelegate());
textEditor.overrideViewportForTest(0, clientHeight || 100, chunkSize || 10);
textEditor.show(WebInspector.inspectorView.element);
return textEditor;
};
InspectorTest.fillEditorWithText = function(textEditor, lineCount)
{
var textModel = textEditor._textModel;
var lines = [];
for (var i = 0; i < lineCount; ++i)
lines.push(i);
textModel.setText(lines.join("\n"));
return textEditor;
};
}
InspectorTest.dumpEditorChunks = function(textEditor)
{
......
......@@ -9,7 +9,8 @@ function test()
InspectorTest.runTestSuite([
function testDamageLastChunk(next)
{
var textEditor = InspectorTest.createTestEditor(5);
var textEditor = InspectorTest.createTestEditor();
InspectorTest.fillEditorWithText(textEditor, 5);
textEditor.setText(textEditor.text() + "\n");
InspectorTest.addResult("\nBefore editing");
InspectorTest.dumpEditorModel(textEditor);
......
......@@ -6,7 +6,8 @@
function test()
{
var textEditor = InspectorTest.createTestEditor(34);
var textEditor = InspectorTest.createTestEditor();
InspectorTest.fillEditorWithText(textEditor, 34);
InspectorTest.dumpEditorChunks(textEditor);
InspectorTest.runTestSuite([
......
......@@ -6,7 +6,8 @@
function test()
{
var textEditor = InspectorTest.createTestEditor(10);
var textEditor = InspectorTest.createTestEditor();
InspectorTest.fillEditorWithText(textEditor, 10);
var textModel = textEditor._textModel;
InspectorTest.dumpEditorChunks(textEditor);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment