Changeset 70429 in webkit


Ignore:
Timestamp:
Oct 24, 2010 6:21:33 PM (13 years ago)
Author:
morrita@google.com
Message:

2010-10-22 MORITA Hajime <morrita@google.com>

Reviewed by Tony Chang.

Text test conversion: editing/spelling/spelling-linebreak.html
https://bugs.webkit.org/show_bug.cgi?id=47649

Rewrote verification part using hasSpellingMarker().

  • editing/spelling/spelling-linebreak-expected.txt: Added.
  • editing/spelling/spelling-linebreak.html:
  • platform/gtk/editing/spelling/spelling-linebreak-expected.txt: Removed.
  • platform/mac/editing/spelling/spelling-linebreak-expected.checksum: Removed.
  • platform/mac/editing/spelling/spelling-linebreak-expected.png: Removed.
  • platform/mac/editing/spelling/spelling-linebreak-expected.txt: Removed.
Location:
trunk/LayoutTests
Files:
1 added
4 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r70416 r70429  
     12010-10-22  MORITA Hajime  <morrita@google.com>
     2
     3        Reviewed by Tony Chang.
     4
     5        Text test conversion: editing/spelling/spelling-linebreak.html
     6        https://bugs.webkit.org/show_bug.cgi?id=47649
     7       
     8        Rewrote verification part using hasSpellingMarker().
     9
     10        * editing/spelling/spelling-linebreak-expected.txt: Added.
     11        * editing/spelling/spelling-linebreak.html:
     12        * platform/gtk/editing/spelling/spelling-linebreak-expected.txt: Removed.
     13        * platform/mac/editing/spelling/spelling-linebreak-expected.checksum: Removed.
     14        * platform/mac/editing/spelling/spelling-linebreak-expected.png: Removed.
     15        * platform/mac/editing/spelling/spelling-linebreak-expected.txt: Removed.
     16
    1172010-10-24  Daniel Bates  <dbates@rim.com>
    218
  • trunk/LayoutTests/editing/spelling/spelling-linebreak.html

    r40317 r70429  
    1212
    1313<script>
     14function log(msg) {
     15    document.getElementById("console").innerHTML += (msg + "\n");
     16}
    1417
    1518function editingTest() {
     19
     20    if (window.layoutTestController)
     21        layoutTestController.dumpAsText();
     22    var elem = document.getElementById("test");
     23    var selection = window.getSelection();
     24    selection.setPosition(elem, 6);
     25
    1626    typeCharacterCommand('z');
    1727    typeCharacterCommand('z');
     
    2232    moveSelectionBackwardByWordCommand();
    2333    insertLineBreakCommand();
     34
     35    if (window.layoutTestController) {
     36        selection.setPosition(elem, 0);
     37        if (layoutTestController.hasSpellingMarker(6, 2))
     38           log("PASS");
     39        else
     40           log("FAIL");
     41        document.getElementById("root").style.display = "none";
     42    }
     43
    2444}
    2545
     
    3151<div>You should see 'zz a' on the first line below, and 'a' on the second line. 'zz' (and only 'zz') should be marked as misspelled.</div>
    3252<div contenteditable id="root" class="editing">
    33 <span id="test"></span>
     53<!-- wee need leading "Hello," to preserve the marker even after setPosition() -->
     54<span id="test">Hello,</span>
    3455</div>
    35 
     56<pre id="console"></pre>
    3657<script>
    37 runEditingTest();
     58editingTest();
    3859</script>
    3960
Note: See TracChangeset for help on using the changeset viewer.