Changeset 139605 in webkit


Ignore:
Timestamp:
Jan 14, 2013 4:05:58 AM (11 years ago)
Author:
commit-queue@webkit.org
Message:

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:
Location:
trunk/LayoutTests
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r139604 r139605  
     12013-01-14  Andrey Lushnikov  <lushnikov@chromium.org>
     2
     3        Web Inspector: InspectorTest.createTestEditor should not set any text in editor
     4        https://bugs.webkit.org/show_bug.cgi?id=106772
     5
     6        Reviewed by Pavel Feldman.
     7
     8        Add InspectorTest.fillEditorWithText helper method and remove this
     9        functionality from InspectorTest.createTestEditor method.
     10
     11        * inspector/editor/editor-test.js:
     12        (initialize_EditorTests.InspectorTest.createTestEditor): Removed functionality for setting editor text.
     13        (initialize_EditorTests.InspectorTest.fillEditorWithText): Added.
     14        * inspector/editor/text-editor-remove-chunks-from-dom.html:
     15        * inspector/editor/text-editor-selection.html:
     16        * inspector/editor/text-editor-type-over-decoration.html:
     17
    1182013-01-14  Csaba Osztrogonác  <ossy@webkit.org>
    219
  • trunk/LayoutTests/inspector/editor/editor-test.js

    r136703 r139605  
    22{
    33
    4 InspectorTest.createTestEditor = function(lineCount, clientHeight, chunkSize)
     4InspectorTest.createTestEditor = function(clientHeight, chunkSize)
    55{
    66    WebInspector.debugDefaultTextEditor = true;
     
    88    textEditor.overrideViewportForTest(0, clientHeight || 100, chunkSize || 10);
    99    textEditor.show(WebInspector.inspectorView.element);
     10    return textEditor;
     11};
     12
     13InspectorTest.fillEditorWithText = function(textEditor, lineCount)
     14{
    1015    var textModel = textEditor._textModel;
    1116    var lines = [];
     
    1318        lines.push(i);
    1419    textModel.setText(lines.join("\n"));
    15     return textEditor;
    16 };
     20}
    1721
    1822InspectorTest.dumpEditorChunks = function(textEditor)
  • trunk/LayoutTests/inspector/editor/text-editor-remove-chunks-from-dom.html

    r135606 r139605  
    1010        function testDamageLastChunk(next)
    1111        {
    12             var textEditor = InspectorTest.createTestEditor(5);
     12            var textEditor = InspectorTest.createTestEditor();
     13            InspectorTest.fillEditorWithText(textEditor, 5);
    1314            textEditor.setText(textEditor.text() + "\n");
    1415            InspectorTest.addResult("\nBefore editing");
  • trunk/LayoutTests/inspector/editor/text-editor-selection.html

    r138560 r139605  
    77function test()
    88{
    9     var textEditor = InspectorTest.createTestEditor(34);
     9    var textEditor = InspectorTest.createTestEditor();
     10    InspectorTest.fillEditorWithText(textEditor, 34);
    1011    InspectorTest.dumpEditorChunks(textEditor);
    1112
  • trunk/LayoutTests/inspector/editor/text-editor-type-over-decoration.html

    r136703 r139605  
    77function test()
    88{
    9     var textEditor = InspectorTest.createTestEditor(10);
     9    var textEditor = InspectorTest.createTestEditor();
     10    InspectorTest.fillEditorWithText(textEditor, 10);
    1011    var textModel = textEditor._textModel;
    1112
Note: See TracChangeset for help on using the changeset viewer.