Changeset 55852 in webkit


Ignore:
Timestamp:
Mar 11, 2010 12:18:53 PM (14 years ago)
Author:
Martin Robinson
Message:

2010-03-11 Martin Robinson <Martin Robinson>

Reviewed by Adam Barth

Convert editing/selection/5136696.html to dumpAsText
https://bugs.webkit.org/show_bug.cgi?id=34306

  • editing/selection/5136696-expected.txt: Added.
  • editing/selection/5136696.html: Use dumpAsText now.
  • platform/gtk/Skipped: Unskip this test in GTK+ now that it has expected result.
  • platform/mac/editing/selection/5136696-expected.checksum: Removed.
  • platform/mac/editing/selection/5136696-expected.png: Removed.
  • platform/mac/editing/selection/5136696-expected.txt: Removed.
  • platform/qt/editing/selection/5136696-expected.txt: Removed.
  • platform/win/editing/selection/5136696-expected.txt: Removed.
Location:
trunk/LayoutTests
Files:
1 added
4 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r55848 r55852  
     12010-03-11  Martin Robinson  <mrobinson@webkit.org>
     2
     3        Reviewed by Adam Barth
     4
     5        Convert editing/selection/5136696.html to dumpAsText
     6        https://bugs.webkit.org/show_bug.cgi?id=34306
     7
     8        * editing/selection/5136696-expected.txt: Added.
     9        * editing/selection/5136696.html: Use dumpAsText now.
     10        * platform/gtk/Skipped: Unskip this test in GTK+ now that it has expected result.
     11        * platform/mac/editing/selection/5136696-expected.checksum: Removed.
     12        * platform/mac/editing/selection/5136696-expected.png: Removed.
     13        * platform/mac/editing/selection/5136696-expected.txt: Removed.
     14        * platform/qt/editing/selection/5136696-expected.txt: Removed.
     15        * platform/win/editing/selection/5136696-expected.txt: Removed.
     16
    1172010-03-11  Chris Fleizach  <cfleizach@apple.com>
    218
  • trunk/LayoutTests/editing/selection/5136696.html

    r49592 r55852  
    11<script>
    2 if (window.layoutTestController)
     2if (window.layoutTestController) {
     3    window.layoutTestController.dumpAsText();
    34    window.layoutTestController.waitUntilDone();
     5}
     6
     7function verifyResults(inputElement, selectedText) {
     8    if (document.activeElement != inputElement) {
     9        document.body.innerHTML = "FAIL (text field was not selected)";
     10        return;
     11    }
     12
     13    if (frames[0].getSelection().toString() != selectedText) {
     14        document.body.innerHTML = "FAIL (unexpected selection)";
     15        return;
     16    }
     17
     18    document.body.innerHTML = "PASS";
     19}
    420   
    521function runTest() {
     22    var textToSelect = "This text should be selected, but this frame shouldn't be focused.";
    623    frame = frames[0];
    724    frame.focus();
    825    s = frame.getSelection();
    926    s.setPosition(frame.document.body, 0);
    10     frame.document.execCommand("InsertText", false, "This test should be selected, but this frame shouldn't be focused.");
     27    frame.document.execCommand("InsertText", false, textToSelect);
    1128    frame.document.execCommand("SelectAll");
    12     document.getElementById("input").focus();
     29
     30    var inputElement = document.getElementById("input");
     31    inputElement.focus();
     32
     33    verifyResults(inputElement, textToSelect);
     34
    1335    if (window.layoutTestController)
    1436        window.layoutTestController.notifyDone();
    1537}
    1638</script>
    17 <p>This tests to make sure that a selection in one from isn't cleared when focusing a node in a different frame.</p>
     39<p>This tests to make sure that a selection in one frame isn't cleared when focusing a node in a different frame.</p>
    1840<iframe border="1" src="../resources/contenteditable-iframe-src.html" onload="runTest();"></iframe><br>
    1941<input type="text" id="input" value="This text field should be focused." size="30">
  • trunk/LayoutTests/platform/gtk/Skipped

    r55842 r55852  
    11261126editing/selection/4947387.html
    11271127editing/selection/4975120.html
    1128 editing/selection/5136696.html
    11291128editing/selection/5195166-1.html
    11301129editing/selection/5195166-2.html
Note: See TracChangeset for help on using the changeset viewer.