Commit f1f5270f authored by mrobinson@webkit.org's avatar mrobinson@webkit.org

2010-03-11 Martin Robinson <mrobinson@webkit.org>

        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.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55852 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 4c031abc
2010-03-11 Martin Robinson <mrobinson@webkit.org>
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.
2010-03-11 Chris Fleizach <cfleizach@apple.com>
Reviewed by Darin Adler.
......
<script>
if (window.layoutTestController)
if (window.layoutTestController) {
window.layoutTestController.dumpAsText();
window.layoutTestController.waitUntilDone();
}
function verifyResults(inputElement, selectedText) {
if (document.activeElement != inputElement) {
document.body.innerHTML = "FAIL (text field was not selected)";
return;
}
if (frames[0].getSelection().toString() != selectedText) {
document.body.innerHTML = "FAIL (unexpected selection)";
return;
}
document.body.innerHTML = "PASS";
}
function runTest() {
var textToSelect = "This text should be selected, but this frame shouldn't be focused.";
frame = frames[0];
frame.focus();
s = frame.getSelection();
s.setPosition(frame.document.body, 0);
frame.document.execCommand("InsertText", false, "This test should be selected, but this frame shouldn't be focused.");
frame.document.execCommand("InsertText", false, textToSelect);
frame.document.execCommand("SelectAll");
document.getElementById("input").focus();
var inputElement = document.getElementById("input");
inputElement.focus();
verifyResults(inputElement, textToSelect);
if (window.layoutTestController)
window.layoutTestController.notifyDone();
}
</script>
<p>This tests to make sure that a selection in one from isn't cleared when focusing a node in a different frame.</p>
<p>This tests to make sure that a selection in one frame isn't cleared when focusing a node in a different frame.</p>
<iframe border="1" src="../resources/contenteditable-iframe-src.html" onload="runTest();"></iframe><br>
<input type="text" id="input" value="This text field should be focused." size="30">
......@@ -1125,7 +1125,6 @@ editing/selection/4932260-2.html
editing/selection/4932260-3.html
editing/selection/4947387.html
editing/selection/4975120.html
editing/selection/5136696.html
editing/selection/5195166-1.html
editing/selection/5195166-2.html
editing/selection/5240265.html
......
100e84b4333b87e11059ac0fade616d0
\ No newline at end of file
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
layer at (0,0) size 800x600
RenderBlock {HTML} at (0,0) size 800x600
RenderBody {BODY} at (8,8) size 784x584
RenderBlock {P} at (0,0) size 784x18
RenderText {#text} at (0,0) size 666x18
text run at (0,0) width 666: "This tests to make sure that a selection in one from isn't cleared when focusing a node in a different frame."
RenderBlock (anonymous) at (0,34) size 784x177
RenderPartObject {IFRAME} at (0,0) size 304x154 [border: (2px inset #000000)]
layer at (0,0) size 300x150
RenderView at (0,0) size 300x150
layer at (0,0) size 300x150
RenderBlock {HTML} at (0,0) size 300x150
RenderBody {BODY} at (8,8) size 284x134 [bgcolor=#FFFFE0]
RenderText {#text} at (0,0) size 270x36
text run at (0,0) width 266: "This test should be selected, but this frame"
text run at (266,0) width 4: " "
text run at (0,18) width 133: "shouldn't be focused."
RenderText {#text} at (0,0) size 0x0
RenderBR {BR} at (304,154) size 0x0
RenderTextControl {INPUT} at (2,156) size 175x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
RenderText {#text} at (0,0) size 0x0
layer at (13,201) size 169x13 scrollWidth 183
RenderBlock {DIV} at (3,3) size 169x13
RenderText {#text} at (1,0) size 181x13
text run at (1,0) width 181: "This text field should be focused."
selection start: position 0 of child 0 {#text} of child 0 {DIV} of child 5 {INPUT} of child 1 {BODY} of child 0 {HTML} of document
selection end: position 34 of child 0 {#text} of child 0 {DIV} of child 5 {INPUT} of child 1 {BODY} of child 0 {HTML} of document
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
layer at (0,0) size 800x600
RenderBlock {HTML} at (0,0) size 800x600
RenderBody {BODY} at (8,8) size 784x584
RenderBlock {P} at (0,0) size 784x19
RenderText {#text} at (0,0) size 675x19
text run at (0,0) width 675: "This tests to make sure that a selection in one from isn't cleared when focusing a node in a different frame."
RenderBlock (anonymous) at (0,33) size 784x183
RenderPartObject {IFRAME} at (0,0) size 304x154 [border: (2px inset #000000)]
layer at (0,0) size 300x150
RenderView at (0,0) size 300x150
layer at (0,0) size 300x150
RenderBlock {HTML} at (0,0) size 300x150
RenderBody {BODY} at (8,8) size 284x134 [bgcolor=#FFFFE0]
RenderText {#text} at (0,0) size 276x38
text run at (0,0) width 276: "This test should be selected, but this frame "
text run at (0,19) width 135: "shouldn't be focused."
RenderBR {BR} at (304,154) size 0x0
RenderTextControl {INPUT} at (2,156) size 248x25 [border: (2px inset #000000)]
RenderText {#text} at (0,0) size 0x0
layer at (13,200) size 242x19
RenderBlock {DIV} at (3,3) size 242x19
RenderText {#text} at (1,0) size 208x19
text run at (1,0) width 208: "This text field should be focused."
selection start: position 0 of child 0 {#text} of child 0 {DIV} of child 5 {INPUT} of child 1 {BODY} of child 0 {HTML} of document
selection end: position 34 of child 0 {#text} of child 0 {DIV} of child 5 {INPUT} of child 1 {BODY} of child 0 {HTML} of document
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