Changeset 109402 in webkit


Ignore:
Timestamp:
Mar 1, 2012 12:55:53 PM (12 years ago)
Author:
commit-queue@webkit.org
Message:

[DRT] Remove all PlainTextController usages in existing tests by adding internal API
https://bugs.webkit.org/show_bug.cgi?id=78570

Patch by Kangil Han <kangil.han@samsung.com> on 2012-03-01
Reviewed by Hajime Morita.

This patch will remove all PlainTextController usages
in existing DRT tests by adding internal API to WebCore/testing/Internals

.:

  • Source/autotools/symbols.filter:

Source/WebCore:

Changed editing/text-iterator/script-tests/basic-iteration.js to use internals.rangeAsText

  • testing/Internals.cpp:

(WebCore::Internals::rangeAsText):
(WebCore):

  • testing/Internals.h:

(Internals):

  • testing/Internals.idl:

Source/WebKit2:

  • win/WebKit2.def:
  • win/WebKit2CFLite.def:

LayoutTests:

  • editing/text-iterator/basic-iteration-expected.txt:
  • editing/text-iterator/script-tests/basic-iteration.js:
Location:
trunk
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r109320 r109402  
     12012-03-01  Kangil Han  <kangil.han@samsung.com>
     2
     3        [DRT] Remove all PlainTextController usages in existing tests by adding internal API
     4        https://bugs.webkit.org/show_bug.cgi?id=78570
     5
     6        Reviewed by Hajime Morita.
     7
     8        This patch will remove all PlainTextController usages
     9        in existing DRT tests by adding internal API to WebCore/testing/Internals
     10
     11        * Source/autotools/symbols.filter:
     12
    1132012-02-29  Ryosuke Niwa  <rniwa@webkit.org>
    214
  • trunk/LayoutTests/ChangeLog

    r109397 r109402  
     12012-03-01  Kangil Han  <kangil.han@samsung.com>
     2
     3        [DRT] Remove all PlainTextController usages in existing tests by adding internal API
     4        https://bugs.webkit.org/show_bug.cgi?id=78570
     5
     6        Reviewed by Hajime Morita.
     7
     8        This patch will remove all PlainTextController usages
     9        in existing DRT tests by adding internal API to WebCore/testing/Internals
     10
     11        * editing/text-iterator/basic-iteration-expected.txt:
     12        * editing/text-iterator/script-tests/basic-iteration.js:
     13
    1142012-03-01  Adam Klein  <adamk@chromium.org>
    215
  • trunk/LayoutTests/editing/text-iterator/basic-iteration-expected.txt

    r43533 r109402  
    44
    55
    6 PASS range.selectNodeContents(testDocument.body); plainText.plainText(range) is ""
    7 PASS range.selectNodeContents(testDocument.body); plainText.plainText(range) is "a"
    8 PASS range.selectNodeContents(testDocument.body); plainText.plainText(range) is "a"
    9 PASS range.selectNodeContents(testDocument.body); plainText.plainText(range) is "a\nb"
    10 PASS range.selectNodeContents(testDocument.body); plainText.plainText(range) is "debugging this note"
    11 FAIL range.selectNodeContents(testDocument.body); plainText.plainText(range) should be Hello
     6PASS range.selectNodeContents(testDocument.body); internals.rangeAsText(range) is ""
     7PASS range.selectNodeContents(testDocument.body); internals.rangeAsText(range) is "a"
     8PASS range.selectNodeContents(testDocument.body); internals.rangeAsText(range) is "a"
     9PASS range.selectNodeContents(testDocument.body); internals.rangeAsText(range) is "a\nb"
     10PASS range.selectNodeContents(testDocument.body); internals.rangeAsText(range) is "debugging this note"
     11FAIL range.selectNodeContents(testDocument.body); internals.rangeAsText(range) should be Hello
    1212. Was Hello
    1313
    1414.
    15 PASS range.selectNodeContents(testDocument.body); plainText.plainText(range) is "hey"
    16 PASS range.setStartBefore(testDocument.body); range.setEndAfter(testDocument.body); plainText.plainText(range) is "hey"
     15PASS range.selectNodeContents(testDocument.body); internals.rangeAsText(range) is "hey"
     16PASS range.setStartBefore(testDocument.body); range.setEndAfter(testDocument.body); internals.rangeAsText(range) is "hey"
    1717PASS successfullyParsed is true
    1818
  • trunk/LayoutTests/editing/text-iterator/script-tests/basic-iteration.js

    r48549 r109402  
    1111
    1212testDocument.body.innerHTML = '';
    13 shouldBe('range.selectNodeContents(testDocument.body); plainText.plainText(range)', '""');
     13shouldBe('range.selectNodeContents(testDocument.body); internals.rangeAsText(range)', '""');
    1414
    1515testDocument.body.innerHTML = 'a';
    16 shouldBe('range.selectNodeContents(testDocument.body); plainText.plainText(range)', '"a"');
     16shouldBe('range.selectNodeContents(testDocument.body); internals.rangeAsText(range)', '"a"');
    1717
    1818testDocument.body.innerHTML = '<div>a</div>';
    19 shouldBe('range.selectNodeContents(testDocument.body); plainText.plainText(range)', '"a"');
     19shouldBe('range.selectNodeContents(testDocument.body); internals.rangeAsText(range)', '"a"');
    2020
    2121testDocument.body.innerHTML = '<div>a</div><div>b</div>';
    22 shouldBe('range.selectNodeContents(testDocument.body); plainText.plainText(range)', '"a\\nb"');
     22shouldBe('range.selectNodeContents(testDocument.body); internals.rangeAsText(range)', '"a\\nb"');
    2323
    2424testDocument.body.innerHTML = '<div style="line-height: 18px; min-height: 436px; " id="node-content" class="note-content">debugging this note</div>';
    25 shouldBe('range.selectNodeContents(testDocument.body); plainText.plainText(range)', '"debugging this note"');
     25shouldBe('range.selectNodeContents(testDocument.body); internals.rangeAsText(range)', '"debugging this note"');
    2626
    2727testDocument.body.innerHTML = '<div>Hello<div><span><span><br></div></div>';
    28 shouldBe('range.selectNodeContents(testDocument.body); plainText.plainText(range)', '"Hello\\n"');
     28shouldBe('range.selectNodeContents(testDocument.body); internals.rangeAsText(range)', '"Hello\\n"');
    2929
    3030testDocument.body.innerHTML = '<div class="note-rule-vertical" style="left:22px"></div>\n\t\t<div class="note-rule-vertical" style="left:26px"></div>\n\n\t\t<div class="note-wrapper">\n\t\t\t<div class="note-header">\n\t\t\t\t<div class="note-body" id="note-body">\n\t\t\t\t\t<div class="note-content" id="note-content" contenteditable="true" style="line-height: 20px; min-height: 580px; ">hey</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\n';
    31 shouldBe('range.selectNodeContents(testDocument.body); plainText.plainText(range)', '"hey"');
    32 shouldBe('range.setStartBefore(testDocument.body); range.setEndAfter(testDocument.body); plainText.plainText(range)', '"hey"');
     31shouldBe('range.selectNodeContents(testDocument.body); internals.rangeAsText(range)', '"hey"');
     32shouldBe('range.setStartBefore(testDocument.body); range.setEndAfter(testDocument.body); internals.rangeAsText(range)', '"hey"');
    3333
    3434document.body.removeChild(subframe);
  • trunk/Source/WebCore/ChangeLog

    r109392 r109402  
     12012-03-01  Kangil Han  <kangil.han@samsung.com>
     2
     3        [DRT] Remove all PlainTextController usages in existing tests by adding internal API
     4        https://bugs.webkit.org/show_bug.cgi?id=78570
     5
     6        Reviewed by Hajime Morita.
     7
     8        This patch will remove all PlainTextController usages
     9        in existing DRT tests by adding internal API to WebCore/testing/Internals
     10
     11        Changed editing/text-iterator/script-tests/basic-iteration.js to use internals.rangeAsText
     12
     13        * testing/Internals.cpp:
     14        (WebCore::Internals::rangeAsText):
     15        (WebCore):
     16        * testing/Internals.h:
     17        (Internals):
     18        * testing/Internals.idl:
     19
    1202012-03-01  Adam Barth  <abarth@webkit.org>
    221
  • trunk/Source/WebCore/testing/Internals.cpp

    r109096 r109402  
    547547}
    548548
     549String Internals::rangeAsText(const Range* range, ExceptionCode& ec)
     550{
     551    if (!range) {
     552        ec = INVALID_ACCESS_ERR;
     553        return String();
     554    }
     555
     556    return range->text();
     557}
     558
    549559int Internals::lastSpellCheckRequestSequence(Document* document, ExceptionCode& ec)
    550560{
  • trunk/Source/WebCore/testing/Internals.h

    r109096 r109402  
    107107    unsigned locationFromRange(Element* scope, const Range*, ExceptionCode&);
    108108    unsigned lengthFromRange(Element* scope, const Range*, ExceptionCode&);
     109    String rangeAsText(const Range*, ExceptionCode&);
    109110
    110111    int lastSpellCheckRequestSequence(Document*, ExceptionCode&);
  • trunk/Source/WebCore/testing/Internals.idl

    r109195 r109402  
    8383        unsigned long locationFromRange(in Element scope, in Range range) raises (DOMException);
    8484        unsigned long lengthFromRange(in Element scope, in Range range) raises (DOMException);
     85        DOMString rangeAsText(in Range range) raises (DOMException);
    8586
    8687        long lastSpellCheckRequestSequence(in Document document) raises (DOMException);
  • trunk/Source/WebKit2/ChangeLog

    r109340 r109402  
     12012-03-01  Kangil Han  <kangil.han@samsung.com>
     2
     3        [DRT] Remove all PlainTextController usages in existing tests by adding internal API
     4        https://bugs.webkit.org/show_bug.cgi?id=78570
     5
     6        Reviewed by Hajime Morita.
     7
     8        This patch will remove all PlainTextController usages
     9        in existing DRT tests by adding internal API to WebCore/testing/Internals
     10
     11        * win/WebKit2.def:
     12        * win/WebKit2CFLite.def:
     13
    1142012-03-01  Nikolas Zimmermann  <nzimmermann@rim.com>
    215
  • trunk/Source/WebKit2/win/WebKit2.def

    r109096 r109402  
    194194        ?shadowTree@Element@WebCore@@QBEPAVShadowTree@2@XZ
    195195        ?suggestedValue@HTMLInputElement@WebCore@@QBEABVString@WTF@@XZ
     196        ?text@Range@WebCore@@QBE?AVString@WTF@@XZ
    196197        ?toDocument@WebCore@@YAPAVDocument@1@VJSValue@JSC@@@Z
    197198        ?toElement@WebCore@@YAPAVElement@1@VJSValue@JSC@@@Z
  • trunk/Source/WebKit2/win/WebKit2CFLite.def

    r109096 r109402  
    187187        ?shadowTree@Element@WebCore@@QBEPAVShadowTree@2@XZ
    188188        ?suggestedValue@HTMLInputElement@WebCore@@QBEABVString@WTF@@XZ
     189        ?text@Range@WebCore@@QBE?AVString@WTF@@XZ
    189190        ?toDocument@WebCore@@YAPAVDocument@1@VJSValue@JSC@@@Z
    190191        ?toElement@WebCore@@YAPAVElement@1@VJSValue@JSC@@@Z
  • trunk/Source/autotools/symbols.filter

    r109225 r109402  
    8686_ZNK7WebCore8Document8settingsEv;
    8787_ZNK7WebCore8Document4viewEv;
     88_ZNK7WebCore5Range4textEv;
    8889_ZNK7WebCore9TreeScope14getElementByIdERKN3WTF12AtomicStringE;
    8990_ZNK7WebCore14DocumentMarker11descriptionEv;
Note: See TracChangeset for help on using the changeset viewer.