Commit 40048a11 authored by bfulgham@webkit.org's avatar bfulgham@webkit.org

2009-06-19 Ryosuke Niwa <rniwa@google.com>

        Reviewed by Maciej Stachowiak.

        This fixs the bug 26361. The original test case did not invoke the event that
        triggered the actual test. This patch adds code to invoke this event, and also
        converts it from a pixel test to a dumpAsText test.




git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44882 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent ad21e38e
2009-06-19 Ryosuke Niwa <rniwa@google.com>
Reviewed by Maciej Stachowiak.
This fixs the bug 26361. The original test case did not invoke the event that
triggered the actual test. This patch adds code to invoke this event, and also
converts it from a pixel test to a dumpAsText test.
* editing/deleting/5156801-expected.txt: Added.
* editing/deleting/5156801.html:
* platform/mac/editing/deleting/5156801-expected.checksum: Removed.
* platform/mac/editing/deleting/5156801-expected.png: Removed.
* platform/mac/editing/deleting/5156801-expected.txt: Removed.
* platform/qt/editing/deleting/5156801-expected.txt: Removed.
2009-06-19 David Hyatt <hyatt@apple.com>
Reviewed by Anders Carlsson.
......
This tests for a bug where delete would crash if a node just after the selection to delete is removed in a DOMNodeRemoved event handler for the last node in the selection to delete.
foo
foo
PASS
<p>This tests for a bug where delete would crash if a node just after the selection to delete is removed in a DOMNodeRemoved event handler for the last node in the selection to delete.</p>
<div contenteditable="true">foo<span id="foo">x</span><span id="removeme">y</span></div>
<div id="div" contenteditable="true">foo<span id="foo">x</span><span id="removeme">y</span></div>
<p id="console"></p>
<script>
if (window.layoutTestController)
window.layoutTestController.dumpAsText();
function log(message) {
var console = document.getElementById("console");
var text = document.createTextNode(message);
console.appendChild(text);
}
function removeHandler() {
var removeme = document.getElementById("removeme");
removeme.parentNode.removeChild(removeme);
}
document.getElementById("foo").addEventListener("DOMNodeRemoved", removeHandler);
var sel = window.getSelection();
sel.setBaseAndExtent( document.getElementById('foo'), 0, document.getElementById('foo'), 1 );
document.execCommand("Delete");
log(document.getElementById('div').innerHTML);
</script>
PASS
ffba1820b212ecbb675c66b1bddb7d5a
\ 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 784x36
RenderText {#text} at (0,0) size 779x36
text run at (0,0) width 779: "This tests for a bug where delete would crash if a node just after the selection to delete is removed in a DOMNodeRemoved"
text run at (0,18) width 349: "event handler for the last node in the selection to delete."
RenderBlock {DIV} at (0,52) size 784x18
RenderText {#text} at (0,0) size 21x18
text run at (0,0) width 21: "foo"
RenderInline {SPAN} at (0,0) size 8x18
RenderText {#text} at (21,0) size 8x18
text run at (21,0) width 8: "x"
RenderInline {SPAN} at (0,0) size 8x18
RenderText {#text} at (29,0) size 8x18
text run at (29,0) width 8: "y"
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 784x38
RenderText {#text} at (0,0) size 782x38
text run at (0,0) width 782: "This tests for a bug where delete would crash if a node just after the selection to delete is removed in a DOMNodeRemoved"
text run at (0,19) width 356: "event handler for the last node in the selection to delete."
RenderBlock {DIV} at (0,52) size 784x19
RenderText {#text} at (0,0) size 20x19
text run at (0,0) width 20: "foo"
RenderInline {SPAN} at (0,0) size 7x19
RenderText {#text} at (20,0) size 7x19
text run at (20,0) width 7: "x"
RenderInline {SPAN} at (0,0) size 7x19
RenderText {#text} at (27,0) size 7x19
text run at (27,0) width 7: "y"
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